Skip to main content

Endpoint

The cloud.Endpoint represents a publicly accessible endpoint and outputs it as part of the compilation target.

Usage

bring cloud;

let endpoint = new cloud.Endpoint("https://example.com");

Target-specific details

Simulator (sim)

The sim implementation of cloud.Endpoint outputs the endpoint URL.

AWS (tf-aws)

The TF AWS implementation of cloud.Endpoint uses a Terraform Output.

AWS (awscdk)

The AWS CDK implementation of cloud.Endpoint uses a Cloudformation Output.

Azure (tf-azure)

🚧 Not supported yet

GCP (tf-gcp)

🚧 Not supported yet

API Reference

Endpoint

represents a publicly accessible endpoint and outputs it as part of the compilation target.

Initializers

bring cloud;

new cloud.Endpoint("https://example.com");
NameTypeDescription
urlstrThe endpoint URL
propswinglang/sdk.cloud.EndpointPropsThe endpoint Props

|


urlRequired
  • Type: str

props
  • Type: winglang/sdk.cloud.EndpointProps

Structs

EndpointProps

Options for Endpoint.

Initializer

bring cloud;

let EndpointProps = cloud.EndpointProps{ ... };

Properties

NameTypeDescription
labelstrThe endpoint's label. For UI purposes.
browserSupportboolWhether the endpoint is supported through browsers. For UI purposes.

label
label: str;
  • Type: str

The endpoint's label. For UI purposes.


Example

"My Dashboard"

browserSupport
browserSupport: bool;
  • Type: bool

Whether the endpoint is supported through browsers. For UI purposes.

API Reference

Endpoint

A cloud Endpoint.

Initializers

bring cloud;

new cloud.Endpoint(url: str, props?: EndpointProps);
NameTypeDescription
urlstrNo description.
propsEndpointPropsNo description.

urlRequired
  • Type: str

propsOptional

Static Functions

NameDescription
onLiftTypeA hook called by the Wing compiler once for each inflight host that needs to use this type inflight.

onLiftType
bring cloud;

cloud.Endpoint.onLiftType(host: IInflightHost, ops: MutArray<str>);

A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.

The list of requested inflight methods needed by the inflight host are given by ops.

This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.

hostRequired

opsRequired
  • Type: MutArray<str>

Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
urlstrThe endpoint url.

nodeRequired
node: Node;
  • Type: constructs.Node

The tree node.


urlRequired
url: str;
  • Type: str

The endpoint url.


Structs

EndpointProps

Options for Endpoint.

Initializer

bring cloud;

let EndpointProps = cloud.EndpointProps{ ... };

Properties

NameTypeDescription
browserSupportboolWhether the endpoint is supported through browsers.
labelstrThe endpoint's label.

browserSupportOptional
browserSupport: bool;
  • Type: bool
  • Default: undefined

Whether the endpoint is supported through browsers.

For UI purposes.


labelOptional
label: str;
  • Type: str
  • Default: undefined

The endpoint's label.

For UI purposes.


Example

"My Dashboard"