Skip to main content

List

Retrieves the list of API gateways in the specified folder.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const ListApiGatewayRequest =
cloudApi.serverless.apigateway_apigateway_service.ListApiGatewayRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ApiGatewayServiceClient);

const result = await client.list(
ListApiGatewayRequest.fromPartial({
folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter"
})
);
console.log(result);
})();

ListApiGatewayRequest​

folderId : string​

ID of the folder to list API gateways in.

To get a folder ID make a yandex.cloud.resourcemanager.v1.FolderService.List request.

pageSize : int64​

The maximum number of results per page to return. If the number of available results is larger than pageSize, the service returns a ListApiGatewayResponse.next_page_token that can be used to get the next page of results in subsequent list requests.

Default value: 100.

pageToken : string​

Page token. To get the next page of results, set pageToken to the ListApiGatewayResponse.next_page_token returned by a previous list request.

filter : string​

A filter expression that filters functions listed in the response.

The expression must specify:

  1. The field name. Currently filtering can only be applied to the ApiGateway.name field.
  2. An = operator.
  3. The value in double quotes ("). Must be 3-63 characters long and match the regular expression [a-z]([-a-z0-9]{0,61}[a-z0-9])?. Example of a filter: name=my-apigw.

ListApiGatewayResponse​

apiGateways : ApiGateway​

List of API gateways in the specified folder.

nextPageToken : string​

Token for getting the next page of the list. If the number of results is greater than the specified ListApiGatewayRequest.page_size, use nextPageToken as the value for the ListApiGatewayRequest.page_token parameter in the next list request.

Each subsequent page will have its own nextPageToken to continue paging through the results.

ApiGateway​

Status​
  • STATUS_UNSPECIFIED

  • CREATING

    API gateway is being created.

  • ACTIVE

    API gateway is ready for use.

  • DELETING

    API gateway is being deleted.

  • ERROR

    API gateway failed. The only allowed action is delete.

  • UPDATING

    API gateway is being updated.

id : string​

ID of the API gateway. Generated at creation time.

folderId : string​

ID of the folder that the API gateway belongs to.

createdAt : google.protobuf.Timestamp​

Creation timestamp for the API-gateway.

name : string​

Name of the API gateway. The name is unique within the folder.

description : string​

Description of the API gateway.

labels : string​

API gateway labels as key:value pairs.

status : Status​

Status of the API gateway.

domain : string​

Default domain for the API gateway. Generated at creation time.

logGroupId : string​

ID of the log group for the API gateway.

attachedDomains : AttachedDomain​

List of domains attached to API gateway.

connectivity : Connectivity​

Network access. If specified the gateway will be attached to specified network/subnet(s).

logOptions : LogOptions​

Options for logging from the API gateway.

variables : VariableInput​

Values of variables defined in the specification.

canary : Canary​

Canary release of the gateway.

executionTimeout : google.protobuf.Duration​

Timeout for gateway call execution

AttachedDomain​

domainId : string​

ID of the domain.

certificateId : string​

ID of the domain certificate.

enabled : bool​

Enabling flag.

domain : string​

Name of the domain.

Connectivity​

Gateway connectivity specification.

networkId : string​

Network the gateway will have access to. It's essential to specify network with subnets in all availability zones.

subnetId : string​

Complete list of subnets (from the same network) the gateway can be attached to. It's essential to specify at least one subnet for each availability zones.

LogOptions​

disabled : bool​

Is logging from API gateway disabled.

One of destination​

Log entries destination.

  • logGroupId : string​

    Entry should be written to log group resolved by ID.

  • folderId : string​

    Entry should be written to default log group for specified folder.

minLevel : yandex.cloud.logging.v1.LogLevel.Level​

Minimum log entry level.

See LogLevel.Level for details.

VariableInput​

One of variableValue​

Variable value that can has only primitive type

  • stringValue : string​
  • intValue : int64​
  • doubleValue : double​
  • boolValue : bool​

Canary​

weight : int64​

It describes percentage of requests, which will be processed by canary.

variables : VariableInput​

Values specification variables, associated with canary.