IResourceWithEndpoints
Interface
interface IResourceWithEndpoints { asHttp2Service(): IResourceWithEndpoints; getEndpoint(name: string): EndpointReference; onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise<void>): IResourceWithEndpoints; withEndpoint( port?: number, targetPort?: number, scheme?: string, name?: string, env?: string, isProxied?: boolean, isExternal?: boolean, protocol?: ProtocolType): IResourceWithEndpoints; withEndpointCallback(endpointName: string, callback: (obj: EndpointUpdateContext) => Promise<void>, createIfNotExists?: boolean): IResourceWithEndpoints; withEndpointProxySupport(proxyEnabled: boolean): IResourceWithEndpoints; withExternalHttpEndpoints(): IResourceWithEndpoints; withHttpCommand( path: string, displayName: string, options?: HttpCommandExportOptions): IResourceWithEndpoints; withHttpEndpoint( port?: number, targetPort?: number, name?: string, env?: string, isProxied?: boolean): IResourceWithEndpoints; withHttpEndpointCallback(callback: (obj: EndpointUpdateContext) => Promise<void>, name?: string, createIfNotExists?: boolean): IResourceWithEndpoints; withHttpHealthCheck( path?: string, statusCode?: number, endpointName?: string): IResourceWithEndpoints; withHttpProbe( probeType: ProbeType, path?: string, initialDelaySeconds?: number, periodSeconds?: number, timeoutSeconds?: number, failureThreshold?: number, successThreshold?: number, endpointName?: string): IResourceWithEndpoints; withHttpsEndpoint( port?: number, targetPort?: number, name?: string, env?: string, isProxied?: boolean): IResourceWithEndpoints; withHttpsEndpointCallback(callback: (obj: EndpointUpdateContext) => Promise<void>, name?: string, createIfNotExists?: boolean): IResourceWithEndpoints; withMcpServer( path?: string, endpointName?: string): IResourceWithEndpoints;}15 members
Methods
Configures a resource to mark all endpoints' transport as HTTP/2. This is useful for HTTP/2 services that need prior knowledge.
asHttp2Service(): IResourceWithEndpointsReturns
IResourceWithEndpointsmethod
getEndpointGets an endpoint reference
getEndpoint(name: string): EndpointReferenceParameters
namestringReturns
EndpointReferenceSubscribes to the ResourceEndpointsAllocated event.
onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise<void>): IResourceWithEndpointsParameters
callback(arg: ResourceEndpointsAllocatedEvent) => Promise<void>Returns
IResourceWithEndpointsAdds a network endpoint
withEndpoint( port?: number, targetPort?: number, scheme?: string, name?: string, env?: string, isProxied?: boolean, isExternal?: boolean, protocol?: ProtocolType): IResourceWithEndpointsParameters
portnumberoptionaltargetPortnumberoptionalschemestringoptionalnamestringoptionalenvstringoptionalisProxiedbooleanoptionalisExternalbooleanoptionalprotocolProtocolTypeoptionalReturns
IResourceWithEndpointsUpdates a named endpoint via callback
withEndpointCallback(endpointName: string, callback: (obj: EndpointUpdateContext) => Promise<void>, createIfNotExists?: boolean): IResourceWithEndpointsParameters
endpointNamestringcallback(obj: EndpointUpdateContext) => Promise<void>createIfNotExistsbooleanoptional= TrueReturns
IResourceWithEndpointsSet whether a resource can use proxied endpoints or whether they should be disabled for all endpoints belonging to the resource. If set to `false`, endpoints belonging to the resource will ignore the configured proxy settings and run proxy-less.
withEndpointProxySupport(proxyEnabled: boolean): IResourceWithEndpointsParameters
proxyEnabledbooleanReturns
IResourceWithEndpointsMarks existing http or https endpoints on a resource as external.
withExternalHttpEndpoints(): IResourceWithEndpointsReturns
IResourceWithEndpointsAdds an HTTP resource command
withHttpCommand( path: string, displayName: string, options?: HttpCommandExportOptions): IResourceWithEndpointsParameters
pathstringdisplayNamestringoptionsHttpCommandExportOptionsoptionalReturns
IResourceWithEndpointsAdds an HTTP endpoint
withHttpEndpoint( port?: number, targetPort?: number, name?: string, env?: string, isProxied?: boolean): IResourceWithEndpointsParameters
portnumberoptionaltargetPortnumberoptionalnamestringoptionalenvstringoptionalisProxiedbooleanoptionalReturns
IResourceWithEndpointsUpdates an HTTP endpoint via callback
withHttpEndpointCallback(callback: (obj: EndpointUpdateContext) => Promise<void>, name?: string, createIfNotExists?: boolean): IResourceWithEndpointsParameters
callback(obj: EndpointUpdateContext) => Promise<void>namestringoptionalcreateIfNotExistsbooleanoptional= TrueReturns
IResourceWithEndpointsAdds a health check to the resource which is mapped to a specific endpoint.
withHttpHealthCheck( path?: string, statusCode?: number, endpointName?: string): IResourceWithEndpointsParameters
pathstringoptionalstatusCodenumberoptionalendpointNamestringoptionalReturns
IResourceWithEndpointsAdds an HTTP health probe to the resource
withHttpProbe( probeType: ProbeType, path?: string, initialDelaySeconds?: number, periodSeconds?: number, timeoutSeconds?: number, failureThreshold?: number, successThreshold?: number, endpointName?: string): IResourceWithEndpointsParameters
probeTypeProbeTypepathstringoptionalinitialDelaySecondsnumberoptionalperiodSecondsnumberoptionaltimeoutSecondsnumberoptionalfailureThresholdnumberoptionalsuccessThresholdnumberoptionalendpointNamestringoptionalReturns
IResourceWithEndpointsAdds an HTTPS endpoint
withHttpsEndpoint( port?: number, targetPort?: number, name?: string, env?: string, isProxied?: boolean): IResourceWithEndpointsParameters
portnumberoptionaltargetPortnumberoptionalnamestringoptionalenvstringoptionalisProxiedbooleanoptionalReturns
IResourceWithEndpointsUpdates an HTTPS endpoint via callback
withHttpsEndpointCallback(callback: (obj: EndpointUpdateContext) => Promise<void>, name?: string, createIfNotExists?: boolean): IResourceWithEndpointsParameters
callback(obj: EndpointUpdateContext) => Promise<void>namestringoptionalcreateIfNotExistsbooleanoptional= TrueReturns
IResourceWithEndpointsMarks the resource as hosting a Model Context Protocol (MCP) server on the specified endpoint.
withMcpServer( path?: string, endpointName?: string): IResourceWithEndpointsParameters
pathstringoptional= /mcpendpointNamestringoptionalReturns
IResourceWithEndpoints