Skip to content

Commit

Permalink
feat(docs): update docs (#529)
Browse files Browse the repository at this point in the history
feat(docs): update docs

Updates the Wing docs. See details in [workflow run].

[Workflow Run]: https://github.com/winglang/docsite/actions/runs/5536170158

------

*Automatically created via the "update-docs" workflow*
  • Loading branch information
monadabot authored Jul 12, 2023
1 parent acec2cb commit 9ac4cd0
Show file tree
Hide file tree
Showing 4 changed files with 208 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
label: AWS utilities
collapsible: true
collapsed: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
---
title: API reference
id: api-reference
description: Wing standard library API reference for the aws module
keywords: [Wing sdk, sdk, Wing API Reference]
hide_title: true
sidebar_position: 100
---

<!-- This file is automatically generated. Do not edit manually. -->

# API Reference <a name="API Reference" id="api-reference"></a>


## Classes <a name="Classes" id="Classes"></a>

### Function <a name="Function" id="@winglang/sdk.aws.Function"></a>

A helper class for working with AWS functions.

#### Initializers <a name="Initializers" id="@winglang/sdk.aws.Function.Initializer"></a>

```wing
bring aws;
new aws.Function();
```

| **Name** | **Type** | **Description** |
| --- | --- | --- |

---


#### Static Functions <a name="Static Functions" id="Static Functions"></a>

| **Name** | **Description** |
| --- | --- |
| <code><a href="#@winglang/sdk.aws.Function.from">from</a></code> | If the inflight host is an AWS function, return a helper interface for working with it. |

---

##### `from` <a name="from" id="@winglang/sdk.aws.Function.from"></a>

```wing
bring aws;
aws.Function.from(host: IInflightHost);
```

If the inflight host is an AWS function, return a helper interface for working with it.

###### `host`<sup>Required</sup> <a name="host" id="@winglang/sdk.aws.Function.from.parameter.host"></a>

- *Type:* <a href="#@winglang/sdk.std.IInflightHost">IInflightHost</a>

The inflight host.

---



## Structs <a name="Structs" id="Structs"></a>

### PolicyStatement <a name="PolicyStatement" id="@winglang/sdk.aws.PolicyStatement"></a>

AWS IAM Policy Statement.

#### Initializer <a name="Initializer" id="@winglang/sdk.aws.PolicyStatement.Initializer"></a>

```wing
bring aws;
let PolicyStatement = aws.PolicyStatement{ ... };
```

#### Properties <a name="Properties" id="Properties"></a>

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@winglang/sdk.aws.PolicyStatement.property.actions">actions</a></code> | <code>MutArray&lt;str&gt;</code> | Actions. |
| <code><a href="#@winglang/sdk.aws.PolicyStatement.property.effect">effect</a></code> | <code><a href="#@winglang/sdk.aws.Effect">Effect</a></code> | Effect ("Allow" or "Deny"). |
| <code><a href="#@winglang/sdk.aws.PolicyStatement.property.resources">resources</a></code> | <code>MutArray&lt;str&gt;</code> | Resources. |

---

##### `actions`<sup>Optional</sup> <a name="actions" id="@winglang/sdk.aws.PolicyStatement.property.actions"></a>

```wing
actions: MutArray<str>;
```

- *Type:* MutArray&lt;str&gt;

Actions.

---

##### `effect`<sup>Optional</sup> <a name="effect" id="@winglang/sdk.aws.PolicyStatement.property.effect"></a>

```wing
effect: Effect;
```

- *Type:* <a href="#@winglang/sdk.aws.Effect">Effect</a>

Effect ("Allow" or "Deny").

---

##### `resources`<sup>Optional</sup> <a name="resources" id="@winglang/sdk.aws.PolicyStatement.property.resources"></a>

```wing
resources: MutArray<str>;
```

- *Type:* MutArray&lt;str&gt;

Resources.

---

## Protocols <a name="Protocols" id="Protocols"></a>

### IAwsFunction <a name="IAwsFunction" id="@winglang/sdk.aws.IAwsFunction"></a>

- *Implemented By:* <a href="#@winglang/sdk.aws.IAwsFunction">IAwsFunction</a>

A shared interface for AWS functions.

#### Methods <a name="Methods" id="Methods"></a>

| **Name** | **Description** |
| --- | --- |
| <code><a href="#@winglang/sdk.aws.IAwsFunction.addEnvironment">addEnvironment</a></code> | Add an environment variable to the function. |
| <code><a href="#@winglang/sdk.aws.IAwsFunction.addPolicyStatements">addPolicyStatements</a></code> | Add policy statements to the function's IAM role. |

---

##### `addEnvironment` <a name="addEnvironment" id="@winglang/sdk.aws.IAwsFunction.addEnvironment"></a>

```wing
addEnvironment(key: str, value: str): void
```

Add an environment variable to the function.

###### `key`<sup>Required</sup> <a name="key" id="@winglang/sdk.aws.IAwsFunction.addEnvironment.parameter.key"></a>

- *Type:* str

---

###### `value`<sup>Required</sup> <a name="value" id="@winglang/sdk.aws.IAwsFunction.addEnvironment.parameter.value"></a>

- *Type:* str

---

##### `addPolicyStatements` <a name="addPolicyStatements" id="@winglang/sdk.aws.IAwsFunction.addPolicyStatements"></a>

```wing
addPolicyStatements(policies: MutArray<PolicyStatement>): void
```

Add policy statements to the function's IAM role.

TODO: update this to accept a variadic parameter (...policies)
https://github.com/winglang/wing/issues/397

###### `policies`<sup>Required</sup> <a name="policies" id="@winglang/sdk.aws.IAwsFunction.addPolicyStatements.parameter.policies"></a>

- *Type:* MutArray&lt;<a href="#@winglang/sdk.aws.PolicyStatement">PolicyStatement</a>&gt;

---


## Enums <a name="Enums" id="Enums"></a>

### Effect <a name="Effect" id="@winglang/sdk.aws.Effect"></a>

The Effect element of an AWS IAM policy statement.

#### Members <a name="Members" id="Members"></a>

| **Name** | **Description** |
| --- | --- |
| <code><a href="#@winglang/sdk.aws.Effect.ALLOW">ALLOW</a></code> | Allow. |
| <code><a href="#@winglang/sdk.aws.Effect.DENY">DENY</a></code> | Deny. |

---

##### `ALLOW` <a name="ALLOW" id="@winglang/sdk.aws.Effect.ALLOW"></a>

Allow.

---


##### `DENY` <a name="DENY" id="@winglang/sdk.aws.Effect.DENY"></a>

Deny.

---

1 comment on commit 9ac4cd0

@vercel
Copy link

@vercel vercel bot commented on 9ac4cd0 Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.