Class v1beta1.NetworkSecurityClient (0.3.0)

Network Security API provides resources to configure authentication and authorization policies. Refer to per API resource documentation for more information. v1beta1

Package

@google-cloud/network-security

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of NetworkSecurityClient.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

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

networkSecurityStub

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

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

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

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

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

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

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

Methods

authorizationPolicyPath(project, location, authorizationPolicy)

authorizationPolicyPath(project: string, location: string, authorizationPolicy: string): string;

Return a fully-qualified authorizationPolicy resource name string.

Parameters
NameDescription
project string
location string
authorizationPolicy string
Returns
TypeDescription
string

{string} Resource name string.

checkCreateAuthorizationPolicyProgress(name)

checkCreateAuthorizationPolicyProgress(name: string): Promise<LROperation<protos.google.cloud.networksecurity.v1beta1.AuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networksecurity.v1beta1.AuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource of the AuthorizationPolicy. Must be in the
   *  format `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the AuthorizationPolicy resource to be created.
   *  This value should be 1-63 characters long, containing only
   *  letters, numbers, hyphens, and underscores, and should not start
   *  with a number. E.g. "authz_policy".
   */
  // const authorizationPolicyId = 'abc123'
  /**
   *  Required. AuthorizationPolicy resource to be created.
   */
  // const authorizationPolicy = {}

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

  async function callCreateAuthorizationPolicy() {
    // Construct request
    const request = {
      parent,
      authorizationPolicyId,
      authorizationPolicy,
    };

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

  callCreateAuthorizationPolicy();

checkCreateClientTlsPolicyProgress(name)

checkCreateClientTlsPolicyProgress(name: string): Promise<LROperation<protos.google.cloud.networksecurity.v1beta1.ClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networksecurity.v1beta1.ClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource of the ClientTlsPolicy. Must be in
   *  the format `projects/* /locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the ClientTlsPolicy resource to be created. This value should
   *  be 1-63 characters long, containing only letters, numbers, hyphens, and
   *  underscores, and should not start with a number. E.g. "client_mtls_policy".
   */
  // const clientTlsPolicyId = 'abc123'
  /**
   *  Required. ClientTlsPolicy resource to be created.
   */
  // const clientTlsPolicy = {}

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

  async function callCreateClientTlsPolicy() {
    // Construct request
    const request = {
      parent,
      clientTlsPolicyId,
      clientTlsPolicy,
    };

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

  callCreateClientTlsPolicy();

checkCreateServerTlsPolicyProgress(name)

checkCreateServerTlsPolicyProgress(name: string): Promise<LROperation<protos.google.cloud.networksecurity.v1beta1.ServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networksecurity.v1beta1.ServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource of the ServerTlsPolicy. Must be in
   *  the format `projects/* /locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the ServerTlsPolicy resource to be created. This value should
   *  be 1-63 characters long, containing only letters, numbers, hyphens, and
   *  underscores, and should not start with a number. E.g. "server_mtls_policy".
   */
  // const serverTlsPolicyId = 'abc123'
  /**
   *  Required. ServerTlsPolicy resource to be created.
   */
  // const serverTlsPolicy = {}

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

  async function callCreateServerTlsPolicy() {
    // Construct request
    const request = {
      parent,
      serverTlsPolicyId,
      serverTlsPolicy,
    };

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

  callCreateServerTlsPolicy();

checkDeleteAuthorizationPolicyProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. A name of the AuthorizationPolicy to delete. Must be in the format
   *  `projects/{project}/locations/{location}/authorizationPolicies/*`.
   */
  // const name = 'abc123'

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

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

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

  callDeleteAuthorizationPolicy();

checkDeleteClientTlsPolicyProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. A name of the ClientTlsPolicy to delete. Must be in
   *  the format `projects/* /locations/{location}/clientTlsPolicies/*`.
   */
  // const name = 'abc123'

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

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

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

  callDeleteClientTlsPolicy();

checkDeleteServerTlsPolicyProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. A name of the ServerTlsPolicy to delete. Must be in
   *  the format `projects/* /locations/{location}/serverTlsPolicies/*`.
   */
  // const name = 'abc123'

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

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

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

  callDeleteServerTlsPolicy();

checkUpdateAuthorizationPolicyProgress(name)

checkUpdateAuthorizationPolicyProgress(name: string): Promise<LROperation<protos.google.cloud.networksecurity.v1beta1.AuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networksecurity.v1beta1.AuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  AuthorizationPolicy resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated AuthorizationPolicy resource.
   */
  // const authorizationPolicy = {}

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

  async function callUpdateAuthorizationPolicy() {
    // Construct request
    const request = {
      authorizationPolicy,
    };

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

  callUpdateAuthorizationPolicy();

checkUpdateClientTlsPolicyProgress(name)

checkUpdateClientTlsPolicyProgress(name: string): Promise<LROperation<protos.google.cloud.networksecurity.v1beta1.ClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networksecurity.v1beta1.ClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  ClientTlsPolicy resource by the update.  The fields
   *  specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the
   *  mask. If the user does not provide a mask then all fields will be
   *  overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated ClientTlsPolicy resource.
   */
  // const clientTlsPolicy = {}

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

  async function callUpdateClientTlsPolicy() {
    // Construct request
    const request = {
      clientTlsPolicy,
    };

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

  callUpdateClientTlsPolicy();

checkUpdateServerTlsPolicyProgress(name)

checkUpdateServerTlsPolicyProgress(name: string): Promise<LROperation<protos.google.cloud.networksecurity.v1beta1.ServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.networksecurity.v1beta1.ServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  ServerTlsPolicy resource by the update.  The fields
   *  specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the
   *  mask. If the user does not provide a mask then all fields will be
   *  overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated ServerTlsPolicy resource.
   */
  // const serverTlsPolicy = {}

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

  async function callUpdateServerTlsPolicy() {
    // Construct request
    const request = {
      serverTlsPolicy,
    };

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

  callUpdateServerTlsPolicy();

clientTlsPolicyPath(project, location, clientTlsPolicy)

clientTlsPolicyPath(project: string, location: string, clientTlsPolicy: string): string;

Return a fully-qualified clientTlsPolicy resource name string.

Parameters
NameDescription
project string
location string
clientTlsPolicy string
Returns
TypeDescription
string

{string} Resource name string.

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

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

Returns
TypeDescription
Promise<void>

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

createAuthorizationPolicy(request, options)

createAuthorizationPolicy(request?: protos.google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new AuthorizationPolicy in a given project and location.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource of the AuthorizationPolicy. Must be in the
   *  format `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the AuthorizationPolicy resource to be created.
   *  This value should be 1-63 characters long, containing only
   *  letters, numbers, hyphens, and underscores, and should not start
   *  with a number. E.g. "authz_policy".
   */
  // const authorizationPolicyId = 'abc123'
  /**
   *  Required. AuthorizationPolicy resource to be created.
   */
  // const authorizationPolicy = {}

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

  async function callCreateAuthorizationPolicy() {
    // Construct request
    const request = {
      parent,
      authorizationPolicyId,
      authorizationPolicy,
    };

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

  callCreateAuthorizationPolicy();

createAuthorizationPolicy(request, options, callback)

createAuthorizationPolicy(request: protos.google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createAuthorizationPolicy(request, callback)

createAuthorizationPolicy(request: protos.google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest, callback: Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest
callback Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createClientTlsPolicy(request, options)

createClientTlsPolicy(request?: protos.google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new ClientTlsPolicy in a given project and location.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource of the ClientTlsPolicy. Must be in
   *  the format `projects/* /locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the ClientTlsPolicy resource to be created. This value should
   *  be 1-63 characters long, containing only letters, numbers, hyphens, and
   *  underscores, and should not start with a number. E.g. "client_mtls_policy".
   */
  // const clientTlsPolicyId = 'abc123'
  /**
   *  Required. ClientTlsPolicy resource to be created.
   */
  // const clientTlsPolicy = {}

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

  async function callCreateClientTlsPolicy() {
    // Construct request
    const request = {
      parent,
      clientTlsPolicyId,
      clientTlsPolicy,
    };

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

  callCreateClientTlsPolicy();

createClientTlsPolicy(request, options, callback)

createClientTlsPolicy(request: protos.google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createClientTlsPolicy(request, callback)

createClientTlsPolicy(request: protos.google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest, callback: Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest
callback Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createServerTlsPolicy(request, options)

createServerTlsPolicy(request?: protos.google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new ServerTlsPolicy in a given project and location.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource of the ServerTlsPolicy. Must be in
   *  the format `projects/* /locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Short name of the ServerTlsPolicy resource to be created. This value should
   *  be 1-63 characters long, containing only letters, numbers, hyphens, and
   *  underscores, and should not start with a number. E.g. "server_mtls_policy".
   */
  // const serverTlsPolicyId = 'abc123'
  /**
   *  Required. ServerTlsPolicy resource to be created.
   */
  // const serverTlsPolicy = {}

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

  async function callCreateServerTlsPolicy() {
    // Construct request
    const request = {
      parent,
      serverTlsPolicyId,
      serverTlsPolicy,
    };

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

  callCreateServerTlsPolicy();

createServerTlsPolicy(request, options, callback)

createServerTlsPolicy(request: protos.google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createServerTlsPolicy(request, callback)

createServerTlsPolicy(request: protos.google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest, callback: Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest
callback Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteAuthorizationPolicy(request, options)

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

Deletes a single AuthorizationPolicy.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IDeleteAuthorizationPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. A name of the AuthorizationPolicy to delete. Must be in the format
   *  `projects/{project}/locations/{location}/authorizationPolicies/*`.
   */
  // const name = 'abc123'

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

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

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

  callDeleteAuthorizationPolicy();

deleteAuthorizationPolicy(request, options, callback)

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

deleteAuthorizationPolicy(request, callback)

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

deleteClientTlsPolicy(request, options)

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

Deletes a single ClientTlsPolicy.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IDeleteClientTlsPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. A name of the ClientTlsPolicy to delete. Must be in
   *  the format `projects/* /locations/{location}/clientTlsPolicies/*`.
   */
  // const name = 'abc123'

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

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

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

  callDeleteClientTlsPolicy();

deleteClientTlsPolicy(request, options, callback)

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

deleteClientTlsPolicy(request, callback)

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

deleteServerTlsPolicy(request, options)

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

Deletes a single ServerTlsPolicy.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IDeleteServerTlsPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. A name of the ServerTlsPolicy to delete. Must be in
   *  the format `projects/* /locations/{location}/serverTlsPolicies/*`.
   */
  // const name = 'abc123'

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

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

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

  callDeleteServerTlsPolicy();

deleteServerTlsPolicy(request, options, callback)

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

deleteServerTlsPolicy(request, callback)

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

getAuthorizationPolicy(request, options)

getAuthorizationPolicy(request?: protos.google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy,
        (protos.google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest | undefined),
        {} | undefined
    ]>;

Gets details of a single AuthorizationPolicy.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, (protos.google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [AuthorizationPolicy]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. A name of the AuthorizationPolicy to get. Must be in the format
   *  `projects/{project}/locations/{location}/authorizationPolicies/*`.
   */
  // const name = 'abc123'

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

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

    // Run request
    const response = await networksecurityClient.getAuthorizationPolicy(request);
    console.log(response);
  }

  callGetAuthorizationPolicy();

getAuthorizationPolicy(request, options, callback)

getAuthorizationPolicy(request: protos.google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest
options CallOptions
callback Callback<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getAuthorizationPolicy(request, callback)

getAuthorizationPolicy(request: protos.google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest, callback: Callback<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest
callback Callback<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getClientTlsPolicy(request, options)

getClientTlsPolicy(request?: protos.google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy,
        (protos.google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest | undefined),
        {} | undefined
    ]>;

Gets details of a single ClientTlsPolicy.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, (protos.google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [ClientTlsPolicy]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. A name of the ClientTlsPolicy to get. Must be in the format
   *  `projects/* /locations/{location}/clientTlsPolicies/*`.
   */
  // const name = 'abc123'

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

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

    // Run request
    const response = await networksecurityClient.getClientTlsPolicy(request);
    console.log(response);
  }

  callGetClientTlsPolicy();

getClientTlsPolicy(request, options, callback)

getClientTlsPolicy(request: protos.google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest
options CallOptions
callback Callback<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getClientTlsPolicy(request, callback)

getClientTlsPolicy(request: protos.google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest, callback: Callback<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest
callback Callback<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

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

getProjectId(callback)

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

getServerTlsPolicy(request, options)

getServerTlsPolicy(request?: protos.google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy,
        (protos.google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest | undefined),
        {} | undefined
    ]>;

Gets details of a single ServerTlsPolicy.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, (protos.google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [ServerTlsPolicy]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. A name of the ServerTlsPolicy to get. Must be in the format
   *  `projects/* /locations/{location}/serverTlsPolicies/*`.
   */
  // const name = 'abc123'

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

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

    // Run request
    const response = await networksecurityClient.getServerTlsPolicy(request);
    console.log(response);
  }

  callGetServerTlsPolicy();

getServerTlsPolicy(request, options, callback)

getServerTlsPolicy(request: protos.google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest
options CallOptions
callback Callback<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getServerTlsPolicy(request, callback)

getServerTlsPolicy(request: protos.google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest, callback: Callback<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest
callback Callback<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

initialize()

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

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

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

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

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

listAuthorizationPolicies(request, options)

listAuthorizationPolicies(request?: protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy[],
        protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest | null,
        protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesResponse
    ]>;

Lists AuthorizationPolicies in a given project and location.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy[], protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest | null, protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [AuthorizationPolicy]. 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 listAuthorizationPoliciesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listAuthorizationPolicies(request, options, callback)

listAuthorizationPolicies(request: protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest, protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesResponse | null | undefined, protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest, protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesResponse | null | undefined, protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy>
Returns
TypeDescription
void

listAuthorizationPolicies(request, callback)

listAuthorizationPolicies(request: protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest, callback: PaginationCallback<protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest, protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesResponse | null | undefined, protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest
callback PaginationCallback<protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest, protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesResponse | null | undefined, protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy>
Returns
TypeDescription
void

listAuthorizationPoliciesAsync(request, options)

listAuthorizationPoliciesAsync(request?: protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy>;

Equivalent to listAuthorizationPolicies, but returns an iterable object.

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

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [AuthorizationPolicy]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The project and location from which the AuthorizationPolicies
   *  should be listed, specified in the format
   *  `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of AuthorizationPolicies to return per call.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last
   *  `ListAuthorizationPoliciesResponse` Indicates that this is a
   *  continuation of a prior `ListAuthorizationPolicies` call, and
   *  that the system should return the next page of data.
   */
  // const pageToken = 'abc123'

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

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

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

  callListAuthorizationPolicies();

listAuthorizationPoliciesStream(request, options)

listAuthorizationPoliciesStream(request?: protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [AuthorizationPolicy] 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 listAuthorizationPoliciesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listClientTlsPolicies(request, options)

listClientTlsPolicies(request?: protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy[],
        protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest | null,
        protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesResponse
    ]>;

Lists ClientTlsPolicies in a given project and location.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy[], protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest | null, protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [ClientTlsPolicy]. 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 listClientTlsPoliciesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listClientTlsPolicies(request, options, callback)

listClientTlsPolicies(request: protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest, protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesResponse | null | undefined, protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest, protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesResponse | null | undefined, protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy>
Returns
TypeDescription
void

listClientTlsPolicies(request, callback)

listClientTlsPolicies(request: protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest, callback: PaginationCallback<protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest, protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesResponse | null | undefined, protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest
callback PaginationCallback<protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest, protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesResponse | null | undefined, protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy>
Returns
TypeDescription
void

listClientTlsPoliciesAsync(request, options)

listClientTlsPoliciesAsync(request?: protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy>;

Equivalent to listClientTlsPolicies, but returns an iterable object.

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

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [ClientTlsPolicy]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The project and location from which the ClientTlsPolicies should
   *  be listed, specified in the format `projects/* /locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of ClientTlsPolicies to return per call.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last `ListClientTlsPoliciesResponse`
   *  Indicates that this is a continuation of a prior
   *  `ListClientTlsPolicies` call, and that the system
   *  should return the next page of data.
   */
  // const pageToken = 'abc123'

  // Imports the Networksecurity library
  const {NetworkSecurityClient} =
    require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

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

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

  listClientTlsPolicies();

listClientTlsPoliciesStream(request, options)

listClientTlsPoliciesStream(request?: protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [ClientTlsPolicy] 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 listClientTlsPoliciesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listServerTlsPolicies(request, options)

listServerTlsPolicies(request?: protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy[],
        protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest | null,
        protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesResponse
    ]>;

Lists ServerTlsPolicies in a given project and location.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy[], protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest | null, protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [ServerTlsPolicy]. 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 listServerTlsPoliciesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listServerTlsPolicies(request, options, callback)

listServerTlsPolicies(request: protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest, protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesResponse | null | undefined, protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest, protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesResponse | null | undefined, protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy>
Returns
TypeDescription
void

listServerTlsPolicies(request, callback)

listServerTlsPolicies(request: protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest, callback: PaginationCallback<protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest, protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesResponse | null | undefined, protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest
callback PaginationCallback<protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest, protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesResponse | null | undefined, protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy>
Returns
TypeDescription
void

listServerTlsPoliciesAsync(request, options)

listServerTlsPoliciesAsync(request?: protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy>;

Equivalent to listServerTlsPolicies, but returns an iterable object.

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

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [ServerTlsPolicy]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The project and location from which the ServerTlsPolicies should
   *  be listed, specified in the format `projects/* /locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of ServerTlsPolicies to return per call.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last `ListServerTlsPoliciesResponse`
   *  Indicates that this is a continuation of a prior
   *  `ListServerTlsPolicies` call, and that the system
   *  should return the next page of data.
   */
  // const pageToken = 'abc123'

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

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

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

  callListServerTlsPolicies();

listServerTlsPoliciesStream(request, options)

listServerTlsPoliciesStream(request?: protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [ServerTlsPolicy] 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 listServerTlsPoliciesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

matchAuthorizationPolicyFromAuthorizationPolicyName(authorizationPolicyName)

matchAuthorizationPolicyFromAuthorizationPolicyName(authorizationPolicyName: string): string | number;

Parse the authorization_policy from AuthorizationPolicy resource.

Parameter
NameDescription
authorizationPolicyName string

A fully-qualified path representing AuthorizationPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the authorization_policy.

matchClientTlsPolicyFromClientTlsPolicyName(clientTlsPolicyName)

matchClientTlsPolicyFromClientTlsPolicyName(clientTlsPolicyName: string): string | number;

Parse the client_tls_policy from ClientTlsPolicy resource.

Parameter
NameDescription
clientTlsPolicyName string

A fully-qualified path representing ClientTlsPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the client_tls_policy.

matchLocationFromAuthorizationPolicyName(authorizationPolicyName)

matchLocationFromAuthorizationPolicyName(authorizationPolicyName: string): string | number;

Parse the location from AuthorizationPolicy resource.

Parameter
NameDescription
authorizationPolicyName string

A fully-qualified path representing AuthorizationPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromClientTlsPolicyName(clientTlsPolicyName)

matchLocationFromClientTlsPolicyName(clientTlsPolicyName: string): string | number;

Parse the location from ClientTlsPolicy resource.

Parameter
NameDescription
clientTlsPolicyName string

A fully-qualified path representing ClientTlsPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromServerTlsPolicyName(serverTlsPolicyName)

matchLocationFromServerTlsPolicyName(serverTlsPolicyName: string): string | number;

Parse the location from ServerTlsPolicy resource.

Parameter
NameDescription
serverTlsPolicyName string

A fully-qualified path representing ServerTlsPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromAuthorizationPolicyName(authorizationPolicyName)

matchProjectFromAuthorizationPolicyName(authorizationPolicyName: string): string | number;

Parse the project from AuthorizationPolicy resource.

Parameter
NameDescription
authorizationPolicyName string

A fully-qualified path representing AuthorizationPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromClientTlsPolicyName(clientTlsPolicyName)

matchProjectFromClientTlsPolicyName(clientTlsPolicyName: string): string | number;

Parse the project from ClientTlsPolicy resource.

Parameter
NameDescription
clientTlsPolicyName string

A fully-qualified path representing ClientTlsPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromServerTlsPolicyName(serverTlsPolicyName)

matchProjectFromServerTlsPolicyName(serverTlsPolicyName: string): string | number;

Parse the project from ServerTlsPolicy resource.

Parameter
NameDescription
serverTlsPolicyName string

A fully-qualified path representing ServerTlsPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchServerTlsPolicyFromServerTlsPolicyName(serverTlsPolicyName)

matchServerTlsPolicyFromServerTlsPolicyName(serverTlsPolicyName: string): string | number;

Parse the server_tls_policy from ServerTlsPolicy resource.

Parameter
NameDescription
serverTlsPolicyName string

A fully-qualified path representing ServerTlsPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the server_tls_policy.

serverTlsPolicyPath(project, location, serverTlsPolicy)

serverTlsPolicyPath(project: string, location: string, serverTlsPolicy: string): string;

Return a fully-qualified serverTlsPolicy resource name string.

Parameters
NameDescription
project string
location string
serverTlsPolicy string
Returns
TypeDescription
string

{string} Resource name string.

updateAuthorizationPolicy(request, options)

updateAuthorizationPolicy(request?: protos.google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single AuthorizationPolicy.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  AuthorizationPolicy resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated AuthorizationPolicy resource.
   */
  // const authorizationPolicy = {}

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

  async function callUpdateAuthorizationPolicy() {
    // Construct request
    const request = {
      authorizationPolicy,
    };

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

  callUpdateAuthorizationPolicy();

updateAuthorizationPolicy(request, options, callback)

updateAuthorizationPolicy(request: protos.google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateAuthorizationPolicy(request, callback)

updateAuthorizationPolicy(request: protos.google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest, callback: Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest
callback Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IAuthorizationPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateClientTlsPolicy(request, options)

updateClientTlsPolicy(request?: protos.google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single ClientTlsPolicy.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  ClientTlsPolicy resource by the update.  The fields
   *  specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the
   *  mask. If the user does not provide a mask then all fields will be
   *  overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated ClientTlsPolicy resource.
   */
  // const clientTlsPolicy = {}

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

  async function callUpdateClientTlsPolicy() {
    // Construct request
    const request = {
      clientTlsPolicy,
    };

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

  callUpdateClientTlsPolicy();

updateClientTlsPolicy(request, options, callback)

updateClientTlsPolicy(request: protos.google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateClientTlsPolicy(request, callback)

updateClientTlsPolicy(request: protos.google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest, callback: Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest
callback Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IClientTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateServerTlsPolicy(request, options)

updateServerTlsPolicy(request?: protos.google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single ServerTlsPolicy.

Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  ServerTlsPolicy resource by the update.  The fields
   *  specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the
   *  mask. If the user does not provide a mask then all fields will be
   *  overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Updated ServerTlsPolicy resource.
   */
  // const serverTlsPolicy = {}

  // Imports the Networksecurity library
  const {NetworkSecurityClient} = require('@google-cloud/network-security').v1beta1;

  // Instantiates a client
  const networksecurityClient = new NetworkSecurityClient();

  async function callUpdateServerTlsPolicy() {
    // Construct request
    const request = {
      serverTlsPolicy,
    };

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

  callUpdateServerTlsPolicy();

updateServerTlsPolicy(request, options, callback)

updateServerTlsPolicy(request: protos.google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateServerTlsPolicy(request, callback)

updateServerTlsPolicy(request: protos.google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest, callback: Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest
callback Callback<LROperation<protos.google.cloud.networksecurity.v1beta1.IServerTlsPolicy, protos.google.cloud.networksecurity.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void