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.
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 |
---|---|---|
bucket |
string |
Bucket name |
object |
string |
Object name. Supports parameter standardization from the path of the original request. Parameters are substituted in object . |
error_object |
string |
This is an optional parameter. Object name returned if an HTTP error code 4xx is received instead of object . Parameters are substituted in error_object . |
default_object |
string |
This is an optional parameter. The name of the object returned if an HTTP error code 404 is received instead of object . Parameters are substituted in default_object . |
service_account_id |
string |
ID of the service account used for authorization when accessing Object Storage. If not specified, it defaults to the top-level service_account_id parameter. If there is no top-level parameter either, the object is available without authorization. |
Extension specification
Example specification:
/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********