Optional
apiIf true, an API key will be required for this route. The source for the API Key can be set at the API level and by default, the source will be the HEADER.
Optional
authorizersAuthorizers allows you to define Lambda authorizers be applied for authorization when the the route is called.
Optional
contentThe content-type
to serve the file as. Only valid when localPath points to a file. If
localPath points to a directory, the content types for all files will be inferred.
Optional
iamBy default, the route method auth type is set to NONE
. If true, the auth type will be
set to AWS_IAM
.
Optional
indexBy default API.static will also serve 'index.html' in response to a request on a directory. To disable this set false or to supply a new index pass an appropriate name.
The local path on disk to create static S3 resources for. Files will be uploaded into S3 objects, and directories will be recursively walked into.
The path on the API that will map to files in [localPath]. If not prefixed with /
, then a
/
will be added automatically to the beginning.
Optional
requestRequest Validator specifies the validator to use at the method level. This will override anything defined at the API level.
Optional
requiredRequired Parameters to validate. If the request validator is set to ALL or PARAMS_ONLY, api gateway will validate these before sending traffic to the event handler.
Generated using TypeDoc
StaticRoute is a route that will map from an incoming path to the files/directories specified by [localPath].