Adding the x-yc-apigateway-integration:cloud_ydb extenison
Written by
Updated at January 22, 2025
Management console
-
In the management console
, select the folder in which you created or want to create an API gateway. -
In the list of services, select API Gateway.
-
Select an API gateway or click Create API gateway to create a new one.
-
In the Specification field, click
. -
Specify the following in the field:
- Path: Relative path to the integration that will be added to API Gateway URL. Specify variables in curly braces, e.g.,
/static/{function_id}
. For more information, see the OpenAPI 3.0 specification. - HTTP method: Method that will be used to work with the integration.
-
Service account: Service account for authorization when accessing the database. If you do not have a service account, create one.
-
Database: Database name.
-
Table: Name of the table the operation will be performed on.
-
Operation: Operation type and its respective parameters:
-
PutItem
-
GetItem
:- Key: Primary key of the element the operation will be performed on.
-
UpdateItem
:- Key: Primary key of the element the operation will be performed on.
- Update expression: Expression that will define which attributes must be updated and how.
- (Optional) Alias: Alias that can be used in the update expression instead of the attribute value. It must start with a colon
:
.
-
DeleteItem
:- Key: Primary key of the element the operation will be performed on.
-
Scan
:- (Optional) Limit: Maximum number of read elements.
- (Optional) Element primary key: Primary key of the element to start the search.
-
- Path: Relative path to the integration that will be added to API Gateway URL. Specify variables in curly braces, e.g.,
-
Click Add.
The Specification field will display the OpenAPI specification with the specified parameter values.