withHttpEndpoint
Method
interface ContainerResource { // ... omitted for brevity withHttpEndpoint( port?: number, targetPort?: number, name?: string, env?: string, isProxied?: boolean): IResourceWithEndpoints;}Signature
method
withHttpEndpoint builderAdds an HTTP endpoint
withHttpEndpoint( port?: number, targetPort?: number, name?: string, env?: string, isProxied?: boolean): IResourceWithEndpointsParameters
portnumberoptionalAn optional port. This is the port that will be given to other resource to communicate with this resource.targetPort numberoptionalThis is the port the resource is listening on. If the endpoint is used for the container, it is the container port.namestringoptionalAn optional name of the endpoint. Defaults to "http" if not specified.envstringoptionalAn optional name of the environment variable to inject.isProxied booleanoptionalSpecifies if the endpoint will be proxied by DCP. Defaults to `null`.Returns
IResourceWithEndpoints Applies to
This method applies to the following types: