The API Gateway Service is the interface for managing API Gateways. v1
Package
@google-cloud/api-gatewayConstructors
(constructor)(opts)
constructor(opts?: ClientOptions);
Construct an instance of ApiGatewayServiceClient.
Name | Description |
opts |
ClientOptions
|
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.
Name | Description |
project |
string
|
api |
string
|
apiConfig |
string
|
Type | Description |
string | {string} Resource name string. |
apiPath(project, api)
apiPath(project: string, api: string): string;
Return a fully-qualified api resource name string.
Name | Description |
project |
string
|
api |
string
|
Type | Description |
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()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
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. |
/**
* 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()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
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. |
/**
* 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()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
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. |
/**
* 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()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
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. |
/**
* 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()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
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. |
/**
* 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()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
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. |
/**
* 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()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
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. |
/**
* 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()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
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. |
/**
* 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()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
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. |
/**
* 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.
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.ICreateApiRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 |
/**
* 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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.ICreateApiConfigRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 |
/**
* 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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.ICreateGatewayRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 |
/**
* 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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IDeleteApiRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 |
/**
* 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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IDeleteApiConfigRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 |
/**
* 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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IDeleteGatewayRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 |
/**
* 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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
void |
gatewayPath(project, location, gateway)
gatewayPath(project: string, location: string, gateway: string): string;
Return a fully-qualified gateway resource name string.
Name | Description |
project |
string
|
location |
string
|
gateway |
string
|
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IGetApiRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 [Api]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* 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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IGetApiConfigRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 [ApiConfig]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* 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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IGetGatewayRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 [Gateway]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* 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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
void |
getProjectId()
getProjectId(): Promise<string>;
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Type | Description |
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.
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IListApiConfigsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 [ApiConfig]. 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 |
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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IListApiConfigsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 [ApiConfig]. 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. |
/**
* 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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IListApiConfigsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Transform | {Stream} An object stream which emits an object representing [ApiConfig] 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 |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IListApisRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 [Api]. 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 |
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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IListApisRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 [Api]. 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. |
/**
* 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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IListApisRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Transform | {Stream} An object stream which emits an object representing [Api] 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 |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IListGatewaysRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 [Gateway]. 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 |
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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IListGatewaysRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 [Gateway]. 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. |
/**
* 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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IListGatewaysRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Transform | {Stream} An object stream which emits an object representing [Gateway] 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 |
matchApiConfigFromApiConfigName(apiConfigName)
matchApiConfigFromApiConfigName(apiConfigName: string): string | number;
Parse the api_config from ApiConfig resource.
Name | Description |
apiConfigName |
string
A fully-qualified path representing ApiConfig resource. |
Type | Description |
string | number | {string} A string representing the api_config. |
matchApiFromApiConfigName(apiConfigName)
matchApiFromApiConfigName(apiConfigName: string): string | number;
Parse the api from ApiConfig resource.
Name | Description |
apiConfigName |
string
A fully-qualified path representing ApiConfig resource. |
Type | Description |
string | number | {string} A string representing the api. |
matchApiFromApiName(apiName)
matchApiFromApiName(apiName: string): string | number;
Parse the api from Api resource.
Name | Description |
apiName |
string
A fully-qualified path representing Api resource. |
Type | Description |
string | number | {string} A string representing the api. |
matchGatewayFromGatewayName(gatewayName)
matchGatewayFromGatewayName(gatewayName: string): string | number;
Parse the gateway from Gateway resource.
Name | Description |
gatewayName |
string
A fully-qualified path representing Gateway resource. |
Type | Description |
string | number | {string} A string representing the gateway. |
matchLocationFromGatewayName(gatewayName)
matchLocationFromGatewayName(gatewayName: string): string | number;
Parse the location from Gateway resource.
Name | Description |
gatewayName |
string
A fully-qualified path representing Gateway resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchProjectFromApiConfigName(apiConfigName)
matchProjectFromApiConfigName(apiConfigName: string): string | number;
Parse the project from ApiConfig resource.
Name | Description |
apiConfigName |
string
A fully-qualified path representing ApiConfig resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromApiName(apiName)
matchProjectFromApiName(apiName: string): string | number;
Parse the project from Api resource.
Name | Description |
apiName |
string
A fully-qualified path representing Api resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromGatewayName(gatewayName)
matchProjectFromGatewayName(gatewayName: string): string | number;
Parse the project from Gateway resource.
Name | Description |
gatewayName |
string
A fully-qualified path representing Gateway resource. |
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IUpdateApiRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 |
/**
* 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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IUpdateApiConfigRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 |
/**
* 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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
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.
Name | Description |
request |
protos.google.cloud.apigateway.v1.IUpdateGatewayRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
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 |
/**
* 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;
Name | Description |
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>
|
Type | Description |
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;
Name | Description |
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>
|
Type | Description |
void |