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");
| Name | Type | Description |
|---|---|---|
| str | The endpoint URL |
| winglang/sdk.cloud.EndpointProps | The endpoint Props |
urlRequired
- Type: str
props
- Type: winglang/sdk.cloud.EndpointProps
Structs
EndpointProps
Options for Endpoint.
Initializer
bring cloud;
let EndpointProps = cloud.EndpointProps{ ... };
Properties
| Name | Type | Description |
|---|---|---|
| str | The endpoint's label. For UI purposes. |
| bool | Whether 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);
| Name | Type | Description |
|---|---|---|
| str | No description. |
| | No description. |
urlRequired
- Type: str
propsOptional
- Type: EndpointProps
Static Functions
| Name | Description |
|---|---|
| A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. |
| 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
- Type: IInflightHost
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
- Type: IResource
Properties
| Name | Type | Description |
|---|---|---|
| constructs.Node | The tree node. |
| str | The 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
| Name | Type | Description |
|---|---|---|
| bool | Whether the endpoint is supported through browsers. |
| str | The 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"