Class v1.ApiGatewayServiceClient (2.2.2)

The API Gateway Service is the interface for managing API Gateways. v1

Package

@google-cloud/api-gateway

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of ApiGatewayServiceClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof gax.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 ApiGatewayServiceClient({fallback: 'rest'}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

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

apiGatewayServiceStub

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

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

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

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

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

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

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

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

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

Methods

apiConfigPath(project, api, apiConfig)

apiConfigPath(project: string, api: string, apiConfig: string): string;

Return a fully-qualified apiConfig resource name string.

Parameters
NameDescription
project string
api string
apiConfig string
Returns
TypeDescription
string

{string} Resource name string.

apiPath(project, api)

apiPath(project: string, api: string): string;

Return a fully-qualified api resource name string.

Parameters
NameDescription
project string
api string
Returns
TypeDescription
string

{string} Resource name string.

checkCreateApiConfigProgress(name)

checkCreateApiConfigProgress(name: string): Promise<LROperation<protos.google.cloud.apigateway.v1.ApiConfig, protos.google.cloud.apigateway.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.apigateway.v1.ApiConfig, protos.google.cloud.apigateway.v1.OperationMetadata>>

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

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. Parent resource of the API Config, of the form:
   *  `projects/* /locations/global/apis/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. Identifier to assign to the API Config. Must be unique within scope of
   *  the parent resource.
   */
  // const apiConfigId = 'abc123'
  /**
   *  Required. API resource.
   */
  // const apiConfig = {}

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

  async function callCreateApiConfig() {
    // Construct request
    const request = {
      parent,
      apiConfigId,
      apiConfig,
    };

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

  callCreateApiConfig();

checkCreateApiProgress(name)

checkCreateApiProgress(name: string): Promise<LROperation<protos.google.cloud.apigateway.v1.Api, protos.google.cloud.apigateway.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.apigateway.v1.Api, protos.google.cloud.apigateway.v1.OperationMetadata>>

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

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. Parent resource of the API, of the form:
   *  `projects/* /locations/global`
   */
  // const parent = 'abc123'
  /**
   *  Required. Identifier to assign to the API. Must be unique within scope of
   *  the parent resource.
   */
  // const apiId = 'abc123'
  /**
   *  Required. API resource.
   */
  // const api = {}

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

  async function callCreateApi() {
    // Construct request
    const request = {
      parent,
      apiId,
      api,
    };

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

  callCreateApi();

checkCreateGatewayProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.apigateway.v1.Gateway, protos.google.cloud.apigateway.v1.OperationMetadata>>

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

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. Parent resource of the Gateway, of the form:
   *  `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. Identifier to assign to the Gateway. Must be unique within scope of
   *  the parent resource.
   */
  // const gatewayId = 'abc123'
  /**
   *  Required. Gateway resource.
   */
  // const gateway = {}

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

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

  callCreateGateway();

checkDeleteApiConfigProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.apigateway.v1.OperationMetadata>>

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

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. Resource name of the form:
   *  `projects/* /locations/global/apis/* /configs/*`
   */
  // const name = 'abc123'

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

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

  callDeleteApiConfig();

checkDeleteApiProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.apigateway.v1.OperationMetadata>>

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

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. Resource name of the form:
   *  `projects/* /locations/global/apis/*`
   */
  // const name = 'abc123'

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

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

  callDeleteApi();

checkDeleteGatewayProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.apigateway.v1.OperationMetadata>>

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

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. Resource name of the form:
   *  `projects/* /locations/* /gateways/*`
   */
  // const name = 'abc123'

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

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

  callDeleteGateway();

checkUpdateApiConfigProgress(name)

checkUpdateApiConfigProgress(name: string): Promise<LROperation<protos.google.cloud.apigateway.v1.ApiConfig, protos.google.cloud.apigateway.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.apigateway.v1.ApiConfig, protos.google.cloud.apigateway.v1.OperationMetadata>>

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

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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the
   *  ApiConfig 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. API Config resource.
   */
  // const apiConfig = {}

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

  async function callUpdateApiConfig() {
    // Construct request
    const request = {
      apiConfig,
    };

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

  callUpdateApiConfig();

checkUpdateApiProgress(name)

checkUpdateApiProgress(name: string): Promise<LROperation<protos.google.cloud.apigateway.v1.Api, protos.google.cloud.apigateway.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.apigateway.v1.Api, protos.google.cloud.apigateway.v1.OperationMetadata>>

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

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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the
   *  Api 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. API resource.
   */
  // const api = {}

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

  async function callUpdateApi() {
    // Construct request
    const request = {
      api,
    };

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

  callUpdateApi();

checkUpdateGatewayProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.apigateway.v1.Gateway, protos.google.cloud.apigateway.v1.OperationMetadata>>

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

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

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

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

  callUpdateGateway();

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.

createApi(request, options)

createApi(request?: protos.google.cloud.apigateway.v1.ICreateApiRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new Api in a given project and location.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.ICreateApiRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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. Parent resource of the API, of the form:
   *  `projects/* /locations/global`
   */
  // const parent = 'abc123'
  /**
   *  Required. Identifier to assign to the API. Must be unique within scope of
   *  the parent resource.
   */
  // const apiId = 'abc123'
  /**
   *  Required. API resource.
   */
  // const api = {}

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

  async function callCreateApi() {
    // Construct request
    const request = {
      parent,
      apiId,
      api,
    };

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

  callCreateApi();

createApi(request, options, callback)

createApi(request: protos.google.cloud.apigateway.v1.ICreateApiRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.ICreateApiRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createApi(request, callback)

createApi(request: protos.google.cloud.apigateway.v1.ICreateApiRequest, callback: Callback<LROperation<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.ICreateApiRequest
callback Callback<LROperation<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createApiConfig(request, options)

createApiConfig(request?: protos.google.cloud.apigateway.v1.ICreateApiConfigRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new ApiConfig in a given project and location.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.ICreateApiConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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. Parent resource of the API Config, of the form:
   *  `projects/* /locations/global/apis/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. Identifier to assign to the API Config. Must be unique within scope of
   *  the parent resource.
   */
  // const apiConfigId = 'abc123'
  /**
   *  Required. API resource.
   */
  // const apiConfig = {}

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

  async function callCreateApiConfig() {
    // Construct request
    const request = {
      parent,
      apiConfigId,
      apiConfig,
    };

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

  callCreateApiConfig();

createApiConfig(request, options, callback)

createApiConfig(request: protos.google.cloud.apigateway.v1.ICreateApiConfigRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.ICreateApiConfigRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createApiConfig(request, callback)

createApiConfig(request: protos.google.cloud.apigateway.v1.ICreateApiConfigRequest, callback: Callback<LROperation<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.ICreateApiConfigRequest
callback Callback<LROperation<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createGateway(request, options)

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

Creates a new Gateway in a given project and location.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.ICreateGatewayRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.apigateway.v1.IGateway, protos.google.cloud.apigateway.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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. Parent resource of the Gateway, of the form:
   *  `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Required. Identifier to assign to the Gateway. Must be unique within scope of
   *  the parent resource.
   */
  // const gatewayId = 'abc123'
  /**
   *  Required. Gateway resource.
   */
  // const gateway = {}

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

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

  callCreateGateway();

createGateway(request, options, callback)

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

createGateway(request, callback)

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

deleteApi(request, options)

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

Deletes a single Api.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IDeleteApiRequest

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.apigateway.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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. Resource name of the form:
   *  `projects/* /locations/global/apis/*`
   */
  // const name = 'abc123'

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

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

  callDeleteApi();

deleteApi(request, options, callback)

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

deleteApi(request, callback)

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

deleteApiConfig(request, options)

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

Deletes a single ApiConfig.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IDeleteApiConfigRequest

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.apigateway.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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. Resource name of the form:
   *  `projects/* /locations/global/apis/* /configs/*`
   */
  // const name = 'abc123'

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

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

  callDeleteApiConfig();

deleteApiConfig(request, options, callback)

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

deleteApiConfig(request, callback)

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

deleteGateway(request, options)

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

Deletes a single Gateway.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IDeleteGatewayRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.apigateway.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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. Resource name of the form:
   *  `projects/* /locations/* /gateways/*`
   */
  // const name = 'abc123'

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

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

  callDeleteGateway();

deleteGateway(request, options, callback)

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

deleteGateway(request, callback)

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

gatewayPath(project, location, gateway)

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

Return a fully-qualified gateway resource name string.

Parameters
NameDescription
project string
location string
gateway string
Returns
TypeDescription
string

{string} Resource name string.

getApi(request, options)

getApi(request?: protos.google.cloud.apigateway.v1.IGetApiRequest, options?: CallOptions): Promise<[
        protos.google.cloud.apigateway.v1.IApi,
        protos.google.cloud.apigateway.v1.IGetApiRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single Api.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IGetApiRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IGetApiRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Resource name of the form:
   *  `projects/* /locations/global/apis/*`
   */
  // const name = 'abc123'

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

    // Run request
    const response = await apigatewayClient.getApi(request);
    console.log(response);
  }

  callGetApi();

getApi(request, options, callback)

getApi(request: protos.google.cloud.apigateway.v1.IGetApiRequest, options: CallOptions, callback: Callback<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IGetApiRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IGetApiRequest
options CallOptions
callback Callback<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IGetApiRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getApi(request, callback)

getApi(request: protos.google.cloud.apigateway.v1.IGetApiRequest, callback: Callback<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IGetApiRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IGetApiRequest
callback Callback<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IGetApiRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getApiConfig(request, options)

getApiConfig(request?: protos.google.cloud.apigateway.v1.IGetApiConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.apigateway.v1.IApiConfig,
        protos.google.cloud.apigateway.v1.IGetApiConfigRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single ApiConfig.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IGetApiConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IGetApiConfigRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Resource name of the form:
   *  `projects/* /locations/global/apis/* /configs/*`
   */
  // const name = 'abc123'
  /**
   *  Specifies which fields of the API Config are returned in the response.
   *  Defaults to `BASIC` view.
   */
  // const view = {}

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

    // Run request
    const response = await apigatewayClient.getApiConfig(request);
    console.log(response);
  }

  callGetApiConfig();

getApiConfig(request, options, callback)

getApiConfig(request: protos.google.cloud.apigateway.v1.IGetApiConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IGetApiConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IGetApiConfigRequest
options CallOptions
callback Callback<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IGetApiConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getApiConfig(request, callback)

getApiConfig(request: protos.google.cloud.apigateway.v1.IGetApiConfigRequest, callback: Callback<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IGetApiConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IGetApiConfigRequest
callback Callback<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IGetApiConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getGateway(request, options)

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

Gets details of a single Gateway.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IGetGatewayRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.apigateway.v1.IGateway, protos.google.cloud.apigateway.v1.IGetGatewayRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Resource name of the form:
   *  `projects/* /locations/* /gateways/*`
   */
  // const name = 'abc123'

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

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

  callGetGateway();

getGateway(request, options, callback)

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

getGateway(request, callback)

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

getProjectId()

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

getProjectId(callback)

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

initialize()

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

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

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

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

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

listApiConfigs(request, options)

listApiConfigs(request?: protos.google.cloud.apigateway.v1.IListApiConfigsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.apigateway.v1.IApiConfig[],
        protos.google.cloud.apigateway.v1.IListApiConfigsRequest | null,
        protos.google.cloud.apigateway.v1.IListApiConfigsResponse
    ]>;

Lists ApiConfigs in a given project and location.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IListApiConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.apigateway.v1.IApiConfig[], protos.google.cloud.apigateway.v1.IListApiConfigsRequest | null, protos.google.cloud.apigateway.v1.IListApiConfigsResponse ]>

{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 listApiConfigsAsync() 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.

listApiConfigs(request, options, callback)

listApiConfigs(request: protos.google.cloud.apigateway.v1.IListApiConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.apigateway.v1.IListApiConfigsRequest, protos.google.cloud.apigateway.v1.IListApiConfigsResponse | null | undefined, protos.google.cloud.apigateway.v1.IApiConfig>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IListApiConfigsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.apigateway.v1.IListApiConfigsRequest, protos.google.cloud.apigateway.v1.IListApiConfigsResponse | null | undefined, protos.google.cloud.apigateway.v1.IApiConfig>
Returns
TypeDescription
void

listApiConfigs(request, callback)

listApiConfigs(request: protos.google.cloud.apigateway.v1.IListApiConfigsRequest, callback: PaginationCallback<protos.google.cloud.apigateway.v1.IListApiConfigsRequest, protos.google.cloud.apigateway.v1.IListApiConfigsResponse | null | undefined, protos.google.cloud.apigateway.v1.IApiConfig>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IListApiConfigsRequest
callback PaginationCallback<protos.google.cloud.apigateway.v1.IListApiConfigsRequest, protos.google.cloud.apigateway.v1.IListApiConfigsResponse | null | undefined, protos.google.cloud.apigateway.v1.IApiConfig>
Returns
TypeDescription
void

listApiConfigsAsync(request, options)

listApiConfigsAsync(request?: protos.google.cloud.apigateway.v1.IListApiConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.apigateway.v1.IApiConfig>;

Equivalent to listApiConfigs, 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.apigateway.v1.IListApiConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.apigateway.v1.IApiConfig>

{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 . 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

  /**
   * 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. Parent resource of the API Config, of the form:
   *  `projects/* /locations/global/apis/*`
   */
  // const parent = 'abc123'
  /**
   *  Page size.
   */
  // const pageSize = 1234
  /**
   *  Page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Filter.
   */
  // const filter = 'abc123'
  /**
   *  Order by parameters.
   */
  // const orderBy = 'abc123'

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

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

  callListApiConfigs();

listApiConfigsStream(request, options)

listApiConfigsStream(request?: protos.google.cloud.apigateway.v1.IListApiConfigsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IListApiConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listApiConfigsAsync() 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.

listApis(request, options)

listApis(request?: protos.google.cloud.apigateway.v1.IListApisRequest, options?: CallOptions): Promise<[
        protos.google.cloud.apigateway.v1.IApi[],
        protos.google.cloud.apigateway.v1.IListApisRequest | null,
        protos.google.cloud.apigateway.v1.IListApisResponse
    ]>;

Lists Apis in a given project and location.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IListApisRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.apigateway.v1.IApi[], protos.google.cloud.apigateway.v1.IListApisRequest | null, protos.google.cloud.apigateway.v1.IListApisResponse ]>

{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 listApisAsync() 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.

listApis(request, options, callback)

listApis(request: protos.google.cloud.apigateway.v1.IListApisRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.apigateway.v1.IListApisRequest, protos.google.cloud.apigateway.v1.IListApisResponse | null | undefined, protos.google.cloud.apigateway.v1.IApi>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IListApisRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.apigateway.v1.IListApisRequest, protos.google.cloud.apigateway.v1.IListApisResponse | null | undefined, protos.google.cloud.apigateway.v1.IApi>
Returns
TypeDescription
void

listApis(request, callback)

listApis(request: protos.google.cloud.apigateway.v1.IListApisRequest, callback: PaginationCallback<protos.google.cloud.apigateway.v1.IListApisRequest, protos.google.cloud.apigateway.v1.IListApisResponse | null | undefined, protos.google.cloud.apigateway.v1.IApi>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IListApisRequest
callback PaginationCallback<protos.google.cloud.apigateway.v1.IListApisRequest, protos.google.cloud.apigateway.v1.IListApisResponse | null | undefined, protos.google.cloud.apigateway.v1.IApi>
Returns
TypeDescription
void

listApisAsync(request, options)

listApisAsync(request?: protos.google.cloud.apigateway.v1.IListApisRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.apigateway.v1.IApi>;

Equivalent to listApis, 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.apigateway.v1.IListApisRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.apigateway.v1.IApi>

{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 . 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

  /**
   * 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. Parent resource of the API, of the form:
   *  `projects/* /locations/global`
   */
  // const parent = 'abc123'
  /**
   *  Page size.
   */
  // const pageSize = 1234
  /**
   *  Page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Filter.
   */
  // const filter = 'abc123'
  /**
   *  Order by parameters.
   */
  // const orderBy = 'abc123'

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

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

  callListApis();

listApisStream(request, options)

listApisStream(request?: protos.google.cloud.apigateway.v1.IListApisRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IListApisRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listApisAsync() 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.

listGateways(request, options)

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

Lists Gateways in a given project and location.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IListGatewaysRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listGatewaysAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listGateways(request, options, callback)

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

listGateways(request, callback)

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

listGatewaysAsync(request, options)

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

Equivalent to listGateways, but returns an iterable object.

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

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IListGatewaysRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

{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 . 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

  /**
   * 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. Parent resource of the Gateway, of the form:
   *  `projects/* /locations/*`
   */
  // const parent = 'abc123'
  /**
   *  Page size.
   */
  // const pageSize = 1234
  /**
   *  Page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Filter.
   */
  // const filter = 'abc123'
  /**
   *  Order by parameters.
   */
  // const orderBy = 'abc123'

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

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

  callListGateways();

listGatewaysStream(request, options)

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

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

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IListGatewaysRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listGatewaysAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

matchApiConfigFromApiConfigName(apiConfigName)

matchApiConfigFromApiConfigName(apiConfigName: string): string | number;

Parse the api_config from ApiConfig resource.

Parameter
NameDescription
apiConfigName string

A fully-qualified path representing ApiConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the api_config.

matchApiFromApiConfigName(apiConfigName)

matchApiFromApiConfigName(apiConfigName: string): string | number;

Parse the api from ApiConfig resource.

Parameter
NameDescription
apiConfigName string

A fully-qualified path representing ApiConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the api.

matchApiFromApiName(apiName)

matchApiFromApiName(apiName: string): string | number;

Parse the api from Api resource.

Parameter
NameDescription
apiName string

A fully-qualified path representing Api resource.

Returns
TypeDescription
string | number

{string} A string representing the api.

matchGatewayFromGatewayName(gatewayName)

matchGatewayFromGatewayName(gatewayName: string): string | number;

Parse the gateway from Gateway resource.

Parameter
NameDescription
gatewayName string

A fully-qualified path representing Gateway resource.

Returns
TypeDescription
string | number

{string} A string representing the gateway.

matchLocationFromGatewayName(gatewayName)

matchLocationFromGatewayName(gatewayName: string): string | number;

Parse the location from Gateway resource.

Parameter
NameDescription
gatewayName string

A fully-qualified path representing Gateway resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromApiConfigName(apiConfigName)

matchProjectFromApiConfigName(apiConfigName: string): string | number;

Parse the project from ApiConfig resource.

Parameter
NameDescription
apiConfigName string

A fully-qualified path representing ApiConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromApiName(apiName)

matchProjectFromApiName(apiName: string): string | number;

Parse the project from Api resource.

Parameter
NameDescription
apiName string

A fully-qualified path representing Api resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromGatewayName(gatewayName)

matchProjectFromGatewayName(gatewayName: string): string | number;

Parse the project from Gateway resource.

Parameter
NameDescription
gatewayName string

A fully-qualified path representing Gateway resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

updateApi(request, options)

updateApi(request?: protos.google.cloud.apigateway.v1.IUpdateApiRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single Api.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IUpdateApiRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the
   *  Api 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. API resource.
   */
  // const api = {}

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

  async function callUpdateApi() {
    // Construct request
    const request = {
      api,
    };

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

  callUpdateApi();

updateApi(request, options, callback)

updateApi(request: protos.google.cloud.apigateway.v1.IUpdateApiRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IUpdateApiRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateApi(request, callback)

updateApi(request: protos.google.cloud.apigateway.v1.IUpdateApiRequest, callback: Callback<LROperation<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IUpdateApiRequest
callback Callback<LROperation<protos.google.cloud.apigateway.v1.IApi, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateApiConfig(request, options)

updateApiConfig(request?: protos.google.cloud.apigateway.v1.IUpdateApiConfigRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single ApiConfig.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IUpdateApiConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the
   *  ApiConfig 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. API Config resource.
   */
  // const apiConfig = {}

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

  async function callUpdateApiConfig() {
    // Construct request
    const request = {
      apiConfig,
    };

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

  callUpdateApiConfig();

updateApiConfig(request, options, callback)

updateApiConfig(request: protos.google.cloud.apigateway.v1.IUpdateApiConfigRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IUpdateApiConfigRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateApiConfig(request, callback)

updateApiConfig(request: protos.google.cloud.apigateway.v1.IUpdateApiConfigRequest, callback: Callback<LROperation<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IUpdateApiConfigRequest
callback Callback<LROperation<protos.google.cloud.apigateway.v1.IApiConfig, protos.google.cloud.apigateway.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateGateway(request, options)

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

Updates the parameters of a single Gateway.

Parameters
NameDescription
request protos.google.cloud.apigateway.v1.IUpdateGatewayRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.apigateway.v1.IGateway, protos.google.cloud.apigateway.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the
   *  Gateway resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Gateway resource.
   */
  // const gateway = {}

  // Imports the Apigateway library
  const {ApiGatewayServiceClient} = require('@google-cloud/api-gateway').v1;

  // Instantiates a client
  const apigatewayClient = new ApiGatewayServiceClient();

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

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

  callUpdateGateway();

updateGateway(request, options, callback)

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

updateGateway(request, callback)

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