From 0cddf76a06a7c2433817b752492bfbbd650ac22b Mon Sep 17 00:00:00 2001 From: monabot Date: Wed, 11 Sep 2024 17:26:45 +0000 Subject: [PATCH] feat(docs): update docs Updates the Wing docs. See details in [workflow run]. [Workflow Run]: https://github.com/winglang/docsite/actions/runs/10816586225 ------ *Automatically created via the "update-docs" workflow* Signed-off-by: monabot --- .../04-standard-library/cloud/bucket.md | 7 +++++-- .../version-latest/04-winglibs/04-toc.md | 2 +- .../04-winglibs/05-winglibs/dynamodb.md | 19 ++++++++++++++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/api_versioned_docs/version-latest/04-standard-library/cloud/bucket.md b/api_versioned_docs/version-latest/04-standard-library/cloud/bucket.md index 329cb52c..39720d2d 100644 --- a/api_versioned_docs/version-latest/04-standard-library/cloud/bucket.md +++ b/api_versioned_docs/version-latest/04-standard-library/cloud/bucket.md @@ -105,25 +105,27 @@ By default, buckets are configured with CORS for any origin. When a bucket is pr ```js playground example bring cloud; +bring http; let uploads = new cloud.Bucket( // these are the default values public: false, cors: true, corsOptions: { - allowedMethods: [http.HttpMethod.GET, http.HttpMethod.POST, http.HttpMethod.PUT, http.HttpMethod.DELETE, http.HttpMethod.HEAD] + allowedMethods: [http.HttpMethod.GET, http.HttpMethod.POST, http.HttpMethod.PUT, http.HttpMethod.DELETE, http.HttpMethod.HEAD], allowedOrigins: ["*"], allowedHeaders: ["*"], exposeHeaders: [], maxAge: 0s }, -) +); ``` The CORS configuration can be disabled by passing `cors: false` to the constructor. CORS rules can also be configured after the bucket is created by calling the `addCorsRule` method: ```js playground example bring cloud; +bring http; let bucket = new cloud.Bucket( cors: false, // disable any default CORS rules @@ -131,6 +133,7 @@ let bucket = new cloud.Bucket( bucket.addCorsRule({ allowedOrigins: ["https://example.com"], + allowedMethods: [http.HttpMethod.GET], }); ``` diff --git a/versioned_docs/version-latest/04-winglibs/04-toc.md b/versioned_docs/version-latest/04-winglibs/04-toc.md index d4380955..e2d63d55 100644 --- a/versioned_docs/version-latest/04-winglibs/04-toc.md +++ b/versioned_docs/version-latest/04-winglibs/04-toc.md @@ -14,7 +14,7 @@ keywords: [winglib, Wing library] | [cloudv2](/docs/winglibs/winglibs/cloudv2) | [@winglibs/cloudv2](/docs/winglibs/winglibs/cloudv2) | v0.1.2 | Standard cloud library for Wing | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) | | [Amazon Cognito](/docs/winglibs/winglibs/cognito) | [@winglibs/cognito](/docs/winglibs/winglibs/cognito) | v0.0.14 | A wing library to work with Amazon Cognito | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) | | [Containers](/docs/winglibs/winglibs/containers) | [@winglibs/containers](/docs/winglibs/winglibs/containers) | v0.1.6 | Deploy containers with Wing | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) | -| [Amazon DynamoDB](/docs/winglibs/winglibs/dynamodb) | [@winglibs/dynamodb](/docs/winglibs/winglibs/dynamodb) | v0.2.3 | A Wing library for Amazon DynamoDB | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) | +| [Amazon DynamoDB](/docs/winglibs/winglibs/dynamodb) | [@winglibs/dynamodb](/docs/winglibs/winglibs/dynamodb) | v0.2.4 | A Wing library for Amazon DynamoDB | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) | | [Amazon EventBridge](/docs/winglibs/winglibs/eventbridge) | [@winglibs/eventbridge](/docs/winglibs/winglibs/eventbridge) | v0.1.8 | A Wing library for working with Amazon EventBridge | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws), [awscdk](/docs/platforms/AWS/awscdk) | | [FIFO Queue](/docs/winglibs/winglibs/fifoqueue) | [@winglibs/fifoqueue](/docs/winglibs/winglibs/fifoqueue) | v0.0.12 | A wing library to work with FIFO (first-in first-out) Queues | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) | | [GitHub](/docs/winglibs/winglibs/github) | [@winglibs/github](/docs/winglibs/winglibs/github) | v0.0.16 | A wing library to work with GitHub Probot | [*](/docs/platforms/platforms) | diff --git a/versioned_docs/version-latest/04-winglibs/05-winglibs/dynamodb.md b/versioned_docs/version-latest/04-winglibs/05-winglibs/dynamodb.md index 560127a3..61dee6c3 100644 --- a/versioned_docs/version-latest/04-winglibs/05-winglibs/dynamodb.md +++ b/versioned_docs/version-latest/04-winglibs/05-winglibs/dynamodb.md @@ -118,6 +118,8 @@ This library is licensed under the [MIT License](./LICENSE). - UpdateOptions - UpdateOutput - ClientProps +- **Enums** + - BillingMode ### Table (preflight class) @@ -264,9 +266,7 @@ new(): Client #### Properties -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| node | Node | The tree node. | +*No properties* #### Methods @@ -533,6 +533,8 @@ new(): Client | **Name** | **Type** | **Description** | | --- | --- | --- | | attributes | Array | *No description* | +| billingMode | BillingMode? | Billing mode for the table. Defaults to `PAY_PER_REQUEST`. | +| deletionProtection | bool? | Enables deletion protection for table. Disabled by default. For the Terraform AWS provider, this will also enable `lifecycle { prevent_destroy = true }` | | globalSecondaryIndex | Array? | *No description* | | hashKey | str | *No description* | | name | str? | *No description* | @@ -671,4 +673,15 @@ new(): Client | region | str? | *No description* | | tableName | str | *No description* | +### BillingMode (enum) + +*No description* + +#### Values + +| **Name** | **Description** | +| --- | --- | +| PAY_PER_REQUEST | *No description* | +| PROVISIONED | *No description* | +