Routes all HTTP methods on the given path to the provided handler(s).
The path to handle requests on.
Rest
...handlers: RouteHandler[]One or more handlers to apply to requests.
Attach a custom domain to this API.
Provide a domain name you own, along with SSL certificates from a certificate authority (e.g. LetsEncrypt).
Must be called prior to [publish]ing the API.
Note: It is strongly encouraged to store certificates in config variables and not in source code.
Routes DELETE requests on the given path to the provided handler(s).
The path to handle requests on.
Rest
...handlers: RouteHandler[]One or more handlers to apply to requests.
Routes GET requests on the given path to the provided handler(s).
The path to handle requests on.
Rest
...handlers: RouteHandler[]One or more handlers to apply to requests.
Routes OPTIONS requests on the given path to the provided handler(s).
The path to handle requests on.
Rest
...handlers: RouteHandler[]One or more handlers to apply to requests.
Routes POST requests on the given path to the provided handler(s).
The path to handle requests on.
Rest
...handlers: RouteHandler[]One or more handlers to apply to requests.
proxy forwards an HTTP request to a target URL or Endpoint.
The route path at which to serve the file.
The target URL or Endpoint to proxy to. If a string is provided, it must be an Internet reachable URL. If an Endpoint is provided, it can be any endpoint exposed by the stack, including endpoints which are not exposed directly to the Internet.
Publishes an API to be internet accessible.
This should be called after describing desired routes and domains. Throws an error if called multiple times on the same endpoint.
An HttpDeployment object representing the live API.
Routes PUT requests on the given path to the provided handler(s).
The path to handle requests on.
Rest
...handlers: RouteHandler[]One or more handlers to apply to requests.
Routes any requests with given HTTP method on the given path to the provided handler(s).
The HTTP method to handle.
The path to handle requests on.
Rest
...handlers: RouteHandler[]One or more handlers to apply to requests.
static serves a file or directory from within the source folder at the requested path.
The route path at which to serve the file.
The local path. If not absolute, it is considered relative to the Pulumi program folder.
Optional
options: ServeStaticOptionsOptional options that can be provided to customize the serving behavior.
Generated using TypeDoc
API publishes an internet-facing HTTP API, for serving web applications or REST APIs.
Paths are
/
seperated. A path can use{param}
to capture zero-or-more non-/
characters and make the captured path segment available inreq.params.param
, or{param+}
to greedily capture all remaining characters in the url path intoreq.params.param
.Paths and routing are defined statically, and cannot overlap. Code inside a route handler can be used to provide dynamic decisions about sub-routing within a static path.