import * as pulumi from "@pulumi/pulumi"; import * as azureessentials from "azure-functions-ts-essentials"; import * as azurefunctions from "@azure/functions"; import * as mod from "."; /** * HTTP request object. Provided to your function when using HttpEventSubscription. */ export type HttpRequest = azurefunctions.HttpRequest; /** * Represents an HTTP response including the status code and data. */ export type HttpResponse = azureessentials.HttpResponse; /** * Host settings specific to the HTTP plugin. * * For more details see https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#http */ export interface HttpHostExtensions { /** The route prefix that applies to all routes. Use an empty string to remove the default prefix. */ routePrefix?: string; /** The maximum number of outstanding requests that are held at any given time. */ maxOutstandingRequests?: number; /** The maximum number of http functions that will be executed in parallel. */ maxConcurrentRequests?: number; /** * When enabled, this setting causes the request processing pipeline to periodically check system performance * counters like connections/threads/processes/memory/cpu/etc. and if any of those counters are over a built-in * high threshold (80%), requests will be rejected with a 429 "Too Busy" response until the counter(s) return * to normal levels. */ dynamicThrottlesEnabled?: boolean; } export interface HttpHostSettings extends mod.HostSettings { extensions?: { http: HttpHostExtensions; }; } /** * HTTP Response that may or may not contain extra output binding data. * For each output binding, the callback should define a property in the response record with the property * name matching the binding name. For instance, for an output binding called 'myoutput', the response could * be '{ response: { status: 200, body: "My Response" }, myoutput: "My Value" }'. */ export type ExtendedHttpResponse = HttpResponse | { response: HttpResponse; [key: string]: any; }; export interface HttpFunctionArgs extends mod.CallbackFunctionArgs, HttpRequest, ExtendedHttpResponse> { /** * Defines the route template, controlling to which request URLs your function responds. The * default value if none is provided is . */ route?: pulumi.Input; /** * An array of the HTTP methods to which the function responds. If not specified, the function * responds to all HTTP methods. */ methods?: pulumi.Input[]>; } export interface HttpEventSubscriptionArgs extends HttpFunctionArgs, mod.CallbackFunctionAppArgs, HttpRequest, ExtendedHttpResponse> { /** * Host settings specific to the HTTP plugin. These values can be provided here, or defaults will * be used in their place. */ hostSettings?: HttpHostSettings; } /** * An Azure Function exposed via an HTTP endpoint that is implemented on top of a * JavaScript/TypeScript callback function. */ export declare class HttpEventSubscription extends mod.EventSubscription, HttpRequest, ExtendedHttpResponse> { /** * Endpoint where this FunctionApp can be invoked. */ readonly url: pulumi.Output; constructor(name: string, args: HttpEventSubscriptionArgs, opts?: pulumi.CustomResourceOptions); } /** * Azure Function triggered by HTTP requests. */ export declare class HttpFunction extends mod.Function, HttpRequest, ExtendedHttpResponse> { constructor(name: string, args: HttpFunctionArgs); }