x-yc-apigateway-integration:object_storage extension
The x-yc-apigateway-integration:object_storage
extension passes the request handling control to Object Storage for distributing static files. Lets you manage the object access key and enables static data distribution directly from Object Storage by redirecting to a signed URL.
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 |
Name of the bucket. |
object |
string |
Object name. Supports parameter standardization from the path of the original request. Parameters are substituted in object . |
error_object |
string |
Optional parameter. Object name returned if HTTP error code 4xx is received instead of object . |
presigned_redirect |
bool |
If the value is true , a pre-signed URL is generated and a redirect is returned to the client. |
service_account_id |
string |
ID of the service account used for authorization when accessing Object Storage. If the parameter is omitted, the value of the top-level service_account_id parameter is used. If there is no top-level parameter, the object is accessed without authorization. |
Extension specification
Sample 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: my-example-bucket
object: '{file}'
error_object: error.html
presigned_redirect: true
service_account_id: ajehfe65fhliq4n28q1