Specification extensions API Gateway. Overview
x-yc-apigateway extension
The x-yc-apigateway
extension allows you to set top-level API gateway parameters whose values will be inherited by nested extensions.
Supported parameters
The table below lists the parameters specific to API Gateway API gateways. Read more about other parameters in the OpenAPI Specification 3.0
Parameter | Type | Description |
---|---|---|
service_account_id |
string |
The ID of the service account on behalf of which the API gateway will perform operations. |
validator |
ValidatorObject |
HTTP request and response validator or a link to it. It can be overridden at the level of a specific operation. |
cors |
CorsRuleObject |
Rule for handling CORS preflight requests or a link to it. It can be overridden at the level of a specific path. |
Extension specification
x-yc-apigateway:
service_account_id: <service_account_ID>
validator: <ValidatorObject or a link to it>
cors: <CorsRuleObject or a link to it>
x-yc-apigateway-integration extension
The x-yc-apigateway-integration
extension is the entry point for integrating the API gateway with other services.
Supported parameters
The table below lists the parameters specific to API Gateway API gateways. Read more about other parameters in the OpenAPI Specification 3.0
Parameter | Type | Description |
---|---|---|
type |
string |
Extension type. Acceptable values: dummy , cloud_functions , http , object_storage , cloud_datasphere , cloud_datastreams , serverless_containers , cloud_ymq , and cloud_ydb . |
Extension specification
<Request>:
<Method>:
x-yc-apigateway-integration:
type: <Type>
<List of parameters as key:value pairs>
The extension's content changes depending on the type
specified in the x-yc-apigateway-integration
section:
- dummy: Returns fixed content with the specified response code and required headers without any third-party service involved.
- cloud-functions: Invokes the specified function, passes it the HTTP request data as input, and returns this function's results to the client.
- http: Redirects the request to the specified URL.
- object_storage: Passes request handling control to Object Storage to share static files.
- cloud_datasphere: Calls the specified DataSphere node, passing it the request body with input variable values and returning the node output in the response body.
- cloud_datastreams: Accesses Yandex Data Streams to perform an operation with the specified stream.
- serverless_containers: Redirects a request to a specified container.
- cloud_ymq: Accesses Yandex Message Queue to perform an operation with the specified queue.
- cloud_ydb: Accesses Yandex Managed Service for YDB to perform an operation with the specified document tables.
All types support parameter substitution when all keys are replaced with the appropriate value. A key should be defined as a parameter of the corresponding operation (all types of parameters defined in the OpenAPI-Specificationpath
, query
, header
, and cookie
).
Parameters are only substituted in some values, depending on the type of extension.