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
url
strThe endpoint URL
props
winglang/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
label
strThe endpoint's label. For UI purposes.
browserSupport
boolWhether 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
url
strNo description.
props
EndpointProps
No description.

urlRequired
  • Type: str

propsOptional

Static Functions

NameDescription
onLiftType
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
toInflight
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.

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>

toInflight
bring cloud;

cloud.Endpoint.toInflight(obj: IResource);

Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.

NOTE: This statement must be executed within an async context.

objRequired

Properties

NameTypeDescription
node
constructs.NodeThe tree node.
url
strThe 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
browserSupport
boolWhether the endpoint is supported through browsers.
label
strThe 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"