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 Storageby 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 |
Bucket name. |
object |
string |
Object name. Supports parameter standardization from the path of the original request. Parameters are substituted in 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 function is invoked 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: 'my-object'
presigned_redirect: true
service_account_id: ajehfe41hhliq4n93q1g