x-yc-apigateway-integration:object_storage extension
The x-yc-apigateway-integration:object_storage
extension enables Object Storage to manage request handling for serving static files.
{% include add-extentions-console %}
Supported parameters
The table below lists the parameters specific to API Gateway API gateways. You can find the description of other parameters in the OpenAPI 3.0 specification
Parameter | Type | Description |
---|---|---|
bucket |
string |
Bucket name |
object |
string |
Object name. It supports parameter templating from the path of the original request. object is used for parameter substitution. |
error_object |
string |
This is an optional parameter. It specifies the object name returned if an HTTP error code 4xx is received instead of object . error_object is used for parameter substitution. |
default_object |
string |
This is an optional parameter. It specifies the name of the object returned if an HTTP error code 404 is received instead of object . default_object is used for parameter substitution. |
service_account_id |
string |
ID of the service account used for authorization when accessing Object Storage. If it is not specified, its default value is taken from the parent service_account_id . If the parent parameter is also missing, the object will be available without authorization. |
Extension specification
Specification example:
/static/{file}:
get:
summary: Serve static file from Yandex Cloud Object Storage
parameters:
- name: file
in: path
required: true
schema:
type: string
x-yc-apigateway-integration:
type: object_storage
bucket: <bucket_name>
object: '{file}'
error_object: error.html
service_account_id: ajehfe65fhl********