diff --git a/.cargo/config.toml b/.cargo/config.toml index 4e6f4107a70..791fa36685c 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,4 @@ [env] -WASI_SDK = { value = ".cargo/wasi-sdk-20.0", relative = true } # tree-sitter build fails with newer version of clang unless implicit-function-declaration is ignored -CC_wasm32_wasi = { value = ".cargo/wasi-sdk-20.0/bin/clang -Wno-error=implicit-function-declaration", relative = true } -AR_wasm32_wasi = { value = ".cargo/wasi-sdk-20.0/bin/ar", relative = true } +CC_wasm32_wasi = { value = ".cargo/wasi-sdk-21.0/bin/clang -Wno-error=implicit-function-declaration", relative = true } +AR_wasm32_wasi = { value = ".cargo/wasi-sdk-21.0/bin/ar", relative = true } diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2a46d04a3a6..fe3b7e2bda0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,7 +4,7 @@ "updateContentCommand": "pnpm install", "features": { "ghcr.io/devcontainers/features/node:1": { - "version": "18.16.0" + "version": "20.11.1" }, "ghcr.io/devcontainers/features/aws-cli:1": {}, "ghcr.io/devcontainers/features/terraform:1": {}, diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 8b8c49edda6..5e7336642f7 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -5,7 +5,7 @@ body: - type: markdown attributes: value: | - :pray: Thanks for taking the time to fill out this bug report! Feel free to ping us on [Wing Slack](https://t.winglang.io/slack) if you have any questions or need help. + :pray: Thanks for taking the time to fill out this bug report! Feel free to ping us on [Wing Discord](https://t.winglang.io/discord) if you have any questions or need help. - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index aba4f81333f..f9cfcae9974 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: true contact_links: - - name: Community Slack - url: https://t.winglang.io/slack + - name: Community Discord + url: https://t.winglang.io/discord about: Come hang out, geek out, ask questions, help friends! diff --git a/.github/ISSUE_TEMPLATE/example.yml b/.github/ISSUE_TEMPLATE/example.yml new file mode 100644 index 00000000000..a4a13c94e7e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/example.yml @@ -0,0 +1,36 @@ +name: Missing Example 🚀 +description: Request for a missing example +labels: ["✨ example","needs-discussion"] +body: + +- type: markdown + attributes: + value: | + ## Missing Example + +- type: textarea + id: description + attributes: + label: Description + placeholder: | + Couldn't find what you are looking for in https://github.com/winglang/examples, just describe in as much detail what is your use case + and what you are trying to build and we'll try to help out. + validations: + required: true + +- type: textarea + id: reference + attributes: + label: Reference + description: + placeholder: | + Optionally, put links or code snippets as a reference that can help us do a better job. + +- type: textarea + attributes: + label: Community Notes + value: | + + * Please vote by adding a 👍 reaction to the issue to help us prioritize. + * If you are interested to work on this issue, please leave a comment. + * If this issue is labeled **needs-discussion**, it means the spec has not been finalized yet. Please reach out on the #dev channel in the [Wing Discord](https://t.winglang.io/discord). diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index 8c478a2a89d..ae627be601d 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -5,28 +5,33 @@ body: - type: markdown attributes: value: | - :pray: Thanks for taking the time to fill out this enhancement request! Feel free to ping us on [Wing Slack](https://t.winglang.io/slack) if you have any questions or need help. + :pray: Thanks for taking the time to fill out this enhancement request! Feel free to ping us on [Wing Discord](https://t.winglang.io/discord) if you have any questions or need help. + - type: markdown attributes: value: | ## Enhancement Request + - type: textarea - id: spec + id: use-cases attributes: - label: Feature Spec - description: + label: Use Case placeholder: | - Describe the feature as if it was already released. Write a hypothetical doc/readme/changelog/contributing section for this new enhancement, code snippets and all. + What problem are you trying to solve? Describe a *concrete* example of something you are trying to do and as many details as possible + about your motivation, the environment, etc. validations: required: true + - type: textarea - id: use-cases + id: proposal attributes: - label: Use Cases + label: Proposed Solution + description: placeholder: | - What problems does this solves? List of use cases this feature or enhancement is designed to address. - validations: - required: true + Optionally, describe how you would have ideally wanted Wing to support this use case. + This can be a hypothetical "user story" or syntax or a snippet of code that would have been your ideal experience. + The purpose of this section is not to design a complete solution but rather to inspire the designer on what a user would have intuitively expected the solution to look like. + - type: textarea id: implementation-notes attributes: @@ -34,6 +39,7 @@ body: description: placeholder: | Any thoughts regarding how this should be implemented? + - type: dropdown id: Component attributes: @@ -53,11 +59,11 @@ body: - Documentation - Development Environment - Contributor Experience + - Libraries - Other validations: required: false - - type: textarea attributes: label: Community Notes @@ -65,4 +71,4 @@ body: * Please vote by adding a 👍 reaction to the issue to help us prioritize. * If you are interested to work on this issue, please leave a comment. - * If this issue is labeled **needs-discussion**, it means the spec has not been finalized yet. Please reach out on the #dev channel in the [Wing Slack](https://t.winglang.io/slack). + * If this issue is labeled **needs-discussion**, it means the spec has not been finalized yet. Please reach out on the #dev channel in the [Wing Discord](https://t.winglang.io/discord). diff --git a/.github/ISSUE_TEMPLATE/incident.yml b/.github/ISSUE_TEMPLATE/incident.yml index 65377dc6b46..6d4ce36f118 100644 --- a/.github/ISSUE_TEMPLATE/incident.yml +++ b/.github/ISSUE_TEMPLATE/incident.yml @@ -32,12 +32,12 @@ body: - label: WORKAROUND - if there is one, make sure it is documented in the section above. - label: PRIORITIZE (P0/P1/P2 - see the definitions [here](https://www.winglang.io/contributing/maintainers/operations#severity-levels)). - label: (optional) CONTACT a relevant person who has more information about the incident. - - label: (optional) ANNOUNCE major incidents on Slack \#dev or \#general channels. "NOTICE - P0 incident started. {incident-description}. Track on {link to issue}". + - label: (optional) ANNOUNCE major incidents on Discord \#dev or \#general channels. "NOTICE - P0 incident started. {incident-description}. Track on {link to issue}". - label: HANDLE by reverting or forward fixing. - label: UPDATE the team on your actions in the created \#alert Slack thread throughout the incident. - label: RESOLVE the incident on [PagerDuty](https://monada.pagerduty.com/incidents) (BetterStack resolves automatically). - label: UPDATE the team on the issue closure. - - label: (optional) ANNOUNCE closure of major incidents on Slack \#dev or \#general channels. "NOTICE - P0 incident ended. {incident-resolution-description}. Track on {link to issue}". + - label: (optional) ANNOUNCE closure of major incidents on Discord \#dev or \#general channels. "NOTICE - P0 incident ended. {incident-resolution-description}. Track on {link to issue}". - label: UNPIN the incident issue. - - label: LESSONS LEARNED should be shared via the "post-mortem" workflow on \#dev Slack channel. + - label: LESSONS LEARNED should be shared via the "post-mortem" workflow on \#dev Discord channel. - label: CLOSE the incident issue. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 497046bde6b..cfbaa76ae34 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,8 +19,8 @@ concurrency: cancel-in-progress: true env: - NODE_VERSION: "18.16.0" - PNPM_VERSION: "8.6.3" + NODE_VERSION: "20.11.1" + PNPM_VERSION: "8.15.1" CARGO_TERM_COLOR: always TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TEAM: ${{ vars.TURBO_TEAM }} @@ -41,12 +41,12 @@ jobs: bench-changed: ${{ fromJson(steps.turbo-diff.outputs.data)['hangar#bench'].changes }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup pnpm - uses: pnpm/action-setup@v2.2.4 + uses: pnpm/action-setup@v3 with: version: ${{ env.PNPM_VERSION }} @@ -102,10 +102,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup pnpm - uses: pnpm/action-setup@v2.2.4 + uses: pnpm/action-setup@v3 with: version: ${{ env.PNPM_VERSION }} @@ -129,7 +129,9 @@ jobs: - name: Install Playwright working-directory: apps/wing-console/console/app - run: pnpm exec playwright install --with-deps + run: | + sudo rm /etc/apt/sources.list.d/microsoft-prod.list + pnpm exec playwright install --with-deps - name: Test run: pnpm test:ci @@ -153,7 +155,7 @@ jobs: - build steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download Dist Artifacts uses: actions/download-artifact@v3 @@ -162,7 +164,7 @@ jobs: path: dist - name: Setup pnpm - uses: pnpm/action-setup@v2.2.4 + uses: pnpm/action-setup@v3 with: version: ${{ env.PNPM_VERSION }} @@ -206,8 +208,7 @@ jobs: fail-fast: true matrix: runner: [windows, macos, ubuntu] - # Pinned 20 to 20.5.1 until https://github.com/nodejs/node/issues/49497 is released - node: ["18", "20.5.1"] + node: ["20", "18"] shard: ["1/2", "2/2"] full_run: # Do a full run on push or when the PR is labeled "pr/e2e-full" @@ -218,14 +219,14 @@ jobs: - runner: windows full_run: false - runner: ubuntu - node: "20" + node: "18" full_run: false steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup pnpm - uses: pnpm/action-setup@v2.2.4 + uses: pnpm/action-setup@v3 with: version: ${{ env.PNPM_VERSION }} @@ -250,11 +251,11 @@ jobs: working-directory: tools/hangar run: | pnpm test:generate - pnpm run test --shard=${{ matrix.shard }} --update=${{ matrix.runner == 'ubuntu' && matrix.node == '18' }} + pnpm run vitest --shard=${{ matrix.shard }} --update=${{ matrix.runner == 'ubuntu' && matrix.node == '20' }} - name: Create mutation if needed # we only care about the diff in our standard dev env - if: matrix.runner == 'ubuntu' && matrix.node == '18' + if: matrix.runner == 'ubuntu' && matrix.node == '20' id: diff env: RAW_SHARD: ${{ matrix.shard }} @@ -263,17 +264,17 @@ jobs: scripts/create_patch.sh "e2e-$SHARD.diff" - name: Upload mutation - if: matrix.runner == 'ubuntu' && matrix.node == '18' && steps.diff.outputs.diff == 'true' + if: matrix.runner == 'ubuntu' && matrix.node == '20' && steps.diff.outputs.diff == 'true' uses: actions/upload-artifact@v3 with: name: ${{ steps.diff.outputs.diff_name }} path: ${{ steps.diff.outputs.diff_name }} - aws-sdk-spec-test: + sdk-spec-test: needs: - build if: github.event_name == 'push' && needs.build.outputs.e2e-changed == 'true' - uses: ./.github/workflows/tf-aws-test.yml + uses: ./.github/workflows/sdk-spec-test.yml secrets: inherit console-preview: @@ -288,7 +289,7 @@ jobs: if: ${{ needs.build.outputs.console-changed == 'true' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && !startsWith(github.head_ref, 'mergify/merge-queue/') }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download Dist Artifacts uses: actions/download-artifact@v3 @@ -297,7 +298,7 @@ jobs: path: dist - name: Install flyctl - uses: superfly/flyctl-actions/setup-flyctl@1.4 + uses: superfly/flyctl-actions/setup-flyctl@1.5 with: version: ${{ env.FLY_VERSION }} @@ -309,7 +310,7 @@ jobs: flyctl launch --no-deploy --copy-config --name "$APP_NAME" --image-label latest -o personal popd fi - flyctl deploy . --config ./apps/wing-console/console/app/preview/fly.toml --app "$APP_NAME" --image-label latest --vm-memory 512 --strategy immediate + flyctl deploy . --config ./apps/wing-console/console/app/preview/fly.toml --app "$APP_NAME" --image-label latest --vm-memory 1024 --strategy immediate flyctl scale count 1 --yes --app "$APP_NAME" echo "deploytime=$(TZ=UTC date +'%Y-%m-%d %H:%M')" >> $GITHUB_OUTPUT @@ -332,11 +333,15 @@ jobs: - e2e-test - benchmark - test - - aws-sdk-spec-test + - sdk-spec-test steps: - name: Check failure - if: needs.build.result == 'failure' || needs.e2e-test.result == 'failure' || needs.benchmark.result == 'failure' || needs.test.result == 'failure' || needs.aws-sdk-spec-test.result == 'failure' - run: exit 1 + # All jobs must either be sucessful or skipped + if: contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'failure') || contains(needs.*.result, 'action_required')|| contains(needs.*.result, 'stale')|| contains(needs.*.result, 'null') + run: | + echo "One or more jobs failed or were cancelled. Please check the logs." + echo '${{ toJson(needs) }}' + exit 1 - name: Download patches uses: actions/download-artifact@v3 - name: Check patches @@ -375,7 +380,7 @@ jobs: run: npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_PUBLISH_TOKEN }} - name: Publish NPM packages - uses: nick-fields/retry@v2 + uses: nick-fields/retry@v3 env: PACKAGE_VERSION: ${{ needs.build.outputs.version }} with: @@ -385,7 +390,7 @@ jobs: set -o pipefail cd dist - PACKAGES=("@winglang/sdk" "@winglang/compiler" "@wingconsole/design-system" "@wingconsole/ui" "@wingconsole/server" "@wingconsole/app" "winglang" "@winglang/platform-awscdk") + PACKAGES=("@winglang/sdk" "@wingcloud/framework" "@winglang/compiler" "@wingconsole/design-system" "@wingconsole/ui" "@wingconsole/server" "@wingconsole/app" "winglang" "@winglang/platform-awscdk" "@winglang/compatibility-spy" "@winglang/wingtunnels") for PACKAGE in "${PACKAGES[@]}"; do # Check if already published VERSION_FOUND=$(npm view "$PACKAGE@$PACKAGE_VERSION" version --verbose || true) @@ -415,7 +420,7 @@ jobs: dependencies: false - name: Write Changelog - uses: DamianReeves/write-file-action@v1.2 + uses: DamianReeves/write-file-action@v1.3 with: path: "CHANGELOG.md" contents: ${{ needs.build.outputs.changelog }} diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index aebc2d5c15d..43b34d4f457 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -33,13 +33,17 @@ jobs: - name: Install Wing run: | ${{ matrix.install_command }} - - name: Download examples/tests/valid/test_bucket.test.w + - name: Create and test each quickstart app + shell: bash run: | - curl -L https://raw.githubusercontent.com/winglang/wing/main/examples/tests/valid/test_bucket.test.w > test_bucket.test.w - cat test_bucket.test.w - - name: Run Test - run: | - wing test test_bucket.test.w + templates=$(wing new --list-templates) + for template in $templates; do + mkdir "$template" + cd "$_" + wing new "$template" + wing test main.w + cd .. + done - name: Download examples/tests/valid/hello.test.w run: | curl -L https://raw.githubusercontent.com/winglang/wing/main/examples/tests/valid/hello.test.w > hello.test.w diff --git a/.github/workflows/close-stale.yml b/.github/workflows/close-stale.yml index f650d6f07de..8ebbebb7c0f 100644 --- a/.github/workflows/close-stale.yml +++ b/.github/workflows/close-stale.yml @@ -12,20 +12,21 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/stale@v6 + - uses: actions/stale@v9 with: + days-before-issue-stale: 90 days-before-pr-stale: 20 + exempt-issue-labels: roadmap stale-issue-message: | Hi, - This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. + This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks! stale-pr-message: | Hi, This PR has not seen activity in 20 days. Therefore, we are marking the PR as stale for now. It will be closed after 7 days. - If you need help with the PR, do not hesitate to reach out in the winglang community slack at [winglang.slack.com](https://winglang.slack.com). + If you need help with the PR, do not hesitate to reach out in the winglang community [Discord](https://t.winglang.io/discord). Feel free to re-open this PR when it is still relevant and ready to be worked on again. Thanks! - diff --git a/.github/workflows/delete-console-preview.yml b/.github/workflows/delete-console-preview.yml index 6e21b6d6d1c..f3b1271637a 100644 --- a/.github/workflows/delete-console-preview.yml +++ b/.github/workflows/delete-console-preview.yml @@ -17,7 +17,7 @@ jobs: if: ${{ github.event.pull_request.head.repo.full_name == github.repository && !startsWith(github.head_ref, 'mergify/merge-queue/') }} steps: - name: Install flyctl - uses: superfly/flyctl-actions/setup-flyctl@1.4 + uses: superfly/flyctl-actions/setup-flyctl@1.5 with: version: ${{env.FLY_VERSION}} diff --git a/.github/workflows/issue-backlogger.yml b/.github/workflows/issue-backlogger.yml index 19e6e7f6e78..0c1b1840a59 100644 --- a/.github/workflows/issue-backlogger.yml +++ b/.github/workflows/issue-backlogger.yml @@ -10,7 +10,7 @@ jobs: name: "Add issue to backlog" runs-on: ubuntu-latest steps: - - uses: actions/add-to-project@v0.4.0 + - uses: actions/add-to-project@v0.5.0 with: project-url: https://github.com/orgs/winglang/projects/2 github-token: ${{ secrets.PROJEN_GITHUB_TOKEN }} diff --git a/.github/workflows/matrix-update.yml b/.github/workflows/matrix-update.yml new file mode 100644 index 00000000000..f535ae3aeff --- /dev/null +++ b/.github/workflows/matrix-update.yml @@ -0,0 +1,68 @@ +name: Compatibility matrix update +on: + workflow_call: {} + +env: + NODE_VERSION: "20.11.1" + PNPM_VERSION: "8.15.1" + +jobs: + update: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v3 + with: + version: ${{ env.PNPM_VERSION }} + + - name: Setup Node.js v18 + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + + - name: Install pnpm Dependencies + run: pnpm install --frozen-lockfile --filter ./tools/compatibility-matrix-automation + + - name: Download Output Files + uses: actions/download-artifact@v3 + with: + name: out + path: out + + - name: Run Update Script + run: | + cd tools/compatibility-matrix-automation + TEST_OUTPUT_FOLDER=../../out npx update-matrix + + - name: Create a PR + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.PROJEN_GITHUB_TOKEN }} + title: "chore(docs): compatibility matrix update" + branch: "github-actions/updating-matrix" + base: main + add-paths: docs/** + commit-message: |- + Updates the [Compatibility Matrix](https://www.winglang.io/docs/standard-library/compatibility-matrix) + + [Workflow Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) + + ------ + + *Automatically created via the "matrix-update" workflow* + body: |- + chore(docs): update compatibility matrix + + [Workflow Run]: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + + ------ + + *Automatically created via the "matrix-update" workflow* + author: monabot + committer: monabot + signoff: true + labels: 📚 documentation + delete-branch: true diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 79e058d9625..8545ce7cc92 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -25,9 +25,9 @@ jobs: steps: - name: Download artifacts id: download-artifacts - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v3 with: - github_token: ${{secrets.GITHUB_TOKEN}} + github_token: ${{ secrets.GITHUB_TOKEN }} run_id: ${{ github.event.workflow_run.id }} name: .+\.diff$ name_is_regexp: true @@ -37,7 +37,7 @@ jobs: - uses: marocchino/action-workflow_run-status@54b6e87d6cb552fc5f36dbe9a722a6048725917a if: steps.download-artifacts.outputs.found_artifact == 'true' with: - github_token: ${{secrets.GITHUB_TOKEN}} + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Token check if: steps.download-artifacts.outputs.found_artifact == 'true' @@ -50,11 +50,33 @@ jobs: It requires private repo read/write permissions." >> $GITHUB_STEP_SUMMARY exit 1 fi + + - name: Find associated pull request + id: pr + uses: actions/github-script@v7 + with: + script: | + const mainRepo = context.payload.workflow_run.repository.full_name; + const headBranch = context.payload.workflow_run.head_branch; + console.log(`Searching for pull request in ${mainRepo} with head branch ${headBranch}`); + + const response = await github.rest.search.issuesAndPullRequests({ + q: `repo:${mainRepo} is:pr is:open head:${headBranch}`, + per_page: 1, + }); + const prs = response.data.items; + if (prs.length < 1) { + throw new Error('No pull request found for the commit'); + } + const prNumber = prs[0].number; + console.log(`Pull request number is ${prNumber}`); + return prNumber; - name: Unstable mutation comment if: steps.download-artifacts.outputs.found_artifact == 'true' && startsWith(github.event.workflow_run.head_commit.message, format('chore{0} self mutation', ':')) uses: thollander/actions-comment-pull-request@v2 with: + pr_number: ${{ steps.pr.outputs.result }} mode: recreate message: | ### :x: Unstable Self-Mutation :x: @@ -67,33 +89,29 @@ jobs: - Flakey tests (relying on one of the above) comment_tag: UnstableMutation GITHUB_TOKEN: ${{ secrets.PROJEN_GITHUB_TOKEN }} - + - name: Unstable mutation fail if: steps.download-artifacts.outputs.found_artifact == 'true' && startsWith(github.event.workflow_run.head_commit.message, format('chore{0} self mutation', ':')) run: exit 1 - name: Disable Git Hooks if: steps.download-artifacts.outputs.found_artifact == 'true' - run: | - git config --global core.hooksPath /dev/null + run: git config --global core.hooksPath /dev/null - name: Update PR Branch - uses: actions/github-script@v6 + uses: actions/github-script@v7 + id: branch-update if: steps.download-artifacts.outputs.found_artifact == 'true' with: github-token: ${{ secrets.MUTATION_TOKEN }} script: | - // use API to get the PR data since we can't rely on the context across forks - const pulls = await github.rest.pulls.list({ - per_page: 1, + const prContextData = await github.rest.pulls.get({ owner: context.repo.owner, repo: context.repo.repo, - head: `${context.payload.workflow_run.head_repository.full_name}:${context.payload.workflow_run.head_branch}` + pull_number: ${{ steps.pr.outputs.result }} }); - - const prContextData = pulls.data[0]; - const prNumber = prContextData.number; - const originalSha = prContextData.head.sha; + const prNumber = prContextData.data.number; + const originalSha = prContextData.data.head.sha; try { console.log("Updating PR branch"); @@ -126,7 +144,7 @@ jobs: - name: Checkout Workflow Branch if: steps.download-artifacts.outputs.found_artifact == 'true' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.MUTATION_TOKEN }} ref: ${{ github.event.workflow_run.head_branch }} @@ -161,24 +179,14 @@ jobs: git push origin HEAD:$HEAD_REF - name: Add label to block auto merge - uses: actions/github-script@v6 + uses: actions/github-script@v7 if: steps.download-artifacts.outputs.found_artifact == 'true' with: github-token: ${{ secrets.MUTATION_TOKEN }} script: | - // use API to get the PR number since we can't rely on the context across forks - const pulls = await github.rest.pulls.list({ - per_page: 1, - owner: context.repo.owner, - repo: context.repo.repo, - head: `${context.payload.workflow_run.head_repository.full_name}:${context.payload.workflow_run.head_branch}` - }); - const prNumber = pulls.data[0].number; - const labels = ["⚠️ pr/review-mutation"]; - await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, - issue_number: prNumber, - labels: labels + issue_number: ${{ steps.pr.outputs.result }}, + labels: ["⚠️ pr/review-mutation"] }); diff --git a/.github/workflows/new-pull-request-comment.yml b/.github/workflows/new-pull-request-comment.yml index fd054fc5033..30acb560032 100644 --- a/.github/workflows/new-pull-request-comment.yml +++ b/.github/workflows/new-pull-request-comment.yml @@ -1,13 +1,18 @@ name: PR Creation Comment on: - pull_request: + pull_request_target: types: - opened +permissions: + contents: read + pull-requests: write + jobs: comment: runs-on: ubuntu-latest + if: ${{ !startsWith(github.head_ref, 'mergify/merge-queue/') }} steps: - name: Comment on new PR uses: thollander/actions-comment-pull-request@v2 @@ -15,7 +20,7 @@ jobs: message: | Thanks for opening this pull request! :tada: Please consult the [contributing guidelines](https://www.winglang.io/contributing) for details on how to contribute to this project. - If you need any assistence, don't hesitate to ping the relevant owner over [Slack](https://t.winglang.io/slack). + If you need any assistance, don't hesitate to ping the relevant owner over [Discord](https://t.winglang.io/discord). | Topic | Owner | |-----------------------------------------------------|---------------------------------------------------------------| @@ -24,7 +29,7 @@ jobs: | JSON, structs, primitives and collections | `@hasanaburayyan` | Platforms and plugins | `@hasanaburayyan` | Frontend resources (website, react, etc) | `@tsuf239` - | Language design | `@eladb` + | Language design | `@chriscbr` | VSCode extension and language server | `@markmcculloh` | Compiler architecture, inflights, lifting | `@yoav-steinberg` | Wing Testing Framework | `@tsuf239` @@ -33,8 +38,8 @@ jobs: | Library Ecosystem | `@chriscbr` | Documentation | `@hasanaburayyan` | SDK test suite | `@tsuf239` - | Examples | `@skorfmann` + | Examples | `@hasanaburayyan` | Wing Playground | `@eladcon` comment_tag: New PR - GITHUB_TOKEN: ${{secrets.PROJEN_GITHUB_TOKEN}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/periodic-azure-clean.yml b/.github/workflows/periodic-azure-clean.yml new file mode 100644 index 00000000000..3ac3e90dbaf --- /dev/null +++ b/.github/workflows/periodic-azure-clean.yml @@ -0,0 +1,37 @@ +name: Periodic Azure cleanup + +on: + schedule: + - cron: "0 0 * * 1" # Every Saturday at midnight UTC, I assume the main build won't be triggered right before this one + workflow_dispatch: {} + +env: + MANUAL: ${{ github.event_name == 'workflow_dispatch' }} + +jobs: + azure-cleanup: + runs-on: ubuntu-latest + steps: + - name: test if is maintainer + uses: tspascoal/get-user-teams-membership@v3 + id: testUserGroup + if: ${{ env.MANUAL == 'true' }} + with: + username: ${{ github.actor }} + team: "maintainers" + GITHUB_TOKEN: ${{ secrets.GH_GROUPS_READ_TOKEN }} + - name: cancel run if not allowed + if: ${{ env.MANUAL == 'true' && steps.testUserGroup.outputs.isTeamMember == 'false' }} + run: | + echo "User ${{github.actor}} is not allowed to dispatch this action." + exit 1 + + - name: Configure azure credentials + uses: azure/login@v2 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + - name: Remove all resources + run: | + for rg in $(az group list --query "[].name" -o tsv); do + az group delete --name $rg --yes --no-wait + done diff --git a/.github/workflows/pull-request-lint.yml b/.github/workflows/pull-request-lint.yml index 8557952f519..ab8877b5e56 100644 --- a/.github/workflows/pull-request-lint.yml +++ b/.github/workflows/pull-request-lint.yml @@ -7,15 +7,14 @@ on: - synchronize - reopened - edited - branches-ignore: - - "mergify/merge-queue/*" jobs: validate: name: Validate PR title runs-on: ubuntu-latest + if: ${{ !startsWith(github.head_ref, 'mergify/merge-queue/') }} steps: - - uses: amannn/action-semantic-pull-request@v5.2.0 + - uses: amannn/action-semantic-pull-request@v5.4.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -32,6 +31,8 @@ jobs: vscode platforms console + typescript + lsp types: |- feat fix diff --git a/.github/workflows/sdk-spec-test.yml b/.github/workflows/sdk-spec-test.yml new file mode 100644 index 00000000000..a3d790c4766 --- /dev/null +++ b/.github/workflows/sdk-spec-test.yml @@ -0,0 +1,240 @@ +name: SDK Spec Tests +run-name: SDK Spec Tests (${{ inputs.repo || github.repository }}/${{inputs.ref || github.ref}}) for ${{inputs.target || 'all'}} +on: + # release: #TODO: uncomment to enable unstable targets, at this moment there are none + # types: + # - published # runs only unstable targets + workflow_call: {} + workflow_dispatch: + inputs: + repo: + type: string + default: winglang/wing + description: "Full repo name (owner/name)" + ref: + type: string + default: main + description: "Ref to checkout. Must be present in the repo input." + target: + type: choice + default: all + description: "target to run at, can be one or all of them" + options: + - all-stable # tf-aws and sim + - all-unstable # tf-azure and soon tf-gcp + - all + - tf-aws + - tf-azure + - sim + - tf-gcp + +permissions: + contents: read + id-token: write + +env: + AWS_REGION: "us-east-1" + NODE_VERSION: "20.11.1" + # this variable indicates wheater to use wing cli from a local version (using the current repo code) + # or use the latest remote npm version + LOCAL_BUILD: ${{ github.workflow == 'build' }} + # indicates if the action triggered from a workflow_dispatch + MANUAL: ${{ github.event_name == 'workflow_dispatch' }} + REPO: ${{ inputs.repo || github.repository }} + REF: ${{ inputs.ref || github.ref }} + TARGET: ${{ inputs.target || (github.workflow == 'build' && 'all-stable') || (github.event_name == 'release' && 'all-unstable') || 'all' }} #the build runs only stable targets, realease only unstable + PNPM_VERSION: "8.15.1" + AZURE_LOCATION: "East US" + CDK_STACK_NAME: "sdk-spec-tests" + GOOGLE_PROJECT_ID: "sdk-spec-tests" + GOOGLE_REGION: "us-central1" + +jobs: + setup: + runs-on: ubuntu-latest + steps: + - name: test if is maintainer + uses: tspascoal/get-user-teams-membership@v3 + id: testUserGroup + if: ${{ env.MANUAL == 'true' }} + with: + username: ${{ github.actor }} + team: "maintainers" + GITHUB_TOKEN: ${{ secrets.GH_GROUPS_READ_TOKEN }} + - name: cancel run if not allowed + if: ${{ env.MANUAL == 'true' && steps.testUserGroup.outputs.isTeamMember == 'false' }} + run: | + echo "User ${{github.actor}} is not allowed to dispatch this action." + exit 1 + - name: Checkout Repository + uses: actions/checkout@v4 + with: + repository: ${{env.REPO}} + ref: ${{env.REF}} + + - name: Get list of directories and save them to the output + id: setdirs + shell: bash + run: | # TODO: skipping std, math and external folders, when https://github.com/winglang/wing/issues/3168 is resolve- we'll skip only the external folder. + dirs=$(ls -d examples/tests/sdk_tests/*/ | sed 's/\/$//' | grep -v "external\|std\|math" | jq -R -s -c 'split("\n")[:-1]') + processed_dirs=$(echo "{ \"directory\": $dirs }" | jq -c '[ .directory[] | {directory: ., name: (split("/") | last)}]') + wrapped_dirs=$(echo $processed_dirs | jq -c .) + echo "dirs=$wrapped_dirs" >> $GITHUB_OUTPUT + - name: Get targets list + id: settargets + run: | + if [ "${{env.TARGET}}" = "all" ]; then + target='["tf-aws", "tf-azure", "tf-gcp"]' + elif [ "${{env.TARGET}}" = "all-stable" ]; then + target='["tf-aws", "sim", "tf-azure"]' + elif [ "${{env.TARGET}}" = "all-unstable" ]; then + target='["tf-gcp"]' + else + target='["${{env.TARGET}}"]' + fi + echo "targets=$target" >> $GITHUB_OUTPUT + outputs: + tests: ${{ steps.setdirs.outputs.dirs }} + targets: ${{ steps.settargets.outputs.targets }} + + test: + needs: setup + runs-on: ubuntu-latest + strategy: + fail-fast: false + max-parallel: 10 + matrix: + test: ${{ fromJson(needs.setup.outputs.tests) }} + target: ${{ fromJson(needs.setup.outputs.targets) }} + name: ${{ matrix.test.name }} - ${{ matrix.target }} + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + repository: ${{env.REPO}} + ref: ${{env.REF}} + + - name: Setup pnpm + if: ${{ env.MANUAL == 'true' }} + uses: pnpm/action-setup@v3 + with: + version: ${{ env.PNPM_VERSION }} + + - name: Setup Node.js v18 + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + + ##################### install a local wing version ######################### + - name: Download Dist Artifacts + if: ${{ env.LOCAL_BUILD == 'true' }} + uses: actions/download-artifact@v3 + with: + name: dist + path: dist + + - name: Install Wing from Dist + if: ${{ env.LOCAL_BUILD == 'true' }} + run: | + mkdir localwing + cd localwing + npm init --yes + npm install ../dist/*-[0-9]*.[0-9]*.[0-9]*.tgz + ./node_modules/.bin/wing --version + + #################### install a remote wing version ######################## + - name: Install winglang globally + if: ${{ env.LOCAL_BUILD == 'false' && env.MANUAL == 'false'}} + uses: nick-fields/retry@v3 + with: + max_attempts: 3 + retry_on: error + timeout_minutes: 5 + command: npm install -g winglang + ######################################################################## + - name: Installing external js modules + run: | + cd examples/tests/sdk_tests + npm install + - name: Configure AWS credentials + if: ${{ matrix.target == 'tf-aws' }} + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ env.AWS_REGION }} + - name: Configure azure credentials + if: ${{ matrix.target == 'tf-azure' }} + uses: azure/login@v2 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - name: Configure gcp credentials + id: gcp-auth + if: ${{ matrix.target == 'tf-gcp' }} + uses: google-github-actions/auth@v1 + with: + workload_identity_provider: "projects/833985639028/locations/global/workloadIdentityPools/gh-action/providers/gh-action-provider" + service_account: "gh-action@sdk-spec-tests.iam.gserviceaccount.com" + # token_format: "id_token" + # id_token_audience: "gh-action@sdk-spec-tests.iam.gserviceaccount.com" + # create_credentials_file: true + + - name: Set-up gcloud + if: ${{ matrix.target == 'tf-gcp' }} + uses: google-github-actions/setup-gcloud@v1 + + - name: export gcloud token + if: ${{ matrix.target == 'tf-gcp' }} + run: echo "GCP_ID_TOKEN=$(gcloud auth print-identity-token --impersonate-service-account=gh-action@sdk-spec-tests.iam.gserviceaccount.com)" >> $GITHUB_ENV + + - name: Installing local dependencies + if: ${{ env.MANUAL == 'true' }} + uses: nick-fields/retry@v3 + env: + TF_LOG: info + TF_LOG_PATH: ${{ runner.workspace }}/terraform.log + with: + max_attempts: 3 + retry_on: error + timeout_minutes: 30 + command: | + pnpm install + pnpm turbo compile -F=winglang + + - name: Execute wing test in matrix directory + env: + TF_LOG: info + TF_LOG_PATH: ${{ runner.workspace }}/terraform.log + run: | + if ${{ env.MANUAL == 'true' }} + then + WING_CLI=$(realpath apps/wing/bin/wing) + elif ${{ env.LOCAL_BUILD == 'false'}} + then + WING_CLI=$(which wing) + # COMPATIBILITY="-t @winglang/compatibility-spy" //TODO: will be handled in a following PR + else + WING_CLI=$(realpath localwing/node_modules/.bin/wing) + COMPATIBILITY="-t ../../../../localwing/node_modules/@winglang/compatibility-spy/lib" + echo $COMPATIBILITY + fi + cd ${{ matrix.test.directory }} + $WING_CLI test --snapshots=deploy -t ${{ matrix.target }} -p ${{ (matrix.target == 'tf-azure' && 2 ) || 10 }} --retry 3 $COMPATIBILITY *.test.w -o ../../../../out/${{ matrix.test.name }}-${{ matrix.target }}.json + + - name: Upload Artifacts + if: ${{ env.LOCAL_BUILD == 'true' }} + uses: actions/upload-artifact@v3 + with: + name: out + path: out/* + + - name: Output Terraform log + if: failure() + run: cat ${{ runner.workspace }}/terraform.log + + update-matrix: + needs: test + if: ${{ github.workflow == 'build' }} + uses: ./.github/workflows/matrix-update.yml + secrets: inherit diff --git a/.github/workflows/tf-aws-test.yml b/.github/workflows/tf-aws-test.yml deleted file mode 100644 index 6cf0e1903e1..00000000000 --- a/.github/workflows/tf-aws-test.yml +++ /dev/null @@ -1,218 +0,0 @@ -name: SDK Spec Tests -run-name: SDK Spec Tests (${{ inputs.repo || github.repository }}/${{inputs.ref || github.ref}}) for ${{inputs.target || 'all'}} -on: - release: - types: - - published # runs only unstable targets - workflow_call: {} - workflow_dispatch: - inputs: - repo: - type: string - default: winglang/wing - description: "Full repo name (owner/name)" - ref: - type: string - default: main - description: "Ref to checkout. Must be present in the repo input." - target: - type: choice - default: all - description: "target to run at, can be one or all of them" - options: - - all-stable # tf-aws - - all-unstable # tf-azure and soon tf-gcp - - all - - tf-aws - - tf-azure - - tf-gcp - -permissions: - contents: read - id-token: write - -env: - AWS_REGION: "us-east-1" - NODE_VERSION: "18.16.0" - # this variable indicates wheater to use wing cli from a local version (using the current repo code) - # or use the latest remote npm version - LOCAL_BUILD: ${{ github.workflow == 'build' }} - # indicates if the action triggered from a workflow_dispatch - MANUAL: ${{ github.event_name == 'workflow_dispatch' }} - REPO: ${{ inputs.repo || github.repository }} - REF: ${{ inputs.ref || github.ref }} - TARGET: ${{ inputs.target || (github.workflow == 'build' && 'all-stable') || (github.event_name == 'release' && 'all-unstable') || 'all' }} #the build runs only stable targets, realease only unstable - PNPM_VERSION: "8.6.3" - AZURE_LOCATION: "East US" - CDK_STACK_NAME: "sdk-spec-tests" - GOOGLE_PROJECT_ID: "sdk-spec-tests" - GOOGLE_REGION: "us-central1" - -jobs: - setup: - runs-on: ubuntu-latest - steps: - - name: test if is maintainer - uses: tspascoal/get-user-teams-membership@v2 - id: testUserGroup - if: ${{ env.MANUAL == 'true' }} - with: - username: ${{ github.actor }} - team: "maintainers" - GITHUB_TOKEN: ${{ secrets.GH_GROUPS_READ_TOKEN }} - - name: cancel run if not allowed - if: ${{ env.MANUAL == 'true' && steps.testUserGroup.outputs.isTeamMember == 'false' }} - run: | - echo "User ${{github.actor}} is not allowed to dispatch this action." - exit 1 - - name: Checkout Repository - uses: actions/checkout@v3 - with: - repository: ${{env.REPO}} - ref: ${{env.REF}} - - - name: Get list of directories and save them to the output - id: setdirs - shell: bash - run: | # TODO: skipping std and external folders, when https://github.com/winglang/wing/issues/3168 is resolve- we'll skip only the external folder. - dirs=$(ls -d examples/tests/sdk_tests/*/ | sed 's/\/$//' | grep -v "external\|std" | jq -R -s -c 'split("\n")[:-1]') - processed_dirs=$(echo "{ \"directory\": $dirs }" | jq -c '[ .directory[] | {directory: ., name: (split("/") | last)}]') - wrapped_dirs=$(echo $processed_dirs | jq -c .) - echo "dirs=$wrapped_dirs" >> $GITHUB_OUTPUT - - name: Get targets list - id: settargets - run: | - if [ "${{env.TARGET}}" = "all" ]; then - target='["tf-aws", "tf-azure", "tf-gcp"]' - elif [ "${{env.TARGET}}" = "all-stable" ]; then - target='["tf-aws"]' - elif [ "${{env.TARGET}}" = "all-unstable" ]; then - target='["tf-azure", "tf-gcp"]' - else - target='["${{env.TARGET}}"]' - fi - echo "targets=$target" >> $GITHUB_OUTPUT - outputs: - tests: ${{ steps.setdirs.outputs.dirs }} - targets: ${{ steps.settargets.outputs.targets }} - - test-tf-aws: - needs: setup - runs-on: ubuntu-latest - strategy: - fail-fast: false - max-parallel: 10 - matrix: - test: ${{ fromJson(needs.setup.outputs.tests) }} - target: ${{ fromJson(needs.setup.outputs.targets) }} - name: ${{ matrix.test.name }} - ${{ matrix.target }} - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - with: - repository: ${{env.REPO}} - ref: ${{env.REF}} - - - name: Setup pnpm - if: ${{ env.MANUAL == 'true' }} - uses: pnpm/action-setup@v2.2.4 - with: - version: ${{ env.PNPM_VERSION }} - - - name: Setup Node.js v18 - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - - ##################### install a local wing version ######################### - - name: Download Dist Artifacts - if: ${{ env.LOCAL_BUILD == 'true' }} - uses: actions/download-artifact@v3 - with: - name: dist - path: dist - - - name: Install Wing from Dist - if: ${{ env.LOCAL_BUILD == 'true' }} - run: | - mkdir localwing - cd localwing - npm init --yes - npm install ../dist/*-[0-9]*.[0-9]*.[0-9]*.tgz - ./node_modules/.bin/wing --version - - #################### install a remote wing version ######################## - - name: Install winglang globally - if: ${{ env.LOCAL_BUILD == 'false' && env.MANUAL == 'false'}} - uses: nick-fields/retry@v2 - with: - max_attempts: 3 - retry_on: error - timeout_minutes: 5 - command: npm install -g winglang - ######################################################################## - - name: Installing external js modules - run: | - cd examples/tests/sdk_tests - npm install - - name: Configure AWS credentials - if: ${{ matrix.target == 'tf-aws'}} - uses: aws-actions/configure-aws-credentials@v2 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} - - name: Configure azure credentials - if: ${{ matrix.target == 'tf-azure' }} - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - name: Configure gcp credentials - id: gcp-auth - if: ${{ matrix.target == 'tf-gcp' }} - uses: google-github-actions/auth@v1 - with: - workload_identity_provider: "projects/833985639028/locations/global/workloadIdentityPools/gh-action/providers/gh-action-provider" - service_account: "gh-action@sdk-spec-tests.iam.gserviceaccount.com" - # token_format: "id_token" - # id_token_audience: "gh-action@sdk-spec-tests.iam.gserviceaccount.com" - # create_credentials_file: true - - - name: Set-up gcloud - if: ${{ matrix.target == 'tf-gcp' }} - uses: google-github-actions/setup-gcloud@v1 - - - name: export gcloud token - if: ${{ matrix.target == 'tf-gcp' }} - run: echo "GCP_ID_TOKEN=$(gcloud auth print-identity-token --impersonate-service-account=gh-action@sdk-spec-tests.iam.gserviceaccount.com)" >> $GITHUB_ENV - - - name: Installing local dependencies - if: ${{ env.MANUAL == 'true' }} - run: | - pnpm install - pnpm turbo compile -F=winglang - - name: Execute wing test in matrix directory - uses: nick-fields/retry@v2 - env: - TF_LOG: info - TF_LOG_PATH: ${{ runner.workspace }}/terraform.log - with: - max_attempts: 3 - retry_on: error - timeout_minutes: 60 - command: | - if ${{ env.MANUAL == 'true' }} - then - WING_CLI=$(realpath apps/wing/bin/wing) - elif ${{ env.LOCAL_BUILD == 'false'}} - then - WING_CLI=$(which wing) - else - WING_CLI=$(realpath localwing/node_modules/.bin/wing) - fi - cd ${{ matrix.test.directory }} - $WING_CLI test -t ${{ matrix.target }} *.test.w - - name: Output Terraform log - if: failure() - run: cat ${{ runner.workspace }}/terraform.log diff --git a/.gitignore b/.gitignore index b5c5dd29f51..781645e6836 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,5 @@ target/ # turbo .turbo/ + +.history/ diff --git a/.mergify.yml b/.mergify.yml index 913b0e5349e..d1f74cd2f13 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -2,14 +2,6 @@ queue_rules: - name: default speculative_checks: 2 - conditions: - - -files=.mergify.yml - - or: - - status-success=Quality Gate - - and: - - -files~=^(?!docs/|logo/) - # These files must be generated via wingsdk build - - -files~=^docs/docs/04-standard-library/[^/]+/[^/]+\.md$ pull_request_rules: - name: automatic merge @@ -19,7 +11,7 @@ pull_request_rules: Thanks for contributing, @{{author}}! This PR will now be added to the [merge queue](https://mergify.com/merge-queue), or immediately merged if `{{head}}` is up-to-date with `{{base}}` and the queue is empty. queue: name: default - method: squash + merge_method: squash commit_message_template: |- {{ title }} (#{{ number }}) {{ body }} @@ -29,6 +21,7 @@ pull_request_rules: - -label~=(🚧 pr/do-not-merge|⚠️ pr/review-mutation) - -merged - -closed + - -draft - branch-protection-review-decision=APPROVED - "#approved-reviews-by>=1" - "#changes-requested-reviews-by=0" @@ -50,6 +43,7 @@ pull_request_rules: - -label~=(🚧 pr/do-not-merge|⚠️ pr/review-mutation|⚠️ mergify/review-config) - -merged - -closed + - -draft - "#approved-reviews-by>=1" - "#changes-requested-reviews-by=0" - "#review-threads-unresolved=0" diff --git a/.node-version b/.node-version index 3c79f30eca2..726a201e63a 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -18.16.0 \ No newline at end of file +20.11.1 \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 40c4ef8612b..28b847ba58d 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -2,4 +2,4 @@ Wing follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). -Please review before contributing issues, pull requests, or joining the Wing Slack. +Please review before contributing issues, pull requests, or joining the Wing Discord. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c2a3f2f6bcf..a8700c0cfab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,8 +10,8 @@ any kind. The [Wing Contributor's Handbook] has tons of relevant information. If you can't find what you need here, please let us know by [submitting an issue]. -The best way to get started is by asking for help in the [#contrib] channel on -the [Wing Slack]. +The best way to get started is by asking for help in the #help channel on +the [Wing Discord]. ## Quick Links @@ -25,9 +25,8 @@ Here is a curated list of topics from the [Wing Contributor's Handbook]: ## Code of Conduct -The Wing community follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). Please review it before contributing issues, pull requests, or joining the [Wing Slack]. +The Wing community follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). Please review it before contributing issues, pull requests, or joining the [Wing Discord]. -[Wing Slack]: https://t.winglang.io/slack +[Wing Discord]: https://t.winglang.io/discord [Wing Contributor's Handbook]: https://www.winglang.io/contributing/ -[#contrib]: https://winglang.slack.com/archives/C04BJBTVDV4 [submitting an issue]: https://github.com/winglang/wing/issues/new diff --git a/Cargo.lock b/Cargo.lock index c6feeb6674f..72b67505c2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,48 +29,64 @@ dependencies = [ ] [[package]] -name = "ansi_term" -version = "0.12.1" +name = "anstream" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ - "winapi", + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", ] [[package]] -name = "anyhow" -version = "1.0.72" +name = "anstyle" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] -name = "arrayref" -version = "0.3.7" +name = "anstyle-parse" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] [[package]] -name = "arrayvec" -version = "0.7.4" +name = "anstyle-query" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] [[package]] -name = "ascii" -version = "1.1.0" +name = "anstyle-wincon" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] [[package]] -name = "atty" -version = "0.2.14" +name = "arrayref" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "autocfg" @@ -86,9 +102,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bitvec" @@ -134,12 +150,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bumpalo" -version = "3.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" - [[package]] name = "bytecheck" version = "0.6.11" @@ -162,12 +172,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "bytes" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" - [[package]] name = "camino" version = "1.1.6" @@ -176,18 +180,9 @@ checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" [[package]] name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - -[[package]] -name = "cesu8" -version = "1.1.0" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" +checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" [[package]] name = "cfg-if" @@ -196,26 +191,51 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "chunked_transfer" -version = "1.4.1" +name = "clap" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cca491388666e04d7248af3f60f0c40cfb0991c72205595d7c396e3510207d1a" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +dependencies = [ + "clap_builder", + "clap_derive", +] [[package]] -name = "clap" -version = "2.34.0" +name = "clap_builder" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", + "anstream", + "anstyle", + "clap_lex", "strsim", - "textwrap", - "unicode-width", - "vec_map", ] +[[package]] +name = "clap_derive" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.51", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "colored" version = "2.0.4" @@ -227,16 +247,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "combine" -version = "4.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" -dependencies = [ - "bytes", - "memchr", -] - [[package]] name = "console" version = "0.15.7" @@ -275,22 +285,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" -[[package]] -name = "core-foundation" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - [[package]] name = "cpufeatures" version = "0.2.9" @@ -330,12 +324,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "difference" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" - [[package]] name = "digest" version = "0.10.7" @@ -346,33 +334,13 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dirs" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "duplicate" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de78e66ac9061e030587b2a2e75cc88f22304913c907b11307bca737141230cb" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-error", ] @@ -396,41 +364,30 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.2" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", "libc", + "windows-sys 0.52.0", ] [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "filetime" -version = "0.2.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", - "windows-sys 0.48.0", + "redox_syscall", + "windows-sys 0.52.0", ] [[package]] @@ -441,9 +398,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -491,12 +448,6 @@ dependencies = [ "wasi", ] -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "globset" version = "0.4.12" @@ -521,9 +472,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" @@ -532,13 +483,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "heck" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -548,28 +496,13 @@ checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] -[[package]] -name = "html-escape" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1ad449764d627e22bfd7cd5e8868264fc9236e07c752972b4080cd351cb476" -dependencies = [ - "utf8-width", -] - -[[package]] -name = "httpdate" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" - [[package]] name = "idna" version = "0.4.0" @@ -592,20 +525,20 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.3", "serde", ] [[package]] name = "indoc" -version = "2.0.3" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c785eefb63ebd0e33416dfcb8d6da0bf27ce752843a45632a67bf10d4d4b5c4" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "insta" @@ -629,16 +562,16 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi", "rustix", "windows-sys 0.48.0", ] [[package]] name = "itertools" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] @@ -649,37 +582,6 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" -[[package]] -name = "jni" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" -dependencies = [ - "cesu8", - "cfg-if", - "combine", - "jni-sys", - "log", - "thiserror", - "walkdir", - "windows-sys 0.45.0", -] - -[[package]] -name = "jni-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" - -[[package]] -name = "js-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" -dependencies = [ - "wasm-bindgen", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -688,19 +590,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" - -[[package]] -name = "libloading" -version = "0.7.4" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "linked-hash-map" @@ -710,21 +602,21 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "log" -version = "0.4.19" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lsp-types" -version = "0.94.0" +version = "0.95.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b63735a13a1f9cd4f4835223d828ed9c2e35c8c5e61837774399f558b6a1237" +checksum = "158c1911354ef73e8fe42da6b10c0484cb65c7f1007f28022e847706c1ab6984" dependencies = [ "bitflags 1.3.2", "serde", @@ -733,20 +625,11 @@ dependencies = [ "url", ] -[[package]] -name = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", -] - [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memoffset" @@ -767,25 +650,26 @@ dependencies = [ ] [[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - -[[package]] -name = "objc" -version = "0.2.7" +name = "nu-ansi-term" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" dependencies = [ - "malloc_buf", + "overload", + "winapi", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "overload" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "parcel_sourcemap" @@ -834,7 +718,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.51", ] [[package]] @@ -888,7 +772,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.51", ] [[package]] @@ -900,6 +784,12 @@ dependencies = [ "siphasher", ] +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -932,9 +822,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -961,9 +851,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.32" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -1004,75 +894,43 @@ dependencies = [ "getrandom", ] -[[package]] -name = "raw-window-handle" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom", - "redox_syscall 0.2.16", - "thiserror", -] - [[package]] name = "regex" -version = "1.9.1" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", "regex-automata", - "regex-syntax 0.7.4", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.3.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b6d6190b7594385f61bd3911cd1be99dfddcfc365a4160cc2ab5bff4aed294" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.4", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "rend" @@ -1111,23 +969,17 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustix" -version = "0.38.6" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee020b1716f0a80e2ace9b03441a749e402e86712f15f16fe8a8f75afac732f" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.2", "errno", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1142,54 +994,38 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - [[package]] name = "seahash" version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" -[[package]] -name = "semver" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" - [[package]] name = "serde" -version = "1.0.180" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.180" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.51", ] [[package]] name = "serde_json" -version = "1.0.104" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" dependencies = [ - "indexmap 2.0.0", "itoa", "ryu", "serde", @@ -1203,7 +1039,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.51", ] [[package]] @@ -1217,6 +1053,15 @@ dependencies = [ "digest", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "simdutf8" version = "0.1.4" @@ -1236,10 +1081,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] -name = "smallbitvec" -version = "2.5.1" +name = "smallvec" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ce4f9dc4a41b4c3476cc925f1efb11b66df373a8fde5d4b8915fa91b5d995e" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "speedy" @@ -1259,35 +1104,35 @@ checksum = "7d395866cb6778625150f77a430cc0af764ce0300f6a3d3413477785fa34b6c7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.51", ] [[package]] name = "strsim" -version = "0.8.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "strum" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.25.2" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" +checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", - "syn 2.0.28", + "syn 2.0.51", ] [[package]] @@ -1303,9 +1148,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "6ab617d94515e94ae53b8406c628598680aa0c9587474ecbe58188f7b345d66c" dependencies = [ "proc-macro2", "quote", @@ -1320,56 +1165,53 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.8.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "redox_syscall 0.3.5", "rustix", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] -name = "textwrap" -version = "0.11.0" +name = "termcolor" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ - "unicode-width", + "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.44" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.44" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.51", ] [[package]] -name = "tiny_http" -version = "0.12.0" +name = "thread_local" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389915df6413a2e74fb181895f933386023c71110878cd0825588928e64cdc82" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ - "ascii", - "chunked_transfer", - "httpdate", - "log", + "cfg-if", + "once_cell", ] [[package]] @@ -1388,121 +1230,70 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] -name = "toml" -version = "0.5.11" +name = "tracing" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "serde", + "pin-project-lite", + "tracing-attributes", + "tracing-core", ] [[package]] -name = "tree-sitter" -version = "0.20.10" +name = "tracing-attributes" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e747b1f9b7b931ed39a548c1fae149101497de3c1fc8d9e18c62c1a66c683d3d" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "cc", - "regex", + "proc-macro2", + "quote", + "syn 2.0.51", ] [[package]] -name = "tree-sitter-cli" -version = "0.20.8" +name = "tracing-core" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae7e9d844d4d38e511a7b93fe8ced79f2a364c32fdea10d04546f1c8317d5a0c" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ - "ansi_term", - "anyhow", - "atty", - "clap", - "difference", - "dirs", - "glob", - "html-escape", - "indexmap 1.9.3", - "lazy_static", - "log", - "regex", - "regex-syntax 0.6.29", - "rustc-hash", - "semver", - "serde", - "serde_json", - "smallbitvec", - "tiny_http", - "toml", - "tree-sitter", - "tree-sitter-config", - "tree-sitter-highlight", - "tree-sitter-loader", - "tree-sitter-tags", - "walkdir", - "webbrowser", - "which", + "once_cell", + "valuable", ] [[package]] -name = "tree-sitter-config" -version = "0.19.0" +name = "tracing-log" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fec4cb27f052ead2246631b332dba0cb6af9a54ce012badee59c4b0ded5e03" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "anyhow", - "dirs", - "serde", - "serde_json", + "log", + "once_cell", + "tracing-core", ] [[package]] -name = "tree-sitter-highlight" -version = "0.20.1" +name = "tracing-subscriber" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "042342584c5a7a0b833d9fc4e2bdab3f9868ddc6c4b339a1e01451c6720868bc" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ - "regex", - "thiserror", - "tree-sitter", + "nu-ansi-term", + "sharded-slab", + "smallvec", + "thread_local", + "tracing-core", + "tracing-log", ] [[package]] -name = "tree-sitter-loader" -version = "0.20.0" +name = "tree-sitter" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0b17eef4833c7c139abed66d562dfa23228e97e647597baf246fd56c21bbfaf" +checksum = "688200d842c76dd88f9a7719ecb0483f79f5a766fb1c100756d5d8a059abc71b" dependencies = [ - "anyhow", "cc", - "dirs", - "libloading", - "once_cell", - "regex", - "serde", - "serde_json", - "tree-sitter", - "tree-sitter-highlight", - "tree-sitter-tags", -] - -[[package]] -name = "tree-sitter-tags" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccb3f1376219530a37a809751ecf65aa35fd8b9c1c4ab6d4faf5f6a9eeda2c05" -dependencies = [ - "memchr", "regex", - "thiserror", - "tree-sitter", -] - -[[package]] -name = "tree-sitter-traversal" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8a158225e4a4d8505f071340bba9edd109b23f01b70540dccb7c799868f307" -dependencies = [ - "tree-sitter", ] [[package]] @@ -1511,7 +1302,6 @@ version = "0.0.0" dependencies = [ "cc", "tree-sitter", - "tree-sitter-cli", ] [[package]] @@ -1547,12 +1337,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - [[package]] name = "unicode-xid" version = "0.2.4" @@ -1572,10 +1356,10 @@ dependencies = [ ] [[package]] -name = "utf8-width" -version = "0.1.6" +name = "utf8parse" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5190c9442dcdaf0ddd50f37420417d219ae5261bbf5db120d0f9bab996c9cba1" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" @@ -1588,10 +1372,10 @@ dependencies = [ ] [[package]] -name = "vec_map" -version = "0.8.2" +name = "valuable" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "version_check" @@ -1605,114 +1389,12 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65dd7eed29412da847b0f78bcec0ac98588165988a8cfe41d4ea1d429f8ccfff" -[[package]] -name = "walkdir" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" -dependencies = [ - "same-file", - "winapi-util", -] - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasm-bindgen" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.28", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.28", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" - -[[package]] -name = "web-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webbrowser" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd222aa310eb7532e3fd427a5d7db7e44bc0b0cf1c1e21139c345325511a85b6" -dependencies = [ - "core-foundation", - "home", - "jni", - "log", - "ndk-context", - "objc", - "raw-window-handle", - "url", - "web-sys", -] - -[[package]] -name = "which" -version = "4.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" -dependencies = [ - "either", - "libc", - "once_cell", -] - [[package]] name = "winapi" version = "0.3.9" @@ -1762,6 +1444,15 @@ dependencies = [ "windows-targets 0.48.1", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.3", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -1792,6 +1483,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows-targets" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" +dependencies = [ + "windows_aarch64_gnullvm 0.52.3", + "windows_aarch64_msvc 0.52.3", + "windows_i686_gnu 0.52.3", + "windows_i686_msvc 0.52.3", + "windows_x86_64_gnu 0.52.3", + "windows_x86_64_gnullvm 0.52.3", + "windows_x86_64_msvc 0.52.3", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -1804,6 +1510,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -1816,6 +1528,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -1828,6 +1546,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_gnu" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -1840,6 +1564,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_i686_msvc" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -1852,6 +1582,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -1864,6 +1600,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -1876,6 +1618,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" + [[package]] name = "wingc" version = "0.0.0" @@ -1887,7 +1635,7 @@ dependencies = [ "derivative", "duplicate", "globset", - "indexmap 2.0.0", + "indexmap 2.2.6", "indoc", "insta", "itertools", @@ -1902,12 +1650,28 @@ dependencies = [ "strum", "tempfile", "tree-sitter", - "tree-sitter-traversal", "tree-sitter-wing", "uuid", "wingii", ] +[[package]] +name = "wingcli" +version = "0.74.53" +dependencies = [ + "anstyle", + "camino", + "clap", + "home", + "lazy_static", + "strum", + "termcolor", + "tracing", + "tracing-subscriber", + "wingc", + "wingii", +] + [[package]] name = "wingii" version = "0.0.0" diff --git a/Cargo.toml b/Cargo.toml index 22981b3a6b7..8f769fec7a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,6 @@ [workspace] members = [ + "apps/wingcli-v2", "libs/tree-sitter-wing", "libs/wingc", "libs/wingii", diff --git a/Privacy.md b/Privacy.md new file mode 100644 index 00000000000..804b9d0c5ad --- /dev/null +++ b/Privacy.md @@ -0,0 +1,162 @@ +# Privacy Notice + +**Last updated: October, 2023** + +This Privacy Notice describes how Wing Cloud Inc. (together with its affiliated companies - "Wing Cloud", "we", or "us") collects, stores, uses and discloses personal data when you interact with us, including when you visit or interact with any of our linked websites, including [https://www.wing.cloud](https://www.wing.cloud) and [https://www.winglang.io](https://www.winglang.io) ("sites"), participate in any of our events, interact with any of our online ads and content, emails, sales and marketing channels, integrations or communications under our control (collectively with our cloud-oriented programming language Winglang or any ensuing Wing Cloud products or services, the "Services"). + +Please review this Privacy Notice carefully, and please use the information herein to make informed choices. If you have any concerns or questions about our privacy practices, please feel free to contact us. By accessing the sites, registering for an account, or making a purchase from us, you are agreeing to all of the terms set forth in this Privacy Notice. + +If you do not agree to this Privacy Notice, please do not use our sites, purchase our products, interact with our Services, or otherwise provide us with any information. Your continued use of our Services means that you agree to this privacy notice. + +You are not legally required to provide us with any personal data. If you do not wish to provide us with your personal data, or to have it processed by us or any of our service providers, please do not provide it to us and avoid any interaction with us or with any of our Services. + +Specifically, this Privacy Notice describes our practices regarding: + + +1. [Data Collection & Processing](#data-collection--processing) +2. [Data Uses & Lawful Bases for Processing](#data-uses--lawful-bases-for-processing) +3. [Data Storage and Transfer](#data-storage-and-transfer) +4. [How Long We Retain Your Personal Data](#how-long-we-retain-your-personal-data) +5. [How We Share or Otherwise Disclose Your Personal Data](#how-we-share-or-otherwise-disclose-your-personal-data) +6. [Cookies and Data Collection Technologies and Do Not Track](#cookies-and-data-collection-technologies-and-do-not-track) +7. [Communications](#communications) +8. [Data Security](#data-security) +9. [Your Data Subject Rights](#your-data-subject-rights) +10. [Data Controller/Processor](#data-controllerprocessor) +11. [US Privacy Notices](#us-privacy-notices) +12. [Additional Notice & Contact Details](#additional-notice--contact-details) + + +## Data Collection & Processing + +When we use the term “personal data” in this Privacy Notice, we mean information that identifies, relates to, describes, is reasonably capable of being associated with, or could reasonably be linked, directly or indirectly, to an individual. It does not include aggregated or identified information that is maintained in a form that is not reasonably capable of being associated with or linked to an individual. + +Sometimes we collect personal data automatically when you interact with our Services and sometimes, we collect personal data directly from you. At times, we may collect personal data from other sources and third parties (such as our Business Customers, Partners, or Service Providers), even before our first direct interaction. + +We may collect or generate the following types of personal data in relation to the Services: + +- **Contact details:** you may provide us with contact and business information such as name, e-mail address, phone number, or job title through our Services, such as by submitting forms available on our sites (e.g. "Contact us" forms, subscription to our newsletters, etc.). +- **Account data:** Certain Wing Cloud products or services may require registration. When you sign up and create your account, you may provide us with certain personal data such as e-mail address, hashed password or other information used for authentication and access control, profile picture, and any additional information you will choose to share via the Services. You may also choose to sign-up and login to our Services using your GitHub account. To do so, you may provide us with information connected to this account (e.g., e-mail address, username for that account, profile picture and other information listed in the “connect” screen). Please note that the personal data related to such an account will also be subject to that third-party’s terms and privacy policy. Hence, we recommend you to carefully read the terms and privacy policies of such third parties before connecting them to your use of our Services. +- **Interactions and communications:** correspondence with us (e.g., for support purposes) via the Services or our social media pages (such as Twitter, Facebook), as well as via chats, surveys, feedback, calls and video recordings, and analyses thereof. +- **Usage and analytics data:** connectivity, technical and behavioral usage data, user agent, IP addresses, device data (such as type, OS, device ID, browser version, locale and language settings used), activity, communication and performance logs, session recordings, issues and bugs, and the cookies and pixels installed or utilized on your device as you access or otherwise use the Services. + +When we offer our Services to business customers (“Business Customers”), we may also process personal data concerning their internal focal persons who directly engage with Wing Cloud concerning their organizational account, billing contacts and authorized signatories on behalf of the Business Customer; as well as the customer’s business needs and preferences, as identified to us or recognized through our engagement with such Business Customer. If you use our Services on behalf of your company which is a Business Customer of ours, please note that we may process certain aspects of your personal data as a Processor, on behalf of and under the instruction of the respective Business Customer. For additional details please refer to [Section 10](#h.30j0zll). + +## Data Uses & Lawful Bases for Processing + +We use your personal data as necessary for the following purposes and in reliance on the lawful bases detailed in the chart below: + +| Purpose | Lawful basis for processing | +| --- | --- | +| To facilitate, operate and provide our Services. | Performance of a Contract, Legitimate Interests, Consent (to the extent applicable) | +| To authenticate your identity, and allow you to access our Services (for Wing Cloud Services requiring registration) | Legitimate Interests, Performance of a Contract | +| To gain a better understanding on how you use and interact with our Services, and how we could improve your and others’ user experience and continue improving our offerings and the overall performance of our Services. | Legitimate Interest, Consent (to the extent applicable) | +| To provide customer service and technical support. | Performance of a Contract, Legitimate Interest | +| To support and enhance our data security measures, including for purposes of preventing and mitigating the risks of fraud, error or any illegal or prohibited activity. | Compliance with legal obligations, Legitimate interest, Performance of a Contract | +| To comply with court orders and warrants, and prevent misuse of the Services, and to take any action in any related legal dispute and proceeding. | Compliance with legal obligations, Legitimate interest, Performance of a Contract | +| To comply with applicable laws and regulations. | Compliance with legal obligations | +| To contact you with general or personalized Service-related messages. | Performance of a Contract, Legitimate Interest | +| To carry out, facilitate and optimize our marketing campaigns, ad management and sales operations, and to manage and deliver advertisements for our products and services more effectively, including on other websites and applications, and contact you with promotional messages that may be of specific interest you. | Consent (to the extent applicable), Legitimate Interest | +| To explore and pursue growth opportunities by facilitating a stronger local presence and tailored experiences. | Legitimate Interest | +| To facilitate, sponsor and offer certain events, contests and promotions. | Legitimate Interest, Consent (to the extent applicable) | +| To create aggregated data, inferred non-personal data or anonymized or pseudonymized data (de-identified data), which we or our business partners may use to provide and improve our respective services, conduct research, or for any other purpose. | Legitimate Interest, Performance of a Contract, Compliance with legal obligations | + +If you reside or are using the Services in a territory governed by privacy laws under which “Consent” is the only or most appropriate lawful basis for the processing of personal data as described herein (in general, or specifically with respect to the types of personal data you expect or elect to process or have processed by us or via the Services, or due to nature of such processing), your acceptance of this Privacy Notice will be deemed as your consent to the processing of your personal data for all purposes detailed in this Privacy Notice, unless applicable law requires a different form of consent. If you wish to revoke such consent, please contact us at [privacy@wing.cloud](mailto:privacy@wing.cloud). + +## Data Storage and Transfer + +We and our authorized service providers (further detailed below) maintain, store and process personal data in the United States of America, Europe, Israel and other locations, as reasonably necessary for the proper performance and delivery of our Services, for our internal business purposes in the locations where Wing Cloud resides, or as may be required by law. + +While privacy laws may vary between jurisdictions, Wing Cloud is committed to protect personal data in accordance with this Privacy Notice and customary industry standards, and such appropriate lawful mechanisms and contractual terms requiring adequate data protection, regardless of any lesser legal requirements that may apply in the jurisdiction to which such data is transferred. + +Wing Cloud has offices in the United States and in Israel, the latter a jurisdiction which is considered by the European Commission, the Swiss Federal Data Protection and Information Commissioner (FDPIC), and the UK Secretary of State to have an adequate level of protection for personal data originating from the EEA, Switzerland and the UK, respectively. We transfer personal data from the EEA, Switzerland or the UK to Israel on this basis. For data transfers from the EEA, Switzerland or UK to countries that are not considered to be offering an adequate level of data protection, we and the relevant data exporters and importers have entered into updated Standard Contractual Clauses as approved by the European Commission, FDPIC and UK Information Commissioner’s Office (ICO). + +## How Long We Retain Your Personal Data + +We retain personal data for as long as we deem it as reasonably necessary in order to maintain and expand our relationship and provide you with our Services and offerings; in order to comply with our legal and contractual obligations; or to protect ourselves from any potential disputes (i.e., as required by laws applicable to log-keeping, records and bookkeeping, and in order to have proof and evidence concerning our relationship, should any legal issues arise following your discontinuance of use), all in accordance with our data retention policy and applicable laws. + +To determine the appropriate retention period for personal data, we consider the amount, nature, and sensitivity of the personal data, the potential risk of harm from unauthorized use or disclosure of your personal data, the purposes for which we process your personal data and the applicable legal requirements. + +Please note that except as required by applicable law or our specific agreements with you, we will not be obligated to retain your personal data for any particular period, and we are free to securely delete, anonymize or restrict access to it for any reason and at any time, with or without notice to you. + +If you have any questions about our data retention policy, please contact us by e-mail at [privacy@wing.cloud](mailto:privacy@wing.cloud). + +## How We Share or Otherwise Disclose Your Personal Data + +We disclose personal data in the following ways: + +- **Service Providers:** We engage selected third-party companies and individuals to perform services on our behalf or complementary to our own. Such service providers include hosting and server co-location services, communications and content delivery networks (CDNs), data security services, billing and payment processing services, fraud detection and prevention services, web and product analytics, e-mail distribution and monitoring services, session or activity recording services, remote access services, content transcription and analysis services, performance measurement, data optimization and marketing services, social and advertising networks, content and data enrichment providers, event production and hosting services, e-mail, voicemails, support, enablement and customer relation management systems, and our legal, financial, privacy and compliance advisors (collectively, “service providers”). Our service providers may have access to personal data, depending on each of their specific roles and purposes in facilitating and enhancing our Services, and may only use the data as determined in our agreements with them. +- **Partnerships:** We may engage selected business and channel partners, resellers, distributors and providers of professional services related to our Services, which allow us to explore and pursue growth opportunities by facilitating a stronger local presence and tailored experiences for our customers, users and prospects. In such instances, we may share relevant contact, business and usage details with the respective partner, to allow them to engage with those entities and individuals for such purposes. If you directly engage with any of our partners, please note that any aspect of that engagement that is not directly related to the Services and directed by us is beyond the scope of Wing Cloud’s Terms of Service and this Privacy Notice, and may therefore be covered by the partner’s own terms and policies. Please review the privacy notices and terms of services of those businesses for more information about what each of those businesses does with your personal data. +- **Service Integrations:** Our Services may allow or require connection or integration with third-party services, for example, GitHub. The provider of this connected or integrated third-party service may receive certain relevant data about or from your account on the Services, or share certain relevant data from your account on the third-party provider’s service with our Services, including personal data, depending on the nature and purpose of such integration. Note that we do not receive or store your passwords for any of these third-party services (but do typically require your API key in order to integrate with them). +- **Event Sponsors:** If you attend an event or webinar organized by us, or download or access an asset on our sites related to such an event, webinar or other activity involving third-party sponsors or presenters, we may share your personal data with them. Depending on the applicable law, you may consent to such sharing via the registration form or by allowing your attendee badge to be scanned at a sponsor booth where relevant. In these circumstances, your personal data will be subject to the sponsors’ privacy statements. If you do not wish for your personal data to be shared, you may choose not to opt-in via the event/webinar registration, or elect to not have your badge scanned, or you can opt-out in accordance with Section 7 below. +- **Sharing your Feedback or Recommendations:** If you submit a public review or feedback, note that we may (at our discretion) store and present your review on our sites and in our Services. If you wish to remove your public review, please contact us at [privacy@wing.cloud](mailto:privacy@wing.cloud). +- **Business Customers:** Our Business Customers may have access to any personal data we process on their behalf in our capacity as a “processor” or a “service provider”, including personal data relating to their users, as it occurs in the context of their use of our Services. +- **Legal Compliance:** We may disclose or allow government and law enforcement officials access to your personal data, in response to a subpoena, search warrant or court order (or similar requirement), or in compliance with applicable laws and regulations. Such disclosure or access may occur if we believe in good faith that: (a) we are legally compelled to do so; (b) disclosure is appropriate in connection with efforts to investigate, prevent, or take action regarding actual or suspected illegal activity, fraud, or other wrongdoing; or (c) such disclosure is required to protect our legitimate business interests, including the security or integrity of our products and services. +- **Protecting Rights and Safety:** We may share personal data with others if we believe in good faith that this will help protect the rights, property or personal safety of Wing Cloud and our employees, any of our prospects, users or customers, or any members of the general public. +- **Wing Cloud Subsidiaries and Affiliated Companies:** We may share personal data internally within our group, for the purposes described in this Privacy Notice. In addition, should Wing Cloud or any of its subsidiaries or affiliates undergo any change in control or ownership, including by means of merger, acquisition or purchase of substantially all or part of its assets, personal data may be shared with or transferred to the parties involved in such an event. We may disclose personal data to a third-party during negotiation of, in connection with or as an asset in such a corporate business transaction. Personal data may also be disclosed in the event of insolvency, bankruptcy or receivership. + +For the avoidance of doubt, Wing Cloud may share personal data in additional manners, pursuant to your explicit approval, or if we are legally obligated to do so, or if we have successfully rendered such data non-personal, non-identifiable and anonymous. We may transfer, share or otherwise use non-personal and non-identifiable data at our sole discretion and without the need for further approval. + +## Cookies and Data Collection Technologies and Do Not Track + +We and our service providers use “cookies”, anonymous identifiers, pixels, container tags and other technologies in order to provide our Services and ensure that they perform properly, to analyze our performance and marketing activities, for personalization purposes, for product development and improvements, and to personalize your experience. + +Cookies are packets of information sent to your web browser and then sent back by the browser each time it accesses the server that sent the cookie. Some cookies are removed when you close your browser tab or window. These are the “Session Cookies”. Some last for longer periods and are called “Persistent Cookies”. We use both types. + +We use Persistent Cookies to remember your log-in details and make it easier for you to log-in the next time you access the platform. We may use this type of cookies and Session Cookies for additional purposes, to facilitate the use of the Services’ features and tools. We may also use HTML5 local storage or Flash cookies for the above-mentioned purposes. These technologies differ from browser cookies in the amount and type of data they store, and how they store it. + +Whilst we do not change our practices in response to a “Do Not Track” signal in the HTTP header from a browser or mobile application, you can manage your cookies preferences, including whether or not to accept them and how to remove them, through your browser settings. Please bear in mind that disabling cookies may complicate or even prevent you from using the Services. + +We also use the web analytics tool Google Analytics. This tool helps us understand users’ behavior on our Services, including by tracking page content, and click/touch, movements, scrolls and keystroke activities. Further information about the privacy practices of our analytics service provider is available at: www.google.com/policies/privacy/partners. Further information about your option to opt-out of this analytics service is available at: [https://tools.google.com/dlpage/gaoptout](https://tools.google.com/dlpage/gaoptout). + +Please note that if you get a new computer, install a new browser, erase or otherwise alter your browser’s cookie file (including upgrading certain browsers), you may also clear the opt-out cookies installed once you opt-out, so an additional opt-out will be necessary to prevent additional tracking. + +For more information on our cookie and data collection technologies practices, you may also use the “Cookie settings” feature available in our Services depending on your location and activity on our Services, as applicable. + +## Communications + +We engage in service and promotional communications, through e-mail, phone, SMS and notifications. + +**Service Communications:** We may contact you with important information regarding our Services. For example, we may send you notifications (through any of the means available to us) of changes or updates to our Services, billing issues, log-in attempts or password reset notices, etc. Please note that you will not be able to opt out of receiving certain service communications which are integral to your use of some of our Services (like password resets or billing notices). + +**Promotional Communications:** We may also notify you about new features, additional offerings, events, special opportunities or any other information we think you will find valuable, as our customer, user or prospect, subject to any necessary collection of your consent as appropriate based on applicable laws. We may provide such notices through any of the contact means available to us (e.g., phone, mobile or e-mail), through the Services, or through our marketing campaigns on any other sites or platforms. + +If you do not wish to receive such promotional communications, you may notify us at any time by sending an e-mail to: [privacy@wing.cloud](mailto:privacy@wing.cloud) or by following the instructions contained in the promotional communications you receive. + +## Data Security + +We have implemented industry-standard physical, procedural and technical security measures, designed to secure your personal data, to minimize the risks of theft, damage, loss of information, or unauthorized access or use of information. However, we cannot guarantee that our Services will be immune from any wrongdoings, malfunctions, unlawful interceptions or access, or other kinds of abuse and misuse. If there is any unexpected activity or inaccurate information or if you have reason to believe that your information is no longer secure, or if you have any questions about our security, please contact us by e-mail at [privacy@wing.cloud](mailto:privacy@wing.cloud). + +## Your Data Subject Rights + +Individuals have rights concerning their personal data. Please contact us by e-mail at: [privacy@wing.cloud](mailto:privacy@wing.cloud) if you wish to exercise your privacy rights under any applicable law, including the EU or UK General Data Protection Regulation (GDPR), the California Consumer Privacy Act (CCPA), and others such as – to the extent applicable – the right to know/request access to (specific pieces of personal data collected; categories of personal data collected; categories of sources from whom the personal data was collected; purpose of collecting personal data; categories of third parties with whom we have shared personal data), to request correction or erasure of your personal data held with Wing Cloud, or to restrict or object to such personal data’s processing (including the right to direct us not to sell or share your personal data to third parties now or in the future, as described below), or to port such personal data, or the right to equal services and prices (e.g. freedom from discrimination) (each to the extent available to you under the laws which apply to you). Under some regulatory frameworks, such as the GDPR, you may also have the right to lodge a complaint with the relevant supervisory authority, as applicable. These rights are also subject to various exclusions and exceptions under applicable laws. + +We will not charge a fee to process or respond to your verifiable privacy request unless it is excessive, repetitive, or manifestly unfounded. If we determine that the request warrants a fee, we will tell you why we made that decision and provide you with a cost estimate before completing your request. Alternatively, we may refuse to comply with your request in such circumstances. + +To the extent applicable to you, you may also designate an authorized agent, in writing or through a power of attorney, to request to exercise your privacy rights on your behalf. The authorized agent may submit a request to exercise these rights by emailing us. + +Please note that when you or an authorized agent ask us to exercise any of your rights under this policy or applicable law, we may need to ask you to provide us with certain credentials to make sure that you are who you claim you are, to avoid disclosure to you of personal data related to others and to ask you to provide further information to better understand the nature and scope of data regarding which you request to exercise your rights. Such additional data may be then retained by us for legal, compliance and auditing purposes (e.g., as proof of the identity of the person submitting the request or proof of request fulfillment). We will not fulfill your request unless you have provided sufficient information that enables us to reasonably verify that you are the individual about whom we collected the personal data. + +Please also note that we may deny your request or we may retain certain elements of your personal data if it is necessary for us or our service providers. We will provide details of our reasoning to you in our correspondence on the matter. + +## Data Controller/Processor + +Certain data protection laws and regulations, such as the EU GDPR, UK GDPR, and CCPA, typically distinguish between two main roles for parties processing personal data: the “data controller” (or under the CCPA, “business”), who determines the purposes and means of processing; and the “data processor” (or under the CCPA, “service provider”), who processes the data on behalf of the data controller (or business). Below we explain how these roles apply to our Services, to the extent that such laws and regulations apply. + +Wing Cloud assumes the responsibilities of “data controller” (to the extent applicable under law) for the processing of all the personal data listed in Section 1 above as set forth in this Privacy Notice. + +However, when Wing Cloud processes personal data on behalf of its Business Customers, Wing Cloud will act as a “data processor” of such data and therefore process the data strictly in accordance with the relevant Business Customer’s reasonable instructions and as further stipulated in the Data Processing Addendum and other commercial agreements we may have with the Business Customer. As the data controllers of such personal data, our Business Customers are solely responsible for determining whether and how they wish to use our Services, and for complying with their obligations under applicable data protection laws and regulations, including handling data subject rights requests by their users and other individuals whose personal data they process through the Services. + +## Additional Notices & Contact Details + +**Updates and Amendments:** We may update and amend this Privacy Notice from time to time by posting an amended version on our Services. The amended version will be effective as of the date it is published. We will provide prior notice if we believe any substantial changes are involved via any of the communication means available to us or via the Services. After such notice period, all amendments shall be deemed accepted by you. In the event consent is required based on where you reside, you will be asked to consent prior to being allowed to access our Services subsequent to a Privacy Notice update/amendment. + +**External Links:** While our Services may contain links to other websites or services, we are not responsible for their privacy practices. We encourage you to pay attention when you leave our Services for the website or application of such third parties, and to read the privacy policies of each and every website and service you visit. This Privacy Notice applies only to our Services. + +**US State Laws Requirements:** This Privacy Notice describes the categories of personal information we may collect and the sources of such information (in Section 1 above), and our retention (Section 4) and deletion (Section 9) practices. We also included information about how we may process your information, which includes “business purposes” under the CCPA and similar US State Laws. If you would like to opt out of the “sale” or “sharing” (as such terms are defined under applicable U.S. State Laws including the CCPA) of your personal information, please contact us at privacy@wing.cloud. We may disclose personal information with third parties or allow them to collect personal information from our Services as described in Section 5 above, if those third parties are our Business Customers (in respect of users’ personal data processed on their behalf), or our authorized Service Providers or business partners who have agreed to our contractual limitations as to their retention, use, and disclosure of such personal data, or direct us to disclose your personal data to third parties. You may also designate an authorized agent, in writing or through a power of attorney, to request to exercise your privacy rights on your behalf. The authorized agent may submit a request to exercise these rights by emailing us at privacy@wing.cloud. Note that we will not discriminate against you by withholding our Services from you or providing a lower quality of service to you for requesting to exercise your rights under the law, to the extent possible. + +If you have any questions or would like to exercise your rights under any applicable US State Laws, you can contact us at privacy@wing.cloud. + +**Children:** Our Services are not designed to attract minors. We do not knowingly collect personal data from minors and do not wish to do so. If we learn that a person who is considered a minor according to applicable law is using the Services, we will attempt to prohibit and block such use and will make our best efforts to promptly delete any personal data stored with us with regard to such minor. If you believe that we might have any such data, please contact us by e-mail at [privacy@wing.cloud](mailto:privacy@wing.cloud). + +**Contacting Us:** If you have any comments or questions regarding our Privacy Notice, or if you have any concerns regarding your personal data held with us, please contact Wing Cloud at [privacy@wing.cloud](mailto:privacy@wing.cloud). diff --git a/README.md b/README.md index f7801ac32e2..1a26949ce74 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,58 @@ + + + +
+ Wing Banner +
+

Welcome to the Wing Language! :wave:

- Take a Tour - ▪︎ - Getting Started - ▪︎ - Join Slack - ▪︎ - FAQ - ▪︎ - Roadmap - ▪︎ - Issues - ▪︎ - Discussions - ▪︎ - Contribute +Take a Tour +▪︎ +Getting Started +▪︎ +Join Discord +▪︎ +FAQ +▪︎ +Roadmap +▪︎ +Issues +▪︎ +Discussions +▪︎ +Contribute +

-**Winglang** is a new open-source programming language designed for the cloud (aka "*cloud-oriented*"). -Wing enables developers to build distributed systems that leverage cloud services as first-class citizens by combining infrastructure ***and*** application code in a safe and unified programming model (aka "*cloud-oriented*"). -Wing programs can be executed locally (*yes, no internet required*) using a fully-functional simulator, or deployed to any cloud provider (*yes, Wing programs are portable across providers*). +**Winglang** is a new open-source programming language designed for the cloud (aka "_cloud-oriented_"). +Wing enables developers to build distributed systems that leverage cloud services as first-class citizens by combining infrastructure **_and_** application code in a safe and unified programming model (aka "_cloud-oriented_"). +Wing programs can be executed locally (_yes, no internet required_) using a fully-functional simulator, or deployed to any cloud provider (_yes, Wing programs are portable across providers_). The mission of Winglang is to bring back your creative flow and close the gap between imagination and creation. -Developing for the cloud today requires mastering various layers of the cloud stack, IAM roles, networking, and numerous tools, along with finding creative ways to test and debug code. In addition, long deployment times hinder iteration cycles and take developers out of their creative flow. +Developing for the cloud today requires mastering various layers of the cloud stack, IAM roles, networking, and numerous tools, along with finding creative ways to test and debug code. In addition, long deployment times hinder iteration cycles and take developers out of their creative flow. Winglang addresses these pains by letting you work at a higher level of abstraction and allowing you to focus on business logic instead of cloud mechanics, only surfacing low-level details when it's needed. We also provide you with a set of tools that let you test your code locally, significantly faster than before. -

- Wing Demo -

+
+ Wing Demo +
-Wing is built by [Elad Ben-Israel](https://github.com/eladb), the guy behind the [AWS CDK](https://github.com/aws/aws-cdk), the gang at the [Wing Cloud team](https://www.wing.cloud/) and an amazing [community](https://t.winglang.io/slack) of contributors (also known as Wingnuts). +Wing is built by [Elad Ben-Israel](https://github.com/eladb), the guy behind the [AWS CDK](https://github.com/aws/aws-cdk), the gang at the [Wing Cloud team](https://www.wing.cloud/) and an amazing [community](https://t.winglang.io/discord) of contributors (also known as Wingnuts). Click [here](https://www.youtube.com/watch?v=5_RhWwgGue0) to watch a short video introduction to the Wing language. ## Why do we think the cloud needs a programming language? 🤔 -Cloud applications are fundamentally different from applications that run on a single machine - +Cloud applications are fundamentally different from applications that run on a single machine - they are distributed systems that rely on cloud infrastructure to achieve their goals. -In order to be able to express both infrastructure and application logic in a safe and unified programming model, -Winglang has two execution phases: *preflight* for infrastructure definitions and *inflight* for runtime code. +In order to be able to express both infrastructure and application logic in a safe and unified programming model, +Winglang has two execution phases: _preflight_ for infrastructure definitions and _inflight_ for runtime code. -Preflight code is executed *during compilation* and produces the infrastructure configuration for your app (e.g. **Terraform**, **CloudFormation**, etc). +Preflight code is executed _during compilation_ and produces the infrastructure configuration for your app (e.g. **Terraform**, **CloudFormation**, etc). Inflight code is compiled into **JavaScript** and executed within cloud compute platforms in Node.js environments. Let's look at a simple example: @@ -62,14 +70,14 @@ queue.setConsumer(inflight (message) => { }); ``` -`cloud.Queue`, `cloud.Counter` and `cloud.Bucket` are *preflight objects*. -They represent cloud infrastructure resources. +`cloud.Queue`, `cloud.Counter` and `cloud.Bucket` are _preflight objects_. +They represent cloud infrastructure resources. When compiled to a specific cloud provider, such as AWS, a Terraform file will be produced with the provider's implementation -of these resources. The `queue.setConsumer()` method is a *preflight method* that configures the infrastructure to -invoke a particular *inflight function* for each message in the queue. +of these resources. The `queue.setConsumer()` method is a _preflight method_ that configures the infrastructure to +invoke a particular _inflight function_ for each message in the queue. **Now comes the cool part:** the code that runs inside the inflight function interacts with the `counter` and the `bucket` objects -through their *inflight methods* (`counter.inc()` and `bucket.put()`). These methods can only be +through their _inflight methods_ (`counter.inc()` and `bucket.put()`). These methods can only be called from inflight scopes. ### Very cool, but what here cannot be done by a library or compiler extension? @@ -82,16 +90,16 @@ You are welcome to read more about it [here](https://www.winglang.io/docs/faq/wh Wing was built from scratch to make it easy for building applications on any cloud. It includes an assembly of different features that serve that purpose: -* [Cloud services](https://www.winglang.io/docs/faq/supported-clouds-services-and-engines/supported-services) as first-class citizens, with [phase modifiers](https://www.winglang.io/contributing/rfcs/language-spec#13-phase-modifiers) for describing infrastructure and runtime code ([`preflight` and `inflight`](https://www.winglang.io/docs/concepts/inflights)). -* [Wing Cloud Library](https://www.winglang.io/docs/category/cloud-library) provides a standard set of resources that lets you write cloud portable code. -* [Compiler plugins](https://www.winglang.io/docs/tools/compiler-plugins) that keep you in control by allowing you to customize the infrastructure definitions and run policy checks. -* Use any resource in the Terraform ecosystem as first-class citizen in your app. -* [JavaScript interoperability](https://www.winglang.io/contributing/rfcs/language-spec#5-interoperability). -* Automatic generation of IAM policies and other cloud mechanics based on source code. -* [Wing Console](https://www.winglang.io/docs/start-here/installation#wing-console) - a visual application-centric operations and management console, that lets you interact with... -* A [simulator](https://www.winglang.io/docs/concepts/simulator) that can used for testing and debugging in milliseconds. -* JSON as a [primitive data type](https://www.winglang.io/docs/language-reference#114-json-type) with schema validation support for each conversion to and from structs. -* [Immutability by default](https://www.winglang.io/blog/2023/02/02/good-cognitive-friction#immutable-by-default), [implicit async code](https://www.winglang.io/contributing/rfcs/language-spec#113-asynchronous-model), and [safety from nulls and undefined](https://www.winglang.io/docs/language-reference#16-optionality). +- [Cloud services](https://www.winglang.io/docs/faq/supported-clouds-services-and-engines/supported-services) as first-class citizens, with [phase modifiers](https://www.winglang.io/contributing/rfcs/language-spec#13-phase-modifiers) for describing infrastructure and runtime code ([`preflight` and `inflight`](https://www.winglang.io/docs/concepts/inflights)). +- [Wing Cloud Library](https://www.winglang.io/docs/category/cloud) provides a standard set of resources that lets you write cloud portable code. +- [Custom platforms](https://www.winglang.io/docs/concepts/platforms) that keep you in control by allowing you to customize the infrastructure definitions and run policy checks. +- Use any resource in the Terraform ecosystem as first-class citizen in your app. +- [JavaScript interoperability](https://www.winglang.io/contributing/rfcs/language-spec#5-interoperability). +- Automatic generation of IAM policies and other cloud mechanics based on source code. +- [Wing Console](https://www.winglang.io/docs/start-here/installation#wing-console) - a visual application-centric operations and management console, that lets you interact with... +- A [simulator](https://www.winglang.io/docs/concepts/simulator) that can used for testing and debugging in milliseconds. +- JSON as a [primitive data type](https://www.winglang.io/docs/language-reference#114-json-type) with schema validation support for each conversion to and from structs. +- [Immutability by default](https://www.winglang.io/blog/2023/02/02/good-cognitive-friction#immutable-by-default), [implicit async code](https://www.winglang.io/contributing/rfcs/language-spec#113-asynchronous-model), and [safety from nulls and undefined](https://www.winglang.io/docs/language-reference#16-optionality). For a more in-depth look at Wing's features and benefits, check out our [documentation](https://www.winglang.io/docs/). @@ -114,13 +122,13 @@ It's a once-in-a-lifetime adventure into the Wing rabbit hole! Here are some questions we're commonly asked that are covered by our [FAQ](https://www.winglang.io/docs/category/faq): -* [Who is behind this project?](https://www.winglang.io/docs/faq/who-is-behind-wing) -* [Which clouds are supported by Wing?](https://www.winglang.io/docs/faq/supported-clouds-services-and-engines/supported-clouds) -* [Which provisioning engines are supported by Wing?](https://www.winglang.io/docs/faq/supported-clouds-services-and-engines/supported-provisioning-engines) +- [Who is behind this project?](https://www.winglang.io/docs/faq/who-is-behind-wing) +- [Which clouds are supported by Wing?](https://www.winglang.io/docs/faq/supported-clouds-services-and-engines/supported-clouds) +- [Which provisioning engines are supported by Wing?](https://www.winglang.io/docs/faq/supported-clouds-services-and-engines/supported-provisioning-engines) ## Community 💬 -Join our flock in the [Wing Slack](https://t.winglang.io/slack) community. +Join our flock in the [Wing Discord](https://t.winglang.io/discord) community. We're here to help each other, answer questions, and share our cloud adventures. Alternatively, post any questions on [GitHub Discussions](https://github.com/winglang/wing/discussions). @@ -140,9 +148,9 @@ We are incredibly grateful to our entire community for contributing bug fixes an ## License 📜 -Wing is licensed under the [MIT License](./LICENSE.md). +Wing is licensed under the [MIT License](./LICENSE.md). Contributions are made under our [contribution license](./CONTRIBUTION_LICENSE.md). Happy coding, and remember: the sky's the limit with Wing (yes, another pun)! 🌤️🚀 -[wing slack]: https://t.winglang.io/slack +[wing discord]: https://t.winglang.io/discord diff --git a/SECURITY.md b/SECURITY.md index 631f7ff8eea..e474a827b29 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -3,3 +3,8 @@ ## Reporting a Vulnerability To report a vulnerability, please email us at security@winglang.io + + +### Owner + +For any questions regarding this document please contact @staycoolcall911 diff --git a/apps/jsii-docgen/.gitattributes b/apps/jsii-docgen/.gitattributes index bc7ca563f01..dea333ed4d4 100644 --- a/apps/jsii-docgen/.gitattributes +++ b/apps/jsii-docgen/.gitattributes @@ -1,6 +1,5 @@ # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". -*.snap linguist-generated /.eslintrc.json linguist-generated /.gitattributes linguist-generated /.gitignore linguist-generated diff --git a/apps/jsii-docgen/.gitignore b/apps/jsii-docgen/.gitignore index 850eab149bb..853d6097a26 100644 --- a/apps/jsii-docgen/.gitignore +++ b/apps/jsii-docgen/.gitignore @@ -30,9 +30,6 @@ jspm_packages/ .yarn-integrity .cache !/.projenrc.js -/test-reports/ -junit.xml -/coverage/ !/.prettierignore !/.prettierrc.json !/.npmrc diff --git a/apps/jsii-docgen/.npmignore b/apps/jsii-docgen/.npmignore index b89fe79aff5..b3a612af0f0 100644 --- a/apps/jsii-docgen/.npmignore +++ b/apps/jsii-docgen/.npmignore @@ -1,8 +1,5 @@ # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". /.projen/ -/test-reports/ -junit.xml -/coverage/ /test/ /tsconfig.dev.json /src/ diff --git a/apps/jsii-docgen/.projen/deps.json b/apps/jsii-docgen/.projen/deps.json index 79ac7266541..d6c94e81f49 100644 --- a/apps/jsii-docgen/.projen/deps.json +++ b/apps/jsii-docgen/.projen/deps.json @@ -4,10 +4,6 @@ "name": "@types/fs-extra", "type": "build" }, - { - "name": "@types/jest", - "type": "build" - }, { "name": "@types/node", "version": "^16", @@ -61,23 +57,9 @@ "version": "^8", "type": "build" }, - { - "name": "jest", - "type": "build" - }, - { - "name": "jest-junit", - "version": "^15", - "type": "build" - }, { "name": "jsii", - "version": "~5.0.0", - "type": "build" - }, - { - "name": "npm-check-updates", - "version": "^16", + "version": "~5.3.11", "type": "build" }, { @@ -89,17 +71,22 @@ "type": "build" }, { - "name": "ts-jest", + "name": "tsx", "type": "build" }, { - "name": "ts-node", + "name": "typescript", "type": "build" }, { - "name": "typescript", + "name": "vitest", "type": "build" }, + { + "name": "@types/node", + "version": "^20.11.0", + "type": "devenv" + }, { "name": "@jsii/spec", "type": "runtime" diff --git a/apps/jsii-docgen/.projen/tasks.json b/apps/jsii-docgen/.projen/tasks.json index 7caa2c9e2ec..d46892a8b91 100644 --- a/apps/jsii-docgen/.projen/tasks.json +++ b/apps/jsii-docgen/.projen/tasks.json @@ -74,7 +74,7 @@ "description": "Synthesize project files", "steps": [ { - "exec": "ts-node --project tsconfig.dev.json .projenrc.ts" + "exec": "tsx --tsconfig tsconfig.dev.json .projenrc.ts" } ] }, @@ -125,10 +125,6 @@ "name": "post-compile", "description": "Runs after successful compilation" }, - "post-upgrade": { - "name": "post-upgrade", - "description": "Runs after upgrading dependencies" - }, "pre-compile": { "name": "pre-compile", "description": "Prepare the project for compilation" @@ -138,55 +134,7 @@ "description": "Run tests", "steps": [ { - "exec": "jest --passWithNoTests --all --updateSnapshot --coverageProvider=v8 --testTimeout=30000" - } - ] - }, - "test:watch": { - "name": "test:watch", - "description": "Run jest in watch mode", - "steps": [ - { - "exec": "jest --watch" - } - ] - }, - "upgrade": { - "name": "upgrade", - "description": "upgrade dependencies", - "env": { - "CI": "0" - }, - "steps": [ - { - "exec": "pnpm update npm-check-updates" - }, - { - "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='jsii'" - }, - { - "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='jsii'" - }, - { - "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='jsii'" - }, - { - "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='jsii'" - }, - { - "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='jsii'" - }, - { - "exec": "pnpm i --no-frozen-lockfile" - }, - { - "exec": "pnpm update @types/fs-extra @types/jest @types/node @types/semver @types/yargs @typescript-eslint/eslint-plugin @typescript-eslint/parser constructs eslint-config-prettier eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import eslint-plugin-prettier eslint jest jest-junit jsii npm-check-updates prettier projen ts-jest ts-node typescript @jsii/spec case fs-extra glob glob-promise jsii-reflect semver yargs" - }, - { - "exec": "pnpm exec projen" - }, - { - "spawn": "post-upgrade" + "exec": "vitest run --update" } ] }, diff --git a/apps/jsii-docgen/.projenrc.ts b/apps/jsii-docgen/.projenrc.ts index 2ee950d10f4..4b9cd2c79ba 100644 --- a/apps/jsii-docgen/.projenrc.ts +++ b/apps/jsii-docgen/.projenrc.ts @@ -1,4 +1,4 @@ -import { typescript, javascript } from "projen"; +import { typescript, javascript, DependencyType } from "projen"; const project = new typescript.TypeScriptProject({ name: "@winglang/jsii-docgen", @@ -15,11 +15,12 @@ const project = new typescript.TypeScriptProject({ "jsii-docgen": "bin/jsii-docgen", }, devDeps: [ - "jsii@~5.0.0", + "vitest", + "tsx", + "jsii@~5.3.11", "@types/fs-extra", "@types/semver", "@types/yargs@^16", - "@types/node", "constructs", ], deps: [ @@ -38,8 +39,15 @@ const project = new typescript.TypeScriptProject({ prettier: true, release: false, package: false, + jest: false, + depsUpgrade: false, }); +project.defaultTask!.reset("tsx --tsconfig tsconfig.dev.json .projenrc.ts"); +project.deps.removeDependency("ts-node"); + +project.testTask.reset("vitest run --update"); + const libraryFixtures = ["construct-library"]; // compile the test fixtures with jsii @@ -59,11 +67,6 @@ project.tasks.addEnvironment("NODE_OPTIONS", "--max-old-space-size=7168"); // Avoid a non JSII compatible package (see https://github.com/projen/projen/issues/2264) // project.package.addPackageResolutions("@types/babel__traverse@7.18.2"); -// override default test timeout from 5s to 30s -project.testTask.reset( - "jest --passWithNoTests --all --updateSnapshot --coverageProvider=v8 --testTimeout=30000" -); - project.addFields({ volta: { extends: "../../package.json", @@ -73,4 +76,6 @@ project.addFields({ project.package.file.addDeletionOverride("pnpm"); project.tryRemoveFile(".npmrc"); +project.deps.addDependency("@types/node@^20.11.0", DependencyType.DEVENV); + project.synth(); diff --git a/apps/jsii-docgen/package.json b/apps/jsii-docgen/package.json index 1cae345dfe9..4a477f16c6d 100644 --- a/apps/jsii-docgen/package.json +++ b/apps/jsii-docgen/package.json @@ -17,11 +17,8 @@ "eslint": "pnpm exec projen eslint", "package": "pnpm exec projen package", "post-compile": "pnpm exec projen post-compile", - "post-upgrade": "pnpm exec projen post-upgrade", "pre-compile": "pnpm exec projen pre-compile", "test": "pnpm exec projen test", - "test:watch": "pnpm exec projen test:watch", - "upgrade": "pnpm exec projen upgrade", "watch": "pnpm exec projen watch", "projen": "pnpm exec projen" }, @@ -33,82 +30,38 @@ }, "devDependencies": { "@types/fs-extra": "^9.0.13", - "@types/jest": "^27.5.2", - "@types/node": "^16", + "@types/node": "^20.11.0", "@types/semver": "^7.5.1", "@types/yargs": "^16", "@typescript-eslint/eslint-plugin": "^5", "@typescript-eslint/parser": "^5", - "constructs": "^10.2.70", + "constructs": "^10.3", "eslint": "^8", "eslint-config-prettier": "^8.10.0", "eslint-import-resolver-node": "^0.3.9", "eslint-import-resolver-typescript": "^3.6.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-prettier": "^4.2.1", - "jest": "^27.5.1", - "jest-junit": "^15", - "jsii": "~5.0.0", - "npm-check-updates": "^16", + "jsii": "~5.3.11", "prettier": "^2.8.8", "projen": "^0.71.163", - "ts-jest": "^27.1.5", - "ts-node": "^10.9.1", - "typescript": "~4.9.5" + "tsx": "^4.7.0", + "typescript": "~5.3.3", + "vitest": "^1.6.0" }, "dependencies": { - "@jsii/spec": "^1.88.0", + "@jsii/spec": "^1.94.0", "case": "^1.6.3", "fs-extra": "^10.1.0", "glob": "^8.1.0", "glob-promise": "^6.0.3", - "jsii-reflect": "^1.88.0", + "jsii-reflect": "^1.94.0", "semver": "^7.5.4", "yargs": "^16" }, "main": "lib/index.js", "license": "Apache-2.0", "version": "0.0.0", - "jest": { - "testMatch": [ - "/src/**/__tests__/**/*.ts?(x)", - "/(test|src)/**/*(*.)@(spec|test).ts?(x)" - ], - "clearMocks": true, - "collectCoverage": true, - "coverageReporters": [ - "json", - "lcov", - "clover", - "cobertura", - "text" - ], - "coverageDirectory": "coverage", - "coveragePathIgnorePatterns": [ - "/node_modules/" - ], - "testPathIgnorePatterns": [ - "/node_modules/" - ], - "watchPathIgnorePatterns": [ - "/node_modules/" - ], - "reporters": [ - "default", - [ - "jest-junit", - { - "outputDirectory": "test-reports" - } - ] - ], - "preset": "ts-jest", - "globals": { - "ts-jest": { - "tsconfig": "tsconfig.dev.json" - } - } - }, "types": "lib/index.d.ts", "volta": { "extends": "../../package.json" diff --git a/apps/jsii-docgen/src/cli.ts b/apps/jsii-docgen/src/cli.ts index 2f2514c596c..2c26427da47 100644 --- a/apps/jsii-docgen/src/cli.ts +++ b/apps/jsii-docgen/src/cli.ts @@ -58,5 +58,5 @@ export async function main() { main().catch((e) => { console.error(e); - process.exit(1); + process.exitCode = 1; }); diff --git a/apps/jsii-docgen/src/docgen/transpile/wing.ts b/apps/jsii-docgen/src/docgen/transpile/wing.ts index d95a4f2dbc1..523a40aa278 100644 --- a/apps/jsii-docgen/src/docgen/transpile/wing.ts +++ b/apps/jsii-docgen/src/docgen/transpile/wing.ts @@ -71,10 +71,11 @@ const formatSignature = ( name: string, inputs: string[], returns?: string, - isInflight?: boolean + isInflight?: boolean, + isOptionalReturn?: boolean ) => { return `${isInflight ? "inflight " : ""}${name}(${formatArguments(inputs)})${ - returns ? ": " + returns : "" + returns ? ": " + `${returns}${isOptionalReturn ? "?" : ""}` : "" }`; }; @@ -207,9 +208,11 @@ export class WingTranspile extends transpile.TranspileBase { : formatInvocation(type, inputs, name); let returnType: transpile.TranspiledTypeReference | undefined; + let isReturnOptional: boolean = false; if (reflect.Initializer.isInitializer(callable)) { returnType = this.typeReference(callable.parentType.reference); } else if (reflect.Method.isMethod(callable)) { + isReturnOptional = callable.returns.optional; returnType = this.typeReference(callable.returns.type); } const returns = returnType?.toString(typeToString); @@ -220,7 +223,13 @@ export class WingTranspile extends transpile.TranspileBase { import: formatImport(type), parameters, signatures: [ - formatSignature(name, inputs, returns, isInflightMethod(callable.docs)), + formatSignature( + name, + inputs, + returns, + isInflightMethod(callable.docs), + isReturnOptional + ), ], invocations: [invocation], returnType, diff --git a/apps/jsii-docgen/src/docgen/view/api-reference.ts b/apps/jsii-docgen/src/docgen/view/api-reference.ts index 8a408a03597..7d578422fef 100644 --- a/apps/jsii-docgen/src/docgen/view/api-reference.ts +++ b/apps/jsii-docgen/src/docgen/view/api-reference.ts @@ -78,7 +78,7 @@ export class ApiReference { this.constructs = new Constructs( transpile, classes, - this.searchableInterfaces(interfaces) + this.searchableInterfaces([...assembly.allInterfaces]) ); this.classes = new Classes(transpile, classes); this.structs = new Structs(transpile, interfaces); diff --git a/apps/jsii-docgen/src/docgen/view/wing-filters.ts b/apps/jsii-docgen/src/docgen/view/wing-filters.ts index 4d70a58f217..d840ac66a0f 100644 --- a/apps/jsii-docgen/src/docgen/view/wing-filters.ts +++ b/apps/jsii-docgen/src/docgen/view/wing-filters.ts @@ -7,7 +7,6 @@ export const VISIBLE_SUBMODULES = [ "redis", "http", "math", - "regex", ]; export const HIDDEN_METHODS = ["toString", "toJSON", "onLift"]; export const HIDDEN_PROPS = ["node", "display"]; diff --git a/apps/jsii-docgen/test/__fixtures__/libraries/construct-library/package.json b/apps/jsii-docgen/test/__fixtures__/libraries/construct-library/package.json index 3a1dcdfc192..f82a836e72a 100644 --- a/apps/jsii-docgen/test/__fixtures__/libraries/construct-library/package.json +++ b/apps/jsii-docgen/test/__fixtures__/libraries/construct-library/package.json @@ -24,15 +24,6 @@ "email": "dummy@example.com", "organization": false }, - "dependencies": { - "@aws-cdk/aws-events": "^1.204.0", - "@aws-cdk/aws-iam": "^1.204.0", - "@aws-cdk/aws-kms": "^1.204.0", - "@aws-cdk/aws-s3": "^1.204.0", - "@aws-cdk/cloud-assembly-schema": "^1.204.0", - "@aws-cdk/core": "^1.204.0", - "constructs": "^3.4.344" - }, "peerDependencies": { "@aws-cdk/aws-events": "^1.204.0", "@aws-cdk/aws-iam": "^1.204.0", @@ -40,13 +31,20 @@ "@aws-cdk/aws-s3": "^1.204.0", "@aws-cdk/cloud-assembly-schema": "^1.204.0", "@aws-cdk/core": "^1.204.0", - "constructs": "^3.3.69" + "constructs": "^3.4.344" }, "devDependencies": { - "@types/node": "^18.17.13", + "@aws-cdk/aws-events": "1.204.0", + "@aws-cdk/aws-iam": "1.204.0", + "@aws-cdk/aws-kms": "1.204.0", + "@aws-cdk/aws-s3": "1.204.0", + "@aws-cdk/cloud-assembly-schema": "1.204.0", + "@aws-cdk/core": "1.204.0", + "constructs": "3.4.344", + "@types/node": "^20.11.0", "@types/prettier": "2.6.0", - "jsii": "~5.0.21", - "typescript": "^4.9.5" + "jsii": "~5.3.11", + "typescript": "^5.3.3" }, "license": "Apache-2.0", "version": "0.0.0" diff --git a/apps/jsii-docgen/test/__snapshots__/cli.test.ts.snap b/apps/jsii-docgen/test/__snapshots__/cli.test.ts.snap index 89ae002f2e1..698d0bdd805 100644 --- a/apps/jsii-docgen/test/__snapshots__/cli.test.ts.snap +++ b/apps/jsii-docgen/test/__snapshots__/cli.test.ts.snap @@ -1,13 +1,13 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`construct-library 1`] = ` -"# API Reference +"# API Reference -## Resources +## Resources -### GoodbyeBucket +### GoodbyeBucket -#### Initializers +#### Initializers \`\`\`typescript import { submod1 } from 'construct-library' @@ -17,63 +17,63 @@ new submod1.GoodbyeBucket(scope: Construct, id: string, props?: BucketProps) | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | string | *No description.* | -| props | @aws-cdk/aws-s3.BucketProps | *No description.* | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | @aws-cdk/aws-s3.BucketProps | *No description.* | --- -##### \`scope\`Required +##### \`scope\`Required - *Type:* constructs.Construct --- -##### \`id\`Required +##### \`id\`Required - *Type:* string --- -##### \`props\`Optional +##### \`props\`Optional - *Type:* @aws-cdk/aws-s3.BucketProps --- -#### Methods +#### Methods | **Name** | **Description** | | --- | --- | -| applyRemovalPolicy | Apply the given removal policy to this resource. | -| addEventNotification | Adds a bucket notification event destination. | -| addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | -| addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | -| arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | -| grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | -| grantPublicAccess | Allows unrestricted access to objects from this bucket. | -| grantPut | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | -| grantPutAcl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | -| grantRead | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grantReadWrite | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grantWrite | Grant write permissions to this bucket to an IAM principal. | -| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | -| onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | -| onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3UrlForObject | The S3 URL of an S3 object. For example:. | -| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | -| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | -| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | -| addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | -| addInventory | Add an inventory configuration. | -| addLifecycleRule | Add a lifecycle rule to the bucket. | -| addMetric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | -| goodbye | *No description.* | - ---- - -##### \`applyRemovalPolicy\` +| applyRemovalPolicy | Apply the given removal policy to this resource. | +| addEventNotification | Adds a bucket notification event destination. | +| addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | +| addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | +| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | +| grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | +| grantPublicAccess | Allows unrestricted access to objects from this bucket. | +| grantPut | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | +| grantPutAcl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | +| grantRead | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grantReadWrite | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grantWrite | Grant write permissions to this bucket to an IAM principal. | +| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | +| onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | +| onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | +| s3UrlForObject | The S3 URL of an S3 object. For example:. | +| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | +| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | +| addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | +| addInventory | Add an inventory configuration. | +| addLifecycleRule | Add a lifecycle rule to the bucket. | +| addMetric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | +| goodbye | *No description.* | + +--- + +##### \`applyRemovalPolicy\` \`\`\`typescript public applyRemovalPolicy(policy: RemovalPolicy): void @@ -89,13 +89,13 @@ to be replaced. The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). -###### \`policy\`Required +###### \`policy\`Required - *Type:* @aws-cdk/core.RemovalPolicy --- -##### \`addEventNotification\` +##### \`addEventNotification\` \`\`\`typescript public addEventNotification(event: EventType, dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void @@ -114,7 +114,7 @@ Adds a bucket notification event destination. \`\`\` -###### \`event\`Required +###### \`event\`Required - *Type:* @aws-cdk/aws-s3.EventType @@ -122,7 +122,7 @@ The event to trigger the notification. --- -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -130,7 +130,7 @@ The notification destination (Lambda, SNS Topic or SQS Queue). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -142,7 +142,7 @@ for details about allowed filter rules. --- -##### \`addObjectCreatedNotification\` +##### \`addObjectCreatedNotification\` \`\`\`typescript public addObjectCreatedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void @@ -153,7 +153,7 @@ Subscribes a destination to receive notifications when an object is created in t This is identical to calling \`onEvent(EventType.OBJECT_CREATED)\`. -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -161,7 +161,7 @@ The notification destination (see onEvent). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -169,7 +169,7 @@ Filters (see onEvent). --- -##### \`addObjectRemovedNotification\` +##### \`addObjectRemovedNotification\` \`\`\`typescript public addObjectRemovedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void @@ -180,7 +180,7 @@ Subscribes a destination to receive notifications when an object is removed from This is identical to calling \`onEvent(EventType.OBJECT_REMOVED)\`. -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -188,7 +188,7 @@ The notification destination (see onEvent). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -196,7 +196,7 @@ Filters (see onEvent). --- -##### \`addToResourcePolicy\` +##### \`addToResourcePolicy\` \`\`\`typescript public addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult @@ -210,7 +210,7 @@ it's not possible to tell whether the bucket already has a policy attached, let alone to re-use that policy to add more statements to it. So it's safest to do nothing in these cases. -###### \`permission\`Required +###### \`permission\`Required - *Type:* @aws-cdk/aws-iam.PolicyStatement @@ -218,7 +218,7 @@ the policy statement to be added to the bucket's policy. --- -##### \`arnForObjects\` +##### \`arnForObjects\` \`\`\`typescript public arnForObjects(keyPattern: string): string @@ -226,19 +226,19 @@ public arnForObjects(keyPattern: string): string Returns an ARN that represents all objects within the bucket that match the key pattern specified. -To represent all keys, specify \`\`\\"*\\"\`\`. +To represent all keys, specify \`\`"*"\`\`. If you need to specify a keyPattern with multiple components, concatenate them into a single string, e.g.: arnForObjects(\`home/\${team}/\${user}/*\`) -###### \`keyPattern\`Required +###### \`keyPattern\`Required - *Type:* string --- -##### \`grantDelete\` +##### \`grantDelete\` \`\`\`typescript public grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -246,7 +246,7 @@ public grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -254,7 +254,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -262,7 +262,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantPublicAccess\` +##### \`grantPublicAccess\` \`\`\`typescript public grantPublicAccess(allowedActions: string, keyPrefix?: string): Grant @@ -275,8 +275,8 @@ in this bucket, which is useful for when you configure your bucket as a website and want everyone to be able to read objects in the bucket without needing to authenticate. -Without arguments, this method will grant read (\\"s3:GetObject\\") access to -all objects (\\"*\\") in the bucket. +Without arguments, this method will grant read ("s3:GetObject") access to +all objects ("*") in the bucket. The method returns the \`iam.Grant\` object, which can then be modified as needed. For example, you can add a condition that will restrict access only @@ -289,25 +289,25 @@ Note that if this \`IBucket\` refers to an existing bucket, possibly not managed by CloudFormation, this method will have no effect, since it's impossible to modify the policy of an existing bucket. -###### \`allowedActions\`Required +###### \`allowedActions\`Required - *Type:* string the set of S3 actions to allow. -Default is \\"s3:GetObject\\". +Default is "s3:GetObject". --- -###### \`keyPrefix\`Optional +###### \`keyPrefix\`Optional - *Type:* string -the prefix of S3 object keys (e.g. \`home/*\`). Default is \\"*\\". +the prefix of S3 object keys (e.g. \`home/*\`). Default is "*". --- -##### \`grantPut\` +##### \`grantPut\` \`\`\`typescript public grantPut(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -318,7 +318,7 @@ Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM princip If encryption is used, permission to use the key to encrypt the contents of written files will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -326,7 +326,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -334,7 +334,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantPutAcl\` +##### \`grantPutAcl\` \`\`\`typescript public grantPutAcl(identity: IGrantable, objectsKeyPattern?: string): Grant @@ -346,19 +346,19 @@ If your application has the '@aws-cdk/aws-s3:grantWriteWithoutAcl' feature flag calling {@link grantWrite} or {@link grantReadWrite} no longer grants permissions to modify the ACLs of the objects; in this case, if you need to modify object ACLs, call this method explicitly. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* string --- -##### \`grantRead\` +##### \`grantRead\` \`\`\`typescript public grantRead(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -369,7 +369,7 @@ Grant read permissions for this bucket and it's contents to an IAM principal (Ro If encryption is used, permission to use the key to decrypt the contents of the bucket will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -377,7 +377,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -385,7 +385,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantReadWrite\` +##### \`grantReadWrite\` \`\`\`typescript public grantReadWrite(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -404,19 +404,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any --- -##### \`grantWrite\` +##### \`grantWrite\` \`\`\`typescript public grantWrite(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -435,19 +435,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any --- -##### \`onCloudTrailEvent\` +##### \`onCloudTrailEvent\` \`\`\`typescript public onCloudTrailEvent(id: string, options?: OnCloudTrailBucketEventOptions): Rule @@ -458,7 +458,7 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -466,7 +466,7 @@ The id of the rule. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -474,7 +474,7 @@ Options for adding the rule. --- -##### \`onCloudTrailPutObject\` +##### \`onCloudTrailPutObject\` \`\`\`typescript public onCloudTrailPutObject(id: string, options?: OnCloudTrailBucketEventOptions): Rule @@ -489,7 +489,7 @@ so using \`onCloudTrailWriteObject\` may be preferable. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -497,7 +497,7 @@ The id of the rule. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -505,7 +505,7 @@ Options for adding the rule. --- -##### \`onCloudTrailWriteObject\` +##### \`onCloudTrailWriteObject\` \`\`\`typescript public onCloudTrailWriteObject(id: string, options?: OnCloudTrailBucketEventOptions): Rule @@ -523,7 +523,7 @@ so using this method may be preferable to \`onCloudTrailPutObject\`. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -531,7 +531,7 @@ The id of the rule. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -539,7 +539,7 @@ Options for adding the rule. --- -##### \`s3UrlForObject\` +##### \`s3UrlForObject\` \`\`\`typescript public s3UrlForObject(key?: string): string @@ -550,7 +550,7 @@ The S3 URL of an S3 object. For example:. \`s3://onlybucket\` - \`s3://bucket/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -561,7 +561,7 @@ bucket is returned. --- -##### \`transferAccelerationUrlForObject\` +##### \`transferAccelerationUrlForObject\` \`\`\`typescript public transferAccelerationUrlForObject(key?: string, options?: TransferAccelerationUrlOptions): string @@ -575,7 +575,7 @@ for dual-stack endpoint (connect to the bucket over IPv6). For example: - \`https://bucket.s3-accelerate.amazonaws.com\` - \`https://bucket.s3-accelerate.amazonaws.com/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -586,7 +586,7 @@ bucket is returned. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.TransferAccelerationUrlOptions @@ -594,7 +594,7 @@ Options for generating URL. --- -##### \`urlForObject\` +##### \`urlForObject\` \`\`\`typescript public urlForObject(key?: string): string @@ -606,7 +606,7 @@ The https URL of an S3 object. Specify \`regional: false\` at the options for no - \`https://s3.us-west-1.amazonaws.com/bucket/key\` - \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -617,7 +617,7 @@ bucket is returned. --- -##### \`virtualHostedUrlForObject\` +##### \`virtualHostedUrlForObject\` \`\`\`typescript public virtualHostedUrlForObject(key?: string, options?: VirtualHostedStyleUrlOptions): string @@ -630,7 +630,7 @@ The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the - \`https://bucket.s3.amazonaws.com/key\` - \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -641,7 +641,7 @@ bucket is returned. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.VirtualHostedStyleUrlOptions @@ -649,7 +649,7 @@ Options for generating URL. --- -##### \`addCorsRule\` +##### \`addCorsRule\` \`\`\`typescript public addCorsRule(rule: CorsRule): void @@ -657,7 +657,7 @@ public addCorsRule(rule: CorsRule): void Adds a cross-origin access configuration for objects in an Amazon S3 bucket. -###### \`rule\`Required +###### \`rule\`Required - *Type:* @aws-cdk/aws-s3.CorsRule @@ -665,7 +665,7 @@ The CORS configuration rule to add. --- -##### \`addInventory\` +##### \`addInventory\` \`\`\`typescript public addInventory(inventory: Inventory): void @@ -673,7 +673,7 @@ public addInventory(inventory: Inventory): void Add an inventory configuration. -###### \`inventory\`Required +###### \`inventory\`Required - *Type:* @aws-cdk/aws-s3.Inventory @@ -681,7 +681,7 @@ configuration to add. --- -##### \`addLifecycleRule\` +##### \`addLifecycleRule\` \`\`\`typescript public addLifecycleRule(rule: LifecycleRule): void @@ -689,7 +689,7 @@ public addLifecycleRule(rule: LifecycleRule): void Add a lifecycle rule to the bucket. -###### \`rule\`Required +###### \`rule\`Required - *Type:* @aws-cdk/aws-s3.LifecycleRule @@ -697,7 +697,7 @@ The rule to add. --- -##### \`addMetric\` +##### \`addMetric\` \`\`\`typescript public addMetric(metric: BucketMetrics): void @@ -705,7 +705,7 @@ public addMetric(metric: BucketMetrics): void Adds a metrics configuration for the CloudWatch request metrics from the bucket. -###### \`metric\`Required +###### \`metric\`Required - *Type:* @aws-cdk/aws-s3.BucketMetrics @@ -713,25 +713,25 @@ The metric configuration to add. --- -##### \`goodbye\` +##### \`goodbye\` \`\`\`typescript public goodbye(): void \`\`\` -#### Static Functions +#### Static Functions | **Name** | **Description** | | --- | --- | -| isResource | Check whether the given construct is a Resource. | -| fromBucketArn | *No description.* | -| fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | -| fromBucketName | *No description.* | -| validateBucketName | Thrown an exception if the given bucket name is not valid. | +| isResource | Check whether the given construct is a Resource. | +| fromBucketArn | *No description.* | +| fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | +| fromBucketName | *No description.* | +| validateBucketName | Thrown an exception if the given bucket name is not valid. | --- -##### \`isResource\` +##### \`isResource\` \`\`\`typescript import { submod1 } from 'construct-library' @@ -741,13 +741,13 @@ submod1.GoodbyeBucket.isResource(construct: IConstruct) Check whether the given construct is a Resource. -###### \`construct\`Required +###### \`construct\`Required - *Type:* @aws-cdk/core.IConstruct --- -##### \`fromBucketArn\` +##### \`fromBucketArn\` \`\`\`typescript import { submod1 } from 'construct-library' @@ -755,25 +755,25 @@ import { submod1 } from 'construct-library' submod1.GoodbyeBucket.fromBucketArn(scope: Construct, id: string, bucketArn: string) \`\`\` -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct --- -###### \`id\`Required +###### \`id\`Required - *Type:* string --- -###### \`bucketArn\`Required +###### \`bucketArn\`Required - *Type:* string --- -##### \`fromBucketAttributes\` +##### \`fromBucketAttributes\` \`\`\`typescript import { submod1 } from 'construct-library' @@ -783,7 +783,7 @@ submod1.GoodbyeBucket.fromBucketAttributes(scope: Construct, id: string, attrs: Creates a Bucket construct that represents an external bucket. -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct @@ -791,7 +791,7 @@ The parent creating construct (usually \`this\`). --- -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -799,7 +799,7 @@ The construct's name. --- -###### \`attrs\`Required +###### \`attrs\`Required - *Type:* @aws-cdk/aws-s3.BucketAttributes @@ -810,7 +810,7 @@ Can be obtained from a call to --- -##### \`fromBucketName\` +##### \`fromBucketName\` \`\`\`typescript import { submod1 } from 'construct-library' @@ -818,25 +818,25 @@ import { submod1 } from 'construct-library' submod1.GoodbyeBucket.fromBucketName(scope: Construct, id: string, bucketName: string) \`\`\` -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct --- -###### \`id\`Required +###### \`id\`Required - *Type:* string --- -###### \`bucketName\`Required +###### \`bucketName\`Required - *Type:* string --- -##### \`validateBucketName\` +##### \`validateBucketName\` \`\`\`typescript import { submod1 } from 'construct-library' @@ -846,7 +846,7 @@ submod1.GoodbyeBucket.validateBucketName(physicalName: string) Thrown an exception if the given bucket name is not valid. -###### \`physicalName\`Required +###### \`physicalName\`Required - *Type:* string @@ -854,27 +854,27 @@ name of the bucket. --- -#### Properties +#### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | @aws-cdk/core.ConstructNode | The construct tree node associated with this construct. | -| env | @aws-cdk/core.ResourceEnvironment | The environment this resource belongs to. | -| stack | @aws-cdk/core.Stack | The stack in which this resource is defined. | -| bucketArn | string | The ARN of the bucket. | -| bucketDomainName | string | The IPv4 DNS name of the specified bucket. | -| bucketDualStackDomainName | string | The IPv6 DNS name of the specified bucket. | -| bucketName | string | The name of the bucket. | -| bucketRegionalDomainName | string | The regional domain name of the specified bucket. | -| bucketWebsiteDomainName | string | The Domain name of the static website. | -| bucketWebsiteUrl | string | The URL of the static website. | -| encryptionKey | @aws-cdk/aws-kms.IKey | Optional KMS encryption key associated with this bucket. | -| isWebsite | boolean | If this bucket has been configured for static website hosting. | -| policy | @aws-cdk/aws-s3.BucketPolicy | The resource policy associated with this bucket. | +| node | @aws-cdk/core.ConstructNode | The construct tree node associated with this construct. | +| env | @aws-cdk/core.ResourceEnvironment | The environment this resource belongs to. | +| stack | @aws-cdk/core.Stack | The stack in which this resource is defined. | +| bucketArn | string | The ARN of the bucket. | +| bucketDomainName | string | The IPv4 DNS name of the specified bucket. | +| bucketDualStackDomainName | string | The IPv6 DNS name of the specified bucket. | +| bucketName | string | The name of the bucket. | +| bucketRegionalDomainName | string | The regional domain name of the specified bucket. | +| bucketWebsiteDomainName | string | The Domain name of the static website. | +| bucketWebsiteUrl | string | The URL of the static website. | +| encryptionKey | @aws-cdk/aws-kms.IKey | Optional KMS encryption key associated with this bucket. | +| isWebsite | boolean | If this bucket has been configured for static website hosting. | +| policy | @aws-cdk/aws-s3.BucketPolicy | The resource policy associated with this bucket. | --- -##### \`node\`Required +##### \`node\`Required \`\`\`typescript public readonly node: ConstructNode; @@ -886,7 +886,7 @@ The construct tree node associated with this construct. --- -##### \`env\`Required +##### \`env\`Required \`\`\`typescript public readonly env: ResourceEnvironment; @@ -905,7 +905,7 @@ that might be different than the stack they were imported into. --- -##### \`stack\`Required +##### \`stack\`Required \`\`\`typescript public readonly stack: Stack; @@ -917,7 +917,7 @@ The stack in which this resource is defined. --- -##### \`bucketArn\`Required +##### \`bucketArn\`Required \`\`\`typescript public readonly bucketArn: string; @@ -929,7 +929,7 @@ The ARN of the bucket. --- -##### \`bucketDomainName\`Required +##### \`bucketDomainName\`Required \`\`\`typescript public readonly bucketDomainName: string; @@ -941,7 +941,7 @@ The IPv4 DNS name of the specified bucket. --- -##### \`bucketDualStackDomainName\`Required +##### \`bucketDualStackDomainName\`Required \`\`\`typescript public readonly bucketDualStackDomainName: string; @@ -953,7 +953,7 @@ The IPv6 DNS name of the specified bucket. --- -##### \`bucketName\`Required +##### \`bucketName\`Required \`\`\`typescript public readonly bucketName: string; @@ -965,7 +965,7 @@ The name of the bucket. --- -##### \`bucketRegionalDomainName\`Required +##### \`bucketRegionalDomainName\`Required \`\`\`typescript public readonly bucketRegionalDomainName: string; @@ -977,7 +977,7 @@ The regional domain name of the specified bucket. --- -##### \`bucketWebsiteDomainName\`Required +##### \`bucketWebsiteDomainName\`Required \`\`\`typescript public readonly bucketWebsiteDomainName: string; @@ -989,7 +989,7 @@ The Domain name of the static website. --- -##### \`bucketWebsiteUrl\`Required +##### \`bucketWebsiteUrl\`Required \`\`\`typescript public readonly bucketWebsiteUrl: string; @@ -1001,7 +1001,7 @@ The URL of the static website. --- -##### \`encryptionKey\`Optional +##### \`encryptionKey\`Optional \`\`\`typescript public readonly encryptionKey: IKey; @@ -1013,7 +1013,7 @@ Optional KMS encryption key associated with this bucket. --- -##### \`isWebsite\`Optional +##### \`isWebsite\`Optional \`\`\`typescript public readonly isWebsite: boolean; @@ -1025,7 +1025,7 @@ If this bucket has been configured for static website hosting. --- -##### \`policy\`Optional +##### \`policy\`Optional \`\`\`typescript public readonly policy: BucketPolicy; @@ -1041,9 +1041,9 @@ first call to addToResourcePolicy(s). --- -### GreeterBucket +### GreeterBucket -#### Initializers +#### Initializers \`\`\`typescript import { GreeterBucket } from 'construct-library' @@ -1053,63 +1053,63 @@ new GreeterBucket(scope: Construct, id: string, props?: BucketProps) | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | string | *No description.* | -| props | @aws-cdk/aws-s3.BucketProps | *No description.* | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | @aws-cdk/aws-s3.BucketProps | *No description.* | --- -##### \`scope\`Required +##### \`scope\`Required - *Type:* constructs.Construct --- -##### \`id\`Required +##### \`id\`Required - *Type:* string --- -##### \`props\`Optional +##### \`props\`Optional - *Type:* @aws-cdk/aws-s3.BucketProps --- -#### Methods +#### Methods | **Name** | **Description** | | --- | --- | -| applyRemovalPolicy | Apply the given removal policy to this resource. | -| addEventNotification | Adds a bucket notification event destination. | -| addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | -| addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | -| arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | -| grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | -| grantPublicAccess | Allows unrestricted access to objects from this bucket. | -| grantPut | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | -| grantPutAcl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | -| grantRead | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grantReadWrite | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grantWrite | Grant write permissions to this bucket to an IAM principal. | -| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | -| onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | -| onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3UrlForObject | The S3 URL of an S3 object. For example:. | -| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | -| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | -| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | -| addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | -| addInventory | Add an inventory configuration. | -| addLifecycleRule | Add a lifecycle rule to the bucket. | -| addMetric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | -| greet | *No description.* | - ---- - -##### \`applyRemovalPolicy\` +| applyRemovalPolicy | Apply the given removal policy to this resource. | +| addEventNotification | Adds a bucket notification event destination. | +| addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | +| addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | +| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | +| grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | +| grantPublicAccess | Allows unrestricted access to objects from this bucket. | +| grantPut | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | +| grantPutAcl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | +| grantRead | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grantReadWrite | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grantWrite | Grant write permissions to this bucket to an IAM principal. | +| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | +| onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | +| onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | +| s3UrlForObject | The S3 URL of an S3 object. For example:. | +| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | +| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | +| addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | +| addInventory | Add an inventory configuration. | +| addLifecycleRule | Add a lifecycle rule to the bucket. | +| addMetric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | +| greet | *No description.* | + +--- + +##### \`applyRemovalPolicy\` \`\`\`typescript public applyRemovalPolicy(policy: RemovalPolicy): void @@ -1125,13 +1125,13 @@ to be replaced. The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). -###### \`policy\`Required +###### \`policy\`Required - *Type:* @aws-cdk/core.RemovalPolicy --- -##### \`addEventNotification\` +##### \`addEventNotification\` \`\`\`typescript public addEventNotification(event: EventType, dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void @@ -1150,7 +1150,7 @@ Adds a bucket notification event destination. \`\`\` -###### \`event\`Required +###### \`event\`Required - *Type:* @aws-cdk/aws-s3.EventType @@ -1158,7 +1158,7 @@ The event to trigger the notification. --- -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -1166,7 +1166,7 @@ The notification destination (Lambda, SNS Topic or SQS Queue). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -1178,7 +1178,7 @@ for details about allowed filter rules. --- -##### \`addObjectCreatedNotification\` +##### \`addObjectCreatedNotification\` \`\`\`typescript public addObjectCreatedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void @@ -1189,7 +1189,7 @@ Subscribes a destination to receive notifications when an object is created in t This is identical to calling \`onEvent(EventType.OBJECT_CREATED)\`. -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -1197,7 +1197,7 @@ The notification destination (see onEvent). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -1205,7 +1205,7 @@ Filters (see onEvent). --- -##### \`addObjectRemovedNotification\` +##### \`addObjectRemovedNotification\` \`\`\`typescript public addObjectRemovedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void @@ -1216,7 +1216,7 @@ Subscribes a destination to receive notifications when an object is removed from This is identical to calling \`onEvent(EventType.OBJECT_REMOVED)\`. -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -1224,7 +1224,7 @@ The notification destination (see onEvent). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -1232,7 +1232,7 @@ Filters (see onEvent). --- -##### \`addToResourcePolicy\` +##### \`addToResourcePolicy\` \`\`\`typescript public addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult @@ -1246,7 +1246,7 @@ it's not possible to tell whether the bucket already has a policy attached, let alone to re-use that policy to add more statements to it. So it's safest to do nothing in these cases. -###### \`permission\`Required +###### \`permission\`Required - *Type:* @aws-cdk/aws-iam.PolicyStatement @@ -1254,7 +1254,7 @@ the policy statement to be added to the bucket's policy. --- -##### \`arnForObjects\` +##### \`arnForObjects\` \`\`\`typescript public arnForObjects(keyPattern: string): string @@ -1262,19 +1262,19 @@ public arnForObjects(keyPattern: string): string Returns an ARN that represents all objects within the bucket that match the key pattern specified. -To represent all keys, specify \`\`\\"*\\"\`\`. +To represent all keys, specify \`\`"*"\`\`. If you need to specify a keyPattern with multiple components, concatenate them into a single string, e.g.: arnForObjects(\`home/\${team}/\${user}/*\`) -###### \`keyPattern\`Required +###### \`keyPattern\`Required - *Type:* string --- -##### \`grantDelete\` +##### \`grantDelete\` \`\`\`typescript public grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1282,7 +1282,7 @@ public grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -1290,7 +1290,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -1298,7 +1298,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantPublicAccess\` +##### \`grantPublicAccess\` \`\`\`typescript public grantPublicAccess(allowedActions: string, keyPrefix?: string): Grant @@ -1311,8 +1311,8 @@ in this bucket, which is useful for when you configure your bucket as a website and want everyone to be able to read objects in the bucket without needing to authenticate. -Without arguments, this method will grant read (\\"s3:GetObject\\") access to -all objects (\\"*\\") in the bucket. +Without arguments, this method will grant read ("s3:GetObject") access to +all objects ("*") in the bucket. The method returns the \`iam.Grant\` object, which can then be modified as needed. For example, you can add a condition that will restrict access only @@ -1325,25 +1325,25 @@ Note that if this \`IBucket\` refers to an existing bucket, possibly not managed by CloudFormation, this method will have no effect, since it's impossible to modify the policy of an existing bucket. -###### \`allowedActions\`Required +###### \`allowedActions\`Required - *Type:* string the set of S3 actions to allow. -Default is \\"s3:GetObject\\". +Default is "s3:GetObject". --- -###### \`keyPrefix\`Optional +###### \`keyPrefix\`Optional - *Type:* string -the prefix of S3 object keys (e.g. \`home/*\`). Default is \\"*\\". +the prefix of S3 object keys (e.g. \`home/*\`). Default is "*". --- -##### \`grantPut\` +##### \`grantPut\` \`\`\`typescript public grantPut(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1354,7 +1354,7 @@ Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM princip If encryption is used, permission to use the key to encrypt the contents of written files will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -1362,7 +1362,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -1370,7 +1370,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantPutAcl\` +##### \`grantPutAcl\` \`\`\`typescript public grantPutAcl(identity: IGrantable, objectsKeyPattern?: string): Grant @@ -1382,19 +1382,19 @@ If your application has the '@aws-cdk/aws-s3:grantWriteWithoutAcl' feature flag calling {@link grantWrite} or {@link grantReadWrite} no longer grants permissions to modify the ACLs of the objects; in this case, if you need to modify object ACLs, call this method explicitly. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* string --- -##### \`grantRead\` +##### \`grantRead\` \`\`\`typescript public grantRead(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1405,7 +1405,7 @@ Grant read permissions for this bucket and it's contents to an IAM principal (Ro If encryption is used, permission to use the key to decrypt the contents of the bucket will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -1413,7 +1413,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -1421,7 +1421,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantReadWrite\` +##### \`grantReadWrite\` \`\`\`typescript public grantReadWrite(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1440,19 +1440,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any --- -##### \`grantWrite\` +##### \`grantWrite\` \`\`\`typescript public grantWrite(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1471,19 +1471,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any --- -##### \`onCloudTrailEvent\` +##### \`onCloudTrailEvent\` \`\`\`typescript public onCloudTrailEvent(id: string, options?: OnCloudTrailBucketEventOptions): Rule @@ -1494,7 +1494,7 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -1502,7 +1502,7 @@ The id of the rule. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -1510,7 +1510,7 @@ Options for adding the rule. --- -##### \`onCloudTrailPutObject\` +##### \`onCloudTrailPutObject\` \`\`\`typescript public onCloudTrailPutObject(id: string, options?: OnCloudTrailBucketEventOptions): Rule @@ -1525,7 +1525,7 @@ so using \`onCloudTrailWriteObject\` may be preferable. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -1533,7 +1533,7 @@ The id of the rule. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -1541,7 +1541,7 @@ Options for adding the rule. --- -##### \`onCloudTrailWriteObject\` +##### \`onCloudTrailWriteObject\` \`\`\`typescript public onCloudTrailWriteObject(id: string, options?: OnCloudTrailBucketEventOptions): Rule @@ -1559,7 +1559,7 @@ so using this method may be preferable to \`onCloudTrailPutObject\`. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -1567,7 +1567,7 @@ The id of the rule. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -1575,7 +1575,7 @@ Options for adding the rule. --- -##### \`s3UrlForObject\` +##### \`s3UrlForObject\` \`\`\`typescript public s3UrlForObject(key?: string): string @@ -1586,7 +1586,7 @@ The S3 URL of an S3 object. For example:. \`s3://onlybucket\` - \`s3://bucket/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -1597,7 +1597,7 @@ bucket is returned. --- -##### \`transferAccelerationUrlForObject\` +##### \`transferAccelerationUrlForObject\` \`\`\`typescript public transferAccelerationUrlForObject(key?: string, options?: TransferAccelerationUrlOptions): string @@ -1611,7 +1611,7 @@ for dual-stack endpoint (connect to the bucket over IPv6). For example: - \`https://bucket.s3-accelerate.amazonaws.com\` - \`https://bucket.s3-accelerate.amazonaws.com/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -1622,7 +1622,7 @@ bucket is returned. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.TransferAccelerationUrlOptions @@ -1630,7 +1630,7 @@ Options for generating URL. --- -##### \`urlForObject\` +##### \`urlForObject\` \`\`\`typescript public urlForObject(key?: string): string @@ -1642,7 +1642,7 @@ The https URL of an S3 object. Specify \`regional: false\` at the options for no - \`https://s3.us-west-1.amazonaws.com/bucket/key\` - \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -1653,7 +1653,7 @@ bucket is returned. --- -##### \`virtualHostedUrlForObject\` +##### \`virtualHostedUrlForObject\` \`\`\`typescript public virtualHostedUrlForObject(key?: string, options?: VirtualHostedStyleUrlOptions): string @@ -1666,7 +1666,7 @@ The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the - \`https://bucket.s3.amazonaws.com/key\` - \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -1677,7 +1677,7 @@ bucket is returned. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.VirtualHostedStyleUrlOptions @@ -1685,7 +1685,7 @@ Options for generating URL. --- -##### \`addCorsRule\` +##### \`addCorsRule\` \`\`\`typescript public addCorsRule(rule: CorsRule): void @@ -1693,7 +1693,7 @@ public addCorsRule(rule: CorsRule): void Adds a cross-origin access configuration for objects in an Amazon S3 bucket. -###### \`rule\`Required +###### \`rule\`Required - *Type:* @aws-cdk/aws-s3.CorsRule @@ -1701,7 +1701,7 @@ The CORS configuration rule to add. --- -##### \`addInventory\` +##### \`addInventory\` \`\`\`typescript public addInventory(inventory: Inventory): void @@ -1709,7 +1709,7 @@ public addInventory(inventory: Inventory): void Add an inventory configuration. -###### \`inventory\`Required +###### \`inventory\`Required - *Type:* @aws-cdk/aws-s3.Inventory @@ -1717,7 +1717,7 @@ configuration to add. --- -##### \`addLifecycleRule\` +##### \`addLifecycleRule\` \`\`\`typescript public addLifecycleRule(rule: LifecycleRule): void @@ -1725,7 +1725,7 @@ public addLifecycleRule(rule: LifecycleRule): void Add a lifecycle rule to the bucket. -###### \`rule\`Required +###### \`rule\`Required - *Type:* @aws-cdk/aws-s3.LifecycleRule @@ -1733,7 +1733,7 @@ The rule to add. --- -##### \`addMetric\` +##### \`addMetric\` \`\`\`typescript public addMetric(metric: BucketMetrics): void @@ -1741,7 +1741,7 @@ public addMetric(metric: BucketMetrics): void Adds a metrics configuration for the CloudWatch request metrics from the bucket. -###### \`metric\`Required +###### \`metric\`Required - *Type:* @aws-cdk/aws-s3.BucketMetrics @@ -1749,25 +1749,25 @@ The metric configuration to add. --- -##### \`greet\` +##### \`greet\` \`\`\`typescript public greet(): void \`\`\` -#### Static Functions +#### Static Functions | **Name** | **Description** | | --- | --- | -| isResource | Check whether the given construct is a Resource. | -| fromBucketArn | *No description.* | -| fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | -| fromBucketName | *No description.* | -| validateBucketName | Thrown an exception if the given bucket name is not valid. | +| isResource | Check whether the given construct is a Resource. | +| fromBucketArn | *No description.* | +| fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | +| fromBucketName | *No description.* | +| validateBucketName | Thrown an exception if the given bucket name is not valid. | --- -##### \`isResource\` +##### \`isResource\` \`\`\`typescript import { GreeterBucket } from 'construct-library' @@ -1777,13 +1777,13 @@ GreeterBucket.isResource(construct: IConstruct) Check whether the given construct is a Resource. -###### \`construct\`Required +###### \`construct\`Required - *Type:* @aws-cdk/core.IConstruct --- -##### \`fromBucketArn\` +##### \`fromBucketArn\` \`\`\`typescript import { GreeterBucket } from 'construct-library' @@ -1791,25 +1791,25 @@ import { GreeterBucket } from 'construct-library' GreeterBucket.fromBucketArn(scope: Construct, id: string, bucketArn: string) \`\`\` -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct --- -###### \`id\`Required +###### \`id\`Required - *Type:* string --- -###### \`bucketArn\`Required +###### \`bucketArn\`Required - *Type:* string --- -##### \`fromBucketAttributes\` +##### \`fromBucketAttributes\` \`\`\`typescript import { GreeterBucket } from 'construct-library' @@ -1819,7 +1819,7 @@ GreeterBucket.fromBucketAttributes(scope: Construct, id: string, attrs: BucketAt Creates a Bucket construct that represents an external bucket. -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct @@ -1827,7 +1827,7 @@ The parent creating construct (usually \`this\`). --- -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -1835,7 +1835,7 @@ The construct's name. --- -###### \`attrs\`Required +###### \`attrs\`Required - *Type:* @aws-cdk/aws-s3.BucketAttributes @@ -1846,7 +1846,7 @@ Can be obtained from a call to --- -##### \`fromBucketName\` +##### \`fromBucketName\` \`\`\`typescript import { GreeterBucket } from 'construct-library' @@ -1854,25 +1854,25 @@ import { GreeterBucket } from 'construct-library' GreeterBucket.fromBucketName(scope: Construct, id: string, bucketName: string) \`\`\` -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct --- -###### \`id\`Required +###### \`id\`Required - *Type:* string --- -###### \`bucketName\`Required +###### \`bucketName\`Required - *Type:* string --- -##### \`validateBucketName\` +##### \`validateBucketName\` \`\`\`typescript import { GreeterBucket } from 'construct-library' @@ -1882,7 +1882,7 @@ GreeterBucket.validateBucketName(physicalName: string) Thrown an exception if the given bucket name is not valid. -###### \`physicalName\`Required +###### \`physicalName\`Required - *Type:* string @@ -1890,27 +1890,27 @@ name of the bucket. --- -#### Properties +#### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | @aws-cdk/core.ConstructNode | The construct tree node associated with this construct. | -| env | @aws-cdk/core.ResourceEnvironment | The environment this resource belongs to. | -| stack | @aws-cdk/core.Stack | The stack in which this resource is defined. | -| bucketArn | string | The ARN of the bucket. | -| bucketDomainName | string | The IPv4 DNS name of the specified bucket. | -| bucketDualStackDomainName | string | The IPv6 DNS name of the specified bucket. | -| bucketName | string | The name of the bucket. | -| bucketRegionalDomainName | string | The regional domain name of the specified bucket. | -| bucketWebsiteDomainName | string | The Domain name of the static website. | -| bucketWebsiteUrl | string | The URL of the static website. | -| encryptionKey | @aws-cdk/aws-kms.IKey | Optional KMS encryption key associated with this bucket. | -| isWebsite | boolean | If this bucket has been configured for static website hosting. | -| policy | @aws-cdk/aws-s3.BucketPolicy | The resource policy associated with this bucket. | +| node | @aws-cdk/core.ConstructNode | The construct tree node associated with this construct. | +| env | @aws-cdk/core.ResourceEnvironment | The environment this resource belongs to. | +| stack | @aws-cdk/core.Stack | The stack in which this resource is defined. | +| bucketArn | string | The ARN of the bucket. | +| bucketDomainName | string | The IPv4 DNS name of the specified bucket. | +| bucketDualStackDomainName | string | The IPv6 DNS name of the specified bucket. | +| bucketName | string | The name of the bucket. | +| bucketRegionalDomainName | string | The regional domain name of the specified bucket. | +| bucketWebsiteDomainName | string | The Domain name of the static website. | +| bucketWebsiteUrl | string | The URL of the static website. | +| encryptionKey | @aws-cdk/aws-kms.IKey | Optional KMS encryption key associated with this bucket. | +| isWebsite | boolean | If this bucket has been configured for static website hosting. | +| policy | @aws-cdk/aws-s3.BucketPolicy | The resource policy associated with this bucket. | --- -##### \`node\`Required +##### \`node\`Required \`\`\`typescript public readonly node: ConstructNode; @@ -1922,7 +1922,7 @@ The construct tree node associated with this construct. --- -##### \`env\`Required +##### \`env\`Required \`\`\`typescript public readonly env: ResourceEnvironment; @@ -1941,7 +1941,7 @@ that might be different than the stack they were imported into. --- -##### \`stack\`Required +##### \`stack\`Required \`\`\`typescript public readonly stack: Stack; @@ -1953,7 +1953,7 @@ The stack in which this resource is defined. --- -##### \`bucketArn\`Required +##### \`bucketArn\`Required \`\`\`typescript public readonly bucketArn: string; @@ -1965,7 +1965,7 @@ The ARN of the bucket. --- -##### \`bucketDomainName\`Required +##### \`bucketDomainName\`Required \`\`\`typescript public readonly bucketDomainName: string; @@ -1977,7 +1977,7 @@ The IPv4 DNS name of the specified bucket. --- -##### \`bucketDualStackDomainName\`Required +##### \`bucketDualStackDomainName\`Required \`\`\`typescript public readonly bucketDualStackDomainName: string; @@ -1989,7 +1989,7 @@ The IPv6 DNS name of the specified bucket. --- -##### \`bucketName\`Required +##### \`bucketName\`Required \`\`\`typescript public readonly bucketName: string; @@ -2001,7 +2001,7 @@ The name of the bucket. --- -##### \`bucketRegionalDomainName\`Required +##### \`bucketRegionalDomainName\`Required \`\`\`typescript public readonly bucketRegionalDomainName: string; @@ -2013,7 +2013,7 @@ The regional domain name of the specified bucket. --- -##### \`bucketWebsiteDomainName\`Required +##### \`bucketWebsiteDomainName\`Required \`\`\`typescript public readonly bucketWebsiteDomainName: string; @@ -2025,7 +2025,7 @@ The Domain name of the static website. --- -##### \`bucketWebsiteUrl\`Required +##### \`bucketWebsiteUrl\`Required \`\`\`typescript public readonly bucketWebsiteUrl: string; @@ -2037,7 +2037,7 @@ The URL of the static website. --- -##### \`encryptionKey\`Optional +##### \`encryptionKey\`Optional \`\`\`typescript public readonly encryptionKey: IKey; @@ -2049,7 +2049,7 @@ Optional KMS encryption key associated with this bucket. --- -##### \`isWebsite\`Optional +##### \`isWebsite\`Optional \`\`\`typescript public readonly isWebsite: boolean; @@ -2061,7 +2061,7 @@ If this bucket has been configured for static website hosting. --- -##### \`policy\`Optional +##### \`policy\`Optional \`\`\`typescript public readonly policy: BucketPolicy; @@ -2084,13 +2084,13 @@ first call to addToResourcePolicy(s). `; exports[`specify language 1`] = ` -"# API Reference +"# API Reference -## Resources +## Resources -### GoodbyeBucket +### GoodbyeBucket -#### Initializers +#### Initializers \`\`\`python from construct_library import submod1 @@ -2129,50 +2129,50 @@ submod1.GoodbyeBucket( | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | str | *No description.* | -| access_control | aws_cdk.aws_s3.BucketAccessControl | Specifies a canned ACL that grants predefined permissions to the bucket. | -| auto_delete_objects | bool | Whether all objects should be automatically deleted when the bucket is removed from the stack or when the stack is deleted. | -| block_public_access | aws_cdk.aws_s3.BlockPublicAccess | The block public access configuration of this bucket. | -| bucket_key_enabled | bool | Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS (SSE-KMS) for new objects in the bucket. | -| bucket_name | str | Physical name of this bucket. | -| cors | typing.List[aws_cdk.aws_s3.CorsRule] | The CORS configuration of this bucket. | -| encryption | aws_cdk.aws_s3.BucketEncryption | The kind of server-side encryption to apply to this bucket. | -| encryption_key | aws_cdk.aws_kms.IKey | External KMS key to use for bucket encryption. | -| enforce_ss_l | bool | Enforces SSL for requests. | -| event_bridge_enabled | bool | Whether this bucket should send notifications to Amazon EventBridge or not. | -| intelligent_tiering_configurations | typing.List[aws_cdk.aws_s3.IntelligentTieringConfiguration] | Inteligent Tiering Configurations. | -| inventories | typing.List[aws_cdk.aws_s3.Inventory] | The inventory configuration of the bucket. | -| lifecycle_rules | typing.List[aws_cdk.aws_s3.LifecycleRule] | Rules that define how Amazon S3 manages objects during their lifetime. | -| metrics | typing.List[aws_cdk.aws_s3.BucketMetrics] | The metrics configuration of this bucket. | -| notifications_handler_role | aws_cdk.aws_iam.IRole | The role to be used by the notifications handler. | -| object_ownership | aws_cdk.aws_s3.ObjectOwnership | The objectOwnership of the bucket. | -| public_read_access | bool | Grants public read access to all objects in the bucket. | -| removal_policy | aws_cdk.core.RemovalPolicy | Policy to apply when the bucket is removed from this stack. | -| server_access_logs_bucket | aws_cdk.aws_s3.IBucket | Destination bucket for the server access logs. | -| server_access_logs_prefix | str | Optional log file prefix to use for the bucket's access logs. | -| transfer_acceleration | bool | Whether this bucket should have transfer acceleration turned on or not. | -| versioned | bool | Whether this bucket should have versioning turned on or not. | -| website_error_document | str | The name of the error document (e.g. \\"404.html\\") for the website. \`websiteIndexDocument\` must also be set if this is set. | -| website_index_document | str | The name of the index document (e.g. \\"index.html\\") for the website. Enables static website hosting for this bucket. | -| website_redirect | aws_cdk.aws_s3.RedirectTarget | Specifies the redirect behavior of all requests to a website endpoint of a bucket. | -| website_routing_rules | typing.List[aws_cdk.aws_s3.RoutingRule] | Rules that define when a redirect is applied and the redirect behavior. | - ---- - -##### \`scope\`Required +| scope | constructs.Construct | *No description.* | +| id | str | *No description.* | +| access_control | aws_cdk.aws_s3.BucketAccessControl | Specifies a canned ACL that grants predefined permissions to the bucket. | +| auto_delete_objects | bool | Whether all objects should be automatically deleted when the bucket is removed from the stack or when the stack is deleted. | +| block_public_access | aws_cdk.aws_s3.BlockPublicAccess | The block public access configuration of this bucket. | +| bucket_key_enabled | bool | Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS (SSE-KMS) for new objects in the bucket. | +| bucket_name | str | Physical name of this bucket. | +| cors | typing.List[aws_cdk.aws_s3.CorsRule] | The CORS configuration of this bucket. | +| encryption | aws_cdk.aws_s3.BucketEncryption | The kind of server-side encryption to apply to this bucket. | +| encryption_key | aws_cdk.aws_kms.IKey | External KMS key to use for bucket encryption. | +| enforce_ss_l | bool | Enforces SSL for requests. | +| event_bridge_enabled | bool | Whether this bucket should send notifications to Amazon EventBridge or not. | +| intelligent_tiering_configurations | typing.List[aws_cdk.aws_s3.IntelligentTieringConfiguration] | Inteligent Tiering Configurations. | +| inventories | typing.List[aws_cdk.aws_s3.Inventory] | The inventory configuration of the bucket. | +| lifecycle_rules | typing.List[aws_cdk.aws_s3.LifecycleRule] | Rules that define how Amazon S3 manages objects during their lifetime. | +| metrics | typing.List[aws_cdk.aws_s3.BucketMetrics] | The metrics configuration of this bucket. | +| notifications_handler_role | aws_cdk.aws_iam.IRole | The role to be used by the notifications handler. | +| object_ownership | aws_cdk.aws_s3.ObjectOwnership | The objectOwnership of the bucket. | +| public_read_access | bool | Grants public read access to all objects in the bucket. | +| removal_policy | aws_cdk.core.RemovalPolicy | Policy to apply when the bucket is removed from this stack. | +| server_access_logs_bucket | aws_cdk.aws_s3.IBucket | Destination bucket for the server access logs. | +| server_access_logs_prefix | str | Optional log file prefix to use for the bucket's access logs. | +| transfer_acceleration | bool | Whether this bucket should have transfer acceleration turned on or not. | +| versioned | bool | Whether this bucket should have versioning turned on or not. | +| website_error_document | str | The name of the error document (e.g. "404.html") for the website. \`websiteIndexDocument\` must also be set if this is set. | +| website_index_document | str | The name of the index document (e.g. "index.html") for the website. Enables static website hosting for this bucket. | +| website_redirect | aws_cdk.aws_s3.RedirectTarget | Specifies the redirect behavior of all requests to a website endpoint of a bucket. | +| website_routing_rules | typing.List[aws_cdk.aws_s3.RoutingRule] | Rules that define when a redirect is applied and the redirect behavior. | + +--- + +##### \`scope\`Required - *Type:* constructs.Construct --- -##### \`id\`Required +##### \`id\`Required - *Type:* str --- -##### \`access_control\`Optional +##### \`access_control\`Optional - *Type:* aws_cdk.aws_s3.BucketAccessControl - *Default:* BucketAccessControl.PRIVATE @@ -2181,7 +2181,7 @@ Specifies a canned ACL that grants predefined permissions to the bucket. --- -##### \`auto_delete_objects\`Optional +##### \`auto_delete_objects\`Optional - *Type:* bool - *Default:* false @@ -2197,7 +2197,7 @@ by deploying with CDK version \`1.126.0\` or later **before** switching this val --- -##### \`block_public_access\`Optional +##### \`block_public_access\`Optional - *Type:* aws_cdk.aws_s3.BlockPublicAccess - *Default:* CloudFormation defaults will apply. New buckets and objects don't allow public access, but users can modify bucket policies or object permissions to allow public access @@ -2208,7 +2208,7 @@ The block public access configuration of this bucket. --- -##### \`bucket_key_enabled\`Optional +##### \`bucket_key_enabled\`Optional - *Type:* bool - *Default:* false @@ -2219,7 +2219,7 @@ Only relevant, when Encryption is set to {@link BucketEncryption.KMS} --- -##### \`bucket_name\`Optional +##### \`bucket_name\`Optional - *Type:* str - *Default:* Assigned by CloudFormation (recommended). @@ -2228,7 +2228,7 @@ Physical name of this bucket. --- -##### \`cors\`Optional +##### \`cors\`Optional - *Type:* typing.List[aws_cdk.aws_s3.CorsRule] - *Default:* No CORS configuration. @@ -2239,7 +2239,7 @@ The CORS configuration of this bucket. --- -##### \`encryption\`Optional +##### \`encryption\`Optional - *Type:* aws_cdk.aws_s3.BucketEncryption - *Default:* \`Kms\` if \`encryptionKey\` is specified, or \`Unencrypted\` otherwise. @@ -2251,20 +2251,20 @@ encryption key is not specified, a key will automatically be created. --- -##### \`encryption_key\`Optional +##### \`encryption_key\`Optional - *Type:* aws_cdk.aws_kms.IKey -- *Default:* If encryption is set to \\"Kms\\" and this property is undefined, a new KMS key will be created and associated with this bucket. +- *Default:* If encryption is set to "Kms" and this property is undefined, a new KMS key will be created and associated with this bucket. External KMS key to use for bucket encryption. -The 'encryption' property must be either not specified or set to \\"Kms\\". -An error will be emitted if encryption is set to \\"Unencrypted\\" or -\\"Managed\\". +The 'encryption' property must be either not specified or set to "Kms". +An error will be emitted if encryption is set to "Unencrypted" or +"Managed". --- -##### \`enforce_ss_l\`Optional +##### \`enforce_ss_l\`Optional - *Type:* bool - *Default:* false @@ -2277,7 +2277,7 @@ S3.5 of the AWS Foundational Security Best Practices Regarding S3. --- -##### \`event_bridge_enabled\`Optional +##### \`event_bridge_enabled\`Optional - *Type:* bool - *Default:* false @@ -2286,7 +2286,7 @@ Whether this bucket should send notifications to Amazon EventBridge or not. --- -##### \`intelligent_tiering_configurations\`Optional +##### \`intelligent_tiering_configurations\`Optional - *Type:* typing.List[aws_cdk.aws_s3.IntelligentTieringConfiguration] - *Default:* No Intelligent Tiiering Configurations. @@ -2297,7 +2297,7 @@ Inteligent Tiering Configurations. --- -##### \`inventories\`Optional +##### \`inventories\`Optional - *Type:* typing.List[aws_cdk.aws_s3.Inventory] - *Default:* No inventory configuration @@ -2308,7 +2308,7 @@ The inventory configuration of the bucket. --- -##### \`lifecycle_rules\`Optional +##### \`lifecycle_rules\`Optional - *Type:* typing.List[aws_cdk.aws_s3.LifecycleRule] - *Default:* No lifecycle rules. @@ -2317,7 +2317,7 @@ Rules that define how Amazon S3 manages objects during their lifetime. --- -##### \`metrics\`Optional +##### \`metrics\`Optional - *Type:* typing.List[aws_cdk.aws_s3.BucketMetrics] - *Default:* No metrics configuration. @@ -2328,7 +2328,7 @@ The metrics configuration of this bucket. --- -##### \`notifications_handler_role\`Optional +##### \`notifications_handler_role\`Optional - *Type:* aws_cdk.aws_iam.IRole - *Default:* a new role will be created. @@ -2337,7 +2337,7 @@ The role to be used by the notifications handler. --- -##### \`object_ownership\`Optional +##### \`object_ownership\`Optional - *Type:* aws_cdk.aws_s3.ObjectOwnership - *Default:* No ObjectOwnership configuration, uploading account will own the object. @@ -2348,7 +2348,7 @@ The objectOwnership of the bucket. --- -##### \`public_read_access\`Optional +##### \`public_read_access\`Optional - *Type:* bool - *Default:* false @@ -2359,7 +2359,7 @@ Similar to calling \`bucket.grantPublicAccess()\` --- -##### \`removal_policy\`Optional +##### \`removal_policy\`Optional - *Type:* aws_cdk.core.RemovalPolicy - *Default:* The bucket will be orphaned. @@ -2368,27 +2368,27 @@ Policy to apply when the bucket is removed from this stack. --- -##### \`server_access_logs_bucket\`Optional +##### \`server_access_logs_bucket\`Optional - *Type:* aws_cdk.aws_s3.IBucket -- *Default:* If \\"serverAccessLogsPrefix\\" undefined - access logs disabled, otherwise - log to current bucket. +- *Default:* If "serverAccessLogsPrefix" undefined - access logs disabled, otherwise - log to current bucket. Destination bucket for the server access logs. --- -##### \`server_access_logs_prefix\`Optional +##### \`server_access_logs_prefix\`Optional - *Type:* str - *Default:* No log file prefix Optional log file prefix to use for the bucket's access logs. -If defined without \\"serverAccessLogsBucket\\", enables access logs to current bucket with this prefix. +If defined without "serverAccessLogsBucket", enables access logs to current bucket with this prefix. --- -##### \`transfer_acceleration\`Optional +##### \`transfer_acceleration\`Optional - *Type:* bool - *Default:* false @@ -2397,7 +2397,7 @@ Whether this bucket should have transfer acceleration turned on or not. --- -##### \`versioned\`Optional +##### \`versioned\`Optional - *Type:* bool - *Default:* false @@ -2406,36 +2406,36 @@ Whether this bucket should have versioning turned on or not. --- -##### \`website_error_document\`Optional +##### \`website_error_document\`Optional - *Type:* str - *Default:* No error document. -The name of the error document (e.g. \\"404.html\\") for the website. \`websiteIndexDocument\` must also be set if this is set. +The name of the error document (e.g. "404.html") for the website. \`websiteIndexDocument\` must also be set if this is set. --- -##### \`website_index_document\`Optional +##### \`website_index_document\`Optional - *Type:* str - *Default:* No index document. -The name of the index document (e.g. \\"index.html\\") for the website. Enables static website hosting for this bucket. +The name of the index document (e.g. "index.html") for the website. Enables static website hosting for this bucket. --- -##### \`website_redirect\`Optional +##### \`website_redirect\`Optional - *Type:* aws_cdk.aws_s3.RedirectTarget - *Default:* No redirection. Specifies the redirect behavior of all requests to a website endpoint of a bucket. -If you specify this property, you can't specify \\"websiteIndexDocument\\", \\"websiteErrorDocument\\" nor , \\"websiteRoutingRules\\". +If you specify this property, you can't specify "websiteIndexDocument", "websiteErrorDocument" nor , "websiteRoutingRules". --- -##### \`website_routing_rules\`Optional +##### \`website_routing_rules\`Optional - *Type:* typing.List[aws_cdk.aws_s3.RoutingRule] - *Default:* No redirection rules. @@ -2444,39 +2444,39 @@ Rules that define when a redirect is applied and the redirect behavior. --- -#### Methods +#### Methods | **Name** | **Description** | | --- | --- | -| apply_removal_policy | Apply the given removal policy to this resource. | -| add_event_notification | Adds a bucket notification event destination. | -| add_object_created_notification | Subscribes a destination to receive notifications when an object is created in the bucket. | -| add_object_removed_notification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| add_to_resource_policy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | -| arn_for_objects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | -| grant_delete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | -| grant_public_access | Allows unrestricted access to objects from this bucket. | -| grant_put | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | -| grant_put_acl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | -| grant_read | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grant_read_write | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grant_write | Grant write permissions to this bucket to an IAM principal. | -| on_cloud_trail_event | Define a CloudWatch event that triggers when something happens to this repository. | -| on_cloud_trail_put_object | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | -| on_cloud_trail_write_object | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3_url_for_object | The S3 URL of an S3 object. For example:. | -| transfer_acceleration_url_for_object | The https Transfer Acceleration URL of an S3 object. | -| url_for_object | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | -| virtual_hosted_url_for_object | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | -| add_cors_rule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | -| add_inventory | Add an inventory configuration. | -| add_lifecycle_rule | Add a lifecycle rule to the bucket. | -| add_metric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | -| goodbye | *No description.* | - ---- - -##### \`apply_removal_policy\` +| apply_removal_policy | Apply the given removal policy to this resource. | +| add_event_notification | Adds a bucket notification event destination. | +| add_object_created_notification | Subscribes a destination to receive notifications when an object is created in the bucket. | +| add_object_removed_notification | Subscribes a destination to receive notifications when an object is removed from the bucket. | +| add_to_resource_policy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| arn_for_objects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | +| grant_delete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | +| grant_public_access | Allows unrestricted access to objects from this bucket. | +| grant_put | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | +| grant_put_acl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | +| grant_read | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grant_read_write | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grant_write | Grant write permissions to this bucket to an IAM principal. | +| on_cloud_trail_event | Define a CloudWatch event that triggers when something happens to this repository. | +| on_cloud_trail_put_object | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | +| on_cloud_trail_write_object | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | +| s3_url_for_object | The S3 URL of an S3 object. For example:. | +| transfer_acceleration_url_for_object | The https Transfer Acceleration URL of an S3 object. | +| url_for_object | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtual_hosted_url_for_object | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | +| add_cors_rule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | +| add_inventory | Add an inventory configuration. | +| add_lifecycle_rule | Add a lifecycle rule to the bucket. | +| add_metric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | +| goodbye | *No description.* | + +--- + +##### \`apply_removal_policy\` \`\`\`python def apply_removal_policy( @@ -2494,13 +2494,13 @@ to be replaced. The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). -###### \`policy\`Required +###### \`policy\`Required - *Type:* aws_cdk.core.RemovalPolicy --- -##### \`add_event_notification\` +##### \`add_event_notification\` \`\`\`python def add_event_notification( @@ -2524,7 +2524,7 @@ Adds a bucket notification event destination. \`\`\` -###### \`event\`Required +###### \`event\`Required - *Type:* aws_cdk.aws_s3.EventType @@ -2532,7 +2532,7 @@ The event to trigger the notification. --- -###### \`dest\`Required +###### \`dest\`Required - *Type:* aws_cdk.aws_s3.IBucketNotificationDestination @@ -2540,7 +2540,7 @@ The notification destination (Lambda, SNS Topic or SQS Queue). --- -###### \`prefix\`Optional +###### \`prefix\`Optional - *Type:* str @@ -2548,7 +2548,7 @@ S3 keys must have the specified prefix. --- -###### \`suffix\`Optional +###### \`suffix\`Optional - *Type:* str @@ -2556,7 +2556,7 @@ S3 keys must have the specified suffix. --- -##### \`add_object_created_notification\` +##### \`add_object_created_notification\` \`\`\`python def add_object_created_notification( @@ -2571,7 +2571,7 @@ Subscribes a destination to receive notifications when an object is created in t This is identical to calling \`onEvent(EventType.OBJECT_CREATED)\`. -###### \`dest\`Required +###### \`dest\`Required - *Type:* aws_cdk.aws_s3.IBucketNotificationDestination @@ -2579,7 +2579,7 @@ The notification destination (see onEvent). --- -###### \`prefix\`Optional +###### \`prefix\`Optional - *Type:* str @@ -2587,7 +2587,7 @@ S3 keys must have the specified prefix. --- -###### \`suffix\`Optional +###### \`suffix\`Optional - *Type:* str @@ -2595,7 +2595,7 @@ S3 keys must have the specified suffix. --- -##### \`add_object_removed_notification\` +##### \`add_object_removed_notification\` \`\`\`python def add_object_removed_notification( @@ -2610,7 +2610,7 @@ Subscribes a destination to receive notifications when an object is removed from This is identical to calling \`onEvent(EventType.OBJECT_REMOVED)\`. -###### \`dest\`Required +###### \`dest\`Required - *Type:* aws_cdk.aws_s3.IBucketNotificationDestination @@ -2618,7 +2618,7 @@ The notification destination (see onEvent). --- -###### \`prefix\`Optional +###### \`prefix\`Optional - *Type:* str @@ -2626,7 +2626,7 @@ S3 keys must have the specified prefix. --- -###### \`suffix\`Optional +###### \`suffix\`Optional - *Type:* str @@ -2634,7 +2634,7 @@ S3 keys must have the specified suffix. --- -##### \`add_to_resource_policy\` +##### \`add_to_resource_policy\` \`\`\`python def add_to_resource_policy( @@ -2650,7 +2650,7 @@ it's not possible to tell whether the bucket already has a policy attached, let alone to re-use that policy to add more statements to it. So it's safest to do nothing in these cases. -###### \`permission\`Required +###### \`permission\`Required - *Type:* aws_cdk.aws_iam.PolicyStatement @@ -2658,7 +2658,7 @@ the policy statement to be added to the bucket's policy. --- -##### \`arn_for_objects\` +##### \`arn_for_objects\` \`\`\`python def arn_for_objects( @@ -2668,19 +2668,19 @@ def arn_for_objects( Returns an ARN that represents all objects within the bucket that match the key pattern specified. -To represent all keys, specify \`\`\\"*\\"\`\`. +To represent all keys, specify \`\`"*"\`\`. If you need to specify a keyPattern with multiple components, concatenate them into a single string, e.g.: arnForObjects(\`home/\${team}/\${user}/*\`) -###### \`key_pattern\`Required +###### \`key_pattern\`Required - *Type:* str --- -##### \`grant_delete\` +##### \`grant_delete\` \`\`\`python def grant_delete( @@ -2691,7 +2691,7 @@ def grant_delete( Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. -###### \`identity\`Required +###### \`identity\`Required - *Type:* aws_cdk.aws_iam.IGrantable @@ -2699,7 +2699,7 @@ The principal. --- -###### \`objects_key_pattern\`Optional +###### \`objects_key_pattern\`Optional - *Type:* typing.Any @@ -2707,7 +2707,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grant_public_access\` +##### \`grant_public_access\` \`\`\`python def grant_public_access( @@ -2723,8 +2723,8 @@ in this bucket, which is useful for when you configure your bucket as a website and want everyone to be able to read objects in the bucket without needing to authenticate. -Without arguments, this method will grant read (\\"s3:GetObject\\") access to -all objects (\\"*\\") in the bucket. +Without arguments, this method will grant read ("s3:GetObject") access to +all objects ("*") in the bucket. The method returns the \`iam.Grant\` object, which can then be modified as needed. For example, you can add a condition that will restrict access only @@ -2737,25 +2737,25 @@ Note that if this \`IBucket\` refers to an existing bucket, possibly not managed by CloudFormation, this method will have no effect, since it's impossible to modify the policy of an existing bucket. -###### \`allowed_actions\`Required +###### \`allowed_actions\`Required - *Type:* str the set of S3 actions to allow. -Default is \\"s3:GetObject\\". +Default is "s3:GetObject". --- -###### \`key_prefix\`Optional +###### \`key_prefix\`Optional - *Type:* str -the prefix of S3 object keys (e.g. \`home/*\`). Default is \\"*\\". +the prefix of S3 object keys (e.g. \`home/*\`). Default is "*". --- -##### \`grant_put\` +##### \`grant_put\` \`\`\`python def grant_put( @@ -2769,7 +2769,7 @@ Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM princip If encryption is used, permission to use the key to encrypt the contents of written files will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required - *Type:* aws_cdk.aws_iam.IGrantable @@ -2777,7 +2777,7 @@ The principal. --- -###### \`objects_key_pattern\`Optional +###### \`objects_key_pattern\`Optional - *Type:* typing.Any @@ -2785,7 +2785,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grant_put_acl\` +##### \`grant_put_acl\` \`\`\`python def grant_put_acl( @@ -2800,19 +2800,19 @@ If your application has the '@aws-cdk/aws-s3:grantWriteWithoutAcl' feature flag calling {@link grantWrite} or {@link grantReadWrite} no longer grants permissions to modify the ACLs of the objects; in this case, if you need to modify object ACLs, call this method explicitly. -###### \`identity\`Required +###### \`identity\`Required - *Type:* aws_cdk.aws_iam.IGrantable --- -###### \`objects_key_pattern\`Optional +###### \`objects_key_pattern\`Optional - *Type:* str --- -##### \`grant_read\` +##### \`grant_read\` \`\`\`python def grant_read( @@ -2826,7 +2826,7 @@ Grant read permissions for this bucket and it's contents to an IAM principal (Ro If encryption is used, permission to use the key to decrypt the contents of the bucket will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required - *Type:* aws_cdk.aws_iam.IGrantable @@ -2834,7 +2834,7 @@ The principal. --- -###### \`objects_key_pattern\`Optional +###### \`objects_key_pattern\`Optional - *Type:* typing.Any @@ -2842,7 +2842,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grant_read_write\` +##### \`grant_read_write\` \`\`\`python def grant_read_write( @@ -2864,19 +2864,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required - *Type:* aws_cdk.aws_iam.IGrantable --- -###### \`objects_key_pattern\`Optional +###### \`objects_key_pattern\`Optional - *Type:* typing.Any --- -##### \`grant_write\` +##### \`grant_write\` \`\`\`python def grant_write( @@ -2898,19 +2898,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required - *Type:* aws_cdk.aws_iam.IGrantable --- -###### \`objects_key_pattern\`Optional +###### \`objects_key_pattern\`Optional - *Type:* typing.Any --- -##### \`on_cloud_trail_event\` +##### \`on_cloud_trail_event\` \`\`\`python def on_cloud_trail_event( @@ -2928,7 +2928,7 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* str @@ -2936,7 +2936,7 @@ The id of the rule. --- -###### \`description\`Optional +###### \`description\`Optional - *Type:* str - *Default:* No description @@ -2945,7 +2945,7 @@ A description of the rule's purpose. --- -###### \`event_pattern\`Optional +###### \`event_pattern\`Optional - *Type:* aws_cdk.aws_events.EventPattern - *Default:* No additional filtering based on an event pattern. @@ -2960,7 +2960,7 @@ on top of that filtering. --- -###### \`rule_name\`Optional +###### \`rule_name\`Optional - *Type:* str - *Default:* AWS CloudFormation generates a unique physical ID. @@ -2969,7 +2969,7 @@ A name for the rule. --- -###### \`target\`Optional +###### \`target\`Optional - *Type:* aws_cdk.aws_events.IRuleTarget - *Default:* No target is added to the rule. Use \`addTarget()\` to add a target. @@ -2978,7 +2978,7 @@ The target to register for the event. --- -###### \`paths\`Optional +###### \`paths\`Optional - *Type:* typing.List[str] - *Default:* Watch changes to all objects @@ -2987,7 +2987,7 @@ Only watch changes to these object paths. --- -##### \`on_cloud_trail_put_object\` +##### \`on_cloud_trail_put_object\` \`\`\`python def on_cloud_trail_put_object( @@ -3009,7 +3009,7 @@ so using \`onCloudTrailWriteObject\` may be preferable. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* str @@ -3017,7 +3017,7 @@ The id of the rule. --- -###### \`description\`Optional +###### \`description\`Optional - *Type:* str - *Default:* No description @@ -3026,7 +3026,7 @@ A description of the rule's purpose. --- -###### \`event_pattern\`Optional +###### \`event_pattern\`Optional - *Type:* aws_cdk.aws_events.EventPattern - *Default:* No additional filtering based on an event pattern. @@ -3041,7 +3041,7 @@ on top of that filtering. --- -###### \`rule_name\`Optional +###### \`rule_name\`Optional - *Type:* str - *Default:* AWS CloudFormation generates a unique physical ID. @@ -3050,7 +3050,7 @@ A name for the rule. --- -###### \`target\`Optional +###### \`target\`Optional - *Type:* aws_cdk.aws_events.IRuleTarget - *Default:* No target is added to the rule. Use \`addTarget()\` to add a target. @@ -3059,7 +3059,7 @@ The target to register for the event. --- -###### \`paths\`Optional +###### \`paths\`Optional - *Type:* typing.List[str] - *Default:* Watch changes to all objects @@ -3068,7 +3068,7 @@ Only watch changes to these object paths. --- -##### \`on_cloud_trail_write_object\` +##### \`on_cloud_trail_write_object\` \`\`\`python def on_cloud_trail_write_object( @@ -3093,7 +3093,7 @@ so using this method may be preferable to \`onCloudTrailPutObject\`. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* str @@ -3101,7 +3101,7 @@ The id of the rule. --- -###### \`description\`Optional +###### \`description\`Optional - *Type:* str - *Default:* No description @@ -3110,7 +3110,7 @@ A description of the rule's purpose. --- -###### \`event_pattern\`Optional +###### \`event_pattern\`Optional - *Type:* aws_cdk.aws_events.EventPattern - *Default:* No additional filtering based on an event pattern. @@ -3125,7 +3125,7 @@ on top of that filtering. --- -###### \`rule_name\`Optional +###### \`rule_name\`Optional - *Type:* str - *Default:* AWS CloudFormation generates a unique physical ID. @@ -3134,7 +3134,7 @@ A name for the rule. --- -###### \`target\`Optional +###### \`target\`Optional - *Type:* aws_cdk.aws_events.IRuleTarget - *Default:* No target is added to the rule. Use \`addTarget()\` to add a target. @@ -3143,7 +3143,7 @@ The target to register for the event. --- -###### \`paths\`Optional +###### \`paths\`Optional - *Type:* typing.List[str] - *Default:* Watch changes to all objects @@ -3152,7 +3152,7 @@ Only watch changes to these object paths. --- -##### \`s3_url_for_object\` +##### \`s3_url_for_object\` \`\`\`python def s3_url_for_object( @@ -3165,7 +3165,7 @@ The S3 URL of an S3 object. For example:. \`s3://onlybucket\` - \`s3://bucket/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -3176,7 +3176,7 @@ bucket is returned. --- -##### \`transfer_acceleration_url_for_object\` +##### \`transfer_acceleration_url_for_object\` \`\`\`python def transfer_acceleration_url_for_object( @@ -3193,7 +3193,7 @@ for dual-stack endpoint (connect to the bucket over IPv6). For example: - \`https://bucket.s3-accelerate.amazonaws.com\` - \`https://bucket.s3-accelerate.amazonaws.com/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -3204,7 +3204,7 @@ bucket is returned. --- -###### \`dual_stack\`Optional +###### \`dual_stack\`Optional - *Type:* bool - *Default:* false @@ -3213,7 +3213,7 @@ Dual-stack support to connect to the bucket over IPv6. --- -##### \`url_for_object\` +##### \`url_for_object\` \`\`\`python def url_for_object( @@ -3227,7 +3227,7 @@ The https URL of an S3 object. Specify \`regional: false\` at the options for no - \`https://s3.us-west-1.amazonaws.com/bucket/key\` - \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -3238,7 +3238,7 @@ bucket is returned. --- -##### \`virtual_hosted_url_for_object\` +##### \`virtual_hosted_url_for_object\` \`\`\`python def virtual_hosted_url_for_object( @@ -3254,7 +3254,7 @@ The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the - \`https://bucket.s3.amazonaws.com/key\` - \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -3265,7 +3265,7 @@ bucket is returned. --- -###### \`regional\`Optional +###### \`regional\`Optional - *Type:* bool - *Default:* true @@ -3274,7 +3274,7 @@ Specifies the URL includes the region. --- -##### \`add_cors_rule\` +##### \`add_cors_rule\` \`\`\`python def add_cors_rule( @@ -3289,7 +3289,7 @@ def add_cors_rule( Adds a cross-origin access configuration for objects in an Amazon S3 bucket. -###### \`allowed_methods\`Required +###### \`allowed_methods\`Required - *Type:* typing.List[aws_cdk.aws_s3.HttpMethods] @@ -3297,7 +3297,7 @@ An HTTP method that you allow the origin to execute. --- -###### \`allowed_origins\`Required +###### \`allowed_origins\`Required - *Type:* typing.List[str] @@ -3305,7 +3305,7 @@ One or more origins you want customers to be able to access the bucket from. --- -###### \`allowed_headers\`Optional +###### \`allowed_headers\`Optional - *Type:* typing.List[str] - *Default:* No headers allowed. @@ -3314,7 +3314,7 @@ Headers that are specified in the Access-Control-Request-Headers header. --- -###### \`exposed_headers\`Optional +###### \`exposed_headers\`Optional - *Type:* typing.List[str] - *Default:* No headers exposed. @@ -3323,7 +3323,7 @@ One or more headers in the response that you want customers to be able to access --- -###### \`id\`Optional +###### \`id\`Optional - *Type:* str - *Default:* No id specified. @@ -3332,7 +3332,7 @@ A unique identifier for this rule. --- -###### \`max_age\`Optional +###### \`max_age\`Optional - *Type:* typing.Union[int, float] - *Default:* No caching. @@ -3341,7 +3341,7 @@ The time in seconds that your browser is to cache the preflight response for the --- -##### \`add_inventory\` +##### \`add_inventory\` \`\`\`python def add_inventory( @@ -3358,7 +3358,7 @@ def add_inventory( Add an inventory configuration. -###### \`destination\`Required +###### \`destination\`Required - *Type:* aws_cdk.aws_s3.InventoryDestination @@ -3366,7 +3366,7 @@ The destination of the inventory. --- -###### \`enabled\`Optional +###### \`enabled\`Optional - *Type:* bool - *Default:* true @@ -3375,7 +3375,7 @@ Whether the inventory is enabled or disabled. --- -###### \`format\`Optional +###### \`format\`Optional - *Type:* aws_cdk.aws_s3.InventoryFormat - *Default:* InventoryFormat.CSV @@ -3384,7 +3384,7 @@ The format of the inventory. --- -###### \`frequency\`Optional +###### \`frequency\`Optional - *Type:* aws_cdk.aws_s3.InventoryFrequency - *Default:* InventoryFrequency.WEEKLY @@ -3393,7 +3393,7 @@ Frequency at which the inventory should be generated. --- -###### \`include_object_versions\`Optional +###### \`include_object_versions\`Optional - *Type:* aws_cdk.aws_s3.InventoryObjectVersion - *Default:* InventoryObjectVersion.ALL @@ -3402,7 +3402,7 @@ If the inventory should contain all the object versions or only the current one. --- -###### \`inventory_id\`Optional +###### \`inventory_id\`Optional - *Type:* str - *Default:* generated ID. @@ -3411,7 +3411,7 @@ The inventory configuration ID. --- -###### \`objects_prefix\`Optional +###### \`objects_prefix\`Optional - *Type:* str - *Default:* No objects prefix @@ -3420,7 +3420,7 @@ The inventory will only include objects that meet the prefix filter criteria. --- -###### \`optional_fields\`Optional +###### \`optional_fields\`Optional - *Type:* typing.List[str] - *Default:* No optional fields. @@ -3429,7 +3429,7 @@ A list of optional fields to be included in the inventory result. --- -##### \`add_lifecycle_rule\` +##### \`add_lifecycle_rule\` \`\`\`python def add_lifecycle_rule( @@ -3452,7 +3452,7 @@ def add_lifecycle_rule( Add a lifecycle rule to the bucket. -###### \`abort_incomplete_multipart_upload_after\`Optional +###### \`abort_incomplete_multipart_upload_after\`Optional - *Type:* aws_cdk.core.Duration - *Default:* Incomplete uploads are never aborted @@ -3466,7 +3466,7 @@ associated with the multipart upload. --- -###### \`enabled\`Optional +###### \`enabled\`Optional - *Type:* bool - *Default:* true @@ -3475,7 +3475,7 @@ Whether this rule is enabled. --- -###### \`expiration\`Optional +###### \`expiration\`Optional - *Type:* aws_cdk.core.Duration - *Default:* No expiration timeout @@ -3488,7 +3488,7 @@ expiration time must also be later than the transition time. --- -###### \`expiration_date\`Optional +###### \`expiration_date\`Optional - *Type:* datetime.datetime - *Default:* No expiration date @@ -3503,7 +3503,7 @@ expiration time must also be later than the transition time. --- -###### \`expired_object_delete_marker\`Optional +###### \`expired_object_delete_marker\`Optional - *Type:* bool - *Default:* false @@ -3514,7 +3514,7 @@ If set to true, the delete marker will be expired. --- -###### \`id\`Optional +###### \`id\`Optional - *Type:* str @@ -3524,7 +3524,7 @@ The value cannot be more than 255 characters. --- -###### \`noncurrent_version_expiration\`Optional +###### \`noncurrent_version_expiration\`Optional - *Type:* aws_cdk.core.Duration - *Default:* No noncurrent version expiration @@ -3540,7 +3540,7 @@ transition time. --- -###### \`noncurrent_versions_to_retain\`Optional +###### \`noncurrent_versions_to_retain\`Optional - *Type:* typing.Union[int, float] - *Default:* No noncurrent versions to retain @@ -3552,7 +3552,7 @@ Amazon S3 permanently deletes them. --- -###### \`noncurrent_version_transitions\`Optional +###### \`noncurrent_version_transitions\`Optional - *Type:* typing.List[aws_cdk.aws_s3.NoncurrentVersionTransition] @@ -3565,7 +3565,7 @@ must be later than the transition time. --- -###### \`object_size_greater_than\`Optional +###### \`object_size_greater_than\`Optional - *Type:* typing.Union[int, float] - *Default:* No rule @@ -3574,7 +3574,7 @@ Specifies the minimum object size in bytes for this rule to apply to. --- -###### \`object_size_less_than\`Optional +###### \`object_size_less_than\`Optional - *Type:* typing.Union[int, float] - *Default:* No rule @@ -3583,7 +3583,7 @@ Specifies the maximum object size in bytes for this rule to apply to. --- -###### \`prefix\`Optional +###### \`prefix\`Optional - *Type:* str - *Default:* Rule applies to all objects @@ -3592,7 +3592,7 @@ Object key prefix that identifies one or more objects to which this rule applies --- -###### \`tag_filters\`Optional +###### \`tag_filters\`Optional - *Type:* typing.Mapping[typing.Any] - *Default:* Rule applies to all objects @@ -3601,7 +3601,7 @@ The TagFilter property type specifies tags to use to identify a subset of object --- -###### \`transitions\`Optional +###### \`transitions\`Optional - *Type:* typing.List[aws_cdk.aws_s3.Transition] - *Default:* No transition rules @@ -3614,7 +3614,7 @@ expiration time must also be later than the transition time. --- -##### \`add_metric\` +##### \`add_metric\` \`\`\`python def add_metric( @@ -3626,7 +3626,7 @@ def add_metric( Adds a metrics configuration for the CloudWatch request metrics from the bucket. -###### \`id\`Required +###### \`id\`Required - *Type:* str @@ -3634,7 +3634,7 @@ The ID used to identify the metrics configuration. --- -###### \`prefix\`Optional +###### \`prefix\`Optional - *Type:* str @@ -3642,7 +3642,7 @@ The prefix that an object must have to be included in the metrics results. --- -###### \`tag_filters\`Optional +###### \`tag_filters\`Optional - *Type:* typing.Mapping[typing.Any] @@ -3652,25 +3652,25 @@ The metrics configuration includes only objects that meet the filter's criteria. --- -##### \`goodbye\` +##### \`goodbye\` \`\`\`python def goodbye() -> None \`\`\` -#### Static Functions +#### Static Functions | **Name** | **Description** | | --- | --- | -| is_resource | Check whether the given construct is a Resource. | -| from_bucket_arn | *No description.* | -| from_bucket_attributes | Creates a Bucket construct that represents an external bucket. | -| from_bucket_name | *No description.* | -| validate_bucket_name | Thrown an exception if the given bucket name is not valid. | +| is_resource | Check whether the given construct is a Resource. | +| from_bucket_arn | *No description.* | +| from_bucket_attributes | Creates a Bucket construct that represents an external bucket. | +| from_bucket_name | *No description.* | +| validate_bucket_name | Thrown an exception if the given bucket name is not valid. | --- -##### \`is_resource\` +##### \`is_resource\` \`\`\`python from construct_library import submod1 @@ -3682,13 +3682,13 @@ submod1.GoodbyeBucket.is_resource( Check whether the given construct is a Resource. -###### \`construct\`Required +###### \`construct\`Required - *Type:* aws_cdk.core.IConstruct --- -##### \`from_bucket_arn\` +##### \`from_bucket_arn\` \`\`\`python from construct_library import submod1 @@ -3700,25 +3700,25 @@ submod1.GoodbyeBucket.from_bucket_arn( ) \`\`\` -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct --- -###### \`id\`Required +###### \`id\`Required - *Type:* str --- -###### \`bucket_arn\`Required +###### \`bucket_arn\`Required - *Type:* str --- -##### \`from_bucket_attributes\` +##### \`from_bucket_attributes\` \`\`\`python from construct_library import submod1 @@ -3743,7 +3743,7 @@ submod1.GoodbyeBucket.from_bucket_attributes( Creates a Bucket construct that represents an external bucket. -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct @@ -3751,7 +3751,7 @@ The parent creating construct (usually \`this\`). --- -###### \`id\`Required +###### \`id\`Required - *Type:* str @@ -3759,7 +3759,7 @@ The construct's name. --- -###### \`account\`Optional +###### \`account\`Optional - *Type:* str - *Default:* it's assumed the bucket belongs to the same account as the scope it's being imported into @@ -3768,7 +3768,7 @@ The account this existing bucket belongs to. --- -###### \`bucket_arn\`Optional +###### \`bucket_arn\`Optional - *Type:* str @@ -3779,7 +3779,7 @@ defined in order to initialize a bucket ref. --- -###### \`bucket_domain_name\`Optional +###### \`bucket_domain_name\`Optional - *Type:* str - *Default:* Inferred from bucket name @@ -3788,7 +3788,7 @@ The domain name of the bucket. --- -###### \`bucket_dual_stack_domain_name\`Optional +###### \`bucket_dual_stack_domain_name\`Optional - *Type:* str @@ -3796,7 +3796,7 @@ The IPv6 DNS name of the specified bucket. --- -###### \`bucket_name\`Optional +###### \`bucket_name\`Optional - *Type:* str @@ -3809,7 +3809,7 @@ policy, won't work. --- -###### \`bucket_regional_domain_name\`Optional +###### \`bucket_regional_domain_name\`Optional - *Type:* str @@ -3817,7 +3817,7 @@ The regional domain name of the specified bucket. --- -###### \`bucket_website_new_url_format\`Optional +###### \`bucket_website_new_url_format\`Optional - *Type:* bool - *Default:* false @@ -3829,7 +3829,7 @@ regions launched since 2014. --- -###### \`bucket_website_url\`Optional +###### \`bucket_website_url\`Optional - *Type:* str - *Default:* Inferred from bucket name @@ -3838,13 +3838,13 @@ The website URL of the bucket (if static web hosting is enabled). --- -###### \`encryption_key\`Optional +###### \`encryption_key\`Optional - *Type:* aws_cdk.aws_kms.IKey --- -###### \`is_website\`Optional +###### \`is_website\`Optional - *Type:* bool - *Default:* false @@ -3853,7 +3853,7 @@ If this bucket has been configured for static website hosting. --- -###### \`notifications_handler_role\`Optional +###### \`notifications_handler_role\`Optional - *Type:* aws_cdk.aws_iam.IRole - *Default:* a new role will be created. @@ -3862,7 +3862,7 @@ The role to be used by the notifications handler. --- -###### \`region\`Optional +###### \`region\`Optional - *Type:* str - *Default:* it's assumed the bucket is in the same region as the scope it's being imported into @@ -3871,7 +3871,7 @@ The region this existing bucket is in. --- -##### \`from_bucket_name\` +##### \`from_bucket_name\` \`\`\`python from construct_library import submod1 @@ -3883,25 +3883,25 @@ submod1.GoodbyeBucket.from_bucket_name( ) \`\`\` -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct --- -###### \`id\`Required +###### \`id\`Required - *Type:* str --- -###### \`bucket_name\`Required +###### \`bucket_name\`Required - *Type:* str --- -##### \`validate_bucket_name\` +##### \`validate_bucket_name\` \`\`\`python from construct_library import submod1 @@ -3913,7 +3913,7 @@ submod1.GoodbyeBucket.validate_bucket_name( Thrown an exception if the given bucket name is not valid. -###### \`physical_name\`Required +###### \`physical_name\`Required - *Type:* str @@ -3921,27 +3921,27 @@ name of the bucket. --- -#### Properties +#### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | aws_cdk.core.ConstructNode | The construct tree node associated with this construct. | -| env | aws_cdk.core.ResourceEnvironment | The environment this resource belongs to. | -| stack | aws_cdk.core.Stack | The stack in which this resource is defined. | -| bucket_arn | str | The ARN of the bucket. | -| bucket_domain_name | str | The IPv4 DNS name of the specified bucket. | -| bucket_dual_stack_domain_name | str | The IPv6 DNS name of the specified bucket. | -| bucket_name | str | The name of the bucket. | -| bucket_regional_domain_name | str | The regional domain name of the specified bucket. | -| bucket_website_domain_name | str | The Domain name of the static website. | -| bucket_website_url | str | The URL of the static website. | -| encryption_key | aws_cdk.aws_kms.IKey | Optional KMS encryption key associated with this bucket. | -| is_website | bool | If this bucket has been configured for static website hosting. | -| policy | aws_cdk.aws_s3.BucketPolicy | The resource policy associated with this bucket. | +| node | aws_cdk.core.ConstructNode | The construct tree node associated with this construct. | +| env | aws_cdk.core.ResourceEnvironment | The environment this resource belongs to. | +| stack | aws_cdk.core.Stack | The stack in which this resource is defined. | +| bucket_arn | str | The ARN of the bucket. | +| bucket_domain_name | str | The IPv4 DNS name of the specified bucket. | +| bucket_dual_stack_domain_name | str | The IPv6 DNS name of the specified bucket. | +| bucket_name | str | The name of the bucket. | +| bucket_regional_domain_name | str | The regional domain name of the specified bucket. | +| bucket_website_domain_name | str | The Domain name of the static website. | +| bucket_website_url | str | The URL of the static website. | +| encryption_key | aws_cdk.aws_kms.IKey | Optional KMS encryption key associated with this bucket. | +| is_website | bool | If this bucket has been configured for static website hosting. | +| policy | aws_cdk.aws_s3.BucketPolicy | The resource policy associated with this bucket. | --- -##### \`node\`Required +##### \`node\`Required \`\`\`python node: ConstructNode @@ -3953,7 +3953,7 @@ The construct tree node associated with this construct. --- -##### \`env\`Required +##### \`env\`Required \`\`\`python env: ResourceEnvironment @@ -3972,7 +3972,7 @@ that might be different than the stack they were imported into. --- -##### \`stack\`Required +##### \`stack\`Required \`\`\`python stack: Stack @@ -3984,7 +3984,7 @@ The stack in which this resource is defined. --- -##### \`bucket_arn\`Required +##### \`bucket_arn\`Required \`\`\`python bucket_arn: str @@ -3996,7 +3996,7 @@ The ARN of the bucket. --- -##### \`bucket_domain_name\`Required +##### \`bucket_domain_name\`Required \`\`\`python bucket_domain_name: str @@ -4008,7 +4008,7 @@ The IPv4 DNS name of the specified bucket. --- -##### \`bucket_dual_stack_domain_name\`Required +##### \`bucket_dual_stack_domain_name\`Required \`\`\`python bucket_dual_stack_domain_name: str @@ -4020,7 +4020,7 @@ The IPv6 DNS name of the specified bucket. --- -##### \`bucket_name\`Required +##### \`bucket_name\`Required \`\`\`python bucket_name: str @@ -4032,7 +4032,7 @@ The name of the bucket. --- -##### \`bucket_regional_domain_name\`Required +##### \`bucket_regional_domain_name\`Required \`\`\`python bucket_regional_domain_name: str @@ -4044,7 +4044,7 @@ The regional domain name of the specified bucket. --- -##### \`bucket_website_domain_name\`Required +##### \`bucket_website_domain_name\`Required \`\`\`python bucket_website_domain_name: str @@ -4056,7 +4056,7 @@ The Domain name of the static website. --- -##### \`bucket_website_url\`Required +##### \`bucket_website_url\`Required \`\`\`python bucket_website_url: str @@ -4068,7 +4068,7 @@ The URL of the static website. --- -##### \`encryption_key\`Optional +##### \`encryption_key\`Optional \`\`\`python encryption_key: IKey @@ -4080,7 +4080,7 @@ Optional KMS encryption key associated with this bucket. --- -##### \`is_website\`Optional +##### \`is_website\`Optional \`\`\`python is_website: bool @@ -4092,7 +4092,7 @@ If this bucket has been configured for static website hosting. --- -##### \`policy\`Optional +##### \`policy\`Optional \`\`\`python policy: BucketPolicy @@ -4108,9 +4108,9 @@ first call to addToResourcePolicy(s). --- -### GreeterBucket +### GreeterBucket -#### Initializers +#### Initializers \`\`\`python import construct_library @@ -4149,50 +4149,50 @@ construct_library.GreeterBucket( | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | str | *No description.* | -| access_control | aws_cdk.aws_s3.BucketAccessControl | Specifies a canned ACL that grants predefined permissions to the bucket. | -| auto_delete_objects | bool | Whether all objects should be automatically deleted when the bucket is removed from the stack or when the stack is deleted. | -| block_public_access | aws_cdk.aws_s3.BlockPublicAccess | The block public access configuration of this bucket. | -| bucket_key_enabled | bool | Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS (SSE-KMS) for new objects in the bucket. | -| bucket_name | str | Physical name of this bucket. | -| cors | typing.List[aws_cdk.aws_s3.CorsRule] | The CORS configuration of this bucket. | -| encryption | aws_cdk.aws_s3.BucketEncryption | The kind of server-side encryption to apply to this bucket. | -| encryption_key | aws_cdk.aws_kms.IKey | External KMS key to use for bucket encryption. | -| enforce_ss_l | bool | Enforces SSL for requests. | -| event_bridge_enabled | bool | Whether this bucket should send notifications to Amazon EventBridge or not. | -| intelligent_tiering_configurations | typing.List[aws_cdk.aws_s3.IntelligentTieringConfiguration] | Inteligent Tiering Configurations. | -| inventories | typing.List[aws_cdk.aws_s3.Inventory] | The inventory configuration of the bucket. | -| lifecycle_rules | typing.List[aws_cdk.aws_s3.LifecycleRule] | Rules that define how Amazon S3 manages objects during their lifetime. | -| metrics | typing.List[aws_cdk.aws_s3.BucketMetrics] | The metrics configuration of this bucket. | -| notifications_handler_role | aws_cdk.aws_iam.IRole | The role to be used by the notifications handler. | -| object_ownership | aws_cdk.aws_s3.ObjectOwnership | The objectOwnership of the bucket. | -| public_read_access | bool | Grants public read access to all objects in the bucket. | -| removal_policy | aws_cdk.core.RemovalPolicy | Policy to apply when the bucket is removed from this stack. | -| server_access_logs_bucket | aws_cdk.aws_s3.IBucket | Destination bucket for the server access logs. | -| server_access_logs_prefix | str | Optional log file prefix to use for the bucket's access logs. | -| transfer_acceleration | bool | Whether this bucket should have transfer acceleration turned on or not. | -| versioned | bool | Whether this bucket should have versioning turned on or not. | -| website_error_document | str | The name of the error document (e.g. \\"404.html\\") for the website. \`websiteIndexDocument\` must also be set if this is set. | -| website_index_document | str | The name of the index document (e.g. \\"index.html\\") for the website. Enables static website hosting for this bucket. | -| website_redirect | aws_cdk.aws_s3.RedirectTarget | Specifies the redirect behavior of all requests to a website endpoint of a bucket. | -| website_routing_rules | typing.List[aws_cdk.aws_s3.RoutingRule] | Rules that define when a redirect is applied and the redirect behavior. | - ---- - -##### \`scope\`Required +| scope | constructs.Construct | *No description.* | +| id | str | *No description.* | +| access_control | aws_cdk.aws_s3.BucketAccessControl | Specifies a canned ACL that grants predefined permissions to the bucket. | +| auto_delete_objects | bool | Whether all objects should be automatically deleted when the bucket is removed from the stack or when the stack is deleted. | +| block_public_access | aws_cdk.aws_s3.BlockPublicAccess | The block public access configuration of this bucket. | +| bucket_key_enabled | bool | Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS (SSE-KMS) for new objects in the bucket. | +| bucket_name | str | Physical name of this bucket. | +| cors | typing.List[aws_cdk.aws_s3.CorsRule] | The CORS configuration of this bucket. | +| encryption | aws_cdk.aws_s3.BucketEncryption | The kind of server-side encryption to apply to this bucket. | +| encryption_key | aws_cdk.aws_kms.IKey | External KMS key to use for bucket encryption. | +| enforce_ss_l | bool | Enforces SSL for requests. | +| event_bridge_enabled | bool | Whether this bucket should send notifications to Amazon EventBridge or not. | +| intelligent_tiering_configurations | typing.List[aws_cdk.aws_s3.IntelligentTieringConfiguration] | Inteligent Tiering Configurations. | +| inventories | typing.List[aws_cdk.aws_s3.Inventory] | The inventory configuration of the bucket. | +| lifecycle_rules | typing.List[aws_cdk.aws_s3.LifecycleRule] | Rules that define how Amazon S3 manages objects during their lifetime. | +| metrics | typing.List[aws_cdk.aws_s3.BucketMetrics] | The metrics configuration of this bucket. | +| notifications_handler_role | aws_cdk.aws_iam.IRole | The role to be used by the notifications handler. | +| object_ownership | aws_cdk.aws_s3.ObjectOwnership | The objectOwnership of the bucket. | +| public_read_access | bool | Grants public read access to all objects in the bucket. | +| removal_policy | aws_cdk.core.RemovalPolicy | Policy to apply when the bucket is removed from this stack. | +| server_access_logs_bucket | aws_cdk.aws_s3.IBucket | Destination bucket for the server access logs. | +| server_access_logs_prefix | str | Optional log file prefix to use for the bucket's access logs. | +| transfer_acceleration | bool | Whether this bucket should have transfer acceleration turned on or not. | +| versioned | bool | Whether this bucket should have versioning turned on or not. | +| website_error_document | str | The name of the error document (e.g. "404.html") for the website. \`websiteIndexDocument\` must also be set if this is set. | +| website_index_document | str | The name of the index document (e.g. "index.html") for the website. Enables static website hosting for this bucket. | +| website_redirect | aws_cdk.aws_s3.RedirectTarget | Specifies the redirect behavior of all requests to a website endpoint of a bucket. | +| website_routing_rules | typing.List[aws_cdk.aws_s3.RoutingRule] | Rules that define when a redirect is applied and the redirect behavior. | + +--- + +##### \`scope\`Required - *Type:* constructs.Construct --- -##### \`id\`Required +##### \`id\`Required - *Type:* str --- -##### \`access_control\`Optional +##### \`access_control\`Optional - *Type:* aws_cdk.aws_s3.BucketAccessControl - *Default:* BucketAccessControl.PRIVATE @@ -4201,7 +4201,7 @@ Specifies a canned ACL that grants predefined permissions to the bucket. --- -##### \`auto_delete_objects\`Optional +##### \`auto_delete_objects\`Optional - *Type:* bool - *Default:* false @@ -4217,7 +4217,7 @@ by deploying with CDK version \`1.126.0\` or later **before** switching this val --- -##### \`block_public_access\`Optional +##### \`block_public_access\`Optional - *Type:* aws_cdk.aws_s3.BlockPublicAccess - *Default:* CloudFormation defaults will apply. New buckets and objects don't allow public access, but users can modify bucket policies or object permissions to allow public access @@ -4228,7 +4228,7 @@ The block public access configuration of this bucket. --- -##### \`bucket_key_enabled\`Optional +##### \`bucket_key_enabled\`Optional - *Type:* bool - *Default:* false @@ -4239,7 +4239,7 @@ Only relevant, when Encryption is set to {@link BucketEncryption.KMS} --- -##### \`bucket_name\`Optional +##### \`bucket_name\`Optional - *Type:* str - *Default:* Assigned by CloudFormation (recommended). @@ -4248,7 +4248,7 @@ Physical name of this bucket. --- -##### \`cors\`Optional +##### \`cors\`Optional - *Type:* typing.List[aws_cdk.aws_s3.CorsRule] - *Default:* No CORS configuration. @@ -4259,7 +4259,7 @@ The CORS configuration of this bucket. --- -##### \`encryption\`Optional +##### \`encryption\`Optional - *Type:* aws_cdk.aws_s3.BucketEncryption - *Default:* \`Kms\` if \`encryptionKey\` is specified, or \`Unencrypted\` otherwise. @@ -4271,20 +4271,20 @@ encryption key is not specified, a key will automatically be created. --- -##### \`encryption_key\`Optional +##### \`encryption_key\`Optional - *Type:* aws_cdk.aws_kms.IKey -- *Default:* If encryption is set to \\"Kms\\" and this property is undefined, a new KMS key will be created and associated with this bucket. +- *Default:* If encryption is set to "Kms" and this property is undefined, a new KMS key will be created and associated with this bucket. External KMS key to use for bucket encryption. -The 'encryption' property must be either not specified or set to \\"Kms\\". -An error will be emitted if encryption is set to \\"Unencrypted\\" or -\\"Managed\\". +The 'encryption' property must be either not specified or set to "Kms". +An error will be emitted if encryption is set to "Unencrypted" or +"Managed". --- -##### \`enforce_ss_l\`Optional +##### \`enforce_ss_l\`Optional - *Type:* bool - *Default:* false @@ -4297,7 +4297,7 @@ S3.5 of the AWS Foundational Security Best Practices Regarding S3. --- -##### \`event_bridge_enabled\`Optional +##### \`event_bridge_enabled\`Optional - *Type:* bool - *Default:* false @@ -4306,7 +4306,7 @@ Whether this bucket should send notifications to Amazon EventBridge or not. --- -##### \`intelligent_tiering_configurations\`Optional +##### \`intelligent_tiering_configurations\`Optional - *Type:* typing.List[aws_cdk.aws_s3.IntelligentTieringConfiguration] - *Default:* No Intelligent Tiiering Configurations. @@ -4317,7 +4317,7 @@ Inteligent Tiering Configurations. --- -##### \`inventories\`Optional +##### \`inventories\`Optional - *Type:* typing.List[aws_cdk.aws_s3.Inventory] - *Default:* No inventory configuration @@ -4328,7 +4328,7 @@ The inventory configuration of the bucket. --- -##### \`lifecycle_rules\`Optional +##### \`lifecycle_rules\`Optional - *Type:* typing.List[aws_cdk.aws_s3.LifecycleRule] - *Default:* No lifecycle rules. @@ -4337,7 +4337,7 @@ Rules that define how Amazon S3 manages objects during their lifetime. --- -##### \`metrics\`Optional +##### \`metrics\`Optional - *Type:* typing.List[aws_cdk.aws_s3.BucketMetrics] - *Default:* No metrics configuration. @@ -4348,7 +4348,7 @@ The metrics configuration of this bucket. --- -##### \`notifications_handler_role\`Optional +##### \`notifications_handler_role\`Optional - *Type:* aws_cdk.aws_iam.IRole - *Default:* a new role will be created. @@ -4357,7 +4357,7 @@ The role to be used by the notifications handler. --- -##### \`object_ownership\`Optional +##### \`object_ownership\`Optional - *Type:* aws_cdk.aws_s3.ObjectOwnership - *Default:* No ObjectOwnership configuration, uploading account will own the object. @@ -4368,7 +4368,7 @@ The objectOwnership of the bucket. --- -##### \`public_read_access\`Optional +##### \`public_read_access\`Optional - *Type:* bool - *Default:* false @@ -4379,7 +4379,7 @@ Similar to calling \`bucket.grantPublicAccess()\` --- -##### \`removal_policy\`Optional +##### \`removal_policy\`Optional - *Type:* aws_cdk.core.RemovalPolicy - *Default:* The bucket will be orphaned. @@ -4388,27 +4388,27 @@ Policy to apply when the bucket is removed from this stack. --- -##### \`server_access_logs_bucket\`Optional +##### \`server_access_logs_bucket\`Optional - *Type:* aws_cdk.aws_s3.IBucket -- *Default:* If \\"serverAccessLogsPrefix\\" undefined - access logs disabled, otherwise - log to current bucket. +- *Default:* If "serverAccessLogsPrefix" undefined - access logs disabled, otherwise - log to current bucket. Destination bucket for the server access logs. --- -##### \`server_access_logs_prefix\`Optional +##### \`server_access_logs_prefix\`Optional - *Type:* str - *Default:* No log file prefix Optional log file prefix to use for the bucket's access logs. -If defined without \\"serverAccessLogsBucket\\", enables access logs to current bucket with this prefix. +If defined without "serverAccessLogsBucket", enables access logs to current bucket with this prefix. --- -##### \`transfer_acceleration\`Optional +##### \`transfer_acceleration\`Optional - *Type:* bool - *Default:* false @@ -4417,7 +4417,7 @@ Whether this bucket should have transfer acceleration turned on or not. --- -##### \`versioned\`Optional +##### \`versioned\`Optional - *Type:* bool - *Default:* false @@ -4426,36 +4426,36 @@ Whether this bucket should have versioning turned on or not. --- -##### \`website_error_document\`Optional +##### \`website_error_document\`Optional - *Type:* str - *Default:* No error document. -The name of the error document (e.g. \\"404.html\\") for the website. \`websiteIndexDocument\` must also be set if this is set. +The name of the error document (e.g. "404.html") for the website. \`websiteIndexDocument\` must also be set if this is set. --- -##### \`website_index_document\`Optional +##### \`website_index_document\`Optional - *Type:* str - *Default:* No index document. -The name of the index document (e.g. \\"index.html\\") for the website. Enables static website hosting for this bucket. +The name of the index document (e.g. "index.html") for the website. Enables static website hosting for this bucket. --- -##### \`website_redirect\`Optional +##### \`website_redirect\`Optional - *Type:* aws_cdk.aws_s3.RedirectTarget - *Default:* No redirection. Specifies the redirect behavior of all requests to a website endpoint of a bucket. -If you specify this property, you can't specify \\"websiteIndexDocument\\", \\"websiteErrorDocument\\" nor , \\"websiteRoutingRules\\". +If you specify this property, you can't specify "websiteIndexDocument", "websiteErrorDocument" nor , "websiteRoutingRules". --- -##### \`website_routing_rules\`Optional +##### \`website_routing_rules\`Optional - *Type:* typing.List[aws_cdk.aws_s3.RoutingRule] - *Default:* No redirection rules. @@ -4464,39 +4464,39 @@ Rules that define when a redirect is applied and the redirect behavior. --- -#### Methods +#### Methods | **Name** | **Description** | | --- | --- | -| apply_removal_policy | Apply the given removal policy to this resource. | -| add_event_notification | Adds a bucket notification event destination. | -| add_object_created_notification | Subscribes a destination to receive notifications when an object is created in the bucket. | -| add_object_removed_notification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| add_to_resource_policy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | -| arn_for_objects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | -| grant_delete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | -| grant_public_access | Allows unrestricted access to objects from this bucket. | -| grant_put | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | -| grant_put_acl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | -| grant_read | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grant_read_write | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grant_write | Grant write permissions to this bucket to an IAM principal. | -| on_cloud_trail_event | Define a CloudWatch event that triggers when something happens to this repository. | -| on_cloud_trail_put_object | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | -| on_cloud_trail_write_object | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3_url_for_object | The S3 URL of an S3 object. For example:. | -| transfer_acceleration_url_for_object | The https Transfer Acceleration URL of an S3 object. | -| url_for_object | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | -| virtual_hosted_url_for_object | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | -| add_cors_rule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | -| add_inventory | Add an inventory configuration. | -| add_lifecycle_rule | Add a lifecycle rule to the bucket. | -| add_metric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | -| greet | *No description.* | - ---- - -##### \`apply_removal_policy\` +| apply_removal_policy | Apply the given removal policy to this resource. | +| add_event_notification | Adds a bucket notification event destination. | +| add_object_created_notification | Subscribes a destination to receive notifications when an object is created in the bucket. | +| add_object_removed_notification | Subscribes a destination to receive notifications when an object is removed from the bucket. | +| add_to_resource_policy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| arn_for_objects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | +| grant_delete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | +| grant_public_access | Allows unrestricted access to objects from this bucket. | +| grant_put | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | +| grant_put_acl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | +| grant_read | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grant_read_write | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grant_write | Grant write permissions to this bucket to an IAM principal. | +| on_cloud_trail_event | Define a CloudWatch event that triggers when something happens to this repository. | +| on_cloud_trail_put_object | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | +| on_cloud_trail_write_object | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | +| s3_url_for_object | The S3 URL of an S3 object. For example:. | +| transfer_acceleration_url_for_object | The https Transfer Acceleration URL of an S3 object. | +| url_for_object | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtual_hosted_url_for_object | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | +| add_cors_rule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | +| add_inventory | Add an inventory configuration. | +| add_lifecycle_rule | Add a lifecycle rule to the bucket. | +| add_metric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | +| greet | *No description.* | + +--- + +##### \`apply_removal_policy\` \`\`\`python def apply_removal_policy( @@ -4514,13 +4514,13 @@ to be replaced. The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). -###### \`policy\`Required +###### \`policy\`Required - *Type:* aws_cdk.core.RemovalPolicy --- -##### \`add_event_notification\` +##### \`add_event_notification\` \`\`\`python def add_event_notification( @@ -4544,7 +4544,7 @@ Adds a bucket notification event destination. \`\`\` -###### \`event\`Required +###### \`event\`Required - *Type:* aws_cdk.aws_s3.EventType @@ -4552,7 +4552,7 @@ The event to trigger the notification. --- -###### \`dest\`Required +###### \`dest\`Required - *Type:* aws_cdk.aws_s3.IBucketNotificationDestination @@ -4560,7 +4560,7 @@ The notification destination (Lambda, SNS Topic or SQS Queue). --- -###### \`prefix\`Optional +###### \`prefix\`Optional - *Type:* str @@ -4568,7 +4568,7 @@ S3 keys must have the specified prefix. --- -###### \`suffix\`Optional +###### \`suffix\`Optional - *Type:* str @@ -4576,7 +4576,7 @@ S3 keys must have the specified suffix. --- -##### \`add_object_created_notification\` +##### \`add_object_created_notification\` \`\`\`python def add_object_created_notification( @@ -4591,7 +4591,7 @@ Subscribes a destination to receive notifications when an object is created in t This is identical to calling \`onEvent(EventType.OBJECT_CREATED)\`. -###### \`dest\`Required +###### \`dest\`Required - *Type:* aws_cdk.aws_s3.IBucketNotificationDestination @@ -4599,7 +4599,7 @@ The notification destination (see onEvent). --- -###### \`prefix\`Optional +###### \`prefix\`Optional - *Type:* str @@ -4607,7 +4607,7 @@ S3 keys must have the specified prefix. --- -###### \`suffix\`Optional +###### \`suffix\`Optional - *Type:* str @@ -4615,7 +4615,7 @@ S3 keys must have the specified suffix. --- -##### \`add_object_removed_notification\` +##### \`add_object_removed_notification\` \`\`\`python def add_object_removed_notification( @@ -4630,7 +4630,7 @@ Subscribes a destination to receive notifications when an object is removed from This is identical to calling \`onEvent(EventType.OBJECT_REMOVED)\`. -###### \`dest\`Required +###### \`dest\`Required - *Type:* aws_cdk.aws_s3.IBucketNotificationDestination @@ -4638,7 +4638,7 @@ The notification destination (see onEvent). --- -###### \`prefix\`Optional +###### \`prefix\`Optional - *Type:* str @@ -4646,7 +4646,7 @@ S3 keys must have the specified prefix. --- -###### \`suffix\`Optional +###### \`suffix\`Optional - *Type:* str @@ -4654,7 +4654,7 @@ S3 keys must have the specified suffix. --- -##### \`add_to_resource_policy\` +##### \`add_to_resource_policy\` \`\`\`python def add_to_resource_policy( @@ -4670,7 +4670,7 @@ it's not possible to tell whether the bucket already has a policy attached, let alone to re-use that policy to add more statements to it. So it's safest to do nothing in these cases. -###### \`permission\`Required +###### \`permission\`Required - *Type:* aws_cdk.aws_iam.PolicyStatement @@ -4678,7 +4678,7 @@ the policy statement to be added to the bucket's policy. --- -##### \`arn_for_objects\` +##### \`arn_for_objects\` \`\`\`python def arn_for_objects( @@ -4688,19 +4688,19 @@ def arn_for_objects( Returns an ARN that represents all objects within the bucket that match the key pattern specified. -To represent all keys, specify \`\`\\"*\\"\`\`. +To represent all keys, specify \`\`"*"\`\`. If you need to specify a keyPattern with multiple components, concatenate them into a single string, e.g.: arnForObjects(\`home/\${team}/\${user}/*\`) -###### \`key_pattern\`Required +###### \`key_pattern\`Required - *Type:* str --- -##### \`grant_delete\` +##### \`grant_delete\` \`\`\`python def grant_delete( @@ -4711,7 +4711,7 @@ def grant_delete( Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. -###### \`identity\`Required +###### \`identity\`Required - *Type:* aws_cdk.aws_iam.IGrantable @@ -4719,7 +4719,7 @@ The principal. --- -###### \`objects_key_pattern\`Optional +###### \`objects_key_pattern\`Optional - *Type:* typing.Any @@ -4727,7 +4727,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grant_public_access\` +##### \`grant_public_access\` \`\`\`python def grant_public_access( @@ -4743,8 +4743,8 @@ in this bucket, which is useful for when you configure your bucket as a website and want everyone to be able to read objects in the bucket without needing to authenticate. -Without arguments, this method will grant read (\\"s3:GetObject\\") access to -all objects (\\"*\\") in the bucket. +Without arguments, this method will grant read ("s3:GetObject") access to +all objects ("*") in the bucket. The method returns the \`iam.Grant\` object, which can then be modified as needed. For example, you can add a condition that will restrict access only @@ -4757,25 +4757,25 @@ Note that if this \`IBucket\` refers to an existing bucket, possibly not managed by CloudFormation, this method will have no effect, since it's impossible to modify the policy of an existing bucket. -###### \`allowed_actions\`Required +###### \`allowed_actions\`Required - *Type:* str the set of S3 actions to allow. -Default is \\"s3:GetObject\\". +Default is "s3:GetObject". --- -###### \`key_prefix\`Optional +###### \`key_prefix\`Optional - *Type:* str -the prefix of S3 object keys (e.g. \`home/*\`). Default is \\"*\\". +the prefix of S3 object keys (e.g. \`home/*\`). Default is "*". --- -##### \`grant_put\` +##### \`grant_put\` \`\`\`python def grant_put( @@ -4789,7 +4789,7 @@ Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM princip If encryption is used, permission to use the key to encrypt the contents of written files will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required - *Type:* aws_cdk.aws_iam.IGrantable @@ -4797,7 +4797,7 @@ The principal. --- -###### \`objects_key_pattern\`Optional +###### \`objects_key_pattern\`Optional - *Type:* typing.Any @@ -4805,7 +4805,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grant_put_acl\` +##### \`grant_put_acl\` \`\`\`python def grant_put_acl( @@ -4820,19 +4820,19 @@ If your application has the '@aws-cdk/aws-s3:grantWriteWithoutAcl' feature flag calling {@link grantWrite} or {@link grantReadWrite} no longer grants permissions to modify the ACLs of the objects; in this case, if you need to modify object ACLs, call this method explicitly. -###### \`identity\`Required +###### \`identity\`Required - *Type:* aws_cdk.aws_iam.IGrantable --- -###### \`objects_key_pattern\`Optional +###### \`objects_key_pattern\`Optional - *Type:* str --- -##### \`grant_read\` +##### \`grant_read\` \`\`\`python def grant_read( @@ -4846,7 +4846,7 @@ Grant read permissions for this bucket and it's contents to an IAM principal (Ro If encryption is used, permission to use the key to decrypt the contents of the bucket will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required - *Type:* aws_cdk.aws_iam.IGrantable @@ -4854,7 +4854,7 @@ The principal. --- -###### \`objects_key_pattern\`Optional +###### \`objects_key_pattern\`Optional - *Type:* typing.Any @@ -4862,7 +4862,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grant_read_write\` +##### \`grant_read_write\` \`\`\`python def grant_read_write( @@ -4884,19 +4884,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required - *Type:* aws_cdk.aws_iam.IGrantable --- -###### \`objects_key_pattern\`Optional +###### \`objects_key_pattern\`Optional - *Type:* typing.Any --- -##### \`grant_write\` +##### \`grant_write\` \`\`\`python def grant_write( @@ -4918,19 +4918,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required - *Type:* aws_cdk.aws_iam.IGrantable --- -###### \`objects_key_pattern\`Optional +###### \`objects_key_pattern\`Optional - *Type:* typing.Any --- -##### \`on_cloud_trail_event\` +##### \`on_cloud_trail_event\` \`\`\`python def on_cloud_trail_event( @@ -4948,7 +4948,7 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* str @@ -4956,7 +4956,7 @@ The id of the rule. --- -###### \`description\`Optional +###### \`description\`Optional - *Type:* str - *Default:* No description @@ -4965,7 +4965,7 @@ A description of the rule's purpose. --- -###### \`event_pattern\`Optional +###### \`event_pattern\`Optional - *Type:* aws_cdk.aws_events.EventPattern - *Default:* No additional filtering based on an event pattern. @@ -4980,7 +4980,7 @@ on top of that filtering. --- -###### \`rule_name\`Optional +###### \`rule_name\`Optional - *Type:* str - *Default:* AWS CloudFormation generates a unique physical ID. @@ -4989,7 +4989,7 @@ A name for the rule. --- -###### \`target\`Optional +###### \`target\`Optional - *Type:* aws_cdk.aws_events.IRuleTarget - *Default:* No target is added to the rule. Use \`addTarget()\` to add a target. @@ -4998,7 +4998,7 @@ The target to register for the event. --- -###### \`paths\`Optional +###### \`paths\`Optional - *Type:* typing.List[str] - *Default:* Watch changes to all objects @@ -5007,7 +5007,7 @@ Only watch changes to these object paths. --- -##### \`on_cloud_trail_put_object\` +##### \`on_cloud_trail_put_object\` \`\`\`python def on_cloud_trail_put_object( @@ -5029,7 +5029,7 @@ so using \`onCloudTrailWriteObject\` may be preferable. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* str @@ -5037,7 +5037,7 @@ The id of the rule. --- -###### \`description\`Optional +###### \`description\`Optional - *Type:* str - *Default:* No description @@ -5046,7 +5046,7 @@ A description of the rule's purpose. --- -###### \`event_pattern\`Optional +###### \`event_pattern\`Optional - *Type:* aws_cdk.aws_events.EventPattern - *Default:* No additional filtering based on an event pattern. @@ -5061,7 +5061,7 @@ on top of that filtering. --- -###### \`rule_name\`Optional +###### \`rule_name\`Optional - *Type:* str - *Default:* AWS CloudFormation generates a unique physical ID. @@ -5070,7 +5070,7 @@ A name for the rule. --- -###### \`target\`Optional +###### \`target\`Optional - *Type:* aws_cdk.aws_events.IRuleTarget - *Default:* No target is added to the rule. Use \`addTarget()\` to add a target. @@ -5079,7 +5079,7 @@ The target to register for the event. --- -###### \`paths\`Optional +###### \`paths\`Optional - *Type:* typing.List[str] - *Default:* Watch changes to all objects @@ -5088,7 +5088,7 @@ Only watch changes to these object paths. --- -##### \`on_cloud_trail_write_object\` +##### \`on_cloud_trail_write_object\` \`\`\`python def on_cloud_trail_write_object( @@ -5113,7 +5113,7 @@ so using this method may be preferable to \`onCloudTrailPutObject\`. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* str @@ -5121,7 +5121,7 @@ The id of the rule. --- -###### \`description\`Optional +###### \`description\`Optional - *Type:* str - *Default:* No description @@ -5130,7 +5130,7 @@ A description of the rule's purpose. --- -###### \`event_pattern\`Optional +###### \`event_pattern\`Optional - *Type:* aws_cdk.aws_events.EventPattern - *Default:* No additional filtering based on an event pattern. @@ -5145,7 +5145,7 @@ on top of that filtering. --- -###### \`rule_name\`Optional +###### \`rule_name\`Optional - *Type:* str - *Default:* AWS CloudFormation generates a unique physical ID. @@ -5154,7 +5154,7 @@ A name for the rule. --- -###### \`target\`Optional +###### \`target\`Optional - *Type:* aws_cdk.aws_events.IRuleTarget - *Default:* No target is added to the rule. Use \`addTarget()\` to add a target. @@ -5163,7 +5163,7 @@ The target to register for the event. --- -###### \`paths\`Optional +###### \`paths\`Optional - *Type:* typing.List[str] - *Default:* Watch changes to all objects @@ -5172,7 +5172,7 @@ Only watch changes to these object paths. --- -##### \`s3_url_for_object\` +##### \`s3_url_for_object\` \`\`\`python def s3_url_for_object( @@ -5185,7 +5185,7 @@ The S3 URL of an S3 object. For example:. \`s3://onlybucket\` - \`s3://bucket/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -5196,7 +5196,7 @@ bucket is returned. --- -##### \`transfer_acceleration_url_for_object\` +##### \`transfer_acceleration_url_for_object\` \`\`\`python def transfer_acceleration_url_for_object( @@ -5213,7 +5213,7 @@ for dual-stack endpoint (connect to the bucket over IPv6). For example: - \`https://bucket.s3-accelerate.amazonaws.com\` - \`https://bucket.s3-accelerate.amazonaws.com/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -5224,7 +5224,7 @@ bucket is returned. --- -###### \`dual_stack\`Optional +###### \`dual_stack\`Optional - *Type:* bool - *Default:* false @@ -5233,7 +5233,7 @@ Dual-stack support to connect to the bucket over IPv6. --- -##### \`url_for_object\` +##### \`url_for_object\` \`\`\`python def url_for_object( @@ -5247,7 +5247,7 @@ The https URL of an S3 object. Specify \`regional: false\` at the options for no - \`https://s3.us-west-1.amazonaws.com/bucket/key\` - \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -5258,7 +5258,7 @@ bucket is returned. --- -##### \`virtual_hosted_url_for_object\` +##### \`virtual_hosted_url_for_object\` \`\`\`python def virtual_hosted_url_for_object( @@ -5274,7 +5274,7 @@ The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the - \`https://bucket.s3.amazonaws.com/key\` - \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -5285,7 +5285,7 @@ bucket is returned. --- -###### \`regional\`Optional +###### \`regional\`Optional - *Type:* bool - *Default:* true @@ -5294,7 +5294,7 @@ Specifies the URL includes the region. --- -##### \`add_cors_rule\` +##### \`add_cors_rule\` \`\`\`python def add_cors_rule( @@ -5309,7 +5309,7 @@ def add_cors_rule( Adds a cross-origin access configuration for objects in an Amazon S3 bucket. -###### \`allowed_methods\`Required +###### \`allowed_methods\`Required - *Type:* typing.List[aws_cdk.aws_s3.HttpMethods] @@ -5317,7 +5317,7 @@ An HTTP method that you allow the origin to execute. --- -###### \`allowed_origins\`Required +###### \`allowed_origins\`Required - *Type:* typing.List[str] @@ -5325,7 +5325,7 @@ One or more origins you want customers to be able to access the bucket from. --- -###### \`allowed_headers\`Optional +###### \`allowed_headers\`Optional - *Type:* typing.List[str] - *Default:* No headers allowed. @@ -5334,7 +5334,7 @@ Headers that are specified in the Access-Control-Request-Headers header. --- -###### \`exposed_headers\`Optional +###### \`exposed_headers\`Optional - *Type:* typing.List[str] - *Default:* No headers exposed. @@ -5343,7 +5343,7 @@ One or more headers in the response that you want customers to be able to access --- -###### \`id\`Optional +###### \`id\`Optional - *Type:* str - *Default:* No id specified. @@ -5352,7 +5352,7 @@ A unique identifier for this rule. --- -###### \`max_age\`Optional +###### \`max_age\`Optional - *Type:* typing.Union[int, float] - *Default:* No caching. @@ -5361,7 +5361,7 @@ The time in seconds that your browser is to cache the preflight response for the --- -##### \`add_inventory\` +##### \`add_inventory\` \`\`\`python def add_inventory( @@ -5378,7 +5378,7 @@ def add_inventory( Add an inventory configuration. -###### \`destination\`Required +###### \`destination\`Required - *Type:* aws_cdk.aws_s3.InventoryDestination @@ -5386,7 +5386,7 @@ The destination of the inventory. --- -###### \`enabled\`Optional +###### \`enabled\`Optional - *Type:* bool - *Default:* true @@ -5395,7 +5395,7 @@ Whether the inventory is enabled or disabled. --- -###### \`format\`Optional +###### \`format\`Optional - *Type:* aws_cdk.aws_s3.InventoryFormat - *Default:* InventoryFormat.CSV @@ -5404,7 +5404,7 @@ The format of the inventory. --- -###### \`frequency\`Optional +###### \`frequency\`Optional - *Type:* aws_cdk.aws_s3.InventoryFrequency - *Default:* InventoryFrequency.WEEKLY @@ -5413,7 +5413,7 @@ Frequency at which the inventory should be generated. --- -###### \`include_object_versions\`Optional +###### \`include_object_versions\`Optional - *Type:* aws_cdk.aws_s3.InventoryObjectVersion - *Default:* InventoryObjectVersion.ALL @@ -5422,7 +5422,7 @@ If the inventory should contain all the object versions or only the current one. --- -###### \`inventory_id\`Optional +###### \`inventory_id\`Optional - *Type:* str - *Default:* generated ID. @@ -5431,7 +5431,7 @@ The inventory configuration ID. --- -###### \`objects_prefix\`Optional +###### \`objects_prefix\`Optional - *Type:* str - *Default:* No objects prefix @@ -5440,7 +5440,7 @@ The inventory will only include objects that meet the prefix filter criteria. --- -###### \`optional_fields\`Optional +###### \`optional_fields\`Optional - *Type:* typing.List[str] - *Default:* No optional fields. @@ -5449,7 +5449,7 @@ A list of optional fields to be included in the inventory result. --- -##### \`add_lifecycle_rule\` +##### \`add_lifecycle_rule\` \`\`\`python def add_lifecycle_rule( @@ -5472,7 +5472,7 @@ def add_lifecycle_rule( Add a lifecycle rule to the bucket. -###### \`abort_incomplete_multipart_upload_after\`Optional +###### \`abort_incomplete_multipart_upload_after\`Optional - *Type:* aws_cdk.core.Duration - *Default:* Incomplete uploads are never aborted @@ -5486,7 +5486,7 @@ associated with the multipart upload. --- -###### \`enabled\`Optional +###### \`enabled\`Optional - *Type:* bool - *Default:* true @@ -5495,7 +5495,7 @@ Whether this rule is enabled. --- -###### \`expiration\`Optional +###### \`expiration\`Optional - *Type:* aws_cdk.core.Duration - *Default:* No expiration timeout @@ -5508,7 +5508,7 @@ expiration time must also be later than the transition time. --- -###### \`expiration_date\`Optional +###### \`expiration_date\`Optional - *Type:* datetime.datetime - *Default:* No expiration date @@ -5523,7 +5523,7 @@ expiration time must also be later than the transition time. --- -###### \`expired_object_delete_marker\`Optional +###### \`expired_object_delete_marker\`Optional - *Type:* bool - *Default:* false @@ -5534,7 +5534,7 @@ If set to true, the delete marker will be expired. --- -###### \`id\`Optional +###### \`id\`Optional - *Type:* str @@ -5544,7 +5544,7 @@ The value cannot be more than 255 characters. --- -###### \`noncurrent_version_expiration\`Optional +###### \`noncurrent_version_expiration\`Optional - *Type:* aws_cdk.core.Duration - *Default:* No noncurrent version expiration @@ -5560,7 +5560,7 @@ transition time. --- -###### \`noncurrent_versions_to_retain\`Optional +###### \`noncurrent_versions_to_retain\`Optional - *Type:* typing.Union[int, float] - *Default:* No noncurrent versions to retain @@ -5572,7 +5572,7 @@ Amazon S3 permanently deletes them. --- -###### \`noncurrent_version_transitions\`Optional +###### \`noncurrent_version_transitions\`Optional - *Type:* typing.List[aws_cdk.aws_s3.NoncurrentVersionTransition] @@ -5585,7 +5585,7 @@ must be later than the transition time. --- -###### \`object_size_greater_than\`Optional +###### \`object_size_greater_than\`Optional - *Type:* typing.Union[int, float] - *Default:* No rule @@ -5594,7 +5594,7 @@ Specifies the minimum object size in bytes for this rule to apply to. --- -###### \`object_size_less_than\`Optional +###### \`object_size_less_than\`Optional - *Type:* typing.Union[int, float] - *Default:* No rule @@ -5603,7 +5603,7 @@ Specifies the maximum object size in bytes for this rule to apply to. --- -###### \`prefix\`Optional +###### \`prefix\`Optional - *Type:* str - *Default:* Rule applies to all objects @@ -5612,7 +5612,7 @@ Object key prefix that identifies one or more objects to which this rule applies --- -###### \`tag_filters\`Optional +###### \`tag_filters\`Optional - *Type:* typing.Mapping[typing.Any] - *Default:* Rule applies to all objects @@ -5621,7 +5621,7 @@ The TagFilter property type specifies tags to use to identify a subset of object --- -###### \`transitions\`Optional +###### \`transitions\`Optional - *Type:* typing.List[aws_cdk.aws_s3.Transition] - *Default:* No transition rules @@ -5634,7 +5634,7 @@ expiration time must also be later than the transition time. --- -##### \`add_metric\` +##### \`add_metric\` \`\`\`python def add_metric( @@ -5646,7 +5646,7 @@ def add_metric( Adds a metrics configuration for the CloudWatch request metrics from the bucket. -###### \`id\`Required +###### \`id\`Required - *Type:* str @@ -5654,7 +5654,7 @@ The ID used to identify the metrics configuration. --- -###### \`prefix\`Optional +###### \`prefix\`Optional - *Type:* str @@ -5662,7 +5662,7 @@ The prefix that an object must have to be included in the metrics results. --- -###### \`tag_filters\`Optional +###### \`tag_filters\`Optional - *Type:* typing.Mapping[typing.Any] @@ -5672,25 +5672,25 @@ The metrics configuration includes only objects that meet the filter's criteria. --- -##### \`greet\` +##### \`greet\` \`\`\`python def greet() -> None \`\`\` -#### Static Functions +#### Static Functions | **Name** | **Description** | | --- | --- | -| is_resource | Check whether the given construct is a Resource. | -| from_bucket_arn | *No description.* | -| from_bucket_attributes | Creates a Bucket construct that represents an external bucket. | -| from_bucket_name | *No description.* | -| validate_bucket_name | Thrown an exception if the given bucket name is not valid. | +| is_resource | Check whether the given construct is a Resource. | +| from_bucket_arn | *No description.* | +| from_bucket_attributes | Creates a Bucket construct that represents an external bucket. | +| from_bucket_name | *No description.* | +| validate_bucket_name | Thrown an exception if the given bucket name is not valid. | --- -##### \`is_resource\` +##### \`is_resource\` \`\`\`python import construct_library @@ -5702,13 +5702,13 @@ construct_library.GreeterBucket.is_resource( Check whether the given construct is a Resource. -###### \`construct\`Required +###### \`construct\`Required - *Type:* aws_cdk.core.IConstruct --- -##### \`from_bucket_arn\` +##### \`from_bucket_arn\` \`\`\`python import construct_library @@ -5720,25 +5720,25 @@ construct_library.GreeterBucket.from_bucket_arn( ) \`\`\` -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct --- -###### \`id\`Required +###### \`id\`Required - *Type:* str --- -###### \`bucket_arn\`Required +###### \`bucket_arn\`Required - *Type:* str --- -##### \`from_bucket_attributes\` +##### \`from_bucket_attributes\` \`\`\`python import construct_library @@ -5763,7 +5763,7 @@ construct_library.GreeterBucket.from_bucket_attributes( Creates a Bucket construct that represents an external bucket. -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct @@ -5771,7 +5771,7 @@ The parent creating construct (usually \`this\`). --- -###### \`id\`Required +###### \`id\`Required - *Type:* str @@ -5779,7 +5779,7 @@ The construct's name. --- -###### \`account\`Optional +###### \`account\`Optional - *Type:* str - *Default:* it's assumed the bucket belongs to the same account as the scope it's being imported into @@ -5788,7 +5788,7 @@ The account this existing bucket belongs to. --- -###### \`bucket_arn\`Optional +###### \`bucket_arn\`Optional - *Type:* str @@ -5799,7 +5799,7 @@ defined in order to initialize a bucket ref. --- -###### \`bucket_domain_name\`Optional +###### \`bucket_domain_name\`Optional - *Type:* str - *Default:* Inferred from bucket name @@ -5808,7 +5808,7 @@ The domain name of the bucket. --- -###### \`bucket_dual_stack_domain_name\`Optional +###### \`bucket_dual_stack_domain_name\`Optional - *Type:* str @@ -5816,7 +5816,7 @@ The IPv6 DNS name of the specified bucket. --- -###### \`bucket_name\`Optional +###### \`bucket_name\`Optional - *Type:* str @@ -5829,7 +5829,7 @@ policy, won't work. --- -###### \`bucket_regional_domain_name\`Optional +###### \`bucket_regional_domain_name\`Optional - *Type:* str @@ -5837,7 +5837,7 @@ The regional domain name of the specified bucket. --- -###### \`bucket_website_new_url_format\`Optional +###### \`bucket_website_new_url_format\`Optional - *Type:* bool - *Default:* false @@ -5849,7 +5849,7 @@ regions launched since 2014. --- -###### \`bucket_website_url\`Optional +###### \`bucket_website_url\`Optional - *Type:* str - *Default:* Inferred from bucket name @@ -5858,13 +5858,13 @@ The website URL of the bucket (if static web hosting is enabled). --- -###### \`encryption_key\`Optional +###### \`encryption_key\`Optional - *Type:* aws_cdk.aws_kms.IKey --- -###### \`is_website\`Optional +###### \`is_website\`Optional - *Type:* bool - *Default:* false @@ -5873,7 +5873,7 @@ If this bucket has been configured for static website hosting. --- -###### \`notifications_handler_role\`Optional +###### \`notifications_handler_role\`Optional - *Type:* aws_cdk.aws_iam.IRole - *Default:* a new role will be created. @@ -5882,7 +5882,7 @@ The role to be used by the notifications handler. --- -###### \`region\`Optional +###### \`region\`Optional - *Type:* str - *Default:* it's assumed the bucket is in the same region as the scope it's being imported into @@ -5891,7 +5891,7 @@ The region this existing bucket is in. --- -##### \`from_bucket_name\` +##### \`from_bucket_name\` \`\`\`python import construct_library @@ -5903,25 +5903,25 @@ construct_library.GreeterBucket.from_bucket_name( ) \`\`\` -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct --- -###### \`id\`Required +###### \`id\`Required - *Type:* str --- -###### \`bucket_name\`Required +###### \`bucket_name\`Required - *Type:* str --- -##### \`validate_bucket_name\` +##### \`validate_bucket_name\` \`\`\`python import construct_library @@ -5933,7 +5933,7 @@ construct_library.GreeterBucket.validate_bucket_name( Thrown an exception if the given bucket name is not valid. -###### \`physical_name\`Required +###### \`physical_name\`Required - *Type:* str @@ -5941,27 +5941,27 @@ name of the bucket. --- -#### Properties +#### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | aws_cdk.core.ConstructNode | The construct tree node associated with this construct. | -| env | aws_cdk.core.ResourceEnvironment | The environment this resource belongs to. | -| stack | aws_cdk.core.Stack | The stack in which this resource is defined. | -| bucket_arn | str | The ARN of the bucket. | -| bucket_domain_name | str | The IPv4 DNS name of the specified bucket. | -| bucket_dual_stack_domain_name | str | The IPv6 DNS name of the specified bucket. | -| bucket_name | str | The name of the bucket. | -| bucket_regional_domain_name | str | The regional domain name of the specified bucket. | -| bucket_website_domain_name | str | The Domain name of the static website. | -| bucket_website_url | str | The URL of the static website. | -| encryption_key | aws_cdk.aws_kms.IKey | Optional KMS encryption key associated with this bucket. | -| is_website | bool | If this bucket has been configured for static website hosting. | -| policy | aws_cdk.aws_s3.BucketPolicy | The resource policy associated with this bucket. | +| node | aws_cdk.core.ConstructNode | The construct tree node associated with this construct. | +| env | aws_cdk.core.ResourceEnvironment | The environment this resource belongs to. | +| stack | aws_cdk.core.Stack | The stack in which this resource is defined. | +| bucket_arn | str | The ARN of the bucket. | +| bucket_domain_name | str | The IPv4 DNS name of the specified bucket. | +| bucket_dual_stack_domain_name | str | The IPv6 DNS name of the specified bucket. | +| bucket_name | str | The name of the bucket. | +| bucket_regional_domain_name | str | The regional domain name of the specified bucket. | +| bucket_website_domain_name | str | The Domain name of the static website. | +| bucket_website_url | str | The URL of the static website. | +| encryption_key | aws_cdk.aws_kms.IKey | Optional KMS encryption key associated with this bucket. | +| is_website | bool | If this bucket has been configured for static website hosting. | +| policy | aws_cdk.aws_s3.BucketPolicy | The resource policy associated with this bucket. | --- -##### \`node\`Required +##### \`node\`Required \`\`\`python node: ConstructNode @@ -5973,7 +5973,7 @@ The construct tree node associated with this construct. --- -##### \`env\`Required +##### \`env\`Required \`\`\`python env: ResourceEnvironment @@ -5992,7 +5992,7 @@ that might be different than the stack they were imported into. --- -##### \`stack\`Required +##### \`stack\`Required \`\`\`python stack: Stack @@ -6004,7 +6004,7 @@ The stack in which this resource is defined. --- -##### \`bucket_arn\`Required +##### \`bucket_arn\`Required \`\`\`python bucket_arn: str @@ -6016,7 +6016,7 @@ The ARN of the bucket. --- -##### \`bucket_domain_name\`Required +##### \`bucket_domain_name\`Required \`\`\`python bucket_domain_name: str @@ -6028,7 +6028,7 @@ The IPv4 DNS name of the specified bucket. --- -##### \`bucket_dual_stack_domain_name\`Required +##### \`bucket_dual_stack_domain_name\`Required \`\`\`python bucket_dual_stack_domain_name: str @@ -6040,7 +6040,7 @@ The IPv6 DNS name of the specified bucket. --- -##### \`bucket_name\`Required +##### \`bucket_name\`Required \`\`\`python bucket_name: str @@ -6052,7 +6052,7 @@ The name of the bucket. --- -##### \`bucket_regional_domain_name\`Required +##### \`bucket_regional_domain_name\`Required \`\`\`python bucket_regional_domain_name: str @@ -6064,7 +6064,7 @@ The regional domain name of the specified bucket. --- -##### \`bucket_website_domain_name\`Required +##### \`bucket_website_domain_name\`Required \`\`\`python bucket_website_domain_name: str @@ -6076,7 +6076,7 @@ The Domain name of the static website. --- -##### \`bucket_website_url\`Required +##### \`bucket_website_url\`Required \`\`\`python bucket_website_url: str @@ -6088,7 +6088,7 @@ The URL of the static website. --- -##### \`encryption_key\`Optional +##### \`encryption_key\`Optional \`\`\`python encryption_key: IKey @@ -6100,7 +6100,7 @@ Optional KMS encryption key associated with this bucket. --- -##### \`is_website\`Optional +##### \`is_website\`Optional \`\`\`python is_website: bool @@ -6112,7 +6112,7 @@ If this bucket has been configured for static website hosting. --- -##### \`policy\`Optional +##### \`policy\`Optional \`\`\`python policy: BucketPolicy @@ -6135,13 +6135,13 @@ first call to addToResourcePolicy(s). `; exports[`specify root submodule 1`] = ` -"# API Reference +"# API Reference -## Resources +## Resources -### GreeterBucket +### GreeterBucket -#### Initializers +#### Initializers \`\`\`typescript import { GreeterBucket } from 'construct-library' @@ -6151,63 +6151,63 @@ new GreeterBucket(scope: Construct, id: string, props?: BucketProps) | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | string | *No description.* | -| props | @aws-cdk/aws-s3.BucketProps | *No description.* | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | @aws-cdk/aws-s3.BucketProps | *No description.* | --- -##### \`scope\`Required +##### \`scope\`Required - *Type:* constructs.Construct --- -##### \`id\`Required +##### \`id\`Required - *Type:* string --- -##### \`props\`Optional +##### \`props\`Optional - *Type:* @aws-cdk/aws-s3.BucketProps --- -#### Methods +#### Methods | **Name** | **Description** | | --- | --- | -| applyRemovalPolicy | Apply the given removal policy to this resource. | -| addEventNotification | Adds a bucket notification event destination. | -| addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | -| addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | -| arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | -| grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | -| grantPublicAccess | Allows unrestricted access to objects from this bucket. | -| grantPut | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | -| grantPutAcl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | -| grantRead | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grantReadWrite | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grantWrite | Grant write permissions to this bucket to an IAM principal. | -| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | -| onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | -| onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3UrlForObject | The S3 URL of an S3 object. For example:. | -| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | -| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | -| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | -| addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | -| addInventory | Add an inventory configuration. | -| addLifecycleRule | Add a lifecycle rule to the bucket. | -| addMetric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | -| greet | *No description.* | - ---- - -##### \`applyRemovalPolicy\` +| applyRemovalPolicy | Apply the given removal policy to this resource. | +| addEventNotification | Adds a bucket notification event destination. | +| addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | +| addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | +| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | +| grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | +| grantPublicAccess | Allows unrestricted access to objects from this bucket. | +| grantPut | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | +| grantPutAcl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | +| grantRead | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grantReadWrite | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grantWrite | Grant write permissions to this bucket to an IAM principal. | +| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | +| onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | +| onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | +| s3UrlForObject | The S3 URL of an S3 object. For example:. | +| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | +| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | +| addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | +| addInventory | Add an inventory configuration. | +| addLifecycleRule | Add a lifecycle rule to the bucket. | +| addMetric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | +| greet | *No description.* | + +--- + +##### \`applyRemovalPolicy\` \`\`\`typescript public applyRemovalPolicy(policy: RemovalPolicy): void @@ -6223,13 +6223,13 @@ to be replaced. The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). -###### \`policy\`Required +###### \`policy\`Required - *Type:* @aws-cdk/core.RemovalPolicy --- -##### \`addEventNotification\` +##### \`addEventNotification\` \`\`\`typescript public addEventNotification(event: EventType, dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void @@ -6248,7 +6248,7 @@ Adds a bucket notification event destination. \`\`\` -###### \`event\`Required +###### \`event\`Required - *Type:* @aws-cdk/aws-s3.EventType @@ -6256,7 +6256,7 @@ The event to trigger the notification. --- -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -6264,7 +6264,7 @@ The notification destination (Lambda, SNS Topic or SQS Queue). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -6276,7 +6276,7 @@ for details about allowed filter rules. --- -##### \`addObjectCreatedNotification\` +##### \`addObjectCreatedNotification\` \`\`\`typescript public addObjectCreatedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void @@ -6287,7 +6287,7 @@ Subscribes a destination to receive notifications when an object is created in t This is identical to calling \`onEvent(EventType.OBJECT_CREATED)\`. -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -6295,7 +6295,7 @@ The notification destination (see onEvent). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -6303,7 +6303,7 @@ Filters (see onEvent). --- -##### \`addObjectRemovedNotification\` +##### \`addObjectRemovedNotification\` \`\`\`typescript public addObjectRemovedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void @@ -6314,7 +6314,7 @@ Subscribes a destination to receive notifications when an object is removed from This is identical to calling \`onEvent(EventType.OBJECT_REMOVED)\`. -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -6322,7 +6322,7 @@ The notification destination (see onEvent). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -6330,7 +6330,7 @@ Filters (see onEvent). --- -##### \`addToResourcePolicy\` +##### \`addToResourcePolicy\` \`\`\`typescript public addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult @@ -6344,7 +6344,7 @@ it's not possible to tell whether the bucket already has a policy attached, let alone to re-use that policy to add more statements to it. So it's safest to do nothing in these cases. -###### \`permission\`Required +###### \`permission\`Required - *Type:* @aws-cdk/aws-iam.PolicyStatement @@ -6352,7 +6352,7 @@ the policy statement to be added to the bucket's policy. --- -##### \`arnForObjects\` +##### \`arnForObjects\` \`\`\`typescript public arnForObjects(keyPattern: string): string @@ -6360,19 +6360,19 @@ public arnForObjects(keyPattern: string): string Returns an ARN that represents all objects within the bucket that match the key pattern specified. -To represent all keys, specify \`\`\\"*\\"\`\`. +To represent all keys, specify \`\`"*"\`\`. If you need to specify a keyPattern with multiple components, concatenate them into a single string, e.g.: arnForObjects(\`home/\${team}/\${user}/*\`) -###### \`keyPattern\`Required +###### \`keyPattern\`Required - *Type:* string --- -##### \`grantDelete\` +##### \`grantDelete\` \`\`\`typescript public grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -6380,7 +6380,7 @@ public grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -6388,7 +6388,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -6396,7 +6396,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantPublicAccess\` +##### \`grantPublicAccess\` \`\`\`typescript public grantPublicAccess(allowedActions: string, keyPrefix?: string): Grant @@ -6409,8 +6409,8 @@ in this bucket, which is useful for when you configure your bucket as a website and want everyone to be able to read objects in the bucket without needing to authenticate. -Without arguments, this method will grant read (\\"s3:GetObject\\") access to -all objects (\\"*\\") in the bucket. +Without arguments, this method will grant read ("s3:GetObject") access to +all objects ("*") in the bucket. The method returns the \`iam.Grant\` object, which can then be modified as needed. For example, you can add a condition that will restrict access only @@ -6423,25 +6423,25 @@ Note that if this \`IBucket\` refers to an existing bucket, possibly not managed by CloudFormation, this method will have no effect, since it's impossible to modify the policy of an existing bucket. -###### \`allowedActions\`Required +###### \`allowedActions\`Required - *Type:* string the set of S3 actions to allow. -Default is \\"s3:GetObject\\". +Default is "s3:GetObject". --- -###### \`keyPrefix\`Optional +###### \`keyPrefix\`Optional - *Type:* string -the prefix of S3 object keys (e.g. \`home/*\`). Default is \\"*\\". +the prefix of S3 object keys (e.g. \`home/*\`). Default is "*". --- -##### \`grantPut\` +##### \`grantPut\` \`\`\`typescript public grantPut(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -6452,7 +6452,7 @@ Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM princip If encryption is used, permission to use the key to encrypt the contents of written files will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -6460,7 +6460,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -6468,7 +6468,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantPutAcl\` +##### \`grantPutAcl\` \`\`\`typescript public grantPutAcl(identity: IGrantable, objectsKeyPattern?: string): Grant @@ -6480,19 +6480,19 @@ If your application has the '@aws-cdk/aws-s3:grantWriteWithoutAcl' feature flag calling {@link grantWrite} or {@link grantReadWrite} no longer grants permissions to modify the ACLs of the objects; in this case, if you need to modify object ACLs, call this method explicitly. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* string --- -##### \`grantRead\` +##### \`grantRead\` \`\`\`typescript public grantRead(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -6503,7 +6503,7 @@ Grant read permissions for this bucket and it's contents to an IAM principal (Ro If encryption is used, permission to use the key to decrypt the contents of the bucket will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -6511,7 +6511,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -6519,7 +6519,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantReadWrite\` +##### \`grantReadWrite\` \`\`\`typescript public grantReadWrite(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -6538,19 +6538,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any --- -##### \`grantWrite\` +##### \`grantWrite\` \`\`\`typescript public grantWrite(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -6569,19 +6569,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any --- -##### \`onCloudTrailEvent\` +##### \`onCloudTrailEvent\` \`\`\`typescript public onCloudTrailEvent(id: string, options?: OnCloudTrailBucketEventOptions): Rule @@ -6592,7 +6592,7 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -6600,7 +6600,7 @@ The id of the rule. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -6608,7 +6608,7 @@ Options for adding the rule. --- -##### \`onCloudTrailPutObject\` +##### \`onCloudTrailPutObject\` \`\`\`typescript public onCloudTrailPutObject(id: string, options?: OnCloudTrailBucketEventOptions): Rule @@ -6623,7 +6623,7 @@ so using \`onCloudTrailWriteObject\` may be preferable. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -6631,7 +6631,7 @@ The id of the rule. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -6639,7 +6639,7 @@ Options for adding the rule. --- -##### \`onCloudTrailWriteObject\` +##### \`onCloudTrailWriteObject\` \`\`\`typescript public onCloudTrailWriteObject(id: string, options?: OnCloudTrailBucketEventOptions): Rule @@ -6657,7 +6657,7 @@ so using this method may be preferable to \`onCloudTrailPutObject\`. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -6665,7 +6665,7 @@ The id of the rule. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -6673,7 +6673,7 @@ Options for adding the rule. --- -##### \`s3UrlForObject\` +##### \`s3UrlForObject\` \`\`\`typescript public s3UrlForObject(key?: string): string @@ -6684,7 +6684,7 @@ The S3 URL of an S3 object. For example:. \`s3://onlybucket\` - \`s3://bucket/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -6695,7 +6695,7 @@ bucket is returned. --- -##### \`transferAccelerationUrlForObject\` +##### \`transferAccelerationUrlForObject\` \`\`\`typescript public transferAccelerationUrlForObject(key?: string, options?: TransferAccelerationUrlOptions): string @@ -6709,7 +6709,7 @@ for dual-stack endpoint (connect to the bucket over IPv6). For example: - \`https://bucket.s3-accelerate.amazonaws.com\` - \`https://bucket.s3-accelerate.amazonaws.com/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -6720,7 +6720,7 @@ bucket is returned. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.TransferAccelerationUrlOptions @@ -6728,7 +6728,7 @@ Options for generating URL. --- -##### \`urlForObject\` +##### \`urlForObject\` \`\`\`typescript public urlForObject(key?: string): string @@ -6740,7 +6740,7 @@ The https URL of an S3 object. Specify \`regional: false\` at the options for no - \`https://s3.us-west-1.amazonaws.com/bucket/key\` - \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -6751,7 +6751,7 @@ bucket is returned. --- -##### \`virtualHostedUrlForObject\` +##### \`virtualHostedUrlForObject\` \`\`\`typescript public virtualHostedUrlForObject(key?: string, options?: VirtualHostedStyleUrlOptions): string @@ -6764,7 +6764,7 @@ The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the - \`https://bucket.s3.amazonaws.com/key\` - \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -6775,7 +6775,7 @@ bucket is returned. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.VirtualHostedStyleUrlOptions @@ -6783,7 +6783,7 @@ Options for generating URL. --- -##### \`addCorsRule\` +##### \`addCorsRule\` \`\`\`typescript public addCorsRule(rule: CorsRule): void @@ -6791,7 +6791,7 @@ public addCorsRule(rule: CorsRule): void Adds a cross-origin access configuration for objects in an Amazon S3 bucket. -###### \`rule\`Required +###### \`rule\`Required - *Type:* @aws-cdk/aws-s3.CorsRule @@ -6799,7 +6799,7 @@ The CORS configuration rule to add. --- -##### \`addInventory\` +##### \`addInventory\` \`\`\`typescript public addInventory(inventory: Inventory): void @@ -6807,7 +6807,7 @@ public addInventory(inventory: Inventory): void Add an inventory configuration. -###### \`inventory\`Required +###### \`inventory\`Required - *Type:* @aws-cdk/aws-s3.Inventory @@ -6815,7 +6815,7 @@ configuration to add. --- -##### \`addLifecycleRule\` +##### \`addLifecycleRule\` \`\`\`typescript public addLifecycleRule(rule: LifecycleRule): void @@ -6823,7 +6823,7 @@ public addLifecycleRule(rule: LifecycleRule): void Add a lifecycle rule to the bucket. -###### \`rule\`Required +###### \`rule\`Required - *Type:* @aws-cdk/aws-s3.LifecycleRule @@ -6831,7 +6831,7 @@ The rule to add. --- -##### \`addMetric\` +##### \`addMetric\` \`\`\`typescript public addMetric(metric: BucketMetrics): void @@ -6839,7 +6839,7 @@ public addMetric(metric: BucketMetrics): void Adds a metrics configuration for the CloudWatch request metrics from the bucket. -###### \`metric\`Required +###### \`metric\`Required - *Type:* @aws-cdk/aws-s3.BucketMetrics @@ -6847,25 +6847,25 @@ The metric configuration to add. --- -##### \`greet\` +##### \`greet\` \`\`\`typescript public greet(): void \`\`\` -#### Static Functions +#### Static Functions | **Name** | **Description** | | --- | --- | -| isResource | Check whether the given construct is a Resource. | -| fromBucketArn | *No description.* | -| fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | -| fromBucketName | *No description.* | -| validateBucketName | Thrown an exception if the given bucket name is not valid. | +| isResource | Check whether the given construct is a Resource. | +| fromBucketArn | *No description.* | +| fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | +| fromBucketName | *No description.* | +| validateBucketName | Thrown an exception if the given bucket name is not valid. | --- -##### \`isResource\` +##### \`isResource\` \`\`\`typescript import { GreeterBucket } from 'construct-library' @@ -6875,13 +6875,13 @@ GreeterBucket.isResource(construct: IConstruct) Check whether the given construct is a Resource. -###### \`construct\`Required +###### \`construct\`Required - *Type:* @aws-cdk/core.IConstruct --- -##### \`fromBucketArn\` +##### \`fromBucketArn\` \`\`\`typescript import { GreeterBucket } from 'construct-library' @@ -6889,25 +6889,25 @@ import { GreeterBucket } from 'construct-library' GreeterBucket.fromBucketArn(scope: Construct, id: string, bucketArn: string) \`\`\` -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct --- -###### \`id\`Required +###### \`id\`Required - *Type:* string --- -###### \`bucketArn\`Required +###### \`bucketArn\`Required - *Type:* string --- -##### \`fromBucketAttributes\` +##### \`fromBucketAttributes\` \`\`\`typescript import { GreeterBucket } from 'construct-library' @@ -6917,7 +6917,7 @@ GreeterBucket.fromBucketAttributes(scope: Construct, id: string, attrs: BucketAt Creates a Bucket construct that represents an external bucket. -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct @@ -6925,7 +6925,7 @@ The parent creating construct (usually \`this\`). --- -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -6933,7 +6933,7 @@ The construct's name. --- -###### \`attrs\`Required +###### \`attrs\`Required - *Type:* @aws-cdk/aws-s3.BucketAttributes @@ -6944,7 +6944,7 @@ Can be obtained from a call to --- -##### \`fromBucketName\` +##### \`fromBucketName\` \`\`\`typescript import { GreeterBucket } from 'construct-library' @@ -6952,25 +6952,25 @@ import { GreeterBucket } from 'construct-library' GreeterBucket.fromBucketName(scope: Construct, id: string, bucketName: string) \`\`\` -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct --- -###### \`id\`Required +###### \`id\`Required - *Type:* string --- -###### \`bucketName\`Required +###### \`bucketName\`Required - *Type:* string --- -##### \`validateBucketName\` +##### \`validateBucketName\` \`\`\`typescript import { GreeterBucket } from 'construct-library' @@ -6980,7 +6980,7 @@ GreeterBucket.validateBucketName(physicalName: string) Thrown an exception if the given bucket name is not valid. -###### \`physicalName\`Required +###### \`physicalName\`Required - *Type:* string @@ -6988,27 +6988,27 @@ name of the bucket. --- -#### Properties +#### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | @aws-cdk/core.ConstructNode | The construct tree node associated with this construct. | -| env | @aws-cdk/core.ResourceEnvironment | The environment this resource belongs to. | -| stack | @aws-cdk/core.Stack | The stack in which this resource is defined. | -| bucketArn | string | The ARN of the bucket. | -| bucketDomainName | string | The IPv4 DNS name of the specified bucket. | -| bucketDualStackDomainName | string | The IPv6 DNS name of the specified bucket. | -| bucketName | string | The name of the bucket. | -| bucketRegionalDomainName | string | The regional domain name of the specified bucket. | -| bucketWebsiteDomainName | string | The Domain name of the static website. | -| bucketWebsiteUrl | string | The URL of the static website. | -| encryptionKey | @aws-cdk/aws-kms.IKey | Optional KMS encryption key associated with this bucket. | -| isWebsite | boolean | If this bucket has been configured for static website hosting. | -| policy | @aws-cdk/aws-s3.BucketPolicy | The resource policy associated with this bucket. | +| node | @aws-cdk/core.ConstructNode | The construct tree node associated with this construct. | +| env | @aws-cdk/core.ResourceEnvironment | The environment this resource belongs to. | +| stack | @aws-cdk/core.Stack | The stack in which this resource is defined. | +| bucketArn | string | The ARN of the bucket. | +| bucketDomainName | string | The IPv4 DNS name of the specified bucket. | +| bucketDualStackDomainName | string | The IPv6 DNS name of the specified bucket. | +| bucketName | string | The name of the bucket. | +| bucketRegionalDomainName | string | The regional domain name of the specified bucket. | +| bucketWebsiteDomainName | string | The Domain name of the static website. | +| bucketWebsiteUrl | string | The URL of the static website. | +| encryptionKey | @aws-cdk/aws-kms.IKey | Optional KMS encryption key associated with this bucket. | +| isWebsite | boolean | If this bucket has been configured for static website hosting. | +| policy | @aws-cdk/aws-s3.BucketPolicy | The resource policy associated with this bucket. | --- -##### \`node\`Required +##### \`node\`Required \`\`\`typescript public readonly node: ConstructNode; @@ -7020,7 +7020,7 @@ The construct tree node associated with this construct. --- -##### \`env\`Required +##### \`env\`Required \`\`\`typescript public readonly env: ResourceEnvironment; @@ -7039,7 +7039,7 @@ that might be different than the stack they were imported into. --- -##### \`stack\`Required +##### \`stack\`Required \`\`\`typescript public readonly stack: Stack; @@ -7051,7 +7051,7 @@ The stack in which this resource is defined. --- -##### \`bucketArn\`Required +##### \`bucketArn\`Required \`\`\`typescript public readonly bucketArn: string; @@ -7063,7 +7063,7 @@ The ARN of the bucket. --- -##### \`bucketDomainName\`Required +##### \`bucketDomainName\`Required \`\`\`typescript public readonly bucketDomainName: string; @@ -7075,7 +7075,7 @@ The IPv4 DNS name of the specified bucket. --- -##### \`bucketDualStackDomainName\`Required +##### \`bucketDualStackDomainName\`Required \`\`\`typescript public readonly bucketDualStackDomainName: string; @@ -7087,7 +7087,7 @@ The IPv6 DNS name of the specified bucket. --- -##### \`bucketName\`Required +##### \`bucketName\`Required \`\`\`typescript public readonly bucketName: string; @@ -7099,7 +7099,7 @@ The name of the bucket. --- -##### \`bucketRegionalDomainName\`Required +##### \`bucketRegionalDomainName\`Required \`\`\`typescript public readonly bucketRegionalDomainName: string; @@ -7111,7 +7111,7 @@ The regional domain name of the specified bucket. --- -##### \`bucketWebsiteDomainName\`Required +##### \`bucketWebsiteDomainName\`Required \`\`\`typescript public readonly bucketWebsiteDomainName: string; @@ -7123,7 +7123,7 @@ The Domain name of the static website. --- -##### \`bucketWebsiteUrl\`Required +##### \`bucketWebsiteUrl\`Required \`\`\`typescript public readonly bucketWebsiteUrl: string; @@ -7135,7 +7135,7 @@ The URL of the static website. --- -##### \`encryptionKey\`Optional +##### \`encryptionKey\`Optional \`\`\`typescript public readonly encryptionKey: IKey; @@ -7147,7 +7147,7 @@ Optional KMS encryption key associated with this bucket. --- -##### \`isWebsite\`Optional +##### \`isWebsite\`Optional \`\`\`typescript public readonly isWebsite: boolean; @@ -7159,7 +7159,7 @@ If this bucket has been configured for static website hosting. --- -##### \`policy\`Optional +##### \`policy\`Optional \`\`\`typescript public readonly policy: BucketPolicy; @@ -7182,13 +7182,13 @@ first call to addToResourcePolicy(s). `; exports[`specify submodule 1`] = ` -"# API Reference +"# API Reference -## Resources +## Resources -### GoodbyeBucket +### GoodbyeBucket -#### Initializers +#### Initializers \`\`\`typescript import { submod1 } from 'construct-library' @@ -7198,63 +7198,63 @@ new submod1.GoodbyeBucket(scope: Construct, id: string, props?: BucketProps) | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | string | *No description.* | -| props | @aws-cdk/aws-s3.BucketProps | *No description.* | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | @aws-cdk/aws-s3.BucketProps | *No description.* | --- -##### \`scope\`Required +##### \`scope\`Required - *Type:* constructs.Construct --- -##### \`id\`Required +##### \`id\`Required - *Type:* string --- -##### \`props\`Optional +##### \`props\`Optional - *Type:* @aws-cdk/aws-s3.BucketProps --- -#### Methods +#### Methods | **Name** | **Description** | | --- | --- | -| applyRemovalPolicy | Apply the given removal policy to this resource. | -| addEventNotification | Adds a bucket notification event destination. | -| addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | -| addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | -| arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | -| grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | -| grantPublicAccess | Allows unrestricted access to objects from this bucket. | -| grantPut | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | -| grantPutAcl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | -| grantRead | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grantReadWrite | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grantWrite | Grant write permissions to this bucket to an IAM principal. | -| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | -| onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | -| onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3UrlForObject | The S3 URL of an S3 object. For example:. | -| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | -| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | -| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | -| addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | -| addInventory | Add an inventory configuration. | -| addLifecycleRule | Add a lifecycle rule to the bucket. | -| addMetric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | -| goodbye | *No description.* | - ---- - -##### \`applyRemovalPolicy\` +| applyRemovalPolicy | Apply the given removal policy to this resource. | +| addEventNotification | Adds a bucket notification event destination. | +| addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | +| addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | +| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | +| grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | +| grantPublicAccess | Allows unrestricted access to objects from this bucket. | +| grantPut | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | +| grantPutAcl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | +| grantRead | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grantReadWrite | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grantWrite | Grant write permissions to this bucket to an IAM principal. | +| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | +| onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | +| onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | +| s3UrlForObject | The S3 URL of an S3 object. For example:. | +| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | +| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | +| addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | +| addInventory | Add an inventory configuration. | +| addLifecycleRule | Add a lifecycle rule to the bucket. | +| addMetric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | +| goodbye | *No description.* | + +--- + +##### \`applyRemovalPolicy\` \`\`\`typescript public applyRemovalPolicy(policy: RemovalPolicy): void @@ -7270,13 +7270,13 @@ to be replaced. The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). -###### \`policy\`Required +###### \`policy\`Required - *Type:* @aws-cdk/core.RemovalPolicy --- -##### \`addEventNotification\` +##### \`addEventNotification\` \`\`\`typescript public addEventNotification(event: EventType, dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void @@ -7295,7 +7295,7 @@ Adds a bucket notification event destination. \`\`\` -###### \`event\`Required +###### \`event\`Required - *Type:* @aws-cdk/aws-s3.EventType @@ -7303,7 +7303,7 @@ The event to trigger the notification. --- -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -7311,7 +7311,7 @@ The notification destination (Lambda, SNS Topic or SQS Queue). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -7323,7 +7323,7 @@ for details about allowed filter rules. --- -##### \`addObjectCreatedNotification\` +##### \`addObjectCreatedNotification\` \`\`\`typescript public addObjectCreatedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void @@ -7334,7 +7334,7 @@ Subscribes a destination to receive notifications when an object is created in t This is identical to calling \`onEvent(EventType.OBJECT_CREATED)\`. -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -7342,7 +7342,7 @@ The notification destination (see onEvent). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -7350,7 +7350,7 @@ Filters (see onEvent). --- -##### \`addObjectRemovedNotification\` +##### \`addObjectRemovedNotification\` \`\`\`typescript public addObjectRemovedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void @@ -7361,7 +7361,7 @@ Subscribes a destination to receive notifications when an object is removed from This is identical to calling \`onEvent(EventType.OBJECT_REMOVED)\`. -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -7369,7 +7369,7 @@ The notification destination (see onEvent). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -7377,7 +7377,7 @@ Filters (see onEvent). --- -##### \`addToResourcePolicy\` +##### \`addToResourcePolicy\` \`\`\`typescript public addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult @@ -7391,7 +7391,7 @@ it's not possible to tell whether the bucket already has a policy attached, let alone to re-use that policy to add more statements to it. So it's safest to do nothing in these cases. -###### \`permission\`Required +###### \`permission\`Required - *Type:* @aws-cdk/aws-iam.PolicyStatement @@ -7399,7 +7399,7 @@ the policy statement to be added to the bucket's policy. --- -##### \`arnForObjects\` +##### \`arnForObjects\` \`\`\`typescript public arnForObjects(keyPattern: string): string @@ -7407,19 +7407,19 @@ public arnForObjects(keyPattern: string): string Returns an ARN that represents all objects within the bucket that match the key pattern specified. -To represent all keys, specify \`\`\\"*\\"\`\`. +To represent all keys, specify \`\`"*"\`\`. If you need to specify a keyPattern with multiple components, concatenate them into a single string, e.g.: arnForObjects(\`home/\${team}/\${user}/*\`) -###### \`keyPattern\`Required +###### \`keyPattern\`Required - *Type:* string --- -##### \`grantDelete\` +##### \`grantDelete\` \`\`\`typescript public grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -7427,7 +7427,7 @@ public grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -7435,7 +7435,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -7443,7 +7443,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantPublicAccess\` +##### \`grantPublicAccess\` \`\`\`typescript public grantPublicAccess(allowedActions: string, keyPrefix?: string): Grant @@ -7456,8 +7456,8 @@ in this bucket, which is useful for when you configure your bucket as a website and want everyone to be able to read objects in the bucket without needing to authenticate. -Without arguments, this method will grant read (\\"s3:GetObject\\") access to -all objects (\\"*\\") in the bucket. +Without arguments, this method will grant read ("s3:GetObject") access to +all objects ("*") in the bucket. The method returns the \`iam.Grant\` object, which can then be modified as needed. For example, you can add a condition that will restrict access only @@ -7470,25 +7470,25 @@ Note that if this \`IBucket\` refers to an existing bucket, possibly not managed by CloudFormation, this method will have no effect, since it's impossible to modify the policy of an existing bucket. -###### \`allowedActions\`Required +###### \`allowedActions\`Required - *Type:* string the set of S3 actions to allow. -Default is \\"s3:GetObject\\". +Default is "s3:GetObject". --- -###### \`keyPrefix\`Optional +###### \`keyPrefix\`Optional - *Type:* string -the prefix of S3 object keys (e.g. \`home/*\`). Default is \\"*\\". +the prefix of S3 object keys (e.g. \`home/*\`). Default is "*". --- -##### \`grantPut\` +##### \`grantPut\` \`\`\`typescript public grantPut(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -7499,7 +7499,7 @@ Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM princip If encryption is used, permission to use the key to encrypt the contents of written files will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -7507,7 +7507,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -7515,7 +7515,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantPutAcl\` +##### \`grantPutAcl\` \`\`\`typescript public grantPutAcl(identity: IGrantable, objectsKeyPattern?: string): Grant @@ -7527,19 +7527,19 @@ If your application has the '@aws-cdk/aws-s3:grantWriteWithoutAcl' feature flag calling {@link grantWrite} or {@link grantReadWrite} no longer grants permissions to modify the ACLs of the objects; in this case, if you need to modify object ACLs, call this method explicitly. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* string --- -##### \`grantRead\` +##### \`grantRead\` \`\`\`typescript public grantRead(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -7550,7 +7550,7 @@ Grant read permissions for this bucket and it's contents to an IAM principal (Ro If encryption is used, permission to use the key to decrypt the contents of the bucket will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -7558,7 +7558,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -7566,7 +7566,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantReadWrite\` +##### \`grantReadWrite\` \`\`\`typescript public grantReadWrite(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -7585,19 +7585,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any --- -##### \`grantWrite\` +##### \`grantWrite\` \`\`\`typescript public grantWrite(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -7616,19 +7616,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any --- -##### \`onCloudTrailEvent\` +##### \`onCloudTrailEvent\` \`\`\`typescript public onCloudTrailEvent(id: string, options?: OnCloudTrailBucketEventOptions): Rule @@ -7639,7 +7639,7 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -7647,7 +7647,7 @@ The id of the rule. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -7655,7 +7655,7 @@ Options for adding the rule. --- -##### \`onCloudTrailPutObject\` +##### \`onCloudTrailPutObject\` \`\`\`typescript public onCloudTrailPutObject(id: string, options?: OnCloudTrailBucketEventOptions): Rule @@ -7670,7 +7670,7 @@ so using \`onCloudTrailWriteObject\` may be preferable. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -7678,7 +7678,7 @@ The id of the rule. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -7686,7 +7686,7 @@ Options for adding the rule. --- -##### \`onCloudTrailWriteObject\` +##### \`onCloudTrailWriteObject\` \`\`\`typescript public onCloudTrailWriteObject(id: string, options?: OnCloudTrailBucketEventOptions): Rule @@ -7704,7 +7704,7 @@ so using this method may be preferable to \`onCloudTrailPutObject\`. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -7712,7 +7712,7 @@ The id of the rule. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -7720,7 +7720,7 @@ Options for adding the rule. --- -##### \`s3UrlForObject\` +##### \`s3UrlForObject\` \`\`\`typescript public s3UrlForObject(key?: string): string @@ -7731,7 +7731,7 @@ The S3 URL of an S3 object. For example:. \`s3://onlybucket\` - \`s3://bucket/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -7742,7 +7742,7 @@ bucket is returned. --- -##### \`transferAccelerationUrlForObject\` +##### \`transferAccelerationUrlForObject\` \`\`\`typescript public transferAccelerationUrlForObject(key?: string, options?: TransferAccelerationUrlOptions): string @@ -7756,7 +7756,7 @@ for dual-stack endpoint (connect to the bucket over IPv6). For example: - \`https://bucket.s3-accelerate.amazonaws.com\` - \`https://bucket.s3-accelerate.amazonaws.com/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -7767,7 +7767,7 @@ bucket is returned. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.TransferAccelerationUrlOptions @@ -7775,7 +7775,7 @@ Options for generating URL. --- -##### \`urlForObject\` +##### \`urlForObject\` \`\`\`typescript public urlForObject(key?: string): string @@ -7787,7 +7787,7 @@ The https URL of an S3 object. Specify \`regional: false\` at the options for no - \`https://s3.us-west-1.amazonaws.com/bucket/key\` - \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -7798,7 +7798,7 @@ bucket is returned. --- -##### \`virtualHostedUrlForObject\` +##### \`virtualHostedUrlForObject\` \`\`\`typescript public virtualHostedUrlForObject(key?: string, options?: VirtualHostedStyleUrlOptions): string @@ -7811,7 +7811,7 @@ The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the - \`https://bucket.s3.amazonaws.com/key\` - \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* string @@ -7822,7 +7822,7 @@ bucket is returned. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.VirtualHostedStyleUrlOptions @@ -7830,7 +7830,7 @@ Options for generating URL. --- -##### \`addCorsRule\` +##### \`addCorsRule\` \`\`\`typescript public addCorsRule(rule: CorsRule): void @@ -7838,7 +7838,7 @@ public addCorsRule(rule: CorsRule): void Adds a cross-origin access configuration for objects in an Amazon S3 bucket. -###### \`rule\`Required +###### \`rule\`Required - *Type:* @aws-cdk/aws-s3.CorsRule @@ -7846,7 +7846,7 @@ The CORS configuration rule to add. --- -##### \`addInventory\` +##### \`addInventory\` \`\`\`typescript public addInventory(inventory: Inventory): void @@ -7854,7 +7854,7 @@ public addInventory(inventory: Inventory): void Add an inventory configuration. -###### \`inventory\`Required +###### \`inventory\`Required - *Type:* @aws-cdk/aws-s3.Inventory @@ -7862,7 +7862,7 @@ configuration to add. --- -##### \`addLifecycleRule\` +##### \`addLifecycleRule\` \`\`\`typescript public addLifecycleRule(rule: LifecycleRule): void @@ -7870,7 +7870,7 @@ public addLifecycleRule(rule: LifecycleRule): void Add a lifecycle rule to the bucket. -###### \`rule\`Required +###### \`rule\`Required - *Type:* @aws-cdk/aws-s3.LifecycleRule @@ -7878,7 +7878,7 @@ The rule to add. --- -##### \`addMetric\` +##### \`addMetric\` \`\`\`typescript public addMetric(metric: BucketMetrics): void @@ -7886,7 +7886,7 @@ public addMetric(metric: BucketMetrics): void Adds a metrics configuration for the CloudWatch request metrics from the bucket. -###### \`metric\`Required +###### \`metric\`Required - *Type:* @aws-cdk/aws-s3.BucketMetrics @@ -7894,25 +7894,25 @@ The metric configuration to add. --- -##### \`goodbye\` +##### \`goodbye\` \`\`\`typescript public goodbye(): void \`\`\` -#### Static Functions +#### Static Functions | **Name** | **Description** | | --- | --- | -| isResource | Check whether the given construct is a Resource. | -| fromBucketArn | *No description.* | -| fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | -| fromBucketName | *No description.* | -| validateBucketName | Thrown an exception if the given bucket name is not valid. | +| isResource | Check whether the given construct is a Resource. | +| fromBucketArn | *No description.* | +| fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | +| fromBucketName | *No description.* | +| validateBucketName | Thrown an exception if the given bucket name is not valid. | --- -##### \`isResource\` +##### \`isResource\` \`\`\`typescript import { submod1 } from 'construct-library' @@ -7922,13 +7922,13 @@ submod1.GoodbyeBucket.isResource(construct: IConstruct) Check whether the given construct is a Resource. -###### \`construct\`Required +###### \`construct\`Required - *Type:* @aws-cdk/core.IConstruct --- -##### \`fromBucketArn\` +##### \`fromBucketArn\` \`\`\`typescript import { submod1 } from 'construct-library' @@ -7936,25 +7936,25 @@ import { submod1 } from 'construct-library' submod1.GoodbyeBucket.fromBucketArn(scope: Construct, id: string, bucketArn: string) \`\`\` -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct --- -###### \`id\`Required +###### \`id\`Required - *Type:* string --- -###### \`bucketArn\`Required +###### \`bucketArn\`Required - *Type:* string --- -##### \`fromBucketAttributes\` +##### \`fromBucketAttributes\` \`\`\`typescript import { submod1 } from 'construct-library' @@ -7964,7 +7964,7 @@ submod1.GoodbyeBucket.fromBucketAttributes(scope: Construct, id: string, attrs: Creates a Bucket construct that represents an external bucket. -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct @@ -7972,7 +7972,7 @@ The parent creating construct (usually \`this\`). --- -###### \`id\`Required +###### \`id\`Required - *Type:* string @@ -7980,7 +7980,7 @@ The construct's name. --- -###### \`attrs\`Required +###### \`attrs\`Required - *Type:* @aws-cdk/aws-s3.BucketAttributes @@ -7991,7 +7991,7 @@ Can be obtained from a call to --- -##### \`fromBucketName\` +##### \`fromBucketName\` \`\`\`typescript import { submod1 } from 'construct-library' @@ -7999,25 +7999,25 @@ import { submod1 } from 'construct-library' submod1.GoodbyeBucket.fromBucketName(scope: Construct, id: string, bucketName: string) \`\`\` -###### \`scope\`Required +###### \`scope\`Required - *Type:* constructs.Construct --- -###### \`id\`Required +###### \`id\`Required - *Type:* string --- -###### \`bucketName\`Required +###### \`bucketName\`Required - *Type:* string --- -##### \`validateBucketName\` +##### \`validateBucketName\` \`\`\`typescript import { submod1 } from 'construct-library' @@ -8027,7 +8027,7 @@ submod1.GoodbyeBucket.validateBucketName(physicalName: string) Thrown an exception if the given bucket name is not valid. -###### \`physicalName\`Required +###### \`physicalName\`Required - *Type:* string @@ -8035,27 +8035,27 @@ name of the bucket. --- -#### Properties +#### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | @aws-cdk/core.ConstructNode | The construct tree node associated with this construct. | -| env | @aws-cdk/core.ResourceEnvironment | The environment this resource belongs to. | -| stack | @aws-cdk/core.Stack | The stack in which this resource is defined. | -| bucketArn | string | The ARN of the bucket. | -| bucketDomainName | string | The IPv4 DNS name of the specified bucket. | -| bucketDualStackDomainName | string | The IPv6 DNS name of the specified bucket. | -| bucketName | string | The name of the bucket. | -| bucketRegionalDomainName | string | The regional domain name of the specified bucket. | -| bucketWebsiteDomainName | string | The Domain name of the static website. | -| bucketWebsiteUrl | string | The URL of the static website. | -| encryptionKey | @aws-cdk/aws-kms.IKey | Optional KMS encryption key associated with this bucket. | -| isWebsite | boolean | If this bucket has been configured for static website hosting. | -| policy | @aws-cdk/aws-s3.BucketPolicy | The resource policy associated with this bucket. | +| node | @aws-cdk/core.ConstructNode | The construct tree node associated with this construct. | +| env | @aws-cdk/core.ResourceEnvironment | The environment this resource belongs to. | +| stack | @aws-cdk/core.Stack | The stack in which this resource is defined. | +| bucketArn | string | The ARN of the bucket. | +| bucketDomainName | string | The IPv4 DNS name of the specified bucket. | +| bucketDualStackDomainName | string | The IPv6 DNS name of the specified bucket. | +| bucketName | string | The name of the bucket. | +| bucketRegionalDomainName | string | The regional domain name of the specified bucket. | +| bucketWebsiteDomainName | string | The Domain name of the static website. | +| bucketWebsiteUrl | string | The URL of the static website. | +| encryptionKey | @aws-cdk/aws-kms.IKey | Optional KMS encryption key associated with this bucket. | +| isWebsite | boolean | If this bucket has been configured for static website hosting. | +| policy | @aws-cdk/aws-s3.BucketPolicy | The resource policy associated with this bucket. | --- -##### \`node\`Required +##### \`node\`Required \`\`\`typescript public readonly node: ConstructNode; @@ -8067,7 +8067,7 @@ The construct tree node associated with this construct. --- -##### \`env\`Required +##### \`env\`Required \`\`\`typescript public readonly env: ResourceEnvironment; @@ -8086,7 +8086,7 @@ that might be different than the stack they were imported into. --- -##### \`stack\`Required +##### \`stack\`Required \`\`\`typescript public readonly stack: Stack; @@ -8098,7 +8098,7 @@ The stack in which this resource is defined. --- -##### \`bucketArn\`Required +##### \`bucketArn\`Required \`\`\`typescript public readonly bucketArn: string; @@ -8110,7 +8110,7 @@ The ARN of the bucket. --- -##### \`bucketDomainName\`Required +##### \`bucketDomainName\`Required \`\`\`typescript public readonly bucketDomainName: string; @@ -8122,7 +8122,7 @@ The IPv4 DNS name of the specified bucket. --- -##### \`bucketDualStackDomainName\`Required +##### \`bucketDualStackDomainName\`Required \`\`\`typescript public readonly bucketDualStackDomainName: string; @@ -8134,7 +8134,7 @@ The IPv6 DNS name of the specified bucket. --- -##### \`bucketName\`Required +##### \`bucketName\`Required \`\`\`typescript public readonly bucketName: string; @@ -8146,7 +8146,7 @@ The name of the bucket. --- -##### \`bucketRegionalDomainName\`Required +##### \`bucketRegionalDomainName\`Required \`\`\`typescript public readonly bucketRegionalDomainName: string; @@ -8158,7 +8158,7 @@ The regional domain name of the specified bucket. --- -##### \`bucketWebsiteDomainName\`Required +##### \`bucketWebsiteDomainName\`Required \`\`\`typescript public readonly bucketWebsiteDomainName: string; @@ -8170,7 +8170,7 @@ The Domain name of the static website. --- -##### \`bucketWebsiteUrl\`Required +##### \`bucketWebsiteUrl\`Required \`\`\`typescript public readonly bucketWebsiteUrl: string; @@ -8182,7 +8182,7 @@ The URL of the static website. --- -##### \`encryptionKey\`Optional +##### \`encryptionKey\`Optional \`\`\`typescript public readonly encryptionKey: IKey; @@ -8194,7 +8194,7 @@ Optional KMS encryption key associated with this bucket. --- -##### \`isWebsite\`Optional +##### \`isWebsite\`Optional \`\`\`typescript public readonly isWebsite: boolean; @@ -8206,7 +8206,7 @@ If this bucket has been configured for static website hosting. --- -##### \`policy\`Optional +##### \`policy\`Optional \`\`\`typescript public readonly policy: BucketPolicy; diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/class.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/class.test.ts.snap index 8ef91366526..f309449451a 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/class.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/class.test.ts.snap @@ -1,11 +1,11 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`csharp snapshot 1`] = ` -Object { - "constants": Array [], +{ + "constants": [], "displayName": "AuthorizationToken", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html", ], "summary": "Authorization token to access private ECR repositories in the current environment via Docker CLI.", @@ -13,29 +13,29 @@ Object { "fqn": "Amazon.CDK.AWS.ECR.AuthorizationToken", "id": "@aws-cdk/aws-ecr.AuthorizationToken", "initializer": undefined, - "instanceMethods": Array [], - "interfaces": Array [], - "properties": Array [], - "staticMethods": Array [ - Object { + "instanceMethods": [], + "interfaces": [], + "properties": [], + "staticMethods": [ + { "displayName": "GrantRead", - "docs": Object { + "docs": { "summary": "Grant access to retrieve an authorization token.", }, "fqn": "Amazon.CDK.AWS.ECR.AuthorizationToken.GrantRead", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "Grantee", - "docs": Object {}, + "docs": {}, "fqn": "Amazon.CDK.AWS.ECR.AuthorizationToken.GrantRead.parameter.Grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "Amazon.CDK.AWS.IAM.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -55,22 +55,22 @@ AuthorizationToken.GrantRead(IGrantable Grantee);", `; exports[`csharp snapshot 2`] = ` -" AuthorizationToken +" AuthorizationToken Authorization token to access private ECR repositories in the current environment via Docker CLI. > [https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html) -# Static Functions +# Static Functions | **Name** | **Description** | | --- | --- | -| GrantRead | Grant access to retrieve an authorization token. | +| GrantRead | Grant access to retrieve an authorization token. | --- -## \`GrantRead\` +## \`GrantRead\` \`\`\`csharp using Amazon.CDK.AWS.ECR; @@ -80,7 +80,7 @@ AuthorizationToken.GrantRead(IGrantable Grantee); Grant access to retrieve an authorization token. -### \`Grantee\`Required +### \`Grantee\`Required - *Type:* Amazon.CDK.AWS.IAM.IGrantable @@ -91,11 +91,11 @@ Grant access to retrieve an authorization token. `; exports[`go snapshot 1`] = ` -Object { - "constants": Array [], +{ + "constants": [], "displayName": "AuthorizationToken", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html", ], "summary": "Authorization token to access private ECR repositories in the current environment via Docker CLI.", @@ -103,29 +103,29 @@ Object { "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.AuthorizationToken", "id": "@aws-cdk/aws-ecr.AuthorizationToken", "initializer": undefined, - "instanceMethods": Array [], - "interfaces": Array [], - "properties": Array [], - "staticMethods": Array [ - Object { + "instanceMethods": [], + "interfaces": [], + "properties": [], + "staticMethods": [ + { "displayName": "GrantRead", - "docs": Object { + "docs": { "summary": "Grant access to retrieve an authorization token.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.AuthorizationToken.GrantRead", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.AuthorizationToken.GrantRead.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "github.com/aws/aws-cdk-go/awscdk/awsiam/awscdkawsiam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -136,7 +136,7 @@ Object { }, }, ], - "usage": "import \\"github.com/aws/aws-cdk-go/awscdkawsecr\\" + "usage": "import "github.com/aws/aws-cdk-go/awscdkawsecr" awscdkawsecr.AuthorizationToken_GrantRead(grantee IGrantable)", }, @@ -145,32 +145,32 @@ awscdkawsecr.AuthorizationToken_GrantRead(grantee IGrantable)", `; exports[`go snapshot 2`] = ` -" AuthorizationToken +" AuthorizationToken Authorization token to access private ECR repositories in the current environment via Docker CLI. > [https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html) -# Static Functions +# Static Functions | **Name** | **Description** | | --- | --- | -| GrantRead | Grant access to retrieve an authorization token. | +| GrantRead | Grant access to retrieve an authorization token. | --- -## \`GrantRead\` +## \`GrantRead\` \`\`\`go -import \\"github.com/aws/aws-cdk-go/awscdkawsecr\\" +import "github.com/aws/aws-cdk-go/awscdkawsecr" awscdkawsecr.AuthorizationToken_GrantRead(grantee IGrantable) \`\`\` Grant access to retrieve an authorization token. -### \`grantee\`Required +### \`grantee\`Required - *Type:* github.com/aws/aws-cdk-go/awscdk/awsiam/awscdkawsiam.IGrantable @@ -181,11 +181,11 @@ Grant access to retrieve an authorization token. `; exports[`java snapshot 1`] = ` -Object { - "constants": Array [], +{ + "constants": [], "displayName": "AuthorizationToken", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html", ], "summary": "Authorization token to access private ECR repositories in the current environment via Docker CLI.", @@ -193,29 +193,29 @@ Object { "fqn": "software.amazon.awscdk.services.ecr.AuthorizationToken", "id": "@aws-cdk/aws-ecr.AuthorizationToken", "initializer": undefined, - "instanceMethods": Array [], - "interfaces": Array [], - "properties": Array [], - "staticMethods": Array [ - Object { + "instanceMethods": [], + "interfaces": [], + "properties": [], + "staticMethods": [ + { "displayName": "grantRead", - "docs": Object { + "docs": { "summary": "Grant access to retrieve an authorization token.", }, "fqn": "software.amazon.awscdk.services.ecr.AuthorizationToken.grantRead", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "software.amazon.awscdk.services.ecr.AuthorizationToken.grantRead.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "software.amazon.awscdk.services.iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -235,22 +235,22 @@ AuthorizationToken.grantRead(IGrantable grantee)", `; exports[`java snapshot 2`] = ` -" AuthorizationToken +" AuthorizationToken Authorization token to access private ECR repositories in the current environment via Docker CLI. > [https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html) -# Static Functions +# Static Functions | **Name** | **Description** | | --- | --- | -| grantRead | Grant access to retrieve an authorization token. | +| grantRead | Grant access to retrieve an authorization token. | --- -## \`grantRead\` +## \`grantRead\` \`\`\`java import software.amazon.awscdk.services.ecr.AuthorizationToken; @@ -260,7 +260,7 @@ AuthorizationToken.grantRead(IGrantable grantee) Grant access to retrieve an authorization token. -### \`grantee\`Required +### \`grantee\`Required - *Type:* software.amazon.awscdk.services.iam.IGrantable @@ -271,11 +271,11 @@ Grant access to retrieve an authorization token. `; exports[`python snapshot 1`] = ` -Object { - "constants": Array [], +{ + "constants": [], "displayName": "AuthorizationToken", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html", ], "summary": "Authorization token to access private ECR repositories in the current environment via Docker CLI.", @@ -283,29 +283,29 @@ Object { "fqn": "aws_cdk.aws_ecr.AuthorizationToken", "id": "@aws-cdk/aws-ecr.AuthorizationToken", "initializer": undefined, - "instanceMethods": Array [], - "interfaces": Array [], - "properties": Array [], - "staticMethods": Array [ - Object { + "instanceMethods": [], + "interfaces": [], + "properties": [], + "staticMethods": [ + { "displayName": "grant_read", - "docs": Object { + "docs": { "summary": "Grant access to retrieve an authorization token.", }, "fqn": "aws_cdk.aws_ecr.AuthorizationToken.grant_read", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "aws_cdk.aws_ecr.AuthorizationToken.grant_read.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "aws_cdk.aws_iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -327,22 +327,22 @@ aws_cdk.aws_ecr.AuthorizationToken.grant_read( `; exports[`python snapshot 2`] = ` -" AuthorizationToken +" AuthorizationToken Authorization token to access private ECR repositories in the current environment via Docker CLI. > [https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html) -# Static Functions +# Static Functions | **Name** | **Description** | | --- | --- | -| grant_read | Grant access to retrieve an authorization token. | +| grant_read | Grant access to retrieve an authorization token. | --- -## \`grant_read\` +## \`grant_read\` \`\`\`python import aws_cdk.aws_ecr @@ -354,7 +354,7 @@ aws_cdk.aws_ecr.AuthorizationToken.grant_read( Grant access to retrieve an authorization token. -### \`grantee\`Required +### \`grantee\`Required - *Type:* aws_cdk.aws_iam.IGrantable @@ -365,11 +365,11 @@ Grant access to retrieve an authorization token. `; exports[`typescript snapshot 1`] = ` -Object { - "constants": Array [], +{ + "constants": [], "displayName": "AuthorizationToken", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html", ], "summary": "Authorization token to access private ECR repositories in the current environment via Docker CLI.", @@ -377,29 +377,29 @@ Object { "fqn": "@aws-cdk/aws-ecr.AuthorizationToken", "id": "@aws-cdk/aws-ecr.AuthorizationToken", "initializer": undefined, - "instanceMethods": Array [], - "interfaces": Array [], - "properties": Array [], - "staticMethods": Array [ - Object { + "instanceMethods": [], + "interfaces": [], + "properties": [], + "staticMethods": [ + { "displayName": "grantRead", - "docs": Object { + "docs": { "summary": "Grant access to retrieve an authorization token.", }, "fqn": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -419,22 +419,22 @@ AuthorizationToken.grantRead(grantee: IGrantable)", `; exports[`typescript snapshot 2`] = ` -" AuthorizationToken +" AuthorizationToken Authorization token to access private ECR repositories in the current environment via Docker CLI. > [https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html) -# Static Functions +# Static Functions | **Name** | **Description** | | --- | --- | -| grantRead | Grant access to retrieve an authorization token. | +| grantRead | Grant access to retrieve an authorization token. | --- -## \`grantRead\` +## \`grantRead\` \`\`\`typescript import { AuthorizationToken } from '@aws-cdk/aws-ecr' @@ -444,7 +444,7 @@ AuthorizationToken.grantRead(grantee: IGrantable) Grant access to retrieve an authorization token. -### \`grantee\`Required +### \`grantee\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -455,11 +455,11 @@ Grant access to retrieve an authorization token. `; exports[`wing snapshot 1`] = ` -Object { - "constants": Array [], +{ + "constants": [], "displayName": "AuthorizationToken", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html", ], "summary": "Authorization token to access private ECR repositories in the current environment via Docker CLI.", @@ -467,29 +467,29 @@ Object { "fqn": "@aws-cdk/aws-ecr.AuthorizationToken", "id": "@aws-cdk/aws-ecr.AuthorizationToken", "initializer": undefined, - "instanceMethods": Array [], - "interfaces": Array [], - "properties": Array [], - "staticMethods": Array [ - Object { + "instanceMethods": [], + "interfaces": [], + "properties": [], + "staticMethods": [ + { "displayName": "grantRead", - "docs": Object { + "docs": { "summary": "Grant access to retrieve an authorization token.", }, "fqn": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -500,7 +500,7 @@ Object { }, }, ], - "usage": "bring { AuthorizationToken } from \\"@aws-cdk/aws-ecr\\"; + "usage": "bring { AuthorizationToken } from "@aws-cdk/aws-ecr"; AuthorizationToken.grantRead(grantee: IGrantable);", }, @@ -509,32 +509,32 @@ AuthorizationToken.grantRead(grantee: IGrantable);", `; exports[`wing snapshot 2`] = ` -" AuthorizationToken +" AuthorizationToken Authorization token to access private ECR repositories in the current environment via Docker CLI. > [https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html) -# Static Functions +# Static Functions | **Name** | **Description** | | --- | --- | -| grantRead | Grant access to retrieve an authorization token. | +| grantRead | Grant access to retrieve an authorization token. | --- -## \`grantRead\` +## \`grantRead\` \`\`\`wing -bring { AuthorizationToken } from \\"@aws-cdk/aws-ecr\\"; +bring { AuthorizationToken } from "@aws-cdk/aws-ecr"; AuthorizationToken.grantRead(grantee: IGrantable); \`\`\` Grant access to retrieve an authorization token. -### \`grantee\`Required +### \`grantee\`Required - *Type:* @aws-cdk/aws-iam.IGrantable diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/documentation.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/documentation.test.ts.snap index 26504ef1ef9..dbdf1a7f2ef 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/documentation.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/documentation.test.ts.snap @@ -1,33 +1,33 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`wing single package 1`] = ` -Object { - "apiReference": Object { - "classes": Array [], - "constructs": Array [ - Object { - "constants": Array [], +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`wing > single package 1`] = ` +{ + "apiReference": { + "classes": [], + "constructs": [ + { + "constants": [], "displayName": "GreeterBucket", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket", "id": "construct-library.GreeterBucket", "inflight": undefined, - "initializer": Object { + "initializer": { "displayName": "Initializer", "fqn": "construct-library.GreeterBucket.Initializer", "id": "construct-library.GreeterBucket.Initializer", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "props", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.Initializer.parameter.props", "id": "construct-library.GreeterBucket.Initializer.parameter.props", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "BucketProps", "fqn": "@aws-cdk/aws-s3.BucketProps", "id": "@aws-cdk/aws-s3.BucketProps", @@ -38,14 +38,14 @@ Object { }, }, ], - "usage": "bring { GreeterBucket } from \\"construct-library\\"; + "usage": "bring { GreeterBucket } from "construct-library"; new GreeterBucket(props?: BucketProps);", }, - "instanceMethods": Array [ - Object { + "instanceMethods": [ + { "displayName": "applyRemovalPolicy", - "docs": Object { + "docs": { "remarks": "The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource @@ -57,18 +57,18 @@ account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`).", }, "fqn": "construct-library.GreeterBucket.applyRemovalPolicy", "id": "construct-library.GreeterBucket.applyRemovalPolicy", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "policy", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.applyRemovalPolicy.parameter.policy", "id": "construct-library.GreeterBucket.applyRemovalPolicy.parameter.policy", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "RemovalPolicy", "fqn": "@aws-cdk/core.RemovalPolicy", "id": "@aws-cdk/core.RemovalPolicy", @@ -81,33 +81,33 @@ account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`).", ], "usage": "applyRemovalPolicy(policy: RemovalPolicy): void", }, - Object { + { "displayName": "addEventNotification", - "docs": Object { + "docs": { "example": " declare const myLambda: lambda.Function; const bucket = new s3.Bucket(this, 'MyBucket'); bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myLambda), {prefix: 'home/myusername/*'});", - "links": Array [ + "links": [ "https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html", ], "summary": "Adds a bucket notification event destination.", }, "fqn": "construct-library.GreeterBucket.addEventNotification", "id": "construct-library.GreeterBucket.addEventNotification", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "event", - "docs": Object { + "docs": { "summary": "The event to trigger the notification.", }, "fqn": "construct-library.GreeterBucket.addEventNotification.parameter.event", "id": "construct-library.GreeterBucket.addEventNotification.parameter.event", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "EventType", "fqn": "@aws-cdk/aws-s3.EventType", "id": "@aws-cdk/aws-s3.EventType", @@ -117,19 +117,19 @@ account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`).", ], }, }, - Object { + { "default": undefined, "displayName": "dest", - "docs": Object { + "docs": { "summary": "The notification destination (Lambda, SNS Topic or SQS Queue).", }, "fqn": "construct-library.GreeterBucket.addEventNotification.parameter.dest", "id": "construct-library.GreeterBucket.addEventNotification.parameter.dest", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IBucketNotificationDestination", "fqn": "@aws-cdk/aws-s3.IBucketNotificationDestination", "id": "@aws-cdk/aws-s3.IBucketNotificationDestination", @@ -139,10 +139,10 @@ account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`).", ], }, }, - Object { + { "default": undefined, "displayName": "filters", - "docs": Object { + "docs": { "remarks": "Each filter must include a \`prefix\` and/or \`suffix\` that will be matched against the s3 object key. Refer to the S3 Developer Guide for details about allowed filter rules.", @@ -151,10 +151,10 @@ for details about allowed filter rules.", "fqn": "construct-library.GreeterBucket.addEventNotification.parameter.filters", "id": "construct-library.GreeterBucket.addEventNotification.parameter.filters", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "NotificationKeyFilter", "fqn": "@aws-cdk/aws-s3.NotificationKeyFilter", "id": "@aws-cdk/aws-s3.NotificationKeyFilter", @@ -167,29 +167,29 @@ for details about allowed filter rules.", ], "usage": "addEventNotification(event: EventType, dest: IBucketNotificationDestination, ...filters: Array): void", }, - Object { + { "displayName": "addObjectCreatedNotification", - "docs": Object { + "docs": { "remarks": "This is identical to calling \`onEvent(EventType.OBJECT_CREATED)\`.", "summary": "Subscribes a destination to receive notifications when an object is created in the bucket.", }, "fqn": "construct-library.GreeterBucket.addObjectCreatedNotification", "id": "construct-library.GreeterBucket.addObjectCreatedNotification", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "dest", - "docs": Object { + "docs": { "summary": "The notification destination (see onEvent).", }, "fqn": "construct-library.GreeterBucket.addObjectCreatedNotification.parameter.dest", "id": "construct-library.GreeterBucket.addObjectCreatedNotification.parameter.dest", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IBucketNotificationDestination", "fqn": "@aws-cdk/aws-s3.IBucketNotificationDestination", "id": "@aws-cdk/aws-s3.IBucketNotificationDestination", @@ -199,19 +199,19 @@ for details about allowed filter rules.", ], }, }, - Object { + { "default": undefined, "displayName": "filters", - "docs": Object { + "docs": { "summary": "Filters (see onEvent).", }, "fqn": "construct-library.GreeterBucket.addObjectCreatedNotification.parameter.filters", "id": "construct-library.GreeterBucket.addObjectCreatedNotification.parameter.filters", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "NotificationKeyFilter", "fqn": "@aws-cdk/aws-s3.NotificationKeyFilter", "id": "@aws-cdk/aws-s3.NotificationKeyFilter", @@ -224,29 +224,29 @@ for details about allowed filter rules.", ], "usage": "addObjectCreatedNotification(dest: IBucketNotificationDestination, ...filters: Array): void", }, - Object { + { "displayName": "addObjectRemovedNotification", - "docs": Object { + "docs": { "remarks": "This is identical to calling \`onEvent(EventType.OBJECT_REMOVED)\`.", "summary": "Subscribes a destination to receive notifications when an object is removed from the bucket.", }, "fqn": "construct-library.GreeterBucket.addObjectRemovedNotification", "id": "construct-library.GreeterBucket.addObjectRemovedNotification", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "dest", - "docs": Object { + "docs": { "summary": "The notification destination (see onEvent).", }, "fqn": "construct-library.GreeterBucket.addObjectRemovedNotification.parameter.dest", "id": "construct-library.GreeterBucket.addObjectRemovedNotification.parameter.dest", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IBucketNotificationDestination", "fqn": "@aws-cdk/aws-s3.IBucketNotificationDestination", "id": "@aws-cdk/aws-s3.IBucketNotificationDestination", @@ -256,19 +256,19 @@ for details about allowed filter rules.", ], }, }, - Object { + { "default": undefined, "displayName": "filters", - "docs": Object { + "docs": { "summary": "Filters (see onEvent).", }, "fqn": "construct-library.GreeterBucket.addObjectRemovedNotification.parameter.filters", "id": "construct-library.GreeterBucket.addObjectRemovedNotification.parameter.filters", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "NotificationKeyFilter", "fqn": "@aws-cdk/aws-s3.NotificationKeyFilter", "id": "@aws-cdk/aws-s3.NotificationKeyFilter", @@ -281,9 +281,9 @@ for details about allowed filter rules.", ], "usage": "addObjectRemovedNotification(dest: IBucketNotificationDestination, ...filters: Array): void", }, - Object { + { "displayName": "addToResourcePolicy", - "docs": Object { + "docs": { "remarks": "Note that the policy statement may or may not be added to the policy. For example, when an \`IBucket\` is created from an existing bucket, it's not possible to tell whether the bucket already has a policy @@ -293,20 +293,20 @@ So it's safest to do nothing in these cases.", }, "fqn": "construct-library.GreeterBucket.addToResourcePolicy", "id": "construct-library.GreeterBucket.addToResourcePolicy", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "permission", - "docs": Object { + "docs": { "summary": "the policy statement to be added to the bucket's policy.", }, "fqn": "construct-library.GreeterBucket.addToResourcePolicy.parameter.permission", "id": "construct-library.GreeterBucket.addToResourcePolicy.parameter.permission", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "PolicyStatement", "fqn": "@aws-cdk/aws-iam.PolicyStatement", "id": "@aws-cdk/aws-iam.PolicyStatement", @@ -319,10 +319,10 @@ So it's safest to do nothing in these cases.", ], "usage": "addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult", }, - Object { + { "displayName": "arnForObjects", - "docs": Object { - "remarks": "To represent all keys, specify \`\`\\"*\\"\`\`. + "docs": { + "remarks": "To represent all keys, specify \`\`"*"\`\`. If you need to specify a keyPattern with multiple components, concatenate them into a single string, e.g.: @@ -331,42 +331,42 @@ If you need to specify a keyPattern with multiple components, concatenate them i }, "fqn": "construct-library.GreeterBucket.arnForObjects", "id": "construct-library.GreeterBucket.arnForObjects", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "keyPattern", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.arnForObjects.parameter.keyPattern", "id": "construct-library.GreeterBucket.arnForObjects.parameter.keyPattern", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, }, ], "usage": "arnForObjects(keyPattern: str): str", }, - Object { + { "displayName": "grantDelete", - "docs": Object { + "docs": { "summary": "Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket.", }, "fqn": "construct-library.GreeterBucket.grantDelete", "id": "construct-library.GreeterBucket.grantDelete", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "identity", - "docs": Object { + "docs": { "summary": "The principal.", }, "fqn": "construct-library.GreeterBucket.grantDelete.parameter.identity", "id": "construct-library.GreeterBucket.grantDelete.parameter.identity", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -376,32 +376,32 @@ If you need to specify a keyPattern with multiple components, concatenate them i ], }, }, - Object { + { "default": undefined, "displayName": "objectsKeyPattern", - "docs": Object { + "docs": { "summary": "Restrict the permission to a certain key pattern (default '*').", }, "fqn": "construct-library.GreeterBucket.grantDelete.parameter.objectsKeyPattern", "id": "construct-library.GreeterBucket.grantDelete.parameter.objectsKeyPattern", "optional": true, - "type": Object { + "type": { "formattingPattern": "any", }, }, ], "usage": "grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant", }, - Object { + { "displayName": "grantPublicAccess", - "docs": Object { + "docs": { "remarks": "IMPORTANT: This permission allows anyone to perform actions on S3 objects in this bucket, which is useful for when you configure your bucket as a website and want everyone to be able to read objects in the bucket without needing to authenticate. -Without arguments, this method will grant read (\\"s3:GetObject\\") access to -all objects (\\"*\\") in the bucket. +Without arguments, this method will grant read ("s3:GetObject") access to +all objects ("*") in the bucket. The method returns the \`iam.Grant\` object, which can then be modified as needed. For example, you can add a condition that will restrict access only @@ -417,60 +417,60 @@ impossible to modify the policy of an existing bucket.", }, "fqn": "construct-library.GreeterBucket.grantPublicAccess", "id": "construct-library.GreeterBucket.grantPublicAccess", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "allowedActions", - "docs": Object { - "remarks": "Default is \\"s3:GetObject\\".", + "docs": { + "remarks": "Default is "s3:GetObject".", "summary": "the set of S3 actions to allow.", }, "fqn": "construct-library.GreeterBucket.grantPublicAccess.parameter.allowedActions", "id": "construct-library.GreeterBucket.grantPublicAccess.parameter.allowedActions", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": undefined, "displayName": "keyPrefix", - "docs": Object { - "summary": "the prefix of S3 object keys (e.g. \`home/*\`). Default is \\"*\\".", + "docs": { + "summary": "the prefix of S3 object keys (e.g. \`home/*\`). Default is "*".", }, "fqn": "construct-library.GreeterBucket.grantPublicAccess.parameter.keyPrefix", "id": "construct-library.GreeterBucket.grantPublicAccess.parameter.keyPrefix", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, ], "usage": "grantPublicAccess(...allowedActions: Array, keyPrefix?: str): Grant", }, - Object { + { "displayName": "grantPut", - "docs": Object { + "docs": { "remarks": "If encryption is used, permission to use the key to encrypt the contents of written files will also be granted to the same principal.", "summary": "Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal.", }, "fqn": "construct-library.GreeterBucket.grantPut", "id": "construct-library.GreeterBucket.grantPut", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "identity", - "docs": Object { + "docs": { "summary": "The principal.", }, "fqn": "construct-library.GreeterBucket.grantPut.parameter.identity", "id": "construct-library.GreeterBucket.grantPut.parameter.identity", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -480,25 +480,25 @@ of written files will also be granted to the same principal.", ], }, }, - Object { + { "default": undefined, "displayName": "objectsKeyPattern", - "docs": Object { + "docs": { "summary": "Restrict the permission to a certain key pattern (default '*').", }, "fqn": "construct-library.GreeterBucket.grantPut.parameter.objectsKeyPattern", "id": "construct-library.GreeterBucket.grantPut.parameter.objectsKeyPattern", "optional": true, - "type": Object { + "type": { "formattingPattern": "any", }, }, ], "usage": "grantPut(identity: IGrantable, objectsKeyPattern?: any): Grant", }, - Object { + { "displayName": "grantPutAcl", - "docs": Object { + "docs": { "remarks": "If your application has the '@aws-cdk/aws-s3:grantWriteWithoutAcl' feature flag set, calling {@link grantWrite} or {@link grantReadWrite} no longer grants permissions to modify the ACLs of the objects; in this case, if you need to modify object ACLs, call this method explicitly.", @@ -506,18 +506,18 @@ in this case, if you need to modify object ACLs, call this method explicitly.", }, "fqn": "construct-library.GreeterBucket.grantPutAcl", "id": "construct-library.GreeterBucket.grantPutAcl", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "identity", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.grantPutAcl.parameter.identity", "id": "construct-library.GreeterBucket.grantPutAcl.parameter.identity", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -527,43 +527,43 @@ in this case, if you need to modify object ACLs, call this method explicitly.", ], }, }, - Object { + { "default": undefined, "displayName": "objectsKeyPattern", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.grantPutAcl.parameter.objectsKeyPattern", "id": "construct-library.GreeterBucket.grantPutAcl.parameter.objectsKeyPattern", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, ], "usage": "grantPutAcl(identity: IGrantable, objectsKeyPattern?: str): Grant", }, - Object { + { "displayName": "grantRead", - "docs": Object { + "docs": { "remarks": "If encryption is used, permission to use the key to decrypt the contents of the bucket will also be granted to the same principal.", "summary": "Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User).", }, "fqn": "construct-library.GreeterBucket.grantRead", "id": "construct-library.GreeterBucket.grantRead", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "identity", - "docs": Object { + "docs": { "summary": "The principal.", }, "fqn": "construct-library.GreeterBucket.grantRead.parameter.identity", "id": "construct-library.GreeterBucket.grantRead.parameter.identity", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -573,25 +573,25 @@ of the bucket will also be granted to the same principal.", ], }, }, - Object { + { "default": undefined, "displayName": "objectsKeyPattern", - "docs": Object { + "docs": { "summary": "Restrict the permission to a certain key pattern (default '*').", }, "fqn": "construct-library.GreeterBucket.grantRead.parameter.objectsKeyPattern", "id": "construct-library.GreeterBucket.grantRead.parameter.objectsKeyPattern", "optional": true, - "type": Object { + "type": { "formattingPattern": "any", }, }, ], "usage": "grantRead(identity: IGrantable, objectsKeyPattern?: any): Grant", }, - Object { + { "displayName": "grantReadWrite", - "docs": Object { + "docs": { "remarks": "If an encryption key is used, permission to use the key for encrypt/decrypt will also be granted. @@ -606,18 +606,18 @@ use the {@link grantPutAcl} method.", }, "fqn": "construct-library.GreeterBucket.grantReadWrite", "id": "construct-library.GreeterBucket.grantReadWrite", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "identity", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.grantReadWrite.parameter.identity", "id": "construct-library.GreeterBucket.grantReadWrite.parameter.identity", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -627,23 +627,23 @@ use the {@link grantPutAcl} method.", ], }, }, - Object { + { "default": undefined, "displayName": "objectsKeyPattern", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.grantReadWrite.parameter.objectsKeyPattern", "id": "construct-library.GreeterBucket.grantReadWrite.parameter.objectsKeyPattern", "optional": true, - "type": Object { + "type": { "formattingPattern": "any", }, }, ], "usage": "grantReadWrite(identity: IGrantable, objectsKeyPattern?: any): Grant", }, - Object { + { "displayName": "grantWrite", - "docs": Object { + "docs": { "remarks": "If encryption is used, permission to use the key to encrypt the contents of written files will also be granted to the same principal. @@ -658,18 +658,18 @@ use the {@link grantPutAcl} method.", }, "fqn": "construct-library.GreeterBucket.grantWrite", "id": "construct-library.GreeterBucket.grantWrite", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "identity", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.grantWrite.parameter.identity", "id": "construct-library.GreeterBucket.grantWrite.parameter.identity", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -679,43 +679,43 @@ use the {@link grantPutAcl} method.", ], }, }, - Object { + { "default": undefined, "displayName": "objectsKeyPattern", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.grantWrite.parameter.objectsKeyPattern", "id": "construct-library.GreeterBucket.grantWrite.parameter.objectsKeyPattern", "optional": true, - "type": Object { + "type": { "formattingPattern": "any", }, }, ], "usage": "grantWrite(identity: IGrantable, objectsKeyPattern?: any): Grant", }, - Object { + { "displayName": "onCloudTrailEvent", - "docs": Object { + "docs": { "remarks": "Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.", "summary": "Define a CloudWatch event that triggers when something happens to this repository.", }, "fqn": "construct-library.GreeterBucket.onCloudTrailEvent", "id": "construct-library.GreeterBucket.onCloudTrailEvent", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "construct-library.GreeterBucket.onCloudTrailEvent.parameter.options", "id": "construct-library.GreeterBucket.onCloudTrailEvent.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnCloudTrailBucketEventOptions", "fqn": "@aws-cdk/aws-s3.OnCloudTrailBucketEventOptions", "id": "@aws-cdk/aws-s3.OnCloudTrailBucketEventOptions", @@ -728,9 +728,9 @@ that captures the event. This method will not create the Trail.", ], "usage": "onCloudTrailEvent(options?: OnCloudTrailBucketEventOptions): Rule", }, - Object { + { "displayName": "onCloudTrailPutObject", - "docs": Object { + "docs": { "remarks": "Note that some tools like \`aws s3 cp\` will automatically use either PutObject or the multipart upload API depending on the file size, so using \`onCloudTrailWriteObject\` may be preferable. @@ -741,20 +741,20 @@ that captures the event. This method will not create the Trail.", }, "fqn": "construct-library.GreeterBucket.onCloudTrailPutObject", "id": "construct-library.GreeterBucket.onCloudTrailPutObject", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "construct-library.GreeterBucket.onCloudTrailPutObject.parameter.options", "id": "construct-library.GreeterBucket.onCloudTrailPutObject.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnCloudTrailBucketEventOptions", "fqn": "@aws-cdk/aws-s3.OnCloudTrailBucketEventOptions", "id": "@aws-cdk/aws-s3.OnCloudTrailBucketEventOptions", @@ -767,9 +767,9 @@ that captures the event. This method will not create the Trail.", ], "usage": "onCloudTrailPutObject(options?: OnCloudTrailBucketEventOptions): Rule", }, - Object { + { "displayName": "onCloudTrailWriteObject", - "docs": Object { + "docs": { "remarks": "This includes the events PutObject, CopyObject, and CompleteMultipartUpload. @@ -783,20 +783,20 @@ that captures the event. This method will not create the Trail.", }, "fqn": "construct-library.GreeterBucket.onCloudTrailWriteObject", "id": "construct-library.GreeterBucket.onCloudTrailWriteObject", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "construct-library.GreeterBucket.onCloudTrailWriteObject.parameter.options", "id": "construct-library.GreeterBucket.onCloudTrailWriteObject.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnCloudTrailBucketEventOptions", "fqn": "@aws-cdk/aws-s3.OnCloudTrailBucketEventOptions", "id": "@aws-cdk/aws-s3.OnCloudTrailBucketEventOptions", @@ -809,20 +809,20 @@ that captures the event. This method will not create the Trail.", ], "usage": "onCloudTrailWriteObject(options?: OnCloudTrailBucketEventOptions): Rule", }, - Object { + { "displayName": "s3UrlForObject", - "docs": Object { + "docs": { "remarks": "- \`s3://onlybucket\` - \`s3://bucket/key\`", "summary": "The S3 URL of an S3 object. For example:.", }, "fqn": "construct-library.GreeterBucket.s3UrlForObject", "id": "construct-library.GreeterBucket.s3UrlForObject", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "key", - "docs": Object { + "docs": { "remarks": "If not specified, the S3 URL of the bucket is returned.", "summary": "The S3 key of the object.", @@ -830,16 +830,16 @@ bucket is returned.", "fqn": "construct-library.GreeterBucket.s3UrlForObject.parameter.key", "id": "construct-library.GreeterBucket.s3UrlForObject.parameter.key", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, ], "usage": "s3UrlForObject(key?: str): str", }, - Object { + { "displayName": "transferAccelerationUrlForObject", - "docs": Object { + "docs": { "remarks": "Specify \`dualStack: true\` at the options for dual-stack endpoint (connect to the bucket over IPv6). For example: @@ -849,11 +849,11 @@ for dual-stack endpoint (connect to the bucket over IPv6). For example: }, "fqn": "construct-library.GreeterBucket.transferAccelerationUrlForObject", "id": "construct-library.GreeterBucket.transferAccelerationUrlForObject", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "key", - "docs": Object { + "docs": { "remarks": "If not specified, the URL of the bucket is returned.", "summary": "The S3 key of the object.", @@ -861,23 +861,23 @@ bucket is returned.", "fqn": "construct-library.GreeterBucket.transferAccelerationUrlForObject.parameter.key", "id": "construct-library.GreeterBucket.transferAccelerationUrlForObject.parameter.key", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for generating URL.", }, "fqn": "construct-library.GreeterBucket.transferAccelerationUrlForObject.parameter.options", "id": "construct-library.GreeterBucket.transferAccelerationUrlForObject.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "TransferAccelerationUrlOptions", "fqn": "@aws-cdk/aws-s3.TransferAccelerationUrlOptions", "id": "@aws-cdk/aws-s3.TransferAccelerationUrlOptions", @@ -890,9 +890,9 @@ bucket is returned.", ], "usage": "transferAccelerationUrlForObject(key?: str, options?: TransferAccelerationUrlOptions): str", }, - Object { + { "displayName": "urlForObject", - "docs": Object { + "docs": { "remarks": "- \`https://s3.us-west-1.amazonaws.com/onlybucket\` - \`https://s3.us-west-1.amazonaws.com/bucket/key\` - \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\`", @@ -900,11 +900,11 @@ bucket is returned.", }, "fqn": "construct-library.GreeterBucket.urlForObject", "id": "construct-library.GreeterBucket.urlForObject", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "key", - "docs": Object { + "docs": { "remarks": "If not specified, the URL of the bucket is returned.", "summary": "The S3 key of the object.", @@ -912,16 +912,16 @@ bucket is returned.", "fqn": "construct-library.GreeterBucket.urlForObject.parameter.key", "id": "construct-library.GreeterBucket.urlForObject.parameter.key", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, ], "usage": "urlForObject(key?: str): str", }, - Object { + { "displayName": "virtualHostedUrlForObject", - "docs": Object { + "docs": { "remarks": "- \`https://only-bucket.s3.us-west-1.amazonaws.com\` - \`https://bucket.s3.us-west-1.amazonaws.com/key\` - \`https://bucket.s3.amazonaws.com/key\` @@ -930,11 +930,11 @@ bucket is returned.", }, "fqn": "construct-library.GreeterBucket.virtualHostedUrlForObject", "id": "construct-library.GreeterBucket.virtualHostedUrlForObject", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "key", - "docs": Object { + "docs": { "remarks": "If not specified, the URL of the bucket is returned.", "summary": "The S3 key of the object.", @@ -942,23 +942,23 @@ bucket is returned.", "fqn": "construct-library.GreeterBucket.virtualHostedUrlForObject.parameter.key", "id": "construct-library.GreeterBucket.virtualHostedUrlForObject.parameter.key", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for generating URL.", }, "fqn": "construct-library.GreeterBucket.virtualHostedUrlForObject.parameter.options", "id": "construct-library.GreeterBucket.virtualHostedUrlForObject.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "VirtualHostedStyleUrlOptions", "fqn": "@aws-cdk/aws-s3.VirtualHostedStyleUrlOptions", "id": "@aws-cdk/aws-s3.VirtualHostedStyleUrlOptions", @@ -971,27 +971,27 @@ bucket is returned.", ], "usage": "virtualHostedUrlForObject(key?: str, options?: VirtualHostedStyleUrlOptions): str", }, - Object { + { "displayName": "addCorsRule", - "docs": Object { + "docs": { "summary": "Adds a cross-origin access configuration for objects in an Amazon S3 bucket.", }, "fqn": "construct-library.GreeterBucket.addCorsRule", "id": "construct-library.GreeterBucket.addCorsRule", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "rule", - "docs": Object { + "docs": { "summary": "The CORS configuration rule to add.", }, "fqn": "construct-library.GreeterBucket.addCorsRule.parameter.rule", "id": "construct-library.GreeterBucket.addCorsRule.parameter.rule", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "CorsRule", "fqn": "@aws-cdk/aws-s3.CorsRule", "id": "@aws-cdk/aws-s3.CorsRule", @@ -1004,27 +1004,27 @@ bucket is returned.", ], "usage": "addCorsRule(rule: CorsRule): void", }, - Object { + { "displayName": "addInventory", - "docs": Object { + "docs": { "summary": "Add an inventory configuration.", }, "fqn": "construct-library.GreeterBucket.addInventory", "id": "construct-library.GreeterBucket.addInventory", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "inventory", - "docs": Object { + "docs": { "summary": "configuration to add.", }, "fqn": "construct-library.GreeterBucket.addInventory.parameter.inventory", "id": "construct-library.GreeterBucket.addInventory.parameter.inventory", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "Inventory", "fqn": "@aws-cdk/aws-s3.Inventory", "id": "@aws-cdk/aws-s3.Inventory", @@ -1037,27 +1037,27 @@ bucket is returned.", ], "usage": "addInventory(inventory: Inventory): void", }, - Object { + { "displayName": "addLifecycleRule", - "docs": Object { + "docs": { "summary": "Add a lifecycle rule to the bucket.", }, "fqn": "construct-library.GreeterBucket.addLifecycleRule", "id": "construct-library.GreeterBucket.addLifecycleRule", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "rule", - "docs": Object { + "docs": { "summary": "The rule to add.", }, "fqn": "construct-library.GreeterBucket.addLifecycleRule.parameter.rule", "id": "construct-library.GreeterBucket.addLifecycleRule.parameter.rule", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "LifecycleRule", "fqn": "@aws-cdk/aws-s3.LifecycleRule", "id": "@aws-cdk/aws-s3.LifecycleRule", @@ -1070,27 +1070,27 @@ bucket is returned.", ], "usage": "addLifecycleRule(rule: LifecycleRule): void", }, - Object { + { "displayName": "addMetric", - "docs": Object { + "docs": { "summary": "Adds a metrics configuration for the CloudWatch request metrics from the bucket.", }, "fqn": "construct-library.GreeterBucket.addMetric", "id": "construct-library.GreeterBucket.addMetric", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "metric", - "docs": Object { + "docs": { "summary": "The metric configuration to add.", }, "fqn": "construct-library.GreeterBucket.addMetric.parameter.metric", "id": "construct-library.GreeterBucket.addMetric.parameter.metric", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "BucketMetrics", "fqn": "@aws-cdk/aws-s3.BucketMetrics", "id": "@aws-cdk/aws-s3.BucketMetrics", @@ -1103,30 +1103,30 @@ bucket is returned.", ], "usage": "addMetric(metric: BucketMetrics): void", }, - Object { + { "displayName": "greet", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.greet", "id": "construct-library.GreeterBucket.greet", - "parameters": Array [], + "parameters": [], "usage": "greet(): void", }, ], - "interfaces": Array [], - "properties": Array [ - Object { + "interfaces": [], + "properties": [ + { "default": undefined, "displayName": "node", - "docs": Object { + "docs": { "summary": "The construct tree node associated with this construct.", }, "fqn": "construct-library.GreeterBucket.property.node", "id": "construct-library.GreeterBucket.property.node", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "ConstructNode", "fqn": "@aws-cdk/core.ConstructNode", "id": "@aws-cdk/core.ConstructNode", @@ -1137,10 +1137,10 @@ bucket is returned.", }, "usage": "node: ConstructNode;", }, - Object { + { "default": undefined, "displayName": "env", - "docs": Object { + "docs": { "remarks": "For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; @@ -1152,10 +1152,10 @@ that might be different than the stack they were imported into.", "fqn": "construct-library.GreeterBucket.property.env", "id": "construct-library.GreeterBucket.property.env", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "ResourceEnvironment", "fqn": "@aws-cdk/core.ResourceEnvironment", "id": "@aws-cdk/core.ResourceEnvironment", @@ -1166,19 +1166,19 @@ that might be different than the stack they were imported into.", }, "usage": "env: ResourceEnvironment;", }, - Object { + { "default": undefined, "displayName": "stack", - "docs": Object { + "docs": { "summary": "The stack in which this resource is defined.", }, "fqn": "construct-library.GreeterBucket.property.stack", "id": "construct-library.GreeterBucket.property.stack", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "Stack", "fqn": "@aws-cdk/core.Stack", "id": "@aws-cdk/core.Stack", @@ -1189,117 +1189,117 @@ that might be different than the stack they were imported into.", }, "usage": "stack: Stack;", }, - Object { + { "default": undefined, "displayName": "bucketArn", - "docs": Object { + "docs": { "summary": "The ARN of the bucket.", }, "fqn": "construct-library.GreeterBucket.property.bucketArn", "id": "construct-library.GreeterBucket.property.bucketArn", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "bucketArn: str;", }, - Object { + { "default": undefined, "displayName": "bucketDomainName", - "docs": Object { + "docs": { "summary": "The IPv4 DNS name of the specified bucket.", }, "fqn": "construct-library.GreeterBucket.property.bucketDomainName", "id": "construct-library.GreeterBucket.property.bucketDomainName", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "bucketDomainName: str;", }, - Object { + { "default": undefined, "displayName": "bucketDualStackDomainName", - "docs": Object { + "docs": { "summary": "The IPv6 DNS name of the specified bucket.", }, "fqn": "construct-library.GreeterBucket.property.bucketDualStackDomainName", "id": "construct-library.GreeterBucket.property.bucketDualStackDomainName", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "bucketDualStackDomainName: str;", }, - Object { + { "default": undefined, "displayName": "bucketName", - "docs": Object { + "docs": { "summary": "The name of the bucket.", }, "fqn": "construct-library.GreeterBucket.property.bucketName", "id": "construct-library.GreeterBucket.property.bucketName", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "bucketName: str;", }, - Object { + { "default": undefined, "displayName": "bucketRegionalDomainName", - "docs": Object { + "docs": { "summary": "The regional domain name of the specified bucket.", }, "fqn": "construct-library.GreeterBucket.property.bucketRegionalDomainName", "id": "construct-library.GreeterBucket.property.bucketRegionalDomainName", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "bucketRegionalDomainName: str;", }, - Object { + { "default": undefined, "displayName": "bucketWebsiteDomainName", - "docs": Object { + "docs": { "summary": "The Domain name of the static website.", }, "fqn": "construct-library.GreeterBucket.property.bucketWebsiteDomainName", "id": "construct-library.GreeterBucket.property.bucketWebsiteDomainName", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "bucketWebsiteDomainName: str;", }, - Object { + { "default": undefined, "displayName": "bucketWebsiteUrl", - "docs": Object { + "docs": { "summary": "The URL of the static website.", }, "fqn": "construct-library.GreeterBucket.property.bucketWebsiteUrl", "id": "construct-library.GreeterBucket.property.bucketWebsiteUrl", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "bucketWebsiteUrl: str;", }, - Object { + { "default": undefined, "displayName": "encryptionKey", - "docs": Object { + "docs": { "summary": "Optional KMS encryption key associated with this bucket.", }, "fqn": "construct-library.GreeterBucket.property.encryptionKey", "id": "construct-library.GreeterBucket.property.encryptionKey", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IKey", "fqn": "@aws-cdk/aws-kms.IKey", "id": "@aws-cdk/aws-kms.IKey", @@ -1310,24 +1310,24 @@ that might be different than the stack they were imported into.", }, "usage": "encryptionKey: IKey;", }, - Object { + { "default": undefined, "displayName": "isWebsite", - "docs": Object { + "docs": { "summary": "If this bucket has been configured for static website hosting.", }, "fqn": "construct-library.GreeterBucket.property.isWebsite", "id": "construct-library.GreeterBucket.property.isWebsite", "optional": true, - "type": Object { + "type": { "formattingPattern": "bool", }, "usage": "isWebsite: bool;", }, - Object { + { "default": undefined, "displayName": "policy", - "docs": Object { + "docs": { "remarks": "If \`autoCreatePolicy\` is true, a \`BucketPolicy\` will be created upon the first call to addToResourcePolicy(s).", "summary": "The resource policy associated with this bucket.", @@ -1335,10 +1335,10 @@ first call to addToResourcePolicy(s).", "fqn": "construct-library.GreeterBucket.property.policy", "id": "construct-library.GreeterBucket.property.policy", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "BucketPolicy", "fqn": "@aws-cdk/aws-s3.BucketPolicy", "id": "@aws-cdk/aws-s3.BucketPolicy", @@ -1350,26 +1350,26 @@ first call to addToResourcePolicy(s).", "usage": "policy: BucketPolicy;", }, ], - "staticMethods": Array [ - Object { + "staticMethods": [ + { "displayName": "isResource", - "docs": Object { + "docs": { "summary": "Check whether the given construct is a Resource.", }, "fqn": "construct-library.GreeterBucket.isResource", "id": "construct-library.GreeterBucket.isResource", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "construct", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.isResource.parameter.construct", "id": "construct-library.GreeterBucket.isResource.parameter.construct", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IConstruct", "fqn": "@aws-cdk/core.IConstruct", "id": "@aws-cdk/core.IConstruct", @@ -1380,44 +1380,44 @@ first call to addToResourcePolicy(s).", }, }, ], - "usage": "bring { GreeterBucket } from \\"construct-library\\"; + "usage": "bring { GreeterBucket } from "construct-library"; GreeterBucket.isResource(construct: IConstruct);", }, - Object { + { "displayName": "fromBucketArn", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.fromBucketArn", "id": "construct-library.GreeterBucket.fromBucketArn", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "bucketArn", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.fromBucketArn.parameter.bucketArn", "id": "construct-library.GreeterBucket.fromBucketArn.parameter.bucketArn", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, }, ], - "usage": "bring { GreeterBucket } from \\"construct-library\\"; + "usage": "bring { GreeterBucket } from "construct-library"; GreeterBucket.fromBucketArn(bucketArn: str);", }, - Object { + { "displayName": "fromBucketAttributes", - "docs": Object { + "docs": { "summary": "Creates a Bucket construct that represents an external bucket.", }, "fqn": "construct-library.GreeterBucket.fromBucketAttributes", "id": "construct-library.GreeterBucket.fromBucketAttributes", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "attrs", - "docs": Object { + "docs": { "remarks": "Can be obtained from a call to \`bucket.export()\` or manually created.", "summary": "A \`BucketAttributes\` object.", @@ -1425,10 +1425,10 @@ GreeterBucket.fromBucketArn(bucketArn: str);", "fqn": "construct-library.GreeterBucket.fromBucketAttributes.parameter.attrs", "id": "construct-library.GreeterBucket.fromBucketAttributes.parameter.attrs", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "BucketAttributes", "fqn": "@aws-cdk/aws-s3.BucketAttributes", "id": "@aws-cdk/aws-s3.BucketAttributes", @@ -1439,67 +1439,67 @@ GreeterBucket.fromBucketArn(bucketArn: str);", }, }, ], - "usage": "bring { GreeterBucket } from \\"construct-library\\"; + "usage": "bring { GreeterBucket } from "construct-library"; GreeterBucket.fromBucketAttributes(attrs: BucketAttributes);", }, - Object { + { "displayName": "fromBucketName", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.fromBucketName", "id": "construct-library.GreeterBucket.fromBucketName", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "bucketName", - "docs": Object {}, + "docs": {}, "fqn": "construct-library.GreeterBucket.fromBucketName.parameter.bucketName", "id": "construct-library.GreeterBucket.fromBucketName.parameter.bucketName", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, }, ], - "usage": "bring { GreeterBucket } from \\"construct-library\\"; + "usage": "bring { GreeterBucket } from "construct-library"; GreeterBucket.fromBucketName(bucketName: str);", }, - Object { + { "displayName": "validateBucketName", - "docs": Object { + "docs": { "summary": "Thrown an exception if the given bucket name is not valid.", }, "fqn": "construct-library.GreeterBucket.validateBucketName", "id": "construct-library.GreeterBucket.validateBucketName", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "physicalName", - "docs": Object { + "docs": { "summary": "name of the bucket.", }, "fqn": "construct-library.GreeterBucket.validateBucketName.parameter.physicalName", "id": "construct-library.GreeterBucket.validateBucketName.parameter.physicalName", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, }, ], - "usage": "bring { GreeterBucket } from \\"construct-library\\"; + "usage": "bring { GreeterBucket } from "construct-library"; GreeterBucket.validateBucketName(physicalName: str);", }, ], }, ], - "enums": Array [], - "interfaces": Array [], - "structs": Array [], + "enums": [], + "interfaces": [], + "structs": [], }, "language": "wing", - "metadata": Object { + "metadata": { "packageName": "construct-library", "packageVersion": "0.0.0", "submodule": undefined, @@ -1512,70 +1512,70 @@ for construct libraries.", } `; -exports[`wing single package 2`] = ` +exports[`wing > single package 2`] = ` "# construct-library This is a test project to make sure the \`jsii-docgen\` cli property renders API documentation for construct libraries. -# API Reference +# API Reference -## Resources +## Resources -### GreeterBucket +### GreeterBucket -#### Initializers +#### Initializers \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; new GreeterBucket(props?: BucketProps); \`\`\` | **Name** | **Type** | **Description** | | --- | --- | --- | -| props | @aws-cdk/aws-s3.BucketProps | *No description.* | +| props | @aws-cdk/aws-s3.BucketProps | *No description.* | --- -##### \`props\`Optional +##### \`props\`Optional - *Type:* @aws-cdk/aws-s3.BucketProps --- -#### Methods +#### Methods | **Name** | **Description** | | --- | --- | -| applyRemovalPolicy | Apply the given removal policy to this resource. | -| addEventNotification | Adds a bucket notification event destination. | -| addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | -| addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | -| arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | -| grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | -| grantPublicAccess | Allows unrestricted access to objects from this bucket. | -| grantPut | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | -| grantPutAcl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | -| grantRead | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grantReadWrite | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grantWrite | Grant write permissions to this bucket to an IAM principal. | -| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | -| onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | -| onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3UrlForObject | The S3 URL of an S3 object. For example:. | -| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | -| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | -| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | -| addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | -| addInventory | Add an inventory configuration. | -| addLifecycleRule | Add a lifecycle rule to the bucket. | -| addMetric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | -| greet | *No description.* | +| applyRemovalPolicy | Apply the given removal policy to this resource. | +| addEventNotification | Adds a bucket notification event destination. | +| addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | +| addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | +| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | +| grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | +| grantPublicAccess | Allows unrestricted access to objects from this bucket. | +| grantPut | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | +| grantPutAcl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | +| grantRead | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grantReadWrite | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grantWrite | Grant write permissions to this bucket to an IAM principal. | +| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | +| onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | +| onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | +| s3UrlForObject | The S3 URL of an S3 object. For example:. | +| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | +| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | +| addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | +| addInventory | Add an inventory configuration. | +| addLifecycleRule | Add a lifecycle rule to the bucket. | +| addMetric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | +| greet | *No description.* | --- -##### \`applyRemovalPolicy\` +##### \`applyRemovalPolicy\` \`\`\`wing applyRemovalPolicy(policy: RemovalPolicy): void @@ -1591,13 +1591,13 @@ to be replaced. The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). -###### \`policy\`Required +###### \`policy\`Required - *Type:* @aws-cdk/core.RemovalPolicy --- -##### \`addEventNotification\` +##### \`addEventNotification\` \`\`\`wing addEventNotification(event: EventType, dest: IBucketNotificationDestination, ...filters: Array): void @@ -1616,7 +1616,7 @@ Adds a bucket notification event destination. \`\`\` -###### \`event\`Required +###### \`event\`Required - *Type:* @aws-cdk/aws-s3.EventType @@ -1624,7 +1624,7 @@ The event to trigger the notification. --- -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -1632,7 +1632,7 @@ The notification destination (Lambda, SNS Topic or SQS Queue). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -1644,7 +1644,7 @@ for details about allowed filter rules. --- -##### \`addObjectCreatedNotification\` +##### \`addObjectCreatedNotification\` \`\`\`wing addObjectCreatedNotification(dest: IBucketNotificationDestination, ...filters: Array): void @@ -1655,7 +1655,7 @@ Subscribes a destination to receive notifications when an object is created in t This is identical to calling \`onEvent(EventType.OBJECT_CREATED)\`. -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -1663,7 +1663,7 @@ The notification destination (see onEvent). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -1671,7 +1671,7 @@ Filters (see onEvent). --- -##### \`addObjectRemovedNotification\` +##### \`addObjectRemovedNotification\` \`\`\`wing addObjectRemovedNotification(dest: IBucketNotificationDestination, ...filters: Array): void @@ -1682,7 +1682,7 @@ Subscribes a destination to receive notifications when an object is removed from This is identical to calling \`onEvent(EventType.OBJECT_REMOVED)\`. -###### \`dest\`Required +###### \`dest\`Required - *Type:* @aws-cdk/aws-s3.IBucketNotificationDestination @@ -1690,7 +1690,7 @@ The notification destination (see onEvent). --- -###### \`filters\`Required +###### \`filters\`Required - *Type:* @aws-cdk/aws-s3.NotificationKeyFilter @@ -1698,7 +1698,7 @@ Filters (see onEvent). --- -##### \`addToResourcePolicy\` +##### \`addToResourcePolicy\` \`\`\`wing addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult @@ -1712,7 +1712,7 @@ it's not possible to tell whether the bucket already has a policy attached, let alone to re-use that policy to add more statements to it. So it's safest to do nothing in these cases. -###### \`permission\`Required +###### \`permission\`Required - *Type:* @aws-cdk/aws-iam.PolicyStatement @@ -1720,7 +1720,7 @@ the policy statement to be added to the bucket's policy. --- -##### \`arnForObjects\` +##### \`arnForObjects\` \`\`\`wing arnForObjects(keyPattern: str): str @@ -1728,19 +1728,19 @@ arnForObjects(keyPattern: str): str Returns an ARN that represents all objects within the bucket that match the key pattern specified. -To represent all keys, specify \`\`\\"*\\"\`\`. +To represent all keys, specify \`\`"*"\`\`. If you need to specify a keyPattern with multiple components, concatenate them into a single string, e.g.: arnForObjects(\`home/\${team}/\${user}/*\`) -###### \`keyPattern\`Required +###### \`keyPattern\`Required - *Type:* str --- -##### \`grantDelete\` +##### \`grantDelete\` \`\`\`wing grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1748,7 +1748,7 @@ grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -1756,7 +1756,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -1764,7 +1764,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantPublicAccess\` +##### \`grantPublicAccess\` \`\`\`wing grantPublicAccess(...allowedActions: Array, keyPrefix?: str): Grant @@ -1777,8 +1777,8 @@ in this bucket, which is useful for when you configure your bucket as a website and want everyone to be able to read objects in the bucket without needing to authenticate. -Without arguments, this method will grant read (\\"s3:GetObject\\") access to -all objects (\\"*\\") in the bucket. +Without arguments, this method will grant read ("s3:GetObject") access to +all objects ("*") in the bucket. The method returns the \`iam.Grant\` object, which can then be modified as needed. For example, you can add a condition that will restrict access only @@ -1791,25 +1791,25 @@ Note that if this \`IBucket\` refers to an existing bucket, possibly not managed by CloudFormation, this method will have no effect, since it's impossible to modify the policy of an existing bucket. -###### \`allowedActions\`Required +###### \`allowedActions\`Required - *Type:* str the set of S3 actions to allow. -Default is \\"s3:GetObject\\". +Default is "s3:GetObject". --- -###### \`keyPrefix\`Optional +###### \`keyPrefix\`Optional - *Type:* str -the prefix of S3 object keys (e.g. \`home/*\`). Default is \\"*\\". +the prefix of S3 object keys (e.g. \`home/*\`). Default is "*". --- -##### \`grantPut\` +##### \`grantPut\` \`\`\`wing grantPut(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1820,7 +1820,7 @@ Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM princip If encryption is used, permission to use the key to encrypt the contents of written files will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -1828,7 +1828,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -1836,7 +1836,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantPutAcl\` +##### \`grantPutAcl\` \`\`\`wing grantPutAcl(identity: IGrantable, objectsKeyPattern?: str): Grant @@ -1848,19 +1848,19 @@ If your application has the '@aws-cdk/aws-s3:grantWriteWithoutAcl' feature flag calling {@link grantWrite} or {@link grantReadWrite} no longer grants permissions to modify the ACLs of the objects; in this case, if you need to modify object ACLs, call this method explicitly. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* str --- -##### \`grantRead\` +##### \`grantRead\` \`\`\`wing grantRead(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1871,7 +1871,7 @@ Grant read permissions for this bucket and it's contents to an IAM principal (Ro If encryption is used, permission to use the key to decrypt the contents of the bucket will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -1879,7 +1879,7 @@ The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -1887,7 +1887,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantReadWrite\` +##### \`grantReadWrite\` \`\`\`wing grantReadWrite(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1906,19 +1906,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any --- -##### \`grantWrite\` +##### \`grantWrite\` \`\`\`wing grantWrite(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1937,19 +1937,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any --- -##### \`onCloudTrailEvent\` +##### \`onCloudTrailEvent\` \`\`\`wing onCloudTrailEvent(options?: OnCloudTrailBucketEventOptions): Rule @@ -1960,7 +1960,7 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -1968,7 +1968,7 @@ Options for adding the rule. --- -##### \`onCloudTrailPutObject\` +##### \`onCloudTrailPutObject\` \`\`\`wing onCloudTrailPutObject(options?: OnCloudTrailBucketEventOptions): Rule @@ -1983,7 +1983,7 @@ so using \`onCloudTrailWriteObject\` may be preferable. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -1991,7 +1991,7 @@ Options for adding the rule. --- -##### \`onCloudTrailWriteObject\` +##### \`onCloudTrailWriteObject\` \`\`\`wing onCloudTrailWriteObject(options?: OnCloudTrailBucketEventOptions): Rule @@ -2009,7 +2009,7 @@ so using this method may be preferable to \`onCloudTrailPutObject\`. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.OnCloudTrailBucketEventOptions @@ -2017,7 +2017,7 @@ Options for adding the rule. --- -##### \`s3UrlForObject\` +##### \`s3UrlForObject\` \`\`\`wing s3UrlForObject(key?: str): str @@ -2028,7 +2028,7 @@ The S3 URL of an S3 object. For example:. \`s3://onlybucket\` - \`s3://bucket/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -2039,7 +2039,7 @@ bucket is returned. --- -##### \`transferAccelerationUrlForObject\` +##### \`transferAccelerationUrlForObject\` \`\`\`wing transferAccelerationUrlForObject(key?: str, options?: TransferAccelerationUrlOptions): str @@ -2053,7 +2053,7 @@ for dual-stack endpoint (connect to the bucket over IPv6). For example: - \`https://bucket.s3-accelerate.amazonaws.com\` - \`https://bucket.s3-accelerate.amazonaws.com/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -2064,7 +2064,7 @@ bucket is returned. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.TransferAccelerationUrlOptions @@ -2072,7 +2072,7 @@ Options for generating URL. --- -##### \`urlForObject\` +##### \`urlForObject\` \`\`\`wing urlForObject(key?: str): str @@ -2084,7 +2084,7 @@ The https URL of an S3 object. Specify \`regional: false\` at the options for no - \`https://s3.us-west-1.amazonaws.com/bucket/key\` - \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -2095,7 +2095,7 @@ bucket is returned. --- -##### \`virtualHostedUrlForObject\` +##### \`virtualHostedUrlForObject\` \`\`\`wing virtualHostedUrlForObject(key?: str, options?: VirtualHostedStyleUrlOptions): str @@ -2108,7 +2108,7 @@ The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the - \`https://bucket.s3.amazonaws.com/key\` - \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -2119,7 +2119,7 @@ bucket is returned. --- -###### \`options\`Optional +###### \`options\`Optional - *Type:* @aws-cdk/aws-s3.VirtualHostedStyleUrlOptions @@ -2127,7 +2127,7 @@ Options for generating URL. --- -##### \`addCorsRule\` +##### \`addCorsRule\` \`\`\`wing addCorsRule(rule: CorsRule): void @@ -2135,7 +2135,7 @@ addCorsRule(rule: CorsRule): void Adds a cross-origin access configuration for objects in an Amazon S3 bucket. -###### \`rule\`Required +###### \`rule\`Required - *Type:* @aws-cdk/aws-s3.CorsRule @@ -2143,7 +2143,7 @@ The CORS configuration rule to add. --- -##### \`addInventory\` +##### \`addInventory\` \`\`\`wing addInventory(inventory: Inventory): void @@ -2151,7 +2151,7 @@ addInventory(inventory: Inventory): void Add an inventory configuration. -###### \`inventory\`Required +###### \`inventory\`Required - *Type:* @aws-cdk/aws-s3.Inventory @@ -2159,7 +2159,7 @@ configuration to add. --- -##### \`addLifecycleRule\` +##### \`addLifecycleRule\` \`\`\`wing addLifecycleRule(rule: LifecycleRule): void @@ -2167,7 +2167,7 @@ addLifecycleRule(rule: LifecycleRule): void Add a lifecycle rule to the bucket. -###### \`rule\`Required +###### \`rule\`Required - *Type:* @aws-cdk/aws-s3.LifecycleRule @@ -2175,7 +2175,7 @@ The rule to add. --- -##### \`addMetric\` +##### \`addMetric\` \`\`\`wing addMetric(metric: BucketMetrics): void @@ -2183,7 +2183,7 @@ addMetric(metric: BucketMetrics): void Adds a metrics configuration for the CloudWatch request metrics from the bucket. -###### \`metric\`Required +###### \`metric\`Required - *Type:* @aws-cdk/aws-s3.BucketMetrics @@ -2191,65 +2191,65 @@ The metric configuration to add. --- -##### \`greet\` +##### \`greet\` \`\`\`wing greet(): void \`\`\` -#### Static Functions +#### Static Functions | **Name** | **Description** | | --- | --- | -| isResource | Check whether the given construct is a Resource. | -| fromBucketArn | *No description.* | -| fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | -| fromBucketName | *No description.* | -| validateBucketName | Thrown an exception if the given bucket name is not valid. | +| isResource | Check whether the given construct is a Resource. | +| fromBucketArn | *No description.* | +| fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | +| fromBucketName | *No description.* | +| validateBucketName | Thrown an exception if the given bucket name is not valid. | --- -##### \`isResource\` +##### \`isResource\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.isResource(construct: IConstruct); \`\`\` Check whether the given construct is a Resource. -###### \`construct\`Required +###### \`construct\`Required - *Type:* @aws-cdk/core.IConstruct --- -##### \`fromBucketArn\` +##### \`fromBucketArn\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.fromBucketArn(bucketArn: str); \`\`\` -###### \`bucketArn\`Required +###### \`bucketArn\`Required - *Type:* str --- -##### \`fromBucketAttributes\` +##### \`fromBucketAttributes\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.fromBucketAttributes(attrs: BucketAttributes); \`\`\` Creates a Bucket construct that represents an external bucket. -###### \`attrs\`Required +###### \`attrs\`Required - *Type:* @aws-cdk/aws-s3.BucketAttributes @@ -2260,31 +2260,31 @@ Can be obtained from a call to --- -##### \`fromBucketName\` +##### \`fromBucketName\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.fromBucketName(bucketName: str); \`\`\` -###### \`bucketName\`Required +###### \`bucketName\`Required - *Type:* str --- -##### \`validateBucketName\` +##### \`validateBucketName\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.validateBucketName(physicalName: str); \`\`\` Thrown an exception if the given bucket name is not valid. -###### \`physicalName\`Required +###### \`physicalName\`Required - *Type:* str @@ -2292,27 +2292,27 @@ name of the bucket. --- -#### Properties +#### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | @aws-cdk/core.ConstructNode | The construct tree node associated with this construct. | -| env | @aws-cdk/core.ResourceEnvironment | The environment this resource belongs to. | -| stack | @aws-cdk/core.Stack | The stack in which this resource is defined. | -| bucketArn | str | The ARN of the bucket. | -| bucketDomainName | str | The IPv4 DNS name of the specified bucket. | -| bucketDualStackDomainName | str | The IPv6 DNS name of the specified bucket. | -| bucketName | str | The name of the bucket. | -| bucketRegionalDomainName | str | The regional domain name of the specified bucket. | -| bucketWebsiteDomainName | str | The Domain name of the static website. | -| bucketWebsiteUrl | str | The URL of the static website. | -| encryptionKey | @aws-cdk/aws-kms.IKey | Optional KMS encryption key associated with this bucket. | -| isWebsite | bool | If this bucket has been configured for static website hosting. | -| policy | @aws-cdk/aws-s3.BucketPolicy | The resource policy associated with this bucket. | +| node | @aws-cdk/core.ConstructNode | The construct tree node associated with this construct. | +| env | @aws-cdk/core.ResourceEnvironment | The environment this resource belongs to. | +| stack | @aws-cdk/core.Stack | The stack in which this resource is defined. | +| bucketArn | str | The ARN of the bucket. | +| bucketDomainName | str | The IPv4 DNS name of the specified bucket. | +| bucketDualStackDomainName | str | The IPv6 DNS name of the specified bucket. | +| bucketName | str | The name of the bucket. | +| bucketRegionalDomainName | str | The regional domain name of the specified bucket. | +| bucketWebsiteDomainName | str | The Domain name of the static website. | +| bucketWebsiteUrl | str | The URL of the static website. | +| encryptionKey | @aws-cdk/aws-kms.IKey | Optional KMS encryption key associated with this bucket. | +| isWebsite | bool | If this bucket has been configured for static website hosting. | +| policy | @aws-cdk/aws-s3.BucketPolicy | The resource policy associated with this bucket. | --- -##### \`node\`Required +##### \`node\`Required \`\`\`wing node: ConstructNode; @@ -2324,7 +2324,7 @@ The construct tree node associated with this construct. --- -##### \`env\`Required +##### \`env\`Required \`\`\`wing env: ResourceEnvironment; @@ -2343,7 +2343,7 @@ that might be different than the stack they were imported into. --- -##### \`stack\`Required +##### \`stack\`Required \`\`\`wing stack: Stack; @@ -2355,7 +2355,7 @@ The stack in which this resource is defined. --- -##### \`bucketArn\`Required +##### \`bucketArn\`Required \`\`\`wing bucketArn: str; @@ -2367,7 +2367,7 @@ The ARN of the bucket. --- -##### \`bucketDomainName\`Required +##### \`bucketDomainName\`Required \`\`\`wing bucketDomainName: str; @@ -2379,7 +2379,7 @@ The IPv4 DNS name of the specified bucket. --- -##### \`bucketDualStackDomainName\`Required +##### \`bucketDualStackDomainName\`Required \`\`\`wing bucketDualStackDomainName: str; @@ -2391,7 +2391,7 @@ The IPv6 DNS name of the specified bucket. --- -##### \`bucketName\`Required +##### \`bucketName\`Required \`\`\`wing bucketName: str; @@ -2403,7 +2403,7 @@ The name of the bucket. --- -##### \`bucketRegionalDomainName\`Required +##### \`bucketRegionalDomainName\`Required \`\`\`wing bucketRegionalDomainName: str; @@ -2415,7 +2415,7 @@ The regional domain name of the specified bucket. --- -##### \`bucketWebsiteDomainName\`Required +##### \`bucketWebsiteDomainName\`Required \`\`\`wing bucketWebsiteDomainName: str; @@ -2427,7 +2427,7 @@ The Domain name of the static website. --- -##### \`bucketWebsiteUrl\`Required +##### \`bucketWebsiteUrl\`Required \`\`\`wing bucketWebsiteUrl: str; @@ -2439,7 +2439,7 @@ The URL of the static website. --- -##### \`encryptionKey\`Optional +##### \`encryptionKey\`Optional \`\`\`wing encryptionKey: IKey; @@ -2451,7 +2451,7 @@ Optional KMS encryption key associated with this bucket. --- -##### \`isWebsite\`Optional +##### \`isWebsite\`Optional \`\`\`wing isWebsite: bool; @@ -2463,7 +2463,7 @@ If this bucket has been configured for static website hosting. --- -##### \`policy\`Optional +##### \`policy\`Optional \`\`\`wing policy: BucketPolicy; diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/enum.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/enum.test.ts.snap index 5a8b506b786..7e5349478fc 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/enum.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/enum.test.ts.snap @@ -1,25 +1,25 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`csharp snapshot 1`] = ` -Object { +{ "displayName": "TagMutability", - "docs": Object { + "docs": { "summary": "The tag mutability setting for your repository.", }, "fqn": "Amazon.CDK.AWS.ECR.TagMutability", "id": "@aws-cdk/aws-ecr.TagMutability", - "members": Array [ - Object { + "members": [ + { "displayName": "MUTABLE", - "docs": Object { + "docs": { "summary": "allow image tags to be overwritten.", }, "fqn": "Amazon.CDK.AWS.ECR.TagMutability.MUTABLE", "id": "@aws-cdk/aws-ecr.TagMutability.MUTABLE", }, - Object { + { "displayName": "IMMUTABLE", - "docs": Object { + "docs": { "summary": "all image tags within the repository will be immutable which will prevent them from being overwritten.", }, "fqn": "Amazon.CDK.AWS.ECR.TagMutability.IMMUTABLE", @@ -30,27 +30,27 @@ Object { `; exports[`csharp snapshot 2`] = ` -" TagMutability +" TagMutability The tag mutability setting for your repository. -# Members +# Members | **Name** | **Description** | | --- | --- | -| MUTABLE | allow image tags to be overwritten. | -| IMMUTABLE | all image tags within the repository will be immutable which will prevent them from being overwritten. | +| MUTABLE | allow image tags to be overwritten. | +| IMMUTABLE | all image tags within the repository will be immutable which will prevent them from being overwritten. | --- -## \`MUTABLE\` +## \`MUTABLE\` allow image tags to be overwritten. --- -## \`IMMUTABLE\` +## \`IMMUTABLE\` all image tags within the repository will be immutable which will prevent them from being overwritten. @@ -60,25 +60,25 @@ all image tags within the repository will be immutable which will prevent them f `; exports[`go snapshot 1`] = ` -Object { +{ "displayName": "TagMutability", - "docs": Object { + "docs": { "summary": "The tag mutability setting for your repository.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.TagMutability", "id": "@aws-cdk/aws-ecr.TagMutability", - "members": Array [ - Object { + "members": [ + { "displayName": "TagMutability_MUTABLE", - "docs": Object { + "docs": { "summary": "allow image tags to be overwritten.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.TagMutability_MUTABLE", "id": "@aws-cdk/aws-ecr.TagMutability.MUTABLE", }, - Object { + { "displayName": "TagMutability_IMMUTABLE", - "docs": Object { + "docs": { "summary": "all image tags within the repository will be immutable which will prevent them from being overwritten.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.TagMutability_IMMUTABLE", @@ -89,27 +89,27 @@ Object { `; exports[`go snapshot 2`] = ` -" TagMutability +" TagMutability The tag mutability setting for your repository. -# Members +# Members | **Name** | **Description** | | --- | --- | -| TagMutability_MUTABLE | allow image tags to be overwritten. | -| TagMutability_IMMUTABLE | all image tags within the repository will be immutable which will prevent them from being overwritten. | +| TagMutability_MUTABLE | allow image tags to be overwritten. | +| TagMutability_IMMUTABLE | all image tags within the repository will be immutable which will prevent them from being overwritten. | --- -## \`TagMutability_MUTABLE\` +## \`TagMutability_MUTABLE\` allow image tags to be overwritten. --- -## \`TagMutability_IMMUTABLE\` +## \`TagMutability_IMMUTABLE\` all image tags within the repository will be immutable which will prevent them from being overwritten. @@ -119,25 +119,25 @@ all image tags within the repository will be immutable which will prevent them f `; exports[`java snapshot 1`] = ` -Object { +{ "displayName": "TagMutability", - "docs": Object { + "docs": { "summary": "The tag mutability setting for your repository.", }, "fqn": "software.amazon.awscdk.services.ecr.TagMutability", "id": "@aws-cdk/aws-ecr.TagMutability", - "members": Array [ - Object { + "members": [ + { "displayName": "MUTABLE", - "docs": Object { + "docs": { "summary": "allow image tags to be overwritten.", }, "fqn": "software.amazon.awscdk.services.ecr.TagMutability.MUTABLE", "id": "@aws-cdk/aws-ecr.TagMutability.MUTABLE", }, - Object { + { "displayName": "IMMUTABLE", - "docs": Object { + "docs": { "summary": "all image tags within the repository will be immutable which will prevent them from being overwritten.", }, "fqn": "software.amazon.awscdk.services.ecr.TagMutability.IMMUTABLE", @@ -148,27 +148,27 @@ Object { `; exports[`java snapshot 2`] = ` -" TagMutability +" TagMutability The tag mutability setting for your repository. -# Members +# Members | **Name** | **Description** | | --- | --- | -| MUTABLE | allow image tags to be overwritten. | -| IMMUTABLE | all image tags within the repository will be immutable which will prevent them from being overwritten. | +| MUTABLE | allow image tags to be overwritten. | +| IMMUTABLE | all image tags within the repository will be immutable which will prevent them from being overwritten. | --- -## \`MUTABLE\` +## \`MUTABLE\` allow image tags to be overwritten. --- -## \`IMMUTABLE\` +## \`IMMUTABLE\` all image tags within the repository will be immutable which will prevent them from being overwritten. @@ -178,25 +178,25 @@ all image tags within the repository will be immutable which will prevent them f `; exports[`python snapshot 1`] = ` -Object { +{ "displayName": "TagMutability", - "docs": Object { + "docs": { "summary": "The tag mutability setting for your repository.", }, "fqn": "aws_cdk.aws_ecr.TagMutability", "id": "@aws-cdk/aws-ecr.TagMutability", - "members": Array [ - Object { + "members": [ + { "displayName": "MUTABLE", - "docs": Object { + "docs": { "summary": "allow image tags to be overwritten.", }, "fqn": "aws_cdk.aws_ecr.TagMutability.MUTABLE", "id": "@aws-cdk/aws-ecr.TagMutability.MUTABLE", }, - Object { + { "displayName": "IMMUTABLE", - "docs": Object { + "docs": { "summary": "all image tags within the repository will be immutable which will prevent them from being overwritten.", }, "fqn": "aws_cdk.aws_ecr.TagMutability.IMMUTABLE", @@ -207,27 +207,27 @@ Object { `; exports[`python snapshot 2`] = ` -" TagMutability +" TagMutability The tag mutability setting for your repository. -# Members +# Members | **Name** | **Description** | | --- | --- | -| MUTABLE | allow image tags to be overwritten. | -| IMMUTABLE | all image tags within the repository will be immutable which will prevent them from being overwritten. | +| MUTABLE | allow image tags to be overwritten. | +| IMMUTABLE | all image tags within the repository will be immutable which will prevent them from being overwritten. | --- -## \`MUTABLE\` +## \`MUTABLE\` allow image tags to be overwritten. --- -## \`IMMUTABLE\` +## \`IMMUTABLE\` all image tags within the repository will be immutable which will prevent them from being overwritten. @@ -237,25 +237,25 @@ all image tags within the repository will be immutable which will prevent them f `; exports[`typescript snapshot 1`] = ` -Object { +{ "displayName": "TagMutability", - "docs": Object { + "docs": { "summary": "The tag mutability setting for your repository.", }, "fqn": "@aws-cdk/aws-ecr.TagMutability", "id": "@aws-cdk/aws-ecr.TagMutability", - "members": Array [ - Object { + "members": [ + { "displayName": "MUTABLE", - "docs": Object { + "docs": { "summary": "allow image tags to be overwritten.", }, "fqn": "@aws-cdk/aws-ecr.TagMutability.MUTABLE", "id": "@aws-cdk/aws-ecr.TagMutability.MUTABLE", }, - Object { + { "displayName": "IMMUTABLE", - "docs": Object { + "docs": { "summary": "all image tags within the repository will be immutable which will prevent them from being overwritten.", }, "fqn": "@aws-cdk/aws-ecr.TagMutability.IMMUTABLE", @@ -266,27 +266,27 @@ Object { `; exports[`typescript snapshot 2`] = ` -" TagMutability +" TagMutability The tag mutability setting for your repository. -# Members +# Members | **Name** | **Description** | | --- | --- | -| MUTABLE | allow image tags to be overwritten. | -| IMMUTABLE | all image tags within the repository will be immutable which will prevent them from being overwritten. | +| MUTABLE | allow image tags to be overwritten. | +| IMMUTABLE | all image tags within the repository will be immutable which will prevent them from being overwritten. | --- -## \`MUTABLE\` +## \`MUTABLE\` allow image tags to be overwritten. --- -## \`IMMUTABLE\` +## \`IMMUTABLE\` all image tags within the repository will be immutable which will prevent them from being overwritten. @@ -296,25 +296,25 @@ all image tags within the repository will be immutable which will prevent them f `; exports[`wing snapshot 1`] = ` -Object { +{ "displayName": "TagMutability", - "docs": Object { + "docs": { "summary": "The tag mutability setting for your repository.", }, "fqn": "@aws-cdk/aws-ecr.TagMutability", "id": "@aws-cdk/aws-ecr.TagMutability", - "members": Array [ - Object { + "members": [ + { "displayName": "MUTABLE", - "docs": Object { + "docs": { "summary": "allow image tags to be overwritten.", }, "fqn": "@aws-cdk/aws-ecr.TagMutability.MUTABLE", "id": "@aws-cdk/aws-ecr.TagMutability.MUTABLE", }, - Object { + { "displayName": "IMMUTABLE", - "docs": Object { + "docs": { "summary": "all image tags within the repository will be immutable which will prevent them from being overwritten.", }, "fqn": "@aws-cdk/aws-ecr.TagMutability.IMMUTABLE", @@ -325,27 +325,27 @@ Object { `; exports[`wing snapshot 2`] = ` -" TagMutability +" TagMutability The tag mutability setting for your repository. -# Members +# Members | **Name** | **Description** | | --- | --- | -| MUTABLE | allow image tags to be overwritten. | -| IMMUTABLE | all image tags within the repository will be immutable which will prevent them from being overwritten. | +| MUTABLE | allow image tags to be overwritten. | +| IMMUTABLE | all image tags within the repository will be immutable which will prevent them from being overwritten. | --- -## \`MUTABLE\` +## \`MUTABLE\` allow image tags to be overwritten. --- -## \`IMMUTABLE\` +## \`IMMUTABLE\` all image tags within the repository will be immutable which will prevent them from being overwritten. diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/initializer.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/initializer.test.ts.snap index e1de583dfe0..8a10bd7cc22 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/initializer.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/initializer.test.ts.snap @@ -1,24 +1,24 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`csharp snapshot 1`] = ` -Object { +{ "displayName": "Initializer", "fqn": "Amazon.CDK.AWS.ECR.CfnPublicRepository.Initializer", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "Scope", - "docs": Object { + "docs": { "summary": "- scope in which this resource is defined.", }, "fqn": "Amazon.CDK.AWS.ECR.CfnPublicRepository.Initializer.parameter.Scope", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.scope", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "Construct", "fqn": "Amazon.CDK.Construct", "id": "@aws-cdk/core.Construct", @@ -28,32 +28,32 @@ Object { ], }, }, - Object { + { "default": undefined, "displayName": "Id", - "docs": Object { + "docs": { "summary": "- scoped id of the resource.", }, "fqn": "Amazon.CDK.AWS.ECR.CfnPublicRepository.Initializer.parameter.Id", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, }, - Object { + { "default": undefined, "displayName": "Props", - "docs": Object { + "docs": { "summary": "- resource properties.", }, "fqn": "Amazon.CDK.AWS.ECR.CfnPublicRepository.Initializer.parameter.Props", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.props", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "CfnPublicRepositoryProps", "fqn": "Amazon.CDK.AWS.ECR.CfnPublicRepositoryProps", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps", @@ -71,7 +71,7 @@ new CfnPublicRepository(Construct Scope, string Id, CfnPublicRepositoryProps Pro `; exports[`csharp snapshot 2`] = ` -" Initializers +" Initializers \`\`\`csharp using Amazon.CDK.AWS.ECR; @@ -81,13 +81,13 @@ new CfnPublicRepository(Construct Scope, string Id, CfnPublicRepositoryProps Pro | **Name** | **Type** | **Description** | | --- | --- | --- | -| Scope | Amazon.CDK.Construct | - scope in which this resource is defined. | -| Id | string | - scoped id of the resource. | -| Props | CfnPublicRepositoryProps | - resource properties. | +| Scope | Amazon.CDK.Construct | - scope in which this resource is defined. | +| Id | string | - scoped id of the resource. | +| Props | CfnPublicRepositoryProps | - resource properties. | --- -# \`Scope\`Required +# \`Scope\`Required - *Type:* Amazon.CDK.Construct @@ -95,7 +95,7 @@ scope in which this resource is defined. --- -# \`Id\`Required +# \`Id\`Required - *Type:* string @@ -103,9 +103,9 @@ scoped id of the resource. --- -# \`Props\`Optional +# \`Props\`Optional -- *Type:* CfnPublicRepositoryProps +- *Type:* CfnPublicRepositoryProps resource properties. @@ -114,24 +114,24 @@ resource properties. `; exports[`go snapshot 1`] = ` -Object { +{ "displayName": "Initializer", "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.CfnPublicRepository.Initializer", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "scope", - "docs": Object { + "docs": { "summary": "- scope in which this resource is defined.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.CfnPublicRepository.Initializer.parameter.scope", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.scope", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "Construct", "fqn": "github.com/aws/aws-cdk-go/awscdk/awscdkcore.Construct", "id": "@aws-cdk/core.Construct", @@ -141,32 +141,32 @@ Object { ], }, }, - Object { + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "- scoped id of the resource.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.CfnPublicRepository.Initializer.parameter.id", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "*string", }, }, - Object { + { "default": undefined, "displayName": "props", - "docs": Object { + "docs": { "summary": "- resource properties.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.CfnPublicRepository.Initializer.parameter.props", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.props", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "CfnPublicRepositoryProps", "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.CfnPublicRepositoryProps", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps", @@ -177,30 +177,30 @@ Object { }, }, ], - "usage": "import \\"github.com/aws/aws-cdk-go/awscdkawsecr\\" + "usage": "import "github.com/aws/aws-cdk-go/awscdkawsecr" awscdkawsecr.NewCfnPublicRepository(scope Construct, id *string, props CfnPublicRepositoryProps) CfnPublicRepository", } `; exports[`go snapshot 2`] = ` -" Initializers +" Initializers \`\`\`go -import \\"github.com/aws/aws-cdk-go/awscdkawsecr\\" +import "github.com/aws/aws-cdk-go/awscdkawsecr" awscdkawsecr.NewCfnPublicRepository(scope Construct, id *string, props CfnPublicRepositoryProps) CfnPublicRepository \`\`\` | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | github.com/aws/aws-cdk-go/awscdk/awscdkcore.Construct | - scope in which this resource is defined. | -| id | *string | - scoped id of the resource. | -| props | CfnPublicRepositoryProps | - resource properties. | +| scope | github.com/aws/aws-cdk-go/awscdk/awscdkcore.Construct | - scope in which this resource is defined. | +| id | *string | - scoped id of the resource. | +| props | CfnPublicRepositoryProps | - resource properties. | --- -# \`scope\`Required +# \`scope\`Required - *Type:* github.com/aws/aws-cdk-go/awscdk/awscdkcore.Construct @@ -208,7 +208,7 @@ scope in which this resource is defined. --- -# \`id\`Required +# \`id\`Required - *Type:* *string @@ -216,9 +216,9 @@ scoped id of the resource. --- -# \`props\`Optional +# \`props\`Optional -- *Type:* CfnPublicRepositoryProps +- *Type:* CfnPublicRepositoryProps resource properties. @@ -227,24 +227,24 @@ resource properties. `; exports[`java snapshot 1`] = ` -Object { +{ "displayName": "Initializer", "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepository.Initializer", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "scope", - "docs": Object { + "docs": { "summary": "- scope in which this resource is defined.", }, "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepository.Initializer.parameter.scope", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.scope", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "Construct", "fqn": "software.amazon.awscdk.core.Construct", "id": "@aws-cdk/core.Construct", @@ -254,24 +254,24 @@ Object { ], }, }, - Object { + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "- scoped id of the resource.", }, "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepository.Initializer.parameter.id", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "java.lang.String", }, }, - Object { + { "default": undefined, "displayName": "repositoryCatalogData", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorycatalogdata", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryCatalogData\`.", @@ -279,15 +279,15 @@ Object { "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepository.Initializer.parameter.repositoryCatalogData", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.repositoryCatalogData", "optional": true, - "type": Object { + "type": { "formattingPattern": "java.lang.Object", }, }, - Object { + { "default": undefined, "displayName": "repositoryName", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositoryname", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryName\`.", @@ -295,15 +295,15 @@ Object { "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepository.Initializer.parameter.repositoryName", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.repositoryName", "optional": true, - "type": Object { + "type": { "formattingPattern": "java.lang.String", }, }, - Object { + { "default": undefined, "displayName": "repositoryPolicyText", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorypolicytext", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryPolicyText\`.", @@ -311,15 +311,15 @@ Object { "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepository.Initializer.parameter.repositoryPolicyText", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.repositoryPolicyText", "optional": true, - "type": Object { + "type": { "formattingPattern": "java.lang.Object", }, }, - Object { + { "default": undefined, "displayName": "tags", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-tags", ], "summary": "\`AWS::ECR::PublicRepository.Tags\`.", @@ -327,13 +327,13 @@ Object { "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepository.Initializer.parameter.tags", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.tags", "optional": true, - "type": Object { + "type": { "formattingPattern": "java.util.List<%>", - "types": Array [ - Object { + "types": [ + { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "CfnTag", "fqn": "software.amazon.awscdk.core.CfnTag", "id": "@aws-cdk/core.CfnTag", @@ -358,7 +358,7 @@ CfnPublicRepository.Builder.create(Construct scope, java.lang.String id) `; exports[`java snapshot 2`] = ` -" Initializers +" Initializers \`\`\`java import software.amazon.awscdk.services.ecr.CfnPublicRepository; @@ -373,16 +373,16 @@ CfnPublicRepository.Builder.create(Construct scope, java.lang.String id) | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | software.amazon.awscdk.core.Construct | - scope in which this resource is defined. | -| id | java.lang.String | - scoped id of the resource. | -| repositoryCatalogData | java.lang.Object | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | -| repositoryName | java.lang.String | \`AWS::ECR::PublicRepository.RepositoryName\`. | -| repositoryPolicyText | java.lang.Object | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | -| tags | java.util.List | \`AWS::ECR::PublicRepository.Tags\`. | +| scope | software.amazon.awscdk.core.Construct | - scope in which this resource is defined. | +| id | java.lang.String | - scoped id of the resource. | +| repositoryCatalogData | java.lang.Object | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | +| repositoryName | java.lang.String | \`AWS::ECR::PublicRepository.RepositoryName\`. | +| repositoryPolicyText | java.lang.Object | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | +| tags | java.util.List | \`AWS::ECR::PublicRepository.Tags\`. | --- -# \`scope\`Required +# \`scope\`Required - *Type:* software.amazon.awscdk.core.Construct @@ -390,7 +390,7 @@ scope in which this resource is defined. --- -# \`id\`Required +# \`id\`Required - *Type:* java.lang.String @@ -398,7 +398,7 @@ scoped id of the resource. --- -# \`repositoryCatalogData\`Optional +# \`repositoryCatalogData\`Optional - *Type:* java.lang.Object @@ -408,7 +408,7 @@ scoped id of the resource. --- -# \`repositoryName\`Optional +# \`repositoryName\`Optional - *Type:* java.lang.String @@ -418,7 +418,7 @@ scoped id of the resource. --- -# \`repositoryPolicyText\`Optional +# \`repositoryPolicyText\`Optional - *Type:* java.lang.Object @@ -428,7 +428,7 @@ scoped id of the resource. --- -# \`tags\`Optional +# \`tags\`Optional - *Type:* java.util.List @@ -441,24 +441,24 @@ scoped id of the resource. `; exports[`python snapshot 1`] = ` -Object { +{ "displayName": "Initializer", "fqn": "aws_cdk.aws_ecr.CfnPublicRepository.Initializer", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "scope", - "docs": Object { + "docs": { "summary": "- scope in which this resource is defined.", }, "fqn": "aws_cdk.aws_ecr.CfnPublicRepository.Initializer.parameter.scope", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.scope", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "Construct", "fqn": "aws_cdk.core.Construct", "id": "@aws-cdk/core.Construct", @@ -468,24 +468,24 @@ Object { ], }, }, - Object { + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "- scoped id of the resource.", }, "fqn": "aws_cdk.aws_ecr.CfnPublicRepository.Initializer.parameter.id", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": undefined, "displayName": "repository_catalog_data", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorycatalogdata", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryCatalogData\`.", @@ -493,15 +493,15 @@ Object { "fqn": "aws_cdk.aws_ecr.CfnPublicRepository.Initializer.parameter.repository_catalog_data", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.repositoryCatalogData", "optional": true, - "type": Object { + "type": { "formattingPattern": "typing.Any", }, }, - Object { + { "default": undefined, "displayName": "repository_name", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositoryname", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryName\`.", @@ -509,15 +509,15 @@ Object { "fqn": "aws_cdk.aws_ecr.CfnPublicRepository.Initializer.parameter.repository_name", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.repositoryName", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": undefined, "displayName": "repository_policy_text", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorypolicytext", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryPolicyText\`.", @@ -525,15 +525,15 @@ Object { "fqn": "aws_cdk.aws_ecr.CfnPublicRepository.Initializer.parameter.repository_policy_text", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.repositoryPolicyText", "optional": true, - "type": Object { + "type": { "formattingPattern": "typing.Any", }, }, - Object { + { "default": undefined, "displayName": "tags", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-tags", ], "summary": "\`AWS::ECR::PublicRepository.Tags\`.", @@ -541,13 +541,13 @@ Object { "fqn": "aws_cdk.aws_ecr.CfnPublicRepository.Initializer.parameter.tags", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.tags", "optional": true, - "type": Object { + "type": { "formattingPattern": "typing.List[%]", - "types": Array [ - Object { + "types": [ + { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "CfnTag", "fqn": "aws_cdk.core.CfnTag", "id": "@aws-cdk/core.CfnTag", @@ -574,7 +574,7 @@ aws_cdk.aws_ecr.CfnPublicRepository( `; exports[`python snapshot 2`] = ` -" Initializers +" Initializers \`\`\`python import aws_cdk.aws_ecr @@ -591,16 +591,16 @@ aws_cdk.aws_ecr.CfnPublicRepository( | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | aws_cdk.core.Construct | - scope in which this resource is defined. | -| id | str | - scoped id of the resource. | -| repository_catalog_data | typing.Any | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | -| repository_name | str | \`AWS::ECR::PublicRepository.RepositoryName\`. | -| repository_policy_text | typing.Any | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | -| tags | typing.List[aws_cdk.core.CfnTag] | \`AWS::ECR::PublicRepository.Tags\`. | +| scope | aws_cdk.core.Construct | - scope in which this resource is defined. | +| id | str | - scoped id of the resource. | +| repository_catalog_data | typing.Any | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | +| repository_name | str | \`AWS::ECR::PublicRepository.RepositoryName\`. | +| repository_policy_text | typing.Any | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | +| tags | typing.List[aws_cdk.core.CfnTag] | \`AWS::ECR::PublicRepository.Tags\`. | --- -# \`scope\`Required +# \`scope\`Required - *Type:* aws_cdk.core.Construct @@ -608,7 +608,7 @@ scope in which this resource is defined. --- -# \`id\`Required +# \`id\`Required - *Type:* str @@ -616,7 +616,7 @@ scoped id of the resource. --- -# \`repository_catalog_data\`Optional +# \`repository_catalog_data\`Optional - *Type:* typing.Any @@ -626,7 +626,7 @@ scoped id of the resource. --- -# \`repository_name\`Optional +# \`repository_name\`Optional - *Type:* str @@ -636,7 +636,7 @@ scoped id of the resource. --- -# \`repository_policy_text\`Optional +# \`repository_policy_text\`Optional - *Type:* typing.Any @@ -646,7 +646,7 @@ scoped id of the resource. --- -# \`tags\`Optional +# \`tags\`Optional - *Type:* typing.List[aws_cdk.core.CfnTag] @@ -659,24 +659,24 @@ scoped id of the resource. `; exports[`typescript snapshot 1`] = ` -Object { +{ "displayName": "Initializer", "fqn": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "scope", - "docs": Object { + "docs": { "summary": "- scope in which this resource is defined.", }, "fqn": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.scope", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.scope", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "Construct", "fqn": "@aws-cdk/core.Construct", "id": "@aws-cdk/core.Construct", @@ -686,32 +686,32 @@ Object { ], }, }, - Object { + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "- scoped id of the resource.", }, "fqn": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.id", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, }, - Object { + { "default": undefined, "displayName": "props", - "docs": Object { + "docs": { "summary": "- resource properties.", }, "fqn": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.props", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.props", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "CfnPublicRepositoryProps", "fqn": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps", @@ -729,7 +729,7 @@ new CfnPublicRepository(scope: Construct, id: string, props?: CfnPublicRepositor `; exports[`typescript snapshot 2`] = ` -" Initializers +" Initializers \`\`\`typescript import { CfnPublicRepository } from '@aws-cdk/aws-ecr' @@ -739,13 +739,13 @@ new CfnPublicRepository(scope: Construct, id: string, props?: CfnPublicRepositor | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | @aws-cdk/core.Construct | - scope in which this resource is defined. | -| id | string | - scoped id of the resource. | -| props | CfnPublicRepositoryProps | - resource properties. | +| scope | @aws-cdk/core.Construct | - scope in which this resource is defined. | +| id | string | - scoped id of the resource. | +| props | CfnPublicRepositoryProps | - resource properties. | --- -# \`scope\`Required +# \`scope\`Required - *Type:* @aws-cdk/core.Construct @@ -753,7 +753,7 @@ scope in which this resource is defined. --- -# \`id\`Required +# \`id\`Required - *Type:* string @@ -761,9 +761,9 @@ scoped id of the resource. --- -# \`props\`Optional +# \`props\`Optional -- *Type:* CfnPublicRepositoryProps +- *Type:* CfnPublicRepositoryProps resource properties. @@ -772,24 +772,24 @@ resource properties. `; exports[`wing snapshot 1`] = ` -Object { +{ "displayName": "Initializer", "fqn": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "props", - "docs": Object { + "docs": { "summary": "- resource properties.", }, "fqn": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.props", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.Initializer.parameter.props", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "CfnPublicRepositoryProps", "fqn": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps", @@ -800,30 +800,30 @@ Object { }, }, ], - "usage": "bring { CfnPublicRepository } from \\"@aws-cdk/aws-ecr\\"; + "usage": "bring { CfnPublicRepository } from "@aws-cdk/aws-ecr"; new CfnPublicRepository(props?: CfnPublicRepositoryProps);", } `; exports[`wing snapshot 2`] = ` -" Initializers +" Initializers \`\`\`wing -bring { CfnPublicRepository } from \\"@aws-cdk/aws-ecr\\"; +bring { CfnPublicRepository } from "@aws-cdk/aws-ecr"; new CfnPublicRepository(props?: CfnPublicRepositoryProps); \`\`\` | **Name** | **Type** | **Description** | | --- | --- | --- | -| props | CfnPublicRepositoryProps | - resource properties. | +| props | CfnPublicRepositoryProps | - resource properties. | --- -# \`props\`Optional +# \`props\`Optional -- *Type:* CfnPublicRepositoryProps +- *Type:* CfnPublicRepositoryProps resource properties. diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/instance-method.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/instance-method.test.ts.snap index d1b54ef6120..ef87f9247fe 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/instance-method.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/instance-method.test.ts.snap @@ -1,27 +1,27 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`csharp snapshot 1`] = ` -Object { +{ "displayName": "Inspect", - "docs": Object { + "docs": { "summary": "Examines the CloudFormation resource and discloses attributes.", }, "fqn": "Amazon.CDK.AWS.ECR.CfnPublicRepository.Inspect", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "Inspector", - "docs": Object { + "docs": { "summary": "- tree inspector to collect and process attributes.", }, "fqn": "Amazon.CDK.AWS.ECR.CfnPublicRepository.Inspect.parameter.Inspector", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect.parameter.inspector", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "TreeInspector", "fqn": "Amazon.CDK.TreeInspector", "id": "@aws-cdk/core.TreeInspector", @@ -37,7 +37,7 @@ Object { `; exports[`csharp snapshot 2`] = ` -" \`Inspect\` +" \`Inspect\` \`\`\`csharp private void Inspect(TreeInspector Inspector) @@ -45,7 +45,7 @@ private void Inspect(TreeInspector Inspector) Examines the CloudFormation resource and discloses attributes. -# \`Inspector\`Required +# \`Inspector\`Required - *Type:* Amazon.CDK.TreeInspector @@ -56,27 +56,27 @@ tree inspector to collect and process attributes. `; exports[`go snapshot 1`] = ` -Object { +{ "displayName": "Inspect", - "docs": Object { + "docs": { "summary": "Examines the CloudFormation resource and discloses attributes.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.CfnPublicRepository.Inspect", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "inspector", - "docs": Object { + "docs": { "summary": "- tree inspector to collect and process attributes.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.CfnPublicRepository.Inspect.parameter.inspector", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect.parameter.inspector", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "TreeInspector", "fqn": "github.com/aws/aws-cdk-go/awscdk/awscdkcore.TreeInspector", "id": "@aws-cdk/core.TreeInspector", @@ -92,7 +92,7 @@ Object { `; exports[`go snapshot 2`] = ` -" \`Inspect\` +" \`Inspect\` \`\`\`go func Inspect(inspector TreeInspector) @@ -100,7 +100,7 @@ func Inspect(inspector TreeInspector) Examines the CloudFormation resource and discloses attributes. -# \`inspector\`Required +# \`inspector\`Required - *Type:* github.com/aws/aws-cdk-go/awscdk/awscdkcore.TreeInspector @@ -111,27 +111,27 @@ tree inspector to collect and process attributes. `; exports[`java snapshot 1`] = ` -Object { +{ "displayName": "inspect", - "docs": Object { + "docs": { "summary": "Examines the CloudFormation resource and discloses attributes.", }, "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepository.inspect", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "inspector", - "docs": Object { + "docs": { "summary": "- tree inspector to collect and process attributes.", }, "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepository.inspect.parameter.inspector", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect.parameter.inspector", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "TreeInspector", "fqn": "software.amazon.awscdk.core.TreeInspector", "id": "@aws-cdk/core.TreeInspector", @@ -147,7 +147,7 @@ Object { `; exports[`java snapshot 2`] = ` -" \`inspect\` +" \`inspect\` \`\`\`java public void inspect(TreeInspector inspector) @@ -155,7 +155,7 @@ public void inspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes. -# \`inspector\`Required +# \`inspector\`Required - *Type:* software.amazon.awscdk.core.TreeInspector @@ -166,27 +166,27 @@ tree inspector to collect and process attributes. `; exports[`python snapshot 1`] = ` -Object { +{ "displayName": "inspect", - "docs": Object { + "docs": { "summary": "Examines the CloudFormation resource and discloses attributes.", }, "fqn": "aws_cdk.aws_ecr.CfnPublicRepository.inspect", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "inspector", - "docs": Object { + "docs": { "summary": "- tree inspector to collect and process attributes.", }, "fqn": "aws_cdk.aws_ecr.CfnPublicRepository.inspect.parameter.inspector", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect.parameter.inspector", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "TreeInspector", "fqn": "aws_cdk.core.TreeInspector", "id": "@aws-cdk/core.TreeInspector", @@ -204,7 +204,7 @@ Object { `; exports[`python snapshot 2`] = ` -" \`inspect\` +" \`inspect\` \`\`\`python def inspect( @@ -214,7 +214,7 @@ def inspect( Examines the CloudFormation resource and discloses attributes. -# \`inspector\`Required +# \`inspector\`Required - *Type:* aws_cdk.core.TreeInspector @@ -225,27 +225,27 @@ tree inspector to collect and process attributes. `; exports[`typescript snapshot 1`] = ` -Object { +{ "displayName": "inspect", - "docs": Object { + "docs": { "summary": "Examines the CloudFormation resource and discloses attributes.", }, "fqn": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "inspector", - "docs": Object { + "docs": { "summary": "- tree inspector to collect and process attributes.", }, "fqn": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect.parameter.inspector", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect.parameter.inspector", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "TreeInspector", "fqn": "@aws-cdk/core.TreeInspector", "id": "@aws-cdk/core.TreeInspector", @@ -261,7 +261,7 @@ Object { `; exports[`typescript snapshot 2`] = ` -" \`inspect\` +" \`inspect\` \`\`\`typescript public inspect(inspector: TreeInspector): void @@ -269,7 +269,7 @@ public inspect(inspector: TreeInspector): void Examines the CloudFormation resource and discloses attributes. -# \`inspector\`Required +# \`inspector\`Required - *Type:* @aws-cdk/core.TreeInspector @@ -280,27 +280,27 @@ tree inspector to collect and process attributes. `; exports[`wing snapshot 1`] = ` -Object { +{ "displayName": "inspect", - "docs": Object { + "docs": { "summary": "Examines the CloudFormation resource and discloses attributes.", }, "fqn": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "inspector", - "docs": Object { + "docs": { "summary": "- tree inspector to collect and process attributes.", }, "fqn": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect.parameter.inspector", "id": "@aws-cdk/aws-ecr.CfnPublicRepository.inspect.parameter.inspector", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "TreeInspector", "fqn": "@aws-cdk/core.TreeInspector", "id": "@aws-cdk/core.TreeInspector", @@ -316,7 +316,7 @@ Object { `; exports[`wing snapshot 2`] = ` -" \`inspect\` +" \`inspect\` \`\`\`wing inspect(inspector: TreeInspector): void @@ -324,7 +324,7 @@ inspect(inspector: TreeInspector): void Examines the CloudFormation resource and discloses attributes. -# \`inspector\`Required +# \`inspector\`Required - *Type:* @aws-cdk/core.TreeInspector diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/interface.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/interface.test.ts.snap index 8792e6cd812..b5fe5ef533f 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/interface.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/interface.test.ts.snap @@ -1,29 +1,29 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`csharp snapshot 1`] = ` -Object { +{ "displayName": "IRepository", - "docs": Object { + "docs": { "summary": "Represents an ECR repository.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository", "id": "@aws-cdk/aws-ecr.IRepository", - "implementations": Array [ - Object { + "implementations": [ + { "displayName": "Repository", "fqn": "Amazon.CDK.AWS.ECR.Repository", "id": "@aws-cdk/aws-ecr.Repository", "packageName": "@aws-cdk/aws-ecr", "packageVersion": "1.106.0", }, - Object { + { "displayName": "RepositoryBase", "fqn": "Amazon.CDK.AWS.ECR.RepositoryBase", "id": "@aws-cdk/aws-ecr.RepositoryBase", "packageName": "@aws-cdk/aws-ecr", "packageVersion": "1.106.0", }, - Object { + { "displayName": "IRepository", "fqn": "Amazon.CDK.AWS.ECR.IRepository", "id": "@aws-cdk/aws-ecr.IRepository", @@ -31,26 +31,26 @@ Object { "packageVersion": "1.106.0", }, ], - "instanceMethods": Array [ - Object { + "instanceMethods": [ + { "displayName": "AddToResourcePolicy", - "docs": Object { + "docs": { "summary": "Add a policy statement to the repository's resource policy.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.AddToResourcePolicy", "id": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "Statement", - "docs": Object {}, + "docs": {}, "fqn": "Amazon.CDK.AWS.ECR.IRepository.AddToResourcePolicy.parameter.Statement", "id": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy.parameter.statement", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "PolicyStatement", "fqn": "Amazon.CDK.AWS.IAM.PolicyStatement", "id": "@aws-cdk/aws-iam.PolicyStatement", @@ -63,25 +63,25 @@ Object { ], "usage": "private AddToResourcePolicyResult AddToResourcePolicy(PolicyStatement Statement)", }, - Object { + { "displayName": "Grant", - "docs": Object { + "docs": { "summary": "Grant the given principal identity permissions to perform the actions on this repository.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.Grant", "id": "@aws-cdk/aws-ecr.IRepository.grant", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "Grantee", - "docs": Object {}, + "docs": {}, "fqn": "Amazon.CDK.AWS.ECR.IRepository.Grant.parameter.Grantee", "id": "@aws-cdk/aws-ecr.IRepository.grant.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "Amazon.CDK.AWS.IAM.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -91,39 +91,39 @@ Object { ], }, }, - Object { + { "default": undefined, "displayName": "Actions", - "docs": Object {}, + "docs": {}, "fqn": "Amazon.CDK.AWS.ECR.IRepository.Grant.parameter.Actions", "id": "@aws-cdk/aws-ecr.IRepository.grant.parameter.actions", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, }, ], "usage": "private Grant Grant(IGrantable Grantee, string Actions)", }, - Object { + { "displayName": "GrantPull", - "docs": Object { + "docs": { "summary": "Grant the given identity permissions to pull images in this repository.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.GrantPull", "id": "@aws-cdk/aws-ecr.IRepository.grantPull", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "Grantee", - "docs": Object {}, + "docs": {}, "fqn": "Amazon.CDK.AWS.ECR.IRepository.GrantPull.parameter.Grantee", "id": "@aws-cdk/aws-ecr.IRepository.grantPull.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "Amazon.CDK.AWS.IAM.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -136,25 +136,25 @@ Object { ], "usage": "private Grant GrantPull(IGrantable Grantee)", }, - Object { + { "displayName": "GrantPullPush", - "docs": Object { + "docs": { "summary": "Grant the given identity permissions to pull and push images to this repository.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.GrantPullPush", "id": "@aws-cdk/aws-ecr.IRepository.grantPullPush", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "Grantee", - "docs": Object {}, + "docs": {}, "fqn": "Amazon.CDK.AWS.ECR.IRepository.GrantPullPush.parameter.Grantee", "id": "@aws-cdk/aws-ecr.IRepository.grantPullPush.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "Amazon.CDK.AWS.IAM.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -167,42 +167,42 @@ Object { ], "usage": "private Grant GrantPullPush(IGrantable Grantee)", }, - Object { + { "displayName": "OnCloudTrailEvent", - "docs": Object { + "docs": { "remarks": "Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.", "summary": "Define a CloudWatch event that triggers when something happens to this repository.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.OnCloudTrailEvent", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "Id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.OnCloudTrailEvent.parameter.Id", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, }, - Object { + { "default": undefined, "displayName": "Options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.OnCloudTrailEvent.parameter.Options", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnEventOptions", "fqn": "Amazon.CDK.AWS.Events.OnEventOptions", "id": "@aws-cdk/aws-events.OnEventOptions", @@ -215,42 +215,42 @@ that captures the event. This method will not create the Trail.", ], "usage": "private Rule OnCloudTrailEvent(string Id, OnEventOptions Options = null)", }, - Object { + { "displayName": "OnCloudTrailImagePushed", - "docs": Object { + "docs": { "remarks": "Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.", "summary": "Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.OnCloudTrailImagePushed", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "Id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.OnCloudTrailImagePushed.parameter.Id", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, }, - Object { + { "default": undefined, "displayName": "Options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.OnCloudTrailImagePushed.parameter.Options", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnCloudTrailImagePushedOptions", "fqn": "Amazon.CDK.AWS.ECR.OnCloudTrailImagePushedOptions", "id": "@aws-cdk/aws-ecr.OnCloudTrailImagePushedOptions", @@ -263,38 +263,38 @@ that captures the event. This method will not create the Trail.", ], "usage": "private Rule OnCloudTrailImagePushed(string Id, OnCloudTrailImagePushedOptions Options = null)", }, - Object { + { "displayName": "OnEvent", - "docs": Object { + "docs": { "remarks": "Use \`rule.addEventPattern(pattern)\` to specify a filter.", "summary": "Defines a CloudWatch event rule which triggers for repository events.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.OnEvent", "id": "@aws-cdk/aws-ecr.IRepository.onEvent", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "Id", - "docs": Object {}, + "docs": {}, "fqn": "Amazon.CDK.AWS.ECR.IRepository.OnEvent.parameter.Id", "id": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, }, - Object { + { "default": undefined, "displayName": "Options", - "docs": Object {}, + "docs": {}, "fqn": "Amazon.CDK.AWS.ECR.IRepository.OnEvent.parameter.Options", "id": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnEventOptions", "fqn": "Amazon.CDK.AWS.Events.OnEventOptions", "id": "@aws-cdk/aws-events.OnEventOptions", @@ -307,40 +307,40 @@ that captures the event. This method will not create the Trail.", ], "usage": "private Rule OnEvent(string Id, OnEventOptions Options = null)", }, - Object { + { "displayName": "OnImageScanCompleted", - "docs": Object { + "docs": { "summary": "Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.OnImageScanCompleted", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "Id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.OnImageScanCompleted.parameter.Id", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, }, - Object { + { "default": undefined, "displayName": "Options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.OnImageScanCompleted.parameter.Options", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnImageScanCompletedOptions", "fqn": "Amazon.CDK.AWS.ECR.OnImageScanCompletedOptions", "id": "@aws-cdk/aws-ecr.OnImageScanCompletedOptions", @@ -353,50 +353,50 @@ that captures the event. This method will not create the Trail.", ], "usage": "private Rule OnImageScanCompleted(string Id, OnImageScanCompletedOptions Options = null)", }, - Object { + { "displayName": "RepositoryUriForDigest", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST]", "summary": "Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.RepositoryUriForDigest", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "Digest", - "docs": Object { - "summary": "Image digest to use (tools usually default to the image with the \\"latest\\" tag if omitted).", + "docs": { + "summary": "Image digest to use (tools usually default to the image with the "latest" tag if omitted).", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.RepositoryUriForDigest.parameter.Digest", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest.parameter.digest", "optional": true, - "type": Object { + "type": { "formattingPattern": "string", }, }, ], "usage": "private string RepositoryUriForDigest(string Digest = null)", }, - Object { + { "displayName": "RepositoryUriForTag", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG]", "summary": "Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.RepositoryUriForTag", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "Tag", - "docs": Object { - "summary": "Image tag to use (tools usually default to \\"latest\\" if omitted).", + "docs": { + "summary": "Image tag to use (tools usually default to "latest" if omitted).", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.RepositoryUriForTag.parameter.Tag", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag.parameter.tag", "optional": true, - "type": Object { + "type": { "formattingPattern": "string", }, }, @@ -404,8 +404,8 @@ that captures the event. This method will not create the Trail.", "usage": "private string RepositoryUriForTag(string Tag = null)", }, ], - "interfaces": Array [ - Object { + "interfaces": [ + { "displayName": "IResource", "fqn": "Amazon.CDK.IResource", "id": "@aws-cdk/core.IResource", @@ -413,20 +413,20 @@ that captures the event. This method will not create the Trail.", "packageVersion": "1.106.0", }, ], - "properties": Array [ - Object { + "properties": [ + { "default": undefined, "displayName": "Node", - "docs": Object { + "docs": { "summary": "The construct tree node for this construct.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.property.Node", "id": "@aws-cdk/aws-ecr.IRepository.property.node", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "ConstructNode", "fqn": "Amazon.CDK.ConstructNode", "id": "@aws-cdk/core.ConstructNode", @@ -437,10 +437,10 @@ that captures the event. This method will not create the Trail.", }, "usage": "public ConstructNode Node { get; }", }, - Object { + { "default": undefined, "displayName": "Env", - "docs": Object { + "docs": { "remarks": "For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; @@ -452,10 +452,10 @@ that might be different than the stack they were imported into.", "fqn": "Amazon.CDK.AWS.ECR.IRepository.property.Env", "id": "@aws-cdk/aws-ecr.IRepository.property.env", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "ResourceEnvironment", "fqn": "Amazon.CDK.ResourceEnvironment", "id": "@aws-cdk/core.ResourceEnvironment", @@ -466,19 +466,19 @@ that might be different than the stack they were imported into.", }, "usage": "public ResourceEnvironment Env { get; }", }, - Object { + { "default": undefined, "displayName": "Stack", - "docs": Object { + "docs": { "summary": "The stack in which this resource is defined.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.property.Stack", "id": "@aws-cdk/aws-ecr.IRepository.property.stack", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "Stack", "fqn": "Amazon.CDK.Stack", "id": "@aws-cdk/core.Stack", @@ -489,45 +489,45 @@ that might be different than the stack they were imported into.", }, "usage": "public Stack Stack { get; }", }, - Object { + { "default": undefined, "displayName": "RepositoryArn", - "docs": Object { + "docs": { "summary": "The ARN of the repository.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.property.RepositoryArn", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryArn", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, "usage": "public string RepositoryArn { get; }", }, - Object { + { "default": undefined, "displayName": "RepositoryName", - "docs": Object { + "docs": { "summary": "The name of the repository.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.property.RepositoryName", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryName", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, "usage": "public string RepositoryName { get; }", }, - Object { + { "default": undefined, "displayName": "RepositoryUri", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY", "summary": "The URI of this repository (represents the latest image):.", }, "fqn": "Amazon.CDK.AWS.ECR.IRepository.property.RepositoryUri", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryUri", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, "usage": "public string RepositoryUri { get; }", @@ -537,32 +537,32 @@ that might be different than the stack they were imported into.", `; exports[`csharp snapshot 2`] = ` -" IRepository +" IRepository - *Extends:* Amazon.CDK.IResource -- *Implemented By:* Repository, RepositoryBase, IRepository +- *Implemented By:* Repository, RepositoryBase, IRepository Represents an ECR repository. -# Methods +# Methods | **Name** | **Description** | | --- | --- | -| AddToResourcePolicy | Add a policy statement to the repository's resource policy. | -| Grant | Grant the given principal identity permissions to perform the actions on this repository. | -| GrantPull | Grant the given identity permissions to pull images in this repository. | -| GrantPullPush | Grant the given identity permissions to pull and push images to this repository. | -| OnCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | -| OnCloudTrailImagePushed | Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository. | -| OnEvent | Defines a CloudWatch event rule which triggers for repository events. | -| OnImageScanCompleted | Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. | -| RepositoryUriForDigest | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | -| RepositoryUriForTag | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | +| AddToResourcePolicy | Add a policy statement to the repository's resource policy. | +| Grant | Grant the given principal identity permissions to perform the actions on this repository. | +| GrantPull | Grant the given identity permissions to pull images in this repository. | +| GrantPullPush | Grant the given identity permissions to pull and push images to this repository. | +| OnCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | +| OnCloudTrailImagePushed | Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository. | +| OnEvent | Defines a CloudWatch event rule which triggers for repository events. | +| OnImageScanCompleted | Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. | +| RepositoryUriForDigest | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | +| RepositoryUriForTag | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | --- -## \`AddToResourcePolicy\` +## \`AddToResourcePolicy\` \`\`\`csharp private AddToResourcePolicyResult AddToResourcePolicy(PolicyStatement Statement) @@ -570,13 +570,13 @@ private AddToResourcePolicyResult AddToResourcePolicy(PolicyStatement Statement) Add a policy statement to the repository's resource policy. -### \`Statement\`Required +### \`Statement\`Required - *Type:* Amazon.CDK.AWS.IAM.PolicyStatement --- -## \`Grant\` +## \`Grant\` \`\`\`csharp private Grant Grant(IGrantable Grantee, string Actions) @@ -584,19 +584,19 @@ private Grant Grant(IGrantable Grantee, string Actions) Grant the given principal identity permissions to perform the actions on this repository. -### \`Grantee\`Required +### \`Grantee\`Required - *Type:* Amazon.CDK.AWS.IAM.IGrantable --- -### \`Actions\`Required +### \`Actions\`Required - *Type:* string --- -## \`GrantPull\` +## \`GrantPull\` \`\`\`csharp private Grant GrantPull(IGrantable Grantee) @@ -604,13 +604,13 @@ private Grant GrantPull(IGrantable Grantee) Grant the given identity permissions to pull images in this repository. -### \`Grantee\`Required +### \`Grantee\`Required - *Type:* Amazon.CDK.AWS.IAM.IGrantable --- -## \`GrantPullPush\` +## \`GrantPullPush\` \`\`\`csharp private Grant GrantPullPush(IGrantable Grantee) @@ -618,13 +618,13 @@ private Grant GrantPullPush(IGrantable Grantee) Grant the given identity permissions to pull and push images to this repository. -### \`Grantee\`Required +### \`Grantee\`Required - *Type:* Amazon.CDK.AWS.IAM.IGrantable --- -## \`OnCloudTrailEvent\` +## \`OnCloudTrailEvent\` \`\`\`csharp private Rule OnCloudTrailEvent(string Id, OnEventOptions Options = null) @@ -635,7 +635,7 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -### \`Id\`Required +### \`Id\`Required - *Type:* string @@ -643,7 +643,7 @@ The id of the rule. --- -### \`Options\`Optional +### \`Options\`Optional - *Type:* Amazon.CDK.AWS.Events.OnEventOptions @@ -651,7 +651,7 @@ Options for adding the rule. --- -## \`OnCloudTrailImagePushed\` +## \`OnCloudTrailImagePushed\` \`\`\`csharp private Rule OnCloudTrailImagePushed(string Id, OnCloudTrailImagePushedOptions Options = null) @@ -662,7 +662,7 @@ Defines an AWS CloudWatch event rule that can trigger a target when an image is Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -### \`Id\`Required +### \`Id\`Required - *Type:* string @@ -670,15 +670,15 @@ The id of the rule. --- -### \`Options\`Optional +### \`Options\`Optional -- *Type:* OnCloudTrailImagePushedOptions +- *Type:* OnCloudTrailImagePushedOptions Options for adding the rule. --- -## \`OnEvent\` +## \`OnEvent\` \`\`\`csharp private Rule OnEvent(string Id, OnEventOptions Options = null) @@ -689,19 +689,19 @@ Defines a CloudWatch event rule which triggers for repository events. Use \`rule.addEventPattern(pattern)\` to specify a filter. -### \`Id\`Required +### \`Id\`Required - *Type:* string --- -### \`Options\`Optional +### \`Options\`Optional - *Type:* Amazon.CDK.AWS.Events.OnEventOptions --- -## \`OnImageScanCompleted\` +## \`OnImageScanCompleted\` \`\`\`csharp private Rule OnImageScanCompleted(string Id, OnImageScanCompletedOptions Options = null) @@ -709,7 +709,7 @@ private Rule OnImageScanCompleted(string Id, OnImageScanCompletedOptions Options Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. -### \`Id\`Required +### \`Id\`Required - *Type:* string @@ -717,15 +717,15 @@ The id of the rule. --- -### \`Options\`Optional +### \`Options\`Optional -- *Type:* OnImageScanCompletedOptions +- *Type:* OnImageScanCompletedOptions Options for adding the rule. --- -## \`RepositoryUriForDigest\` +## \`RepositoryUriForDigest\` \`\`\`csharp private string RepositoryUriForDigest(string Digest = null) @@ -735,15 +735,15 @@ Returns the URI of the repository for a certain tag. Can be used in \`docker pus ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST] -### \`Digest\`Optional +### \`Digest\`Optional - *Type:* string -Image digest to use (tools usually default to the image with the \\"latest\\" tag if omitted). +Image digest to use (tools usually default to the image with the "latest" tag if omitted). --- -## \`RepositoryUriForTag\` +## \`RepositoryUriForTag\` \`\`\`csharp private string RepositoryUriForTag(string Tag = null) @@ -753,28 +753,28 @@ Returns the URI of the repository for a certain tag. Can be used in \`docker pus ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG] -### \`Tag\`Optional +### \`Tag\`Optional - *Type:* string -Image tag to use (tools usually default to \\"latest\\" if omitted). +Image tag to use (tools usually default to "latest" if omitted). --- -# Properties +# Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| Node | Amazon.CDK.ConstructNode | The construct tree node for this construct. | -| Env | Amazon.CDK.ResourceEnvironment | The environment this resource belongs to. | -| Stack | Amazon.CDK.Stack | The stack in which this resource is defined. | -| RepositoryArn | string | The ARN of the repository. | -| RepositoryName | string | The name of the repository. | -| RepositoryUri | string | The URI of this repository (represents the latest image):. | +| Node | Amazon.CDK.ConstructNode | The construct tree node for this construct. | +| Env | Amazon.CDK.ResourceEnvironment | The environment this resource belongs to. | +| Stack | Amazon.CDK.Stack | The stack in which this resource is defined. | +| RepositoryArn | string | The ARN of the repository. | +| RepositoryName | string | The name of the repository. | +| RepositoryUri | string | The URI of this repository (represents the latest image):. | --- -## \`Node\`Required +## \`Node\`Required \`\`\`csharp public ConstructNode Node { get; } @@ -786,7 +786,7 @@ The construct tree node for this construct. --- -## \`Env\`Required +## \`Env\`Required \`\`\`csharp public ResourceEnvironment Env { get; } @@ -805,7 +805,7 @@ that might be different than the stack they were imported into. --- -## \`Stack\`Required +## \`Stack\`Required \`\`\`csharp public Stack Stack { get; } @@ -817,7 +817,7 @@ The stack in which this resource is defined. --- -## \`RepositoryArn\`Required +## \`RepositoryArn\`Required \`\`\`csharp public string RepositoryArn { get; } @@ -829,7 +829,7 @@ The ARN of the repository. --- -## \`RepositoryName\`Required +## \`RepositoryName\`Required \`\`\`csharp public string RepositoryName { get; } @@ -841,7 +841,7 @@ The name of the repository. --- -## \`RepositoryUri\`Required +## \`RepositoryUri\`Required \`\`\`csharp public string RepositoryUri { get; } @@ -858,29 +858,29 @@ ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY `; exports[`go snapshot 1`] = ` -Object { +{ "displayName": "IRepository", - "docs": Object { + "docs": { "summary": "Represents an ECR repository.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository", "id": "@aws-cdk/aws-ecr.IRepository", - "implementations": Array [ - Object { + "implementations": [ + { "displayName": "Repository", "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.Repository", "id": "@aws-cdk/aws-ecr.Repository", "packageName": "@aws-cdk/aws-ecr", "packageVersion": "1.106.0", }, - Object { + { "displayName": "RepositoryBase", "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.RepositoryBase", "id": "@aws-cdk/aws-ecr.RepositoryBase", "packageName": "@aws-cdk/aws-ecr", "packageVersion": "1.106.0", }, - Object { + { "displayName": "IRepository", "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository", "id": "@aws-cdk/aws-ecr.IRepository", @@ -888,26 +888,26 @@ Object { "packageVersion": "1.106.0", }, ], - "instanceMethods": Array [ - Object { + "instanceMethods": [ + { "displayName": "AddToResourcePolicy", - "docs": Object { + "docs": { "summary": "Add a policy statement to the repository's resource policy.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.AddToResourcePolicy", "id": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "statement", - "docs": Object {}, + "docs": {}, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.AddToResourcePolicy.parameter.statement", "id": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy.parameter.statement", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "PolicyStatement", "fqn": "github.com/aws/aws-cdk-go/awscdk/awsiam/awscdkawsiam.PolicyStatement", "id": "@aws-cdk/aws-iam.PolicyStatement", @@ -920,25 +920,25 @@ Object { ], "usage": "func AddToResourcePolicy(statement PolicyStatement) AddToResourcePolicyResult", }, - Object { + { "displayName": "Grant", - "docs": Object { + "docs": { "summary": "Grant the given principal identity permissions to perform the actions on this repository.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.Grant", "id": "@aws-cdk/aws-ecr.IRepository.grant", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.Grant.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grant.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "github.com/aws/aws-cdk-go/awscdk/awsiam/awscdkawsiam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -948,39 +948,39 @@ Object { ], }, }, - Object { + { "default": undefined, "displayName": "actions", - "docs": Object {}, + "docs": {}, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.Grant.parameter.actions", "id": "@aws-cdk/aws-ecr.IRepository.grant.parameter.actions", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "*string", }, }, ], "usage": "func Grant(grantee IGrantable, actions *string) Grant", }, - Object { + { "displayName": "GrantPull", - "docs": Object { + "docs": { "summary": "Grant the given identity permissions to pull images in this repository.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.GrantPull", "id": "@aws-cdk/aws-ecr.IRepository.grantPull", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.GrantPull.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grantPull.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "github.com/aws/aws-cdk-go/awscdk/awsiam/awscdkawsiam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -993,25 +993,25 @@ Object { ], "usage": "func GrantPull(grantee IGrantable) Grant", }, - Object { + { "displayName": "GrantPullPush", - "docs": Object { + "docs": { "summary": "Grant the given identity permissions to pull and push images to this repository.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.GrantPullPush", "id": "@aws-cdk/aws-ecr.IRepository.grantPullPush", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.GrantPullPush.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grantPullPush.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "github.com/aws/aws-cdk-go/awscdk/awsiam/awscdkawsiam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -1024,42 +1024,42 @@ Object { ], "usage": "func GrantPullPush(grantee IGrantable) Grant", }, - Object { + { "displayName": "OnCloudTrailEvent", - "docs": Object { + "docs": { "remarks": "Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.", "summary": "Define a CloudWatch event that triggers when something happens to this repository.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.OnCloudTrailEvent", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.OnCloudTrailEvent.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "*string", }, }, - Object { + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.OnCloudTrailEvent.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnEventOptions", "fqn": "github.com/aws/aws-cdk-go/awscdkawsevents/awscdkawsevents.OnEventOptions", "id": "@aws-cdk/aws-events.OnEventOptions", @@ -1072,42 +1072,42 @@ that captures the event. This method will not create the Trail.", ], "usage": "func OnCloudTrailEvent(id *string, options OnEventOptions) Rule", }, - Object { + { "displayName": "OnCloudTrailImagePushed", - "docs": Object { + "docs": { "remarks": "Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.", "summary": "Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.OnCloudTrailImagePushed", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.OnCloudTrailImagePushed.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "*string", }, }, - Object { + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.OnCloudTrailImagePushed.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnCloudTrailImagePushedOptions", "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.OnCloudTrailImagePushedOptions", "id": "@aws-cdk/aws-ecr.OnCloudTrailImagePushedOptions", @@ -1120,38 +1120,38 @@ that captures the event. This method will not create the Trail.", ], "usage": "func OnCloudTrailImagePushed(id *string, options OnCloudTrailImagePushedOptions) Rule", }, - Object { + { "displayName": "OnEvent", - "docs": Object { + "docs": { "remarks": "Use \`rule.addEventPattern(pattern)\` to specify a filter.", "summary": "Defines a CloudWatch event rule which triggers for repository events.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.OnEvent", "id": "@aws-cdk/aws-ecr.IRepository.onEvent", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object {}, + "docs": {}, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.OnEvent.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "*string", }, }, - Object { + { "default": undefined, "displayName": "options", - "docs": Object {}, + "docs": {}, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.OnEvent.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnEventOptions", "fqn": "github.com/aws/aws-cdk-go/awscdkawsevents/awscdkawsevents.OnEventOptions", "id": "@aws-cdk/aws-events.OnEventOptions", @@ -1164,40 +1164,40 @@ that captures the event. This method will not create the Trail.", ], "usage": "func OnEvent(id *string, options OnEventOptions) Rule", }, - Object { + { "displayName": "OnImageScanCompleted", - "docs": Object { + "docs": { "summary": "Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.OnImageScanCompleted", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.OnImageScanCompleted.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "*string", }, }, - Object { + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.OnImageScanCompleted.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnImageScanCompletedOptions", "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.OnImageScanCompletedOptions", "id": "@aws-cdk/aws-ecr.OnImageScanCompletedOptions", @@ -1210,50 +1210,50 @@ that captures the event. This method will not create the Trail.", ], "usage": "func OnImageScanCompleted(id *string, options OnImageScanCompletedOptions) Rule", }, - Object { + { "displayName": "RepositoryUriForDigest", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST]", "summary": "Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.RepositoryUriForDigest", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "digest", - "docs": Object { - "summary": "Image digest to use (tools usually default to the image with the \\"latest\\" tag if omitted).", + "docs": { + "summary": "Image digest to use (tools usually default to the image with the "latest" tag if omitted).", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.RepositoryUriForDigest.parameter.digest", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest.parameter.digest", "optional": true, - "type": Object { + "type": { "formattingPattern": "*string", }, }, ], "usage": "func RepositoryUriForDigest(digest *string) *string", }, - Object { + { "displayName": "RepositoryUriForTag", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG]", "summary": "Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.RepositoryUriForTag", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "tag", - "docs": Object { - "summary": "Image tag to use (tools usually default to \\"latest\\" if omitted).", + "docs": { + "summary": "Image tag to use (tools usually default to "latest" if omitted).", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.RepositoryUriForTag.parameter.tag", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag.parameter.tag", "optional": true, - "type": Object { + "type": { "formattingPattern": "*string", }, }, @@ -1261,8 +1261,8 @@ that captures the event. This method will not create the Trail.", "usage": "func RepositoryUriForTag(tag *string) *string", }, ], - "interfaces": Array [ - Object { + "interfaces": [ + { "displayName": "IResource", "fqn": "github.com/aws/aws-cdk-go/awscdk/awscdkcore.IResource", "id": "@aws-cdk/core.IResource", @@ -1270,20 +1270,20 @@ that captures the event. This method will not create the Trail.", "packageVersion": "1.106.0", }, ], - "properties": Array [ - Object { + "properties": [ + { "default": undefined, "displayName": "Node", - "docs": Object { + "docs": { "summary": "The construct tree node for this construct.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.property.Node", "id": "@aws-cdk/aws-ecr.IRepository.property.node", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "ConstructNode", "fqn": "github.com/aws/aws-cdk-go/awscdk/awscdkcore.ConstructNode", "id": "@aws-cdk/core.ConstructNode", @@ -1294,10 +1294,10 @@ that captures the event. This method will not create the Trail.", }, "usage": "func Node() ConstructNode", }, - Object { + { "default": undefined, "displayName": "Env", - "docs": Object { + "docs": { "remarks": "For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; @@ -1309,10 +1309,10 @@ that might be different than the stack they were imported into.", "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.property.Env", "id": "@aws-cdk/aws-ecr.IRepository.property.env", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "ResourceEnvironment", "fqn": "github.com/aws/aws-cdk-go/awscdk/awscdkcore.ResourceEnvironment", "id": "@aws-cdk/core.ResourceEnvironment", @@ -1323,19 +1323,19 @@ that might be different than the stack they were imported into.", }, "usage": "func Env() ResourceEnvironment", }, - Object { + { "default": undefined, "displayName": "Stack", - "docs": Object { + "docs": { "summary": "The stack in which this resource is defined.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.property.Stack", "id": "@aws-cdk/aws-ecr.IRepository.property.stack", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "Stack", "fqn": "github.com/aws/aws-cdk-go/awscdk/awscdkcore.Stack", "id": "@aws-cdk/core.Stack", @@ -1346,45 +1346,45 @@ that might be different than the stack they were imported into.", }, "usage": "func Stack() Stack", }, - Object { + { "default": undefined, "displayName": "RepositoryArn", - "docs": Object { + "docs": { "summary": "The ARN of the repository.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.property.RepositoryArn", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryArn", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "*string", }, "usage": "func RepositoryArn() *string", }, - Object { + { "default": undefined, "displayName": "RepositoryName", - "docs": Object { + "docs": { "summary": "The name of the repository.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.property.RepositoryName", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryName", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "*string", }, "usage": "func RepositoryName() *string", }, - Object { + { "default": undefined, "displayName": "RepositoryUri", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY", "summary": "The URI of this repository (represents the latest image):.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.IRepository.property.RepositoryUri", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryUri", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "*string", }, "usage": "func RepositoryUri() *string", @@ -1394,32 +1394,32 @@ that might be different than the stack they were imported into.", `; exports[`go snapshot 2`] = ` -" IRepository +" IRepository - *Extends:* github.com/aws/aws-cdk-go/awscdk/awscdkcore.IResource -- *Implemented By:* Repository, RepositoryBase, IRepository +- *Implemented By:* Repository, RepositoryBase, IRepository Represents an ECR repository. -# Methods +# Methods | **Name** | **Description** | | --- | --- | -| AddToResourcePolicy | Add a policy statement to the repository's resource policy. | -| Grant | Grant the given principal identity permissions to perform the actions on this repository. | -| GrantPull | Grant the given identity permissions to pull images in this repository. | -| GrantPullPush | Grant the given identity permissions to pull and push images to this repository. | -| OnCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | -| OnCloudTrailImagePushed | Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository. | -| OnEvent | Defines a CloudWatch event rule which triggers for repository events. | -| OnImageScanCompleted | Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. | -| RepositoryUriForDigest | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | -| RepositoryUriForTag | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | +| AddToResourcePolicy | Add a policy statement to the repository's resource policy. | +| Grant | Grant the given principal identity permissions to perform the actions on this repository. | +| GrantPull | Grant the given identity permissions to pull images in this repository. | +| GrantPullPush | Grant the given identity permissions to pull and push images to this repository. | +| OnCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | +| OnCloudTrailImagePushed | Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository. | +| OnEvent | Defines a CloudWatch event rule which triggers for repository events. | +| OnImageScanCompleted | Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. | +| RepositoryUriForDigest | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | +| RepositoryUriForTag | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | --- -## \`AddToResourcePolicy\` +## \`AddToResourcePolicy\` \`\`\`go func AddToResourcePolicy(statement PolicyStatement) AddToResourcePolicyResult @@ -1427,13 +1427,13 @@ func AddToResourcePolicy(statement PolicyStatement) AddToResourcePolicyResult Add a policy statement to the repository's resource policy. -### \`statement\`Required +### \`statement\`Required - *Type:* github.com/aws/aws-cdk-go/awscdk/awsiam/awscdkawsiam.PolicyStatement --- -## \`Grant\` +## \`Grant\` \`\`\`go func Grant(grantee IGrantable, actions *string) Grant @@ -1441,19 +1441,19 @@ func Grant(grantee IGrantable, actions *string) Grant Grant the given principal identity permissions to perform the actions on this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* github.com/aws/aws-cdk-go/awscdk/awsiam/awscdkawsiam.IGrantable --- -### \`actions\`Required +### \`actions\`Required - *Type:* *string --- -## \`GrantPull\` +## \`GrantPull\` \`\`\`go func GrantPull(grantee IGrantable) Grant @@ -1461,13 +1461,13 @@ func GrantPull(grantee IGrantable) Grant Grant the given identity permissions to pull images in this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* github.com/aws/aws-cdk-go/awscdk/awsiam/awscdkawsiam.IGrantable --- -## \`GrantPullPush\` +## \`GrantPullPush\` \`\`\`go func GrantPullPush(grantee IGrantable) Grant @@ -1475,13 +1475,13 @@ func GrantPullPush(grantee IGrantable) Grant Grant the given identity permissions to pull and push images to this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* github.com/aws/aws-cdk-go/awscdk/awsiam/awscdkawsiam.IGrantable --- -## \`OnCloudTrailEvent\` +## \`OnCloudTrailEvent\` \`\`\`go func OnCloudTrailEvent(id *string, options OnEventOptions) Rule @@ -1492,7 +1492,7 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -### \`id\`Required +### \`id\`Required - *Type:* *string @@ -1500,7 +1500,7 @@ The id of the rule. --- -### \`options\`Optional +### \`options\`Optional - *Type:* github.com/aws/aws-cdk-go/awscdkawsevents/awscdkawsevents.OnEventOptions @@ -1508,7 +1508,7 @@ Options for adding the rule. --- -## \`OnCloudTrailImagePushed\` +## \`OnCloudTrailImagePushed\` \`\`\`go func OnCloudTrailImagePushed(id *string, options OnCloudTrailImagePushedOptions) Rule @@ -1519,7 +1519,7 @@ Defines an AWS CloudWatch event rule that can trigger a target when an image is Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -### \`id\`Required +### \`id\`Required - *Type:* *string @@ -1527,15 +1527,15 @@ The id of the rule. --- -### \`options\`Optional +### \`options\`Optional -- *Type:* OnCloudTrailImagePushedOptions +- *Type:* OnCloudTrailImagePushedOptions Options for adding the rule. --- -## \`OnEvent\` +## \`OnEvent\` \`\`\`go func OnEvent(id *string, options OnEventOptions) Rule @@ -1546,19 +1546,19 @@ Defines a CloudWatch event rule which triggers for repository events. Use \`rule.addEventPattern(pattern)\` to specify a filter. -### \`id\`Required +### \`id\`Required - *Type:* *string --- -### \`options\`Optional +### \`options\`Optional - *Type:* github.com/aws/aws-cdk-go/awscdkawsevents/awscdkawsevents.OnEventOptions --- -## \`OnImageScanCompleted\` +## \`OnImageScanCompleted\` \`\`\`go func OnImageScanCompleted(id *string, options OnImageScanCompletedOptions) Rule @@ -1566,7 +1566,7 @@ func OnImageScanCompleted(id *string, options OnImageScanCompletedOptions) Rule Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. -### \`id\`Required +### \`id\`Required - *Type:* *string @@ -1574,15 +1574,15 @@ The id of the rule. --- -### \`options\`Optional +### \`options\`Optional -- *Type:* OnImageScanCompletedOptions +- *Type:* OnImageScanCompletedOptions Options for adding the rule. --- -## \`RepositoryUriForDigest\` +## \`RepositoryUriForDigest\` \`\`\`go func RepositoryUriForDigest(digest *string) *string @@ -1592,15 +1592,15 @@ Returns the URI of the repository for a certain tag. Can be used in \`docker pus ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST] -### \`digest\`Optional +### \`digest\`Optional - *Type:* *string -Image digest to use (tools usually default to the image with the \\"latest\\" tag if omitted). +Image digest to use (tools usually default to the image with the "latest" tag if omitted). --- -## \`RepositoryUriForTag\` +## \`RepositoryUriForTag\` \`\`\`go func RepositoryUriForTag(tag *string) *string @@ -1610,28 +1610,28 @@ Returns the URI of the repository for a certain tag. Can be used in \`docker pus ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG] -### \`tag\`Optional +### \`tag\`Optional - *Type:* *string -Image tag to use (tools usually default to \\"latest\\" if omitted). +Image tag to use (tools usually default to "latest" if omitted). --- -# Properties +# Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| Node | github.com/aws/aws-cdk-go/awscdk/awscdkcore.ConstructNode | The construct tree node for this construct. | -| Env | github.com/aws/aws-cdk-go/awscdk/awscdkcore.ResourceEnvironment | The environment this resource belongs to. | -| Stack | github.com/aws/aws-cdk-go/awscdk/awscdkcore.Stack | The stack in which this resource is defined. | -| RepositoryArn | *string | The ARN of the repository. | -| RepositoryName | *string | The name of the repository. | -| RepositoryUri | *string | The URI of this repository (represents the latest image):. | +| Node | github.com/aws/aws-cdk-go/awscdk/awscdkcore.ConstructNode | The construct tree node for this construct. | +| Env | github.com/aws/aws-cdk-go/awscdk/awscdkcore.ResourceEnvironment | The environment this resource belongs to. | +| Stack | github.com/aws/aws-cdk-go/awscdk/awscdkcore.Stack | The stack in which this resource is defined. | +| RepositoryArn | *string | The ARN of the repository. | +| RepositoryName | *string | The name of the repository. | +| RepositoryUri | *string | The URI of this repository (represents the latest image):. | --- -## \`Node\`Required +## \`Node\`Required \`\`\`go func Node() ConstructNode @@ -1643,7 +1643,7 @@ The construct tree node for this construct. --- -## \`Env\`Required +## \`Env\`Required \`\`\`go func Env() ResourceEnvironment @@ -1662,7 +1662,7 @@ that might be different than the stack they were imported into. --- -## \`Stack\`Required +## \`Stack\`Required \`\`\`go func Stack() Stack @@ -1674,7 +1674,7 @@ The stack in which this resource is defined. --- -## \`RepositoryArn\`Required +## \`RepositoryArn\`Required \`\`\`go func RepositoryArn() *string @@ -1686,7 +1686,7 @@ The ARN of the repository. --- -## \`RepositoryName\`Required +## \`RepositoryName\`Required \`\`\`go func RepositoryName() *string @@ -1698,7 +1698,7 @@ The name of the repository. --- -## \`RepositoryUri\`Required +## \`RepositoryUri\`Required \`\`\`go func RepositoryUri() *string @@ -1715,29 +1715,29 @@ ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY `; exports[`java snapshot 1`] = ` -Object { +{ "displayName": "IRepository", - "docs": Object { + "docs": { "summary": "Represents an ECR repository.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository", "id": "@aws-cdk/aws-ecr.IRepository", - "implementations": Array [ - Object { + "implementations": [ + { "displayName": "Repository", "fqn": "software.amazon.awscdk.services.ecr.Repository", "id": "@aws-cdk/aws-ecr.Repository", "packageName": "@aws-cdk/aws-ecr", "packageVersion": "1.106.0", }, - Object { + { "displayName": "RepositoryBase", "fqn": "software.amazon.awscdk.services.ecr.RepositoryBase", "id": "@aws-cdk/aws-ecr.RepositoryBase", "packageName": "@aws-cdk/aws-ecr", "packageVersion": "1.106.0", }, - Object { + { "displayName": "IRepository", "fqn": "software.amazon.awscdk.services.ecr.IRepository", "id": "@aws-cdk/aws-ecr.IRepository", @@ -1745,26 +1745,26 @@ Object { "packageVersion": "1.106.0", }, ], - "instanceMethods": Array [ - Object { + "instanceMethods": [ + { "displayName": "addToResourcePolicy", - "docs": Object { + "docs": { "summary": "Add a policy statement to the repository's resource policy.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.addToResourcePolicy", "id": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "statement", - "docs": Object {}, + "docs": {}, "fqn": "software.amazon.awscdk.services.ecr.IRepository.addToResourcePolicy.parameter.statement", "id": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy.parameter.statement", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "PolicyStatement", "fqn": "software.amazon.awscdk.services.iam.PolicyStatement", "id": "@aws-cdk/aws-iam.PolicyStatement", @@ -1777,25 +1777,25 @@ Object { ], "usage": "public AddToResourcePolicyResult addToResourcePolicy(PolicyStatement statement)", }, - Object { + { "displayName": "grant", - "docs": Object { + "docs": { "summary": "Grant the given principal identity permissions to perform the actions on this repository.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.grant", "id": "@aws-cdk/aws-ecr.IRepository.grant", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "software.amazon.awscdk.services.ecr.IRepository.grant.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grant.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "software.amazon.awscdk.services.iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -1805,39 +1805,39 @@ Object { ], }, }, - Object { + { "default": undefined, "displayName": "actions", - "docs": Object {}, + "docs": {}, "fqn": "software.amazon.awscdk.services.ecr.IRepository.grant.parameter.actions", "id": "@aws-cdk/aws-ecr.IRepository.grant.parameter.actions", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "java.lang.String", }, }, ], "usage": "public Grant grant(IGrantable grantee, java.lang.String actions)", }, - Object { + { "displayName": "grantPull", - "docs": Object { + "docs": { "summary": "Grant the given identity permissions to pull images in this repository.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.grantPull", "id": "@aws-cdk/aws-ecr.IRepository.grantPull", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "software.amazon.awscdk.services.ecr.IRepository.grantPull.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grantPull.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "software.amazon.awscdk.services.iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -1850,25 +1850,25 @@ Object { ], "usage": "public Grant grantPull(IGrantable grantee)", }, - Object { + { "displayName": "grantPullPush", - "docs": Object { + "docs": { "summary": "Grant the given identity permissions to pull and push images to this repository.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.grantPullPush", "id": "@aws-cdk/aws-ecr.IRepository.grantPullPush", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "software.amazon.awscdk.services.ecr.IRepository.grantPullPush.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grantPullPush.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "software.amazon.awscdk.services.iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -1881,42 +1881,42 @@ Object { ], "usage": "public Grant grantPullPush(IGrantable grantee)", }, - Object { + { "displayName": "onCloudTrailEvent", - "docs": Object { + "docs": { "remarks": "Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.", "summary": "Define a CloudWatch event that triggers when something happens to this repository.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.onCloudTrailEvent", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.onCloudTrailEvent.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "java.lang.String", }, }, - Object { + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.onCloudTrailEvent.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnEventOptions", "fqn": "software.amazon.awscdk.services.events.OnEventOptions", "id": "@aws-cdk/aws-events.OnEventOptions", @@ -1930,42 +1930,42 @@ that captures the event. This method will not create the Trail.", "usage": "public Rule onCloudTrailEvent(java.lang.String id) public Rule onCloudTrailEvent(java.lang.String id, OnEventOptions options)", }, - Object { + { "displayName": "onCloudTrailImagePushed", - "docs": Object { + "docs": { "remarks": "Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.", "summary": "Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.onCloudTrailImagePushed", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.onCloudTrailImagePushed.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "java.lang.String", }, }, - Object { + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.onCloudTrailImagePushed.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnCloudTrailImagePushedOptions", "fqn": "software.amazon.awscdk.services.ecr.OnCloudTrailImagePushedOptions", "id": "@aws-cdk/aws-ecr.OnCloudTrailImagePushedOptions", @@ -1979,38 +1979,38 @@ that captures the event. This method will not create the Trail.", "usage": "public Rule onCloudTrailImagePushed(java.lang.String id) public Rule onCloudTrailImagePushed(java.lang.String id, OnCloudTrailImagePushedOptions options)", }, - Object { + { "displayName": "onEvent", - "docs": Object { + "docs": { "remarks": "Use \`rule.addEventPattern(pattern)\` to specify a filter.", "summary": "Defines a CloudWatch event rule which triggers for repository events.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.onEvent", "id": "@aws-cdk/aws-ecr.IRepository.onEvent", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object {}, + "docs": {}, "fqn": "software.amazon.awscdk.services.ecr.IRepository.onEvent.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "java.lang.String", }, }, - Object { + { "default": undefined, "displayName": "options", - "docs": Object {}, + "docs": {}, "fqn": "software.amazon.awscdk.services.ecr.IRepository.onEvent.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnEventOptions", "fqn": "software.amazon.awscdk.services.events.OnEventOptions", "id": "@aws-cdk/aws-events.OnEventOptions", @@ -2024,40 +2024,40 @@ public Rule onCloudTrailImagePushed(java.lang.String id, OnCloudTrailImagePushed "usage": "public Rule onEvent(java.lang.String id) public Rule onEvent(java.lang.String id, OnEventOptions options)", }, - Object { + { "displayName": "onImageScanCompleted", - "docs": Object { + "docs": { "summary": "Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.onImageScanCompleted", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.onImageScanCompleted.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "java.lang.String", }, }, - Object { + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.onImageScanCompleted.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnImageScanCompletedOptions", "fqn": "software.amazon.awscdk.services.ecr.OnImageScanCompletedOptions", "id": "@aws-cdk/aws-ecr.OnImageScanCompletedOptions", @@ -2071,25 +2071,25 @@ public Rule onEvent(java.lang.String id, OnEventOptions options)", "usage": "public Rule onImageScanCompleted(java.lang.String id) public Rule onImageScanCompleted(java.lang.String id, OnImageScanCompletedOptions options)", }, - Object { + { "displayName": "repositoryUriForDigest", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST]", "summary": "Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.repositoryUriForDigest", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "digest", - "docs": Object { - "summary": "Image digest to use (tools usually default to the image with the \\"latest\\" tag if omitted).", + "docs": { + "summary": "Image digest to use (tools usually default to the image with the "latest" tag if omitted).", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.repositoryUriForDigest.parameter.digest", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest.parameter.digest", "optional": true, - "type": Object { + "type": { "formattingPattern": "java.lang.String", }, }, @@ -2097,25 +2097,25 @@ public Rule onImageScanCompleted(java.lang.String id, OnImageScanCompletedOption "usage": "public java.lang.String repositoryUriForDigest() public java.lang.String repositoryUriForDigest(java.lang.String digest)", }, - Object { + { "displayName": "repositoryUriForTag", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG]", "summary": "Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.repositoryUriForTag", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "tag", - "docs": Object { - "summary": "Image tag to use (tools usually default to \\"latest\\" if omitted).", + "docs": { + "summary": "Image tag to use (tools usually default to "latest" if omitted).", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.repositoryUriForTag.parameter.tag", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag.parameter.tag", "optional": true, - "type": Object { + "type": { "formattingPattern": "java.lang.String", }, }, @@ -2124,8 +2124,8 @@ public java.lang.String repositoryUriForDigest(java.lang.String digest)", public java.lang.String repositoryUriForTag(java.lang.String tag)", }, ], - "interfaces": Array [ - Object { + "interfaces": [ + { "displayName": "IResource", "fqn": "software.amazon.awscdk.core.IResource", "id": "@aws-cdk/core.IResource", @@ -2133,20 +2133,20 @@ public java.lang.String repositoryUriForTag(java.lang.String tag)", "packageVersion": "1.106.0", }, ], - "properties": Array [ - Object { + "properties": [ + { "default": undefined, "displayName": "node", - "docs": Object { + "docs": { "summary": "The construct tree node for this construct.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.property.node", "id": "@aws-cdk/aws-ecr.IRepository.property.node", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "ConstructNode", "fqn": "software.amazon.awscdk.core.ConstructNode", "id": "@aws-cdk/core.ConstructNode", @@ -2157,10 +2157,10 @@ public java.lang.String repositoryUriForTag(java.lang.String tag)", }, "usage": "public ConstructNode getNode();", }, - Object { + { "default": undefined, "displayName": "env", - "docs": Object { + "docs": { "remarks": "For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; @@ -2172,10 +2172,10 @@ that might be different than the stack they were imported into.", "fqn": "software.amazon.awscdk.services.ecr.IRepository.property.env", "id": "@aws-cdk/aws-ecr.IRepository.property.env", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "ResourceEnvironment", "fqn": "software.amazon.awscdk.core.ResourceEnvironment", "id": "@aws-cdk/core.ResourceEnvironment", @@ -2186,19 +2186,19 @@ that might be different than the stack they were imported into.", }, "usage": "public ResourceEnvironment getEnv();", }, - Object { + { "default": undefined, "displayName": "stack", - "docs": Object { + "docs": { "summary": "The stack in which this resource is defined.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.property.stack", "id": "@aws-cdk/aws-ecr.IRepository.property.stack", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "Stack", "fqn": "software.amazon.awscdk.core.Stack", "id": "@aws-cdk/core.Stack", @@ -2209,45 +2209,45 @@ that might be different than the stack they were imported into.", }, "usage": "public Stack getStack();", }, - Object { + { "default": undefined, "displayName": "repositoryArn", - "docs": Object { + "docs": { "summary": "The ARN of the repository.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.property.repositoryArn", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryArn", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "java.lang.String", }, "usage": "public java.lang.String getRepositoryArn();", }, - Object { + { "default": undefined, "displayName": "repositoryName", - "docs": Object { + "docs": { "summary": "The name of the repository.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.property.repositoryName", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryName", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "java.lang.String", }, "usage": "public java.lang.String getRepositoryName();", }, - Object { + { "default": undefined, "displayName": "repositoryUri", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY", "summary": "The URI of this repository (represents the latest image):.", }, "fqn": "software.amazon.awscdk.services.ecr.IRepository.property.repositoryUri", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryUri", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "java.lang.String", }, "usage": "public java.lang.String getRepositoryUri();", @@ -2257,32 +2257,32 @@ that might be different than the stack they were imported into.", `; exports[`java snapshot 2`] = ` -" IRepository +" IRepository - *Extends:* software.amazon.awscdk.core.IResource -- *Implemented By:* Repository, RepositoryBase, IRepository +- *Implemented By:* Repository, RepositoryBase, IRepository Represents an ECR repository. -# Methods +# Methods | **Name** | **Description** | | --- | --- | -| addToResourcePolicy | Add a policy statement to the repository's resource policy. | -| grant | Grant the given principal identity permissions to perform the actions on this repository. | -| grantPull | Grant the given identity permissions to pull images in this repository. | -| grantPullPush | Grant the given identity permissions to pull and push images to this repository. | -| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | -| onCloudTrailImagePushed | Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository. | -| onEvent | Defines a CloudWatch event rule which triggers for repository events. | -| onImageScanCompleted | Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. | -| repositoryUriForDigest | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | -| repositoryUriForTag | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | +| addToResourcePolicy | Add a policy statement to the repository's resource policy. | +| grant | Grant the given principal identity permissions to perform the actions on this repository. | +| grantPull | Grant the given identity permissions to pull images in this repository. | +| grantPullPush | Grant the given identity permissions to pull and push images to this repository. | +| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | +| onCloudTrailImagePushed | Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository. | +| onEvent | Defines a CloudWatch event rule which triggers for repository events. | +| onImageScanCompleted | Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. | +| repositoryUriForDigest | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | +| repositoryUriForTag | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | --- -## \`addToResourcePolicy\` +## \`addToResourcePolicy\` \`\`\`java public AddToResourcePolicyResult addToResourcePolicy(PolicyStatement statement) @@ -2290,13 +2290,13 @@ public AddToResourcePolicyResult addToResourcePolicy(PolicyStatement statement) Add a policy statement to the repository's resource policy. -### \`statement\`Required +### \`statement\`Required - *Type:* software.amazon.awscdk.services.iam.PolicyStatement --- -## \`grant\` +## \`grant\` \`\`\`java public Grant grant(IGrantable grantee, java.lang.String actions) @@ -2304,19 +2304,19 @@ public Grant grant(IGrantable grantee, java.lang.String actions) Grant the given principal identity permissions to perform the actions on this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* software.amazon.awscdk.services.iam.IGrantable --- -### \`actions\`Required +### \`actions\`Required - *Type:* java.lang.String --- -## \`grantPull\` +## \`grantPull\` \`\`\`java public Grant grantPull(IGrantable grantee) @@ -2324,13 +2324,13 @@ public Grant grantPull(IGrantable grantee) Grant the given identity permissions to pull images in this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* software.amazon.awscdk.services.iam.IGrantable --- -## \`grantPullPush\` +## \`grantPullPush\` \`\`\`java public Grant grantPullPush(IGrantable grantee) @@ -2338,13 +2338,13 @@ public Grant grantPullPush(IGrantable grantee) Grant the given identity permissions to pull and push images to this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* software.amazon.awscdk.services.iam.IGrantable --- -## \`onCloudTrailEvent\` +## \`onCloudTrailEvent\` \`\`\`java public Rule onCloudTrailEvent(java.lang.String id) @@ -2356,7 +2356,7 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -### \`id\`Required +### \`id\`Required - *Type:* java.lang.String @@ -2364,7 +2364,7 @@ The id of the rule. --- -### \`options\`Optional +### \`options\`Optional - *Type:* software.amazon.awscdk.services.events.OnEventOptions @@ -2372,7 +2372,7 @@ Options for adding the rule. --- -## \`onCloudTrailImagePushed\` +## \`onCloudTrailImagePushed\` \`\`\`java public Rule onCloudTrailImagePushed(java.lang.String id) @@ -2384,7 +2384,7 @@ Defines an AWS CloudWatch event rule that can trigger a target when an image is Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -### \`id\`Required +### \`id\`Required - *Type:* java.lang.String @@ -2392,15 +2392,15 @@ The id of the rule. --- -### \`options\`Optional +### \`options\`Optional -- *Type:* OnCloudTrailImagePushedOptions +- *Type:* OnCloudTrailImagePushedOptions Options for adding the rule. --- -## \`onEvent\` +## \`onEvent\` \`\`\`java public Rule onEvent(java.lang.String id) @@ -2412,19 +2412,19 @@ Defines a CloudWatch event rule which triggers for repository events. Use \`rule.addEventPattern(pattern)\` to specify a filter. -### \`id\`Required +### \`id\`Required - *Type:* java.lang.String --- -### \`options\`Optional +### \`options\`Optional - *Type:* software.amazon.awscdk.services.events.OnEventOptions --- -## \`onImageScanCompleted\` +## \`onImageScanCompleted\` \`\`\`java public Rule onImageScanCompleted(java.lang.String id) @@ -2433,7 +2433,7 @@ public Rule onImageScanCompleted(java.lang.String id, OnImageScanCompletedOption Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. -### \`id\`Required +### \`id\`Required - *Type:* java.lang.String @@ -2441,15 +2441,15 @@ The id of the rule. --- -### \`options\`Optional +### \`options\`Optional -- *Type:* OnImageScanCompletedOptions +- *Type:* OnImageScanCompletedOptions Options for adding the rule. --- -## \`repositoryUriForDigest\` +## \`repositoryUriForDigest\` \`\`\`java public java.lang.String repositoryUriForDigest() @@ -2460,15 +2460,15 @@ Returns the URI of the repository for a certain tag. Can be used in \`docker pus ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST] -### \`digest\`Optional +### \`digest\`Optional - *Type:* java.lang.String -Image digest to use (tools usually default to the image with the \\"latest\\" tag if omitted). +Image digest to use (tools usually default to the image with the "latest" tag if omitted). --- -## \`repositoryUriForTag\` +## \`repositoryUriForTag\` \`\`\`java public java.lang.String repositoryUriForTag() @@ -2479,28 +2479,28 @@ Returns the URI of the repository for a certain tag. Can be used in \`docker pus ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG] -### \`tag\`Optional +### \`tag\`Optional - *Type:* java.lang.String -Image tag to use (tools usually default to \\"latest\\" if omitted). +Image tag to use (tools usually default to "latest" if omitted). --- -# Properties +# Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | software.amazon.awscdk.core.ConstructNode | The construct tree node for this construct. | -| env | software.amazon.awscdk.core.ResourceEnvironment | The environment this resource belongs to. | -| stack | software.amazon.awscdk.core.Stack | The stack in which this resource is defined. | -| repositoryArn | java.lang.String | The ARN of the repository. | -| repositoryName | java.lang.String | The name of the repository. | -| repositoryUri | java.lang.String | The URI of this repository (represents the latest image):. | +| node | software.amazon.awscdk.core.ConstructNode | The construct tree node for this construct. | +| env | software.amazon.awscdk.core.ResourceEnvironment | The environment this resource belongs to. | +| stack | software.amazon.awscdk.core.Stack | The stack in which this resource is defined. | +| repositoryArn | java.lang.String | The ARN of the repository. | +| repositoryName | java.lang.String | The name of the repository. | +| repositoryUri | java.lang.String | The URI of this repository (represents the latest image):. | --- -## \`node\`Required +## \`node\`Required \`\`\`java public ConstructNode getNode(); @@ -2512,7 +2512,7 @@ The construct tree node for this construct. --- -## \`env\`Required +## \`env\`Required \`\`\`java public ResourceEnvironment getEnv(); @@ -2531,7 +2531,7 @@ that might be different than the stack they were imported into. --- -## \`stack\`Required +## \`stack\`Required \`\`\`java public Stack getStack(); @@ -2543,7 +2543,7 @@ The stack in which this resource is defined. --- -## \`repositoryArn\`Required +## \`repositoryArn\`Required \`\`\`java public java.lang.String getRepositoryArn(); @@ -2555,7 +2555,7 @@ The ARN of the repository. --- -## \`repositoryName\`Required +## \`repositoryName\`Required \`\`\`java public java.lang.String getRepositoryName(); @@ -2567,7 +2567,7 @@ The name of the repository. --- -## \`repositoryUri\`Required +## \`repositoryUri\`Required \`\`\`java public java.lang.String getRepositoryUri(); @@ -2584,29 +2584,29 @@ ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY `; exports[`python snapshot 1`] = ` -Object { +{ "displayName": "IRepository", - "docs": Object { + "docs": { "summary": "Represents an ECR repository.", }, "fqn": "aws_cdk.aws_ecr.IRepository", "id": "@aws-cdk/aws-ecr.IRepository", - "implementations": Array [ - Object { + "implementations": [ + { "displayName": "Repository", "fqn": "aws_cdk.aws_ecr.Repository", "id": "@aws-cdk/aws-ecr.Repository", "packageName": "@aws-cdk/aws-ecr", "packageVersion": "1.106.0", }, - Object { + { "displayName": "RepositoryBase", "fqn": "aws_cdk.aws_ecr.RepositoryBase", "id": "@aws-cdk/aws-ecr.RepositoryBase", "packageName": "@aws-cdk/aws-ecr", "packageVersion": "1.106.0", }, - Object { + { "displayName": "IRepository", "fqn": "aws_cdk.aws_ecr.IRepository", "id": "@aws-cdk/aws-ecr.IRepository", @@ -2614,26 +2614,26 @@ Object { "packageVersion": "1.106.0", }, ], - "instanceMethods": Array [ - Object { + "instanceMethods": [ + { "displayName": "add_to_resource_policy", - "docs": Object { + "docs": { "summary": "Add a policy statement to the repository's resource policy.", }, "fqn": "aws_cdk.aws_ecr.IRepository.add_to_resource_policy", "id": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "statement", - "docs": Object {}, + "docs": {}, "fqn": "aws_cdk.aws_ecr.IRepository.add_to_resource_policy.parameter.statement", "id": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy.parameter.statement", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "PolicyStatement", "fqn": "aws_cdk.aws_iam.PolicyStatement", "id": "@aws-cdk/aws-iam.PolicyStatement", @@ -2648,25 +2648,25 @@ Object { statement: PolicyStatement ) -> AddToResourcePolicyResult", }, - Object { + { "displayName": "grant", - "docs": Object { + "docs": { "summary": "Grant the given principal identity permissions to perform the actions on this repository.", }, "fqn": "aws_cdk.aws_ecr.IRepository.grant", "id": "@aws-cdk/aws-ecr.IRepository.grant", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "aws_cdk.aws_ecr.IRepository.grant.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grant.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "aws_cdk.aws_iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -2676,14 +2676,14 @@ Object { ], }, }, - Object { + { "default": undefined, "displayName": "actions", - "docs": Object {}, + "docs": {}, "fqn": "aws_cdk.aws_ecr.IRepository.grant.parameter.actions", "id": "@aws-cdk/aws-ecr.IRepository.grant.parameter.actions", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, }, @@ -2693,25 +2693,25 @@ Object { actions: str ) -> Grant", }, - Object { + { "displayName": "grant_pull", - "docs": Object { + "docs": { "summary": "Grant the given identity permissions to pull images in this repository.", }, "fqn": "aws_cdk.aws_ecr.IRepository.grant_pull", "id": "@aws-cdk/aws-ecr.IRepository.grantPull", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "aws_cdk.aws_ecr.IRepository.grant_pull.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grantPull.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "aws_cdk.aws_iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -2726,25 +2726,25 @@ Object { grantee: IGrantable ) -> Grant", }, - Object { + { "displayName": "grant_pull_push", - "docs": Object { + "docs": { "summary": "Grant the given identity permissions to pull and push images to this repository.", }, "fqn": "aws_cdk.aws_ecr.IRepository.grant_pull_push", "id": "@aws-cdk/aws-ecr.IRepository.grantPullPush", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "aws_cdk.aws_ecr.IRepository.grant_pull_push.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grantPullPush.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "aws_cdk.aws_iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -2759,47 +2759,47 @@ Object { grantee: IGrantable ) -> Grant", }, - Object { + { "displayName": "on_cloud_trail_event", - "docs": Object { + "docs": { "remarks": "Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.", "summary": "Define a CloudWatch event that triggers when something happens to this repository.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_cloud_trail_event", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_cloud_trail_event.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": "- No description", "displayName": "description", - "docs": Object { + "docs": { "summary": "A description of the rule's purpose.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_cloud_trail_event.parameter.description", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.description", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": "- No additional filtering based on an event pattern.", "displayName": "event_pattern", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html", ], "remarks": "The method that generates the rule probably imposes some type of event @@ -2810,10 +2810,10 @@ on top of that filtering.", "fqn": "aws_cdk.aws_ecr.IRepository.on_cloud_trail_event.parameter.event_pattern", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.eventPattern", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "EventPattern", "fqn": "aws_cdk.aws_events.EventPattern", "id": "@aws-cdk/aws-events.EventPattern", @@ -2823,32 +2823,32 @@ on top of that filtering.", ], }, }, - Object { + { "default": "AWS CloudFormation generates a unique physical ID.", "displayName": "rule_name", - "docs": Object { + "docs": { "summary": "A name for the rule.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_cloud_trail_event.parameter.rule_name", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.ruleName", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": "- No target is added to the rule. Use \`addTarget()\` to add a target.", "displayName": "target", - "docs": Object { + "docs": { "summary": "The target to register for the event.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_cloud_trail_event.parameter.target", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.target", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IRuleTarget", "fqn": "aws_cdk.aws_events.IRuleTarget", "id": "@aws-cdk/aws-events.IRuleTarget", @@ -2867,47 +2867,47 @@ on top of that filtering.", target: IRuleTarget = None ) -> Rule", }, - Object { + { "displayName": "on_cloud_trail_image_pushed", - "docs": Object { + "docs": { "remarks": "Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.", "summary": "Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_cloud_trail_image_pushed", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_cloud_trail_image_pushed.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": "- No description", "displayName": "description", - "docs": Object { + "docs": { "summary": "A description of the rule's purpose.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_cloud_trail_image_pushed.parameter.description", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.description", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": "- No additional filtering based on an event pattern.", "displayName": "event_pattern", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html", ], "remarks": "The method that generates the rule probably imposes some type of event @@ -2918,10 +2918,10 @@ on top of that filtering.", "fqn": "aws_cdk.aws_ecr.IRepository.on_cloud_trail_image_pushed.parameter.event_pattern", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.eventPattern", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "EventPattern", "fqn": "aws_cdk.aws_events.EventPattern", "id": "@aws-cdk/aws-events.EventPattern", @@ -2931,32 +2931,32 @@ on top of that filtering.", ], }, }, - Object { + { "default": "AWS CloudFormation generates a unique physical ID.", "displayName": "rule_name", - "docs": Object { + "docs": { "summary": "A name for the rule.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_cloud_trail_image_pushed.parameter.rule_name", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.ruleName", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": "- No target is added to the rule. Use \`addTarget()\` to add a target.", "displayName": "target", - "docs": Object { + "docs": { "summary": "The target to register for the event.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_cloud_trail_image_pushed.parameter.target", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.target", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IRuleTarget", "fqn": "aws_cdk.aws_events.IRuleTarget", "id": "@aws-cdk/aws-events.IRuleTarget", @@ -2966,16 +2966,16 @@ on top of that filtering.", ], }, }, - Object { + { "default": "- Watch changes to all tags", "displayName": "image_tag", - "docs": Object { + "docs": { "summary": "Only watch changes to this image tag.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_cloud_trail_image_pushed.parameter.image_tag", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.imageTag", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, @@ -2989,45 +2989,45 @@ on top of that filtering.", image_tag: str = None ) -> Rule", }, - Object { + { "displayName": "on_event", - "docs": Object { + "docs": { "remarks": "Use \`rule.addEventPattern(pattern)\` to specify a filter.", "summary": "Defines a CloudWatch event rule which triggers for repository events.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_event", "id": "@aws-cdk/aws-ecr.IRepository.onEvent", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object {}, + "docs": {}, "fqn": "aws_cdk.aws_ecr.IRepository.on_event.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": "- No description", "displayName": "description", - "docs": Object { + "docs": { "summary": "A description of the rule's purpose.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_event.parameter.description", "id": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.description", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": "- No additional filtering based on an event pattern.", "displayName": "event_pattern", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html", ], "remarks": "The method that generates the rule probably imposes some type of event @@ -3038,10 +3038,10 @@ on top of that filtering.", "fqn": "aws_cdk.aws_ecr.IRepository.on_event.parameter.event_pattern", "id": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.eventPattern", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "EventPattern", "fqn": "aws_cdk.aws_events.EventPattern", "id": "@aws-cdk/aws-events.EventPattern", @@ -3051,32 +3051,32 @@ on top of that filtering.", ], }, }, - Object { + { "default": "AWS CloudFormation generates a unique physical ID.", "displayName": "rule_name", - "docs": Object { + "docs": { "summary": "A name for the rule.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_event.parameter.rule_name", "id": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.ruleName", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": "- No target is added to the rule. Use \`addTarget()\` to add a target.", "displayName": "target", - "docs": Object { + "docs": { "summary": "The target to register for the event.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_event.parameter.target", "id": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.target", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IRuleTarget", "fqn": "aws_cdk.aws_events.IRuleTarget", "id": "@aws-cdk/aws-events.IRuleTarget", @@ -3095,45 +3095,45 @@ on top of that filtering.", target: IRuleTarget = None ) -> Rule", }, - Object { + { "displayName": "on_image_scan_completed", - "docs": Object { + "docs": { "summary": "Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_image_scan_completed", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_image_scan_completed.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": "- No description", "displayName": "description", - "docs": Object { + "docs": { "summary": "A description of the rule's purpose.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_image_scan_completed.parameter.description", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.description", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": "- No additional filtering based on an event pattern.", "displayName": "event_pattern", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html", ], "remarks": "The method that generates the rule probably imposes some type of event @@ -3144,10 +3144,10 @@ on top of that filtering.", "fqn": "aws_cdk.aws_ecr.IRepository.on_image_scan_completed.parameter.event_pattern", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.eventPattern", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "EventPattern", "fqn": "aws_cdk.aws_events.EventPattern", "id": "@aws-cdk/aws-events.EventPattern", @@ -3157,32 +3157,32 @@ on top of that filtering.", ], }, }, - Object { + { "default": "AWS CloudFormation generates a unique physical ID.", "displayName": "rule_name", - "docs": Object { + "docs": { "summary": "A name for the rule.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_image_scan_completed.parameter.rule_name", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.ruleName", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, - Object { + { "default": "- No target is added to the rule. Use \`addTarget()\` to add a target.", "displayName": "target", - "docs": Object { + "docs": { "summary": "The target to register for the event.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_image_scan_completed.parameter.target", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.target", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IRuleTarget", "fqn": "aws_cdk.aws_events.IRuleTarget", "id": "@aws-cdk/aws-events.IRuleTarget", @@ -3192,20 +3192,20 @@ on top of that filtering.", ], }, }, - Object { + { "default": "- Watch the changes to the repository with all image tags", "displayName": "image_tags", - "docs": Object { + "docs": { "remarks": "Leave it undefined to watch the full repository.", "summary": "Only watch changes to the image tags spedified.", }, "fqn": "aws_cdk.aws_ecr.IRepository.on_image_scan_completed.parameter.image_tags", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.imageTags", "optional": true, - "type": Object { + "type": { "formattingPattern": "typing.List[%]", - "types": Array [ - Object { + "types": [ + { "formattingPattern": "str", }, ], @@ -3221,25 +3221,25 @@ on top of that filtering.", image_tags: typing.List[str] = None ) -> Rule", }, - Object { + { "displayName": "repository_uri_for_digest", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST]", "summary": "Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`.", }, "fqn": "aws_cdk.aws_ecr.IRepository.repository_uri_for_digest", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "digest", - "docs": Object { - "summary": "Image digest to use (tools usually default to the image with the \\"latest\\" tag if omitted).", + "docs": { + "summary": "Image digest to use (tools usually default to the image with the "latest" tag if omitted).", }, "fqn": "aws_cdk.aws_ecr.IRepository.repository_uri_for_digest.parameter.digest", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest.parameter.digest", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, @@ -3248,25 +3248,25 @@ on top of that filtering.", digest: str = None ) -> str", }, - Object { + { "displayName": "repository_uri_for_tag", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG]", "summary": "Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`.", }, "fqn": "aws_cdk.aws_ecr.IRepository.repository_uri_for_tag", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "tag", - "docs": Object { - "summary": "Image tag to use (tools usually default to \\"latest\\" if omitted).", + "docs": { + "summary": "Image tag to use (tools usually default to "latest" if omitted).", }, "fqn": "aws_cdk.aws_ecr.IRepository.repository_uri_for_tag.parameter.tag", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag.parameter.tag", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, @@ -3276,8 +3276,8 @@ on top of that filtering.", ) -> str", }, ], - "interfaces": Array [ - Object { + "interfaces": [ + { "displayName": "IResource", "fqn": "aws_cdk.core.IResource", "id": "@aws-cdk/core.IResource", @@ -3285,20 +3285,20 @@ on top of that filtering.", "packageVersion": "1.106.0", }, ], - "properties": Array [ - Object { + "properties": [ + { "default": undefined, "displayName": "node", - "docs": Object { + "docs": { "summary": "The construct tree node for this construct.", }, "fqn": "aws_cdk.aws_ecr.IRepository.property.node", "id": "@aws-cdk/aws-ecr.IRepository.property.node", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "ConstructNode", "fqn": "aws_cdk.core.ConstructNode", "id": "@aws-cdk/core.ConstructNode", @@ -3309,10 +3309,10 @@ on top of that filtering.", }, "usage": "node: ConstructNode", }, - Object { + { "default": undefined, "displayName": "env", - "docs": Object { + "docs": { "remarks": "For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; @@ -3324,10 +3324,10 @@ that might be different than the stack they were imported into.", "fqn": "aws_cdk.aws_ecr.IRepository.property.env", "id": "@aws-cdk/aws-ecr.IRepository.property.env", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "ResourceEnvironment", "fqn": "aws_cdk.core.ResourceEnvironment", "id": "@aws-cdk/core.ResourceEnvironment", @@ -3338,19 +3338,19 @@ that might be different than the stack they were imported into.", }, "usage": "env: ResourceEnvironment", }, - Object { + { "default": undefined, "displayName": "stack", - "docs": Object { + "docs": { "summary": "The stack in which this resource is defined.", }, "fqn": "aws_cdk.aws_ecr.IRepository.property.stack", "id": "@aws-cdk/aws-ecr.IRepository.property.stack", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "Stack", "fqn": "aws_cdk.core.Stack", "id": "@aws-cdk/core.Stack", @@ -3361,45 +3361,45 @@ that might be different than the stack they were imported into.", }, "usage": "stack: Stack", }, - Object { + { "default": undefined, "displayName": "repository_arn", - "docs": Object { + "docs": { "summary": "The ARN of the repository.", }, "fqn": "aws_cdk.aws_ecr.IRepository.property.repository_arn", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryArn", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "repository_arn: str", }, - Object { + { "default": undefined, "displayName": "repository_name", - "docs": Object { + "docs": { "summary": "The name of the repository.", }, "fqn": "aws_cdk.aws_ecr.IRepository.property.repository_name", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryName", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "repository_name: str", }, - Object { + { "default": undefined, "displayName": "repository_uri", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY", "summary": "The URI of this repository (represents the latest image):.", }, "fqn": "aws_cdk.aws_ecr.IRepository.property.repository_uri", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryUri", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "repository_uri: str", @@ -3409,32 +3409,32 @@ that might be different than the stack they were imported into.", `; exports[`python snapshot 2`] = ` -" IRepository +" IRepository - *Extends:* aws_cdk.core.IResource -- *Implemented By:* Repository, RepositoryBase, IRepository +- *Implemented By:* Repository, RepositoryBase, IRepository Represents an ECR repository. -# Methods +# Methods | **Name** | **Description** | | --- | --- | -| add_to_resource_policy | Add a policy statement to the repository's resource policy. | -| grant | Grant the given principal identity permissions to perform the actions on this repository. | -| grant_pull | Grant the given identity permissions to pull images in this repository. | -| grant_pull_push | Grant the given identity permissions to pull and push images to this repository. | -| on_cloud_trail_event | Define a CloudWatch event that triggers when something happens to this repository. | -| on_cloud_trail_image_pushed | Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository. | -| on_event | Defines a CloudWatch event rule which triggers for repository events. | -| on_image_scan_completed | Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. | -| repository_uri_for_digest | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | -| repository_uri_for_tag | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | +| add_to_resource_policy | Add a policy statement to the repository's resource policy. | +| grant | Grant the given principal identity permissions to perform the actions on this repository. | +| grant_pull | Grant the given identity permissions to pull images in this repository. | +| grant_pull_push | Grant the given identity permissions to pull and push images to this repository. | +| on_cloud_trail_event | Define a CloudWatch event that triggers when something happens to this repository. | +| on_cloud_trail_image_pushed | Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository. | +| on_event | Defines a CloudWatch event rule which triggers for repository events. | +| on_image_scan_completed | Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. | +| repository_uri_for_digest | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | +| repository_uri_for_tag | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | --- -## \`add_to_resource_policy\` +## \`add_to_resource_policy\` \`\`\`python def add_to_resource_policy( @@ -3444,13 +3444,13 @@ def add_to_resource_policy( Add a policy statement to the repository's resource policy. -### \`statement\`Required +### \`statement\`Required - *Type:* aws_cdk.aws_iam.PolicyStatement --- -## \`grant\` +## \`grant\` \`\`\`python def grant( @@ -3461,19 +3461,19 @@ def grant( Grant the given principal identity permissions to perform the actions on this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* aws_cdk.aws_iam.IGrantable --- -### \`actions\`Required +### \`actions\`Required - *Type:* str --- -## \`grant_pull\` +## \`grant_pull\` \`\`\`python def grant_pull( @@ -3483,13 +3483,13 @@ def grant_pull( Grant the given identity permissions to pull images in this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* aws_cdk.aws_iam.IGrantable --- -## \`grant_pull_push\` +## \`grant_pull_push\` \`\`\`python def grant_pull_push( @@ -3499,13 +3499,13 @@ def grant_pull_push( Grant the given identity permissions to pull and push images to this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* aws_cdk.aws_iam.IGrantable --- -## \`on_cloud_trail_event\` +## \`on_cloud_trail_event\` \`\`\`python def on_cloud_trail_event( @@ -3522,7 +3522,7 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -### \`id\`Required +### \`id\`Required - *Type:* str @@ -3530,7 +3530,7 @@ The id of the rule. --- -### \`description\`Optional +### \`description\`Optional - *Type:* str - *Default:* No description @@ -3539,7 +3539,7 @@ A description of the rule's purpose. --- -### \`event_pattern\`Optional +### \`event_pattern\`Optional - *Type:* aws_cdk.aws_events.EventPattern - *Default:* No additional filtering based on an event pattern. @@ -3554,7 +3554,7 @@ on top of that filtering. --- -### \`rule_name\`Optional +### \`rule_name\`Optional - *Type:* str - *Default:* AWS CloudFormation generates a unique physical ID. @@ -3563,7 +3563,7 @@ A name for the rule. --- -### \`target\`Optional +### \`target\`Optional - *Type:* aws_cdk.aws_events.IRuleTarget - *Default:* No target is added to the rule. Use \`addTarget()\` to add a target. @@ -3572,7 +3572,7 @@ The target to register for the event. --- -## \`on_cloud_trail_image_pushed\` +## \`on_cloud_trail_image_pushed\` \`\`\`python def on_cloud_trail_image_pushed( @@ -3590,7 +3590,7 @@ Defines an AWS CloudWatch event rule that can trigger a target when an image is Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -### \`id\`Required +### \`id\`Required - *Type:* str @@ -3598,7 +3598,7 @@ The id of the rule. --- -### \`description\`Optional +### \`description\`Optional - *Type:* str - *Default:* No description @@ -3607,7 +3607,7 @@ A description of the rule's purpose. --- -### \`event_pattern\`Optional +### \`event_pattern\`Optional - *Type:* aws_cdk.aws_events.EventPattern - *Default:* No additional filtering based on an event pattern. @@ -3622,7 +3622,7 @@ on top of that filtering. --- -### \`rule_name\`Optional +### \`rule_name\`Optional - *Type:* str - *Default:* AWS CloudFormation generates a unique physical ID. @@ -3631,7 +3631,7 @@ A name for the rule. --- -### \`target\`Optional +### \`target\`Optional - *Type:* aws_cdk.aws_events.IRuleTarget - *Default:* No target is added to the rule. Use \`addTarget()\` to add a target. @@ -3640,7 +3640,7 @@ The target to register for the event. --- -### \`image_tag\`Optional +### \`image_tag\`Optional - *Type:* str - *Default:* Watch changes to all tags @@ -3649,7 +3649,7 @@ Only watch changes to this image tag. --- -## \`on_event\` +## \`on_event\` \`\`\`python def on_event( @@ -3666,13 +3666,13 @@ Defines a CloudWatch event rule which triggers for repository events. Use \`rule.addEventPattern(pattern)\` to specify a filter. -### \`id\`Required +### \`id\`Required - *Type:* str --- -### \`description\`Optional +### \`description\`Optional - *Type:* str - *Default:* No description @@ -3681,7 +3681,7 @@ A description of the rule's purpose. --- -### \`event_pattern\`Optional +### \`event_pattern\`Optional - *Type:* aws_cdk.aws_events.EventPattern - *Default:* No additional filtering based on an event pattern. @@ -3696,7 +3696,7 @@ on top of that filtering. --- -### \`rule_name\`Optional +### \`rule_name\`Optional - *Type:* str - *Default:* AWS CloudFormation generates a unique physical ID. @@ -3705,7 +3705,7 @@ A name for the rule. --- -### \`target\`Optional +### \`target\`Optional - *Type:* aws_cdk.aws_events.IRuleTarget - *Default:* No target is added to the rule. Use \`addTarget()\` to add a target. @@ -3714,7 +3714,7 @@ The target to register for the event. --- -## \`on_image_scan_completed\` +## \`on_image_scan_completed\` \`\`\`python def on_image_scan_completed( @@ -3729,7 +3729,7 @@ def on_image_scan_completed( Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. -### \`id\`Required +### \`id\`Required - *Type:* str @@ -3737,7 +3737,7 @@ The id of the rule. --- -### \`description\`Optional +### \`description\`Optional - *Type:* str - *Default:* No description @@ -3746,7 +3746,7 @@ A description of the rule's purpose. --- -### \`event_pattern\`Optional +### \`event_pattern\`Optional - *Type:* aws_cdk.aws_events.EventPattern - *Default:* No additional filtering based on an event pattern. @@ -3761,7 +3761,7 @@ on top of that filtering. --- -### \`rule_name\`Optional +### \`rule_name\`Optional - *Type:* str - *Default:* AWS CloudFormation generates a unique physical ID. @@ -3770,7 +3770,7 @@ A name for the rule. --- -### \`target\`Optional +### \`target\`Optional - *Type:* aws_cdk.aws_events.IRuleTarget - *Default:* No target is added to the rule. Use \`addTarget()\` to add a target. @@ -3779,7 +3779,7 @@ The target to register for the event. --- -### \`image_tags\`Optional +### \`image_tags\`Optional - *Type:* typing.List[str] - *Default:* Watch the changes to the repository with all image tags @@ -3790,7 +3790,7 @@ Leave it undefined to watch the full repository. --- -## \`repository_uri_for_digest\` +## \`repository_uri_for_digest\` \`\`\`python def repository_uri_for_digest( @@ -3802,15 +3802,15 @@ Returns the URI of the repository for a certain tag. Can be used in \`docker pus ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST] -### \`digest\`Optional +### \`digest\`Optional - *Type:* str -Image digest to use (tools usually default to the image with the \\"latest\\" tag if omitted). +Image digest to use (tools usually default to the image with the "latest" tag if omitted). --- -## \`repository_uri_for_tag\` +## \`repository_uri_for_tag\` \`\`\`python def repository_uri_for_tag( @@ -3822,28 +3822,28 @@ Returns the URI of the repository for a certain tag. Can be used in \`docker pus ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG] -### \`tag\`Optional +### \`tag\`Optional - *Type:* str -Image tag to use (tools usually default to \\"latest\\" if omitted). +Image tag to use (tools usually default to "latest" if omitted). --- -# Properties +# Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | aws_cdk.core.ConstructNode | The construct tree node for this construct. | -| env | aws_cdk.core.ResourceEnvironment | The environment this resource belongs to. | -| stack | aws_cdk.core.Stack | The stack in which this resource is defined. | -| repository_arn | str | The ARN of the repository. | -| repository_name | str | The name of the repository. | -| repository_uri | str | The URI of this repository (represents the latest image):. | +| node | aws_cdk.core.ConstructNode | The construct tree node for this construct. | +| env | aws_cdk.core.ResourceEnvironment | The environment this resource belongs to. | +| stack | aws_cdk.core.Stack | The stack in which this resource is defined. | +| repository_arn | str | The ARN of the repository. | +| repository_name | str | The name of the repository. | +| repository_uri | str | The URI of this repository (represents the latest image):. | --- -## \`node\`Required +## \`node\`Required \`\`\`python node: ConstructNode @@ -3855,7 +3855,7 @@ The construct tree node for this construct. --- -## \`env\`Required +## \`env\`Required \`\`\`python env: ResourceEnvironment @@ -3874,7 +3874,7 @@ that might be different than the stack they were imported into. --- -## \`stack\`Required +## \`stack\`Required \`\`\`python stack: Stack @@ -3886,7 +3886,7 @@ The stack in which this resource is defined. --- -## \`repository_arn\`Required +## \`repository_arn\`Required \`\`\`python repository_arn: str @@ -3898,7 +3898,7 @@ The ARN of the repository. --- -## \`repository_name\`Required +## \`repository_name\`Required \`\`\`python repository_name: str @@ -3910,7 +3910,7 @@ The name of the repository. --- -## \`repository_uri\`Required +## \`repository_uri\`Required \`\`\`python repository_uri: str @@ -3927,29 +3927,29 @@ ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY `; exports[`typescript snapshot 1`] = ` -Object { +{ "displayName": "IRepository", - "docs": Object { + "docs": { "summary": "Represents an ECR repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository", "id": "@aws-cdk/aws-ecr.IRepository", - "implementations": Array [ - Object { + "implementations": [ + { "displayName": "Repository", "fqn": "@aws-cdk/aws-ecr.Repository", "id": "@aws-cdk/aws-ecr.Repository", "packageName": "@aws-cdk/aws-ecr", "packageVersion": "1.106.0", }, - Object { + { "displayName": "RepositoryBase", "fqn": "@aws-cdk/aws-ecr.RepositoryBase", "id": "@aws-cdk/aws-ecr.RepositoryBase", "packageName": "@aws-cdk/aws-ecr", "packageVersion": "1.106.0", }, - Object { + { "displayName": "IRepository", "fqn": "@aws-cdk/aws-ecr.IRepository", "id": "@aws-cdk/aws-ecr.IRepository", @@ -3957,26 +3957,26 @@ Object { "packageVersion": "1.106.0", }, ], - "instanceMethods": Array [ - Object { + "instanceMethods": [ + { "displayName": "addToResourcePolicy", - "docs": Object { + "docs": { "summary": "Add a policy statement to the repository's resource policy.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy", "id": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "statement", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy.parameter.statement", "id": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy.parameter.statement", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "PolicyStatement", "fqn": "@aws-cdk/aws-iam.PolicyStatement", "id": "@aws-cdk/aws-iam.PolicyStatement", @@ -3989,25 +3989,25 @@ Object { ], "usage": "public addToResourcePolicy(statement: PolicyStatement): AddToResourcePolicyResult", }, - Object { + { "displayName": "grant", - "docs": Object { + "docs": { "summary": "Grant the given principal identity permissions to perform the actions on this repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.grant", "id": "@aws-cdk/aws-ecr.IRepository.grant", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.IRepository.grant.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grant.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -4017,39 +4017,39 @@ Object { ], }, }, - Object { + { "default": undefined, "displayName": "actions", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.IRepository.grant.parameter.actions", "id": "@aws-cdk/aws-ecr.IRepository.grant.parameter.actions", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, }, ], "usage": "public grant(grantee: IGrantable, actions: string): Grant", }, - Object { + { "displayName": "grantPull", - "docs": Object { + "docs": { "summary": "Grant the given identity permissions to pull images in this repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.grantPull", "id": "@aws-cdk/aws-ecr.IRepository.grantPull", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.IRepository.grantPull.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grantPull.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -4062,25 +4062,25 @@ Object { ], "usage": "public grantPull(grantee: IGrantable): Grant", }, - Object { + { "displayName": "grantPullPush", - "docs": Object { + "docs": { "summary": "Grant the given identity permissions to pull and push images to this repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.grantPullPush", "id": "@aws-cdk/aws-ecr.IRepository.grantPullPush", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.IRepository.grantPullPush.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grantPullPush.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -4093,42 +4093,42 @@ Object { ], "usage": "public grantPullPush(grantee: IGrantable): Grant", }, - Object { + { "displayName": "onCloudTrailEvent", - "docs": Object { + "docs": { "remarks": "Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.", "summary": "Define a CloudWatch event that triggers when something happens to this repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, }, - Object { + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnEventOptions", "fqn": "@aws-cdk/aws-events.OnEventOptions", "id": "@aws-cdk/aws-events.OnEventOptions", @@ -4141,42 +4141,42 @@ that captures the event. This method will not create the Trail.", ], "usage": "public onCloudTrailEvent(id: string, options?: OnEventOptions): Rule", }, - Object { + { "displayName": "onCloudTrailImagePushed", - "docs": Object { + "docs": { "remarks": "Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.", "summary": "Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, }, - Object { + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnCloudTrailImagePushedOptions", "fqn": "@aws-cdk/aws-ecr.OnCloudTrailImagePushedOptions", "id": "@aws-cdk/aws-ecr.OnCloudTrailImagePushedOptions", @@ -4189,38 +4189,38 @@ that captures the event. This method will not create the Trail.", ], "usage": "public onCloudTrailImagePushed(id: string, options?: OnCloudTrailImagePushedOptions): Rule", }, - Object { + { "displayName": "onEvent", - "docs": Object { + "docs": { "remarks": "Use \`rule.addEventPattern(pattern)\` to specify a filter.", "summary": "Defines a CloudWatch event rule which triggers for repository events.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onEvent", "id": "@aws-cdk/aws-ecr.IRepository.onEvent", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, }, - Object { + { "default": undefined, "displayName": "options", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnEventOptions", "fqn": "@aws-cdk/aws-events.OnEventOptions", "id": "@aws-cdk/aws-events.OnEventOptions", @@ -4233,40 +4233,40 @@ that captures the event. This method will not create the Trail.", ], "usage": "public onEvent(id: string, options?: OnEventOptions): Rule", }, - Object { + { "displayName": "onImageScanCompleted", - "docs": Object { + "docs": { "summary": "Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "id", - "docs": Object { + "docs": { "summary": "The id of the rule.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.id", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.id", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, }, - Object { + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnImageScanCompletedOptions", "fqn": "@aws-cdk/aws-ecr.OnImageScanCompletedOptions", "id": "@aws-cdk/aws-ecr.OnImageScanCompletedOptions", @@ -4279,50 +4279,50 @@ that captures the event. This method will not create the Trail.", ], "usage": "public onImageScanCompleted(id: string, options?: OnImageScanCompletedOptions): Rule", }, - Object { + { "displayName": "repositoryUriForDigest", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST]", "summary": "Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "digest", - "docs": Object { - "summary": "Image digest to use (tools usually default to the image with the \\"latest\\" tag if omitted).", + "docs": { + "summary": "Image digest to use (tools usually default to the image with the "latest" tag if omitted).", }, "fqn": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest.parameter.digest", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest.parameter.digest", "optional": true, - "type": Object { + "type": { "formattingPattern": "string", }, }, ], "usage": "public repositoryUriForDigest(digest?: string): string", }, - Object { + { "displayName": "repositoryUriForTag", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG]", "summary": "Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "tag", - "docs": Object { - "summary": "Image tag to use (tools usually default to \\"latest\\" if omitted).", + "docs": { + "summary": "Image tag to use (tools usually default to "latest" if omitted).", }, "fqn": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag.parameter.tag", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag.parameter.tag", "optional": true, - "type": Object { + "type": { "formattingPattern": "string", }, }, @@ -4330,8 +4330,8 @@ that captures the event. This method will not create the Trail.", "usage": "public repositoryUriForTag(tag?: string): string", }, ], - "interfaces": Array [ - Object { + "interfaces": [ + { "displayName": "IResource", "fqn": "@aws-cdk/core.IResource", "id": "@aws-cdk/core.IResource", @@ -4339,20 +4339,20 @@ that captures the event. This method will not create the Trail.", "packageVersion": "1.106.0", }, ], - "properties": Array [ - Object { + "properties": [ + { "default": undefined, "displayName": "node", - "docs": Object { + "docs": { "summary": "The construct tree node for this construct.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.property.node", "id": "@aws-cdk/aws-ecr.IRepository.property.node", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "ConstructNode", "fqn": "@aws-cdk/core.ConstructNode", "id": "@aws-cdk/core.ConstructNode", @@ -4363,10 +4363,10 @@ that captures the event. This method will not create the Trail.", }, "usage": "public readonly node: ConstructNode;", }, - Object { + { "default": undefined, "displayName": "env", - "docs": Object { + "docs": { "remarks": "For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; @@ -4378,10 +4378,10 @@ that might be different than the stack they were imported into.", "fqn": "@aws-cdk/aws-ecr.IRepository.property.env", "id": "@aws-cdk/aws-ecr.IRepository.property.env", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "ResourceEnvironment", "fqn": "@aws-cdk/core.ResourceEnvironment", "id": "@aws-cdk/core.ResourceEnvironment", @@ -4392,19 +4392,19 @@ that might be different than the stack they were imported into.", }, "usage": "public readonly env: ResourceEnvironment;", }, - Object { + { "default": undefined, "displayName": "stack", - "docs": Object { + "docs": { "summary": "The stack in which this resource is defined.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.property.stack", "id": "@aws-cdk/aws-ecr.IRepository.property.stack", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "Stack", "fqn": "@aws-cdk/core.Stack", "id": "@aws-cdk/core.Stack", @@ -4415,45 +4415,45 @@ that might be different than the stack they were imported into.", }, "usage": "public readonly stack: Stack;", }, - Object { + { "default": undefined, "displayName": "repositoryArn", - "docs": Object { + "docs": { "summary": "The ARN of the repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.property.repositoryArn", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryArn", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, "usage": "public readonly repositoryArn: string;", }, - Object { + { "default": undefined, "displayName": "repositoryName", - "docs": Object { + "docs": { "summary": "The name of the repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.property.repositoryName", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryName", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, "usage": "public readonly repositoryName: string;", }, - Object { + { "default": undefined, "displayName": "repositoryUri", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY", "summary": "The URI of this repository (represents the latest image):.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.property.repositoryUri", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryUri", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "string", }, "usage": "public readonly repositoryUri: string;", @@ -4463,32 +4463,32 @@ that might be different than the stack they were imported into.", `; exports[`typescript snapshot 2`] = ` -" IRepository +" IRepository - *Extends:* @aws-cdk/core.IResource -- *Implemented By:* Repository, RepositoryBase, IRepository +- *Implemented By:* Repository, RepositoryBase, IRepository Represents an ECR repository. -# Methods +# Methods | **Name** | **Description** | | --- | --- | -| addToResourcePolicy | Add a policy statement to the repository's resource policy. | -| grant | Grant the given principal identity permissions to perform the actions on this repository. | -| grantPull | Grant the given identity permissions to pull images in this repository. | -| grantPullPush | Grant the given identity permissions to pull and push images to this repository. | -| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | -| onCloudTrailImagePushed | Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository. | -| onEvent | Defines a CloudWatch event rule which triggers for repository events. | -| onImageScanCompleted | Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. | -| repositoryUriForDigest | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | -| repositoryUriForTag | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | +| addToResourcePolicy | Add a policy statement to the repository's resource policy. | +| grant | Grant the given principal identity permissions to perform the actions on this repository. | +| grantPull | Grant the given identity permissions to pull images in this repository. | +| grantPullPush | Grant the given identity permissions to pull and push images to this repository. | +| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | +| onCloudTrailImagePushed | Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository. | +| onEvent | Defines a CloudWatch event rule which triggers for repository events. | +| onImageScanCompleted | Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. | +| repositoryUriForDigest | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | +| repositoryUriForTag | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | --- -## \`addToResourcePolicy\` +## \`addToResourcePolicy\` \`\`\`typescript public addToResourcePolicy(statement: PolicyStatement): AddToResourcePolicyResult @@ -4496,13 +4496,13 @@ public addToResourcePolicy(statement: PolicyStatement): AddToResourcePolicyResul Add a policy statement to the repository's resource policy. -### \`statement\`Required +### \`statement\`Required - *Type:* @aws-cdk/aws-iam.PolicyStatement --- -## \`grant\` +## \`grant\` \`\`\`typescript public grant(grantee: IGrantable, actions: string): Grant @@ -4510,19 +4510,19 @@ public grant(grantee: IGrantable, actions: string): Grant Grant the given principal identity permissions to perform the actions on this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -### \`actions\`Required +### \`actions\`Required - *Type:* string --- -## \`grantPull\` +## \`grantPull\` \`\`\`typescript public grantPull(grantee: IGrantable): Grant @@ -4530,13 +4530,13 @@ public grantPull(grantee: IGrantable): Grant Grant the given identity permissions to pull images in this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -## \`grantPullPush\` +## \`grantPullPush\` \`\`\`typescript public grantPullPush(grantee: IGrantable): Grant @@ -4544,13 +4544,13 @@ public grantPullPush(grantee: IGrantable): Grant Grant the given identity permissions to pull and push images to this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -## \`onCloudTrailEvent\` +## \`onCloudTrailEvent\` \`\`\`typescript public onCloudTrailEvent(id: string, options?: OnEventOptions): Rule @@ -4561,7 +4561,7 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -### \`id\`Required +### \`id\`Required - *Type:* string @@ -4569,7 +4569,7 @@ The id of the rule. --- -### \`options\`Optional +### \`options\`Optional - *Type:* @aws-cdk/aws-events.OnEventOptions @@ -4577,7 +4577,7 @@ Options for adding the rule. --- -## \`onCloudTrailImagePushed\` +## \`onCloudTrailImagePushed\` \`\`\`typescript public onCloudTrailImagePushed(id: string, options?: OnCloudTrailImagePushedOptions): Rule @@ -4588,7 +4588,7 @@ Defines an AWS CloudWatch event rule that can trigger a target when an image is Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -### \`id\`Required +### \`id\`Required - *Type:* string @@ -4596,15 +4596,15 @@ The id of the rule. --- -### \`options\`Optional +### \`options\`Optional -- *Type:* OnCloudTrailImagePushedOptions +- *Type:* OnCloudTrailImagePushedOptions Options for adding the rule. --- -## \`onEvent\` +## \`onEvent\` \`\`\`typescript public onEvent(id: string, options?: OnEventOptions): Rule @@ -4615,19 +4615,19 @@ Defines a CloudWatch event rule which triggers for repository events. Use \`rule.addEventPattern(pattern)\` to specify a filter. -### \`id\`Required +### \`id\`Required - *Type:* string --- -### \`options\`Optional +### \`options\`Optional - *Type:* @aws-cdk/aws-events.OnEventOptions --- -## \`onImageScanCompleted\` +## \`onImageScanCompleted\` \`\`\`typescript public onImageScanCompleted(id: string, options?: OnImageScanCompletedOptions): Rule @@ -4635,7 +4635,7 @@ public onImageScanCompleted(id: string, options?: OnImageScanCompletedOptions): Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. -### \`id\`Required +### \`id\`Required - *Type:* string @@ -4643,15 +4643,15 @@ The id of the rule. --- -### \`options\`Optional +### \`options\`Optional -- *Type:* OnImageScanCompletedOptions +- *Type:* OnImageScanCompletedOptions Options for adding the rule. --- -## \`repositoryUriForDigest\` +## \`repositoryUriForDigest\` \`\`\`typescript public repositoryUriForDigest(digest?: string): string @@ -4661,15 +4661,15 @@ Returns the URI of the repository for a certain tag. Can be used in \`docker pus ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST] -### \`digest\`Optional +### \`digest\`Optional - *Type:* string -Image digest to use (tools usually default to the image with the \\"latest\\" tag if omitted). +Image digest to use (tools usually default to the image with the "latest" tag if omitted). --- -## \`repositoryUriForTag\` +## \`repositoryUriForTag\` \`\`\`typescript public repositoryUriForTag(tag?: string): string @@ -4679,28 +4679,28 @@ Returns the URI of the repository for a certain tag. Can be used in \`docker pus ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG] -### \`tag\`Optional +### \`tag\`Optional - *Type:* string -Image tag to use (tools usually default to \\"latest\\" if omitted). +Image tag to use (tools usually default to "latest" if omitted). --- -# Properties +# Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | @aws-cdk/core.ConstructNode | The construct tree node for this construct. | -| env | @aws-cdk/core.ResourceEnvironment | The environment this resource belongs to. | -| stack | @aws-cdk/core.Stack | The stack in which this resource is defined. | -| repositoryArn | string | The ARN of the repository. | -| repositoryName | string | The name of the repository. | -| repositoryUri | string | The URI of this repository (represents the latest image):. | +| node | @aws-cdk/core.ConstructNode | The construct tree node for this construct. | +| env | @aws-cdk/core.ResourceEnvironment | The environment this resource belongs to. | +| stack | @aws-cdk/core.Stack | The stack in which this resource is defined. | +| repositoryArn | string | The ARN of the repository. | +| repositoryName | string | The name of the repository. | +| repositoryUri | string | The URI of this repository (represents the latest image):. | --- -## \`node\`Required +## \`node\`Required \`\`\`typescript public readonly node: ConstructNode; @@ -4712,7 +4712,7 @@ The construct tree node for this construct. --- -## \`env\`Required +## \`env\`Required \`\`\`typescript public readonly env: ResourceEnvironment; @@ -4731,7 +4731,7 @@ that might be different than the stack they were imported into. --- -## \`stack\`Required +## \`stack\`Required \`\`\`typescript public readonly stack: Stack; @@ -4743,7 +4743,7 @@ The stack in which this resource is defined. --- -## \`repositoryArn\`Required +## \`repositoryArn\`Required \`\`\`typescript public readonly repositoryArn: string; @@ -4755,7 +4755,7 @@ The ARN of the repository. --- -## \`repositoryName\`Required +## \`repositoryName\`Required \`\`\`typescript public readonly repositoryName: string; @@ -4767,7 +4767,7 @@ The name of the repository. --- -## \`repositoryUri\`Required +## \`repositoryUri\`Required \`\`\`typescript public readonly repositoryUri: string; @@ -4784,29 +4784,29 @@ ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY `; exports[`wing snapshot 1`] = ` -Object { +{ "displayName": "IRepository", - "docs": Object { + "docs": { "summary": "Represents an ECR repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository", "id": "@aws-cdk/aws-ecr.IRepository", - "implementations": Array [ - Object { + "implementations": [ + { "displayName": "Repository", "fqn": "@aws-cdk/aws-ecr.Repository", "id": "@aws-cdk/aws-ecr.Repository", "packageName": "@aws-cdk/aws-ecr", "packageVersion": "1.106.0", }, - Object { + { "displayName": "RepositoryBase", "fqn": "@aws-cdk/aws-ecr.RepositoryBase", "id": "@aws-cdk/aws-ecr.RepositoryBase", "packageName": "@aws-cdk/aws-ecr", "packageVersion": "1.106.0", }, - Object { + { "displayName": "IRepository", "fqn": "@aws-cdk/aws-ecr.IRepository", "id": "@aws-cdk/aws-ecr.IRepository", @@ -4814,26 +4814,26 @@ Object { "packageVersion": "1.106.0", }, ], - "instanceMethods": Array [ - Object { + "instanceMethods": [ + { "displayName": "addToResourcePolicy", - "docs": Object { + "docs": { "summary": "Add a policy statement to the repository's resource policy.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy", "id": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "statement", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy.parameter.statement", "id": "@aws-cdk/aws-ecr.IRepository.addToResourcePolicy.parameter.statement", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "PolicyStatement", "fqn": "@aws-cdk/aws-iam.PolicyStatement", "id": "@aws-cdk/aws-iam.PolicyStatement", @@ -4846,25 +4846,25 @@ Object { ], "usage": "addToResourcePolicy(statement: PolicyStatement): AddToResourcePolicyResult", }, - Object { + { "displayName": "grant", - "docs": Object { + "docs": { "summary": "Grant the given principal identity permissions to perform the actions on this repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.grant", "id": "@aws-cdk/aws-ecr.IRepository.grant", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.IRepository.grant.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grant.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -4874,39 +4874,39 @@ Object { ], }, }, - Object { + { "default": undefined, "displayName": "actions", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.IRepository.grant.parameter.actions", "id": "@aws-cdk/aws-ecr.IRepository.grant.parameter.actions", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, }, ], "usage": "grant(grantee: IGrantable, ...actions: Array): Grant", }, - Object { + { "displayName": "grantPull", - "docs": Object { + "docs": { "summary": "Grant the given identity permissions to pull images in this repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.grantPull", "id": "@aws-cdk/aws-ecr.IRepository.grantPull", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.IRepository.grantPull.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grantPull.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -4919,25 +4919,25 @@ Object { ], "usage": "grantPull(grantee: IGrantable): Grant", }, - Object { + { "displayName": "grantPullPush", - "docs": Object { + "docs": { "summary": "Grant the given identity permissions to pull and push images to this repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.grantPullPush", "id": "@aws-cdk/aws-ecr.IRepository.grantPullPush", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.IRepository.grantPullPush.parameter.grantee", "id": "@aws-cdk/aws-ecr.IRepository.grantPullPush.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -4950,29 +4950,29 @@ Object { ], "usage": "grantPullPush(grantee: IGrantable): Grant", }, - Object { + { "displayName": "onCloudTrailEvent", - "docs": Object { + "docs": { "remarks": "Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.", "summary": "Define a CloudWatch event that triggers when something happens to this repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailEvent.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnEventOptions", "fqn": "@aws-cdk/aws-events.OnEventOptions", "id": "@aws-cdk/aws-events.OnEventOptions", @@ -4985,29 +4985,29 @@ that captures the event. This method will not create the Trail.", ], "usage": "onCloudTrailEvent(options?: OnEventOptions): Rule", }, - Object { + { "displayName": "onCloudTrailImagePushed", - "docs": Object { + "docs": { "remarks": "Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.", "summary": "Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onCloudTrailImagePushed.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnCloudTrailImagePushedOptions", "fqn": "@aws-cdk/aws-ecr.OnCloudTrailImagePushedOptions", "id": "@aws-cdk/aws-ecr.OnCloudTrailImagePushedOptions", @@ -5020,27 +5020,27 @@ that captures the event. This method will not create the Trail.", ], "usage": "onCloudTrailImagePushed(options?: OnCloudTrailImagePushedOptions): Rule", }, - Object { + { "displayName": "onEvent", - "docs": Object { + "docs": { "remarks": "Use \`rule.addEventPattern(pattern)\` to specify a filter.", "summary": "Defines a CloudWatch event rule which triggers for repository events.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onEvent", "id": "@aws-cdk/aws-ecr.IRepository.onEvent", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "options", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onEvent.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnEventOptions", "fqn": "@aws-cdk/aws-events.OnEventOptions", "id": "@aws-cdk/aws-events.OnEventOptions", @@ -5053,27 +5053,27 @@ that captures the event. This method will not create the Trail.", ], "usage": "onEvent(options?: OnEventOptions): Rule", }, - Object { + { "displayName": "onImageScanCompleted", - "docs": Object { + "docs": { "summary": "Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "options", - "docs": Object { + "docs": { "summary": "Options for adding the rule.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.options", "id": "@aws-cdk/aws-ecr.IRepository.onImageScanCompleted.parameter.options", "optional": true, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "OnImageScanCompletedOptions", "fqn": "@aws-cdk/aws-ecr.OnImageScanCompletedOptions", "id": "@aws-cdk/aws-ecr.OnImageScanCompletedOptions", @@ -5086,50 +5086,50 @@ that captures the event. This method will not create the Trail.", ], "usage": "onImageScanCompleted(options?: OnImageScanCompletedOptions): Rule", }, - Object { + { "displayName": "repositoryUriForDigest", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST]", "summary": "Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "digest", - "docs": Object { - "summary": "Image digest to use (tools usually default to the image with the \\"latest\\" tag if omitted).", + "docs": { + "summary": "Image digest to use (tools usually default to the image with the "latest" tag if omitted).", }, "fqn": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest.parameter.digest", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForDigest.parameter.digest", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, ], "usage": "repositoryUriForDigest(digest?: str): str", }, - Object { + { "displayName": "repositoryUriForTag", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG]", "summary": "Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "tag", - "docs": Object { - "summary": "Image tag to use (tools usually default to \\"latest\\" if omitted).", + "docs": { + "summary": "Image tag to use (tools usually default to "latest" if omitted).", }, "fqn": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag.parameter.tag", "id": "@aws-cdk/aws-ecr.IRepository.repositoryUriForTag.parameter.tag", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, }, @@ -5137,8 +5137,8 @@ that captures the event. This method will not create the Trail.", "usage": "repositoryUriForTag(tag?: str): str", }, ], - "interfaces": Array [ - Object { + "interfaces": [ + { "displayName": "IResource", "fqn": "@aws-cdk/core.IResource", "id": "@aws-cdk/core.IResource", @@ -5146,20 +5146,20 @@ that captures the event. This method will not create the Trail.", "packageVersion": "1.106.0", }, ], - "properties": Array [ - Object { + "properties": [ + { "default": undefined, "displayName": "node", - "docs": Object { + "docs": { "summary": "The construct tree node for this construct.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.property.node", "id": "@aws-cdk/aws-ecr.IRepository.property.node", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "ConstructNode", "fqn": "@aws-cdk/core.ConstructNode", "id": "@aws-cdk/core.ConstructNode", @@ -5170,10 +5170,10 @@ that captures the event. This method will not create the Trail.", }, "usage": "node: ConstructNode;", }, - Object { + { "default": undefined, "displayName": "env", - "docs": Object { + "docs": { "remarks": "For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; @@ -5185,10 +5185,10 @@ that might be different than the stack they were imported into.", "fqn": "@aws-cdk/aws-ecr.IRepository.property.env", "id": "@aws-cdk/aws-ecr.IRepository.property.env", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "ResourceEnvironment", "fqn": "@aws-cdk/core.ResourceEnvironment", "id": "@aws-cdk/core.ResourceEnvironment", @@ -5199,19 +5199,19 @@ that might be different than the stack they were imported into.", }, "usage": "env: ResourceEnvironment;", }, - Object { + { "default": undefined, "displayName": "stack", - "docs": Object { + "docs": { "summary": "The stack in which this resource is defined.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.property.stack", "id": "@aws-cdk/aws-ecr.IRepository.property.stack", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "Stack", "fqn": "@aws-cdk/core.Stack", "id": "@aws-cdk/core.Stack", @@ -5222,45 +5222,45 @@ that might be different than the stack they were imported into.", }, "usage": "stack: Stack;", }, - Object { + { "default": undefined, "displayName": "repositoryArn", - "docs": Object { + "docs": { "summary": "The ARN of the repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.property.repositoryArn", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryArn", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "repositoryArn: str;", }, - Object { + { "default": undefined, "displayName": "repositoryName", - "docs": Object { + "docs": { "summary": "The name of the repository.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.property.repositoryName", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryName", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "repositoryName: str;", }, - Object { + { "default": undefined, "displayName": "repositoryUri", - "docs": Object { + "docs": { "remarks": "ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY", "summary": "The URI of this repository (represents the latest image):.", }, "fqn": "@aws-cdk/aws-ecr.IRepository.property.repositoryUri", "id": "@aws-cdk/aws-ecr.IRepository.property.repositoryUri", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "repositoryUri: str;", @@ -5270,32 +5270,32 @@ that might be different than the stack they were imported into.", `; exports[`wing snapshot 2`] = ` -" IRepository +" IRepository - *Extends:* @aws-cdk/core.IResource -- *Implemented By:* Repository, RepositoryBase, IRepository +- *Implemented By:* Repository, RepositoryBase, IRepository Represents an ECR repository. -# Methods +# Methods | **Name** | **Description** | | --- | --- | -| addToResourcePolicy | Add a policy statement to the repository's resource policy. | -| grant | Grant the given principal identity permissions to perform the actions on this repository. | -| grantPull | Grant the given identity permissions to pull images in this repository. | -| grantPullPush | Grant the given identity permissions to pull and push images to this repository. | -| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | -| onCloudTrailImagePushed | Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository. | -| onEvent | Defines a CloudWatch event rule which triggers for repository events. | -| onImageScanCompleted | Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. | -| repositoryUriForDigest | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | -| repositoryUriForTag | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | +| addToResourcePolicy | Add a policy statement to the repository's resource policy. | +| grant | Grant the given principal identity permissions to perform the actions on this repository. | +| grantPull | Grant the given identity permissions to pull images in this repository. | +| grantPullPush | Grant the given identity permissions to pull and push images to this repository. | +| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | +| onCloudTrailImagePushed | Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this repository. | +| onEvent | Defines a CloudWatch event rule which triggers for repository events. | +| onImageScanCompleted | Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. | +| repositoryUriForDigest | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | +| repositoryUriForTag | Returns the URI of the repository for a certain tag. Can be used in \`docker push/pull\`. | --- -## \`addToResourcePolicy\` +## \`addToResourcePolicy\` \`\`\`wing addToResourcePolicy(statement: PolicyStatement): AddToResourcePolicyResult @@ -5303,13 +5303,13 @@ addToResourcePolicy(statement: PolicyStatement): AddToResourcePolicyResult Add a policy statement to the repository's resource policy. -### \`statement\`Required +### \`statement\`Required - *Type:* @aws-cdk/aws-iam.PolicyStatement --- -## \`grant\` +## \`grant\` \`\`\`wing grant(grantee: IGrantable, ...actions: Array): Grant @@ -5317,19 +5317,19 @@ grant(grantee: IGrantable, ...actions: Array): Grant Grant the given principal identity permissions to perform the actions on this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -### \`actions\`Required +### \`actions\`Required - *Type:* str --- -## \`grantPull\` +## \`grantPull\` \`\`\`wing grantPull(grantee: IGrantable): Grant @@ -5337,13 +5337,13 @@ grantPull(grantee: IGrantable): Grant Grant the given identity permissions to pull images in this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -## \`grantPullPush\` +## \`grantPullPush\` \`\`\`wing grantPullPush(grantee: IGrantable): Grant @@ -5351,13 +5351,13 @@ grantPullPush(grantee: IGrantable): Grant Grant the given identity permissions to pull and push images to this repository. -### \`grantee\`Required +### \`grantee\`Required - *Type:* @aws-cdk/aws-iam.IGrantable --- -## \`onCloudTrailEvent\` +## \`onCloudTrailEvent\` \`\`\`wing onCloudTrailEvent(options?: OnEventOptions): Rule @@ -5368,7 +5368,7 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -### \`options\`Optional +### \`options\`Optional - *Type:* @aws-cdk/aws-events.OnEventOptions @@ -5376,7 +5376,7 @@ Options for adding the rule. --- -## \`onCloudTrailImagePushed\` +## \`onCloudTrailImagePushed\` \`\`\`wing onCloudTrailImagePushed(options?: OnCloudTrailImagePushedOptions): Rule @@ -5387,15 +5387,15 @@ Defines an AWS CloudWatch event rule that can trigger a target when an image is Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -### \`options\`Optional +### \`options\`Optional -- *Type:* OnCloudTrailImagePushedOptions +- *Type:* OnCloudTrailImagePushedOptions Options for adding the rule. --- -## \`onEvent\` +## \`onEvent\` \`\`\`wing onEvent(options?: OnEventOptions): Rule @@ -5406,13 +5406,13 @@ Defines a CloudWatch event rule which triggers for repository events. Use \`rule.addEventPattern(pattern)\` to specify a filter. -### \`options\`Optional +### \`options\`Optional - *Type:* @aws-cdk/aws-events.OnEventOptions --- -## \`onImageScanCompleted\` +## \`onImageScanCompleted\` \`\`\`wing onImageScanCompleted(options?: OnImageScanCompletedOptions): Rule @@ -5420,15 +5420,15 @@ onImageScanCompleted(options?: OnImageScanCompletedOptions): Rule Defines an AWS CloudWatch event rule that can trigger a target when the image scan is completed. -### \`options\`Optional +### \`options\`Optional -- *Type:* OnImageScanCompletedOptions +- *Type:* OnImageScanCompletedOptions Options for adding the rule. --- -## \`repositoryUriForDigest\` +## \`repositoryUriForDigest\` \`\`\`wing repositoryUriForDigest(digest?: str): str @@ -5438,15 +5438,15 @@ Returns the URI of the repository for a certain tag. Can be used in \`docker pus ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[@DIGEST] -### \`digest\`Optional +### \`digest\`Optional - *Type:* str -Image digest to use (tools usually default to the image with the \\"latest\\" tag if omitted). +Image digest to use (tools usually default to the image with the "latest" tag if omitted). --- -## \`repositoryUriForTag\` +## \`repositoryUriForTag\` \`\`\`wing repositoryUriForTag(tag?: str): str @@ -5456,28 +5456,28 @@ Returns the URI of the repository for a certain tag. Can be used in \`docker pus ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY[:TAG] -### \`tag\`Optional +### \`tag\`Optional - *Type:* str -Image tag to use (tools usually default to \\"latest\\" if omitted). +Image tag to use (tools usually default to "latest" if omitted). --- -# Properties +# Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | @aws-cdk/core.ConstructNode | The construct tree node for this construct. | -| env | @aws-cdk/core.ResourceEnvironment | The environment this resource belongs to. | -| stack | @aws-cdk/core.Stack | The stack in which this resource is defined. | -| repositoryArn | str | The ARN of the repository. | -| repositoryName | str | The name of the repository. | -| repositoryUri | str | The URI of this repository (represents the latest image):. | +| node | @aws-cdk/core.ConstructNode | The construct tree node for this construct. | +| env | @aws-cdk/core.ResourceEnvironment | The environment this resource belongs to. | +| stack | @aws-cdk/core.Stack | The stack in which this resource is defined. | +| repositoryArn | str | The ARN of the repository. | +| repositoryName | str | The name of the repository. | +| repositoryUri | str | The URI of this repository (represents the latest image):. | --- -## \`node\`Required +## \`node\`Required \`\`\`wing node: ConstructNode; @@ -5489,7 +5489,7 @@ The construct tree node for this construct. --- -## \`env\`Required +## \`env\`Required \`\`\`wing env: ResourceEnvironment; @@ -5508,7 +5508,7 @@ that might be different than the stack they were imported into. --- -## \`stack\`Required +## \`stack\`Required \`\`\`wing stack: Stack; @@ -5520,7 +5520,7 @@ The stack in which this resource is defined. --- -## \`repositoryArn\`Required +## \`repositoryArn\`Required \`\`\`wing repositoryArn: str; @@ -5532,7 +5532,7 @@ The ARN of the repository. --- -## \`repositoryName\`Required +## \`repositoryName\`Required \`\`\`wing repositoryName: str; @@ -5544,7 +5544,7 @@ The name of the repository. --- -## \`repositoryUri\`Required +## \`repositoryUri\`Required \`\`\`wing repositoryUri: str; diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/markdown.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/markdown.test.ts.snap index 6721cd97140..297ab7d54c1 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/markdown.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/markdown.test.ts.snap @@ -1,69 +1,69 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`complex link formatter wing snapshot 1`] = ` +exports[`complex link formatter > wing snapshot 1`] = ` "# construct-library This is a test project to make sure the \`jsii-docgen\` cli property renders API documentation for construct libraries. -# API Reference +# API Reference -## Resources +## Resources -### GreeterBucket +### GreeterBucket -#### Initializers +#### Initializers \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; new GreeterBucket(props?: BucketProps); \`\`\` | **Name** | **Type** | **Description** | | --- | --- | --- | -| props | BucketProps | *No description.* | +| props | BucketProps | *No description.* | --- -##### \`props\`Optional +##### \`props\`Optional -- *Type:* BucketProps +- *Type:* BucketProps --- -#### Methods +#### Methods | **Name** | **Description** | | --- | --- | -| applyRemovalPolicy | Apply the given removal policy to this resource. | -| addEventNotification | Adds a bucket notification event destination. | -| addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | -| addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | -| arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | -| grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | -| grantPublicAccess | Allows unrestricted access to objects from this bucket. | -| grantPut | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | -| grantPutAcl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | -| grantRead | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grantReadWrite | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grantWrite | Grant write permissions to this bucket to an IAM principal. | -| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | -| onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | -| onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3UrlForObject | The S3 URL of an S3 object. For example:. | -| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | -| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | -| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | -| addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | -| addInventory | Add an inventory configuration. | -| addLifecycleRule | Add a lifecycle rule to the bucket. | -| addMetric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | -| greet | *No description.* | - ---- - -##### \`applyRemovalPolicy\` +| applyRemovalPolicy | Apply the given removal policy to this resource. | +| addEventNotification | Adds a bucket notification event destination. | +| addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | +| addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | +| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | +| grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | +| grantPublicAccess | Allows unrestricted access to objects from this bucket. | +| grantPut | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | +| grantPutAcl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | +| grantRead | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grantReadWrite | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grantWrite | Grant write permissions to this bucket to an IAM principal. | +| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | +| onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | +| onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | +| s3UrlForObject | The S3 URL of an S3 object. For example:. | +| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | +| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | +| addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | +| addInventory | Add an inventory configuration. | +| addLifecycleRule | Add a lifecycle rule to the bucket. | +| addMetric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | +| greet | *No description.* | + +--- + +##### \`applyRemovalPolicy\` \`\`\`wing applyRemovalPolicy(policy: RemovalPolicy): void @@ -79,13 +79,13 @@ to be replaced. The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). -###### \`policy\`Required +###### \`policy\`Required -- *Type:* RemovalPolicy +- *Type:* RemovalPolicy --- -##### \`addEventNotification\` +##### \`addEventNotification\` \`\`\`wing addEventNotification(event: EventType, dest: IBucketNotificationDestination, ...filters: Array): void @@ -104,25 +104,25 @@ Adds a bucket notification event destination. \`\`\` -###### \`event\`Required +###### \`event\`Required -- *Type:* EventType +- *Type:* EventType The event to trigger the notification. --- -###### \`dest\`Required +###### \`dest\`Required -- *Type:* IBucketNotificationDestination +- *Type:* IBucketNotificationDestination The notification destination (Lambda, SNS Topic or SQS Queue). --- -###### \`filters\`Required +###### \`filters\`Required -- *Type:* NotificationKeyFilter +- *Type:* NotificationKeyFilter S3 object key filter rules to determine which objects trigger this event. @@ -132,7 +132,7 @@ for details about allowed filter rules. --- -##### \`addObjectCreatedNotification\` +##### \`addObjectCreatedNotification\` \`\`\`wing addObjectCreatedNotification(dest: IBucketNotificationDestination, ...filters: Array): void @@ -143,23 +143,23 @@ Subscribes a destination to receive notifications when an object is created in t This is identical to calling \`onEvent(EventType.OBJECT_CREATED)\`. -###### \`dest\`Required +###### \`dest\`Required -- *Type:* IBucketNotificationDestination +- *Type:* IBucketNotificationDestination The notification destination (see onEvent). --- -###### \`filters\`Required +###### \`filters\`Required -- *Type:* NotificationKeyFilter +- *Type:* NotificationKeyFilter Filters (see onEvent). --- -##### \`addObjectRemovedNotification\` +##### \`addObjectRemovedNotification\` \`\`\`wing addObjectRemovedNotification(dest: IBucketNotificationDestination, ...filters: Array): void @@ -170,23 +170,23 @@ Subscribes a destination to receive notifications when an object is removed from This is identical to calling \`onEvent(EventType.OBJECT_REMOVED)\`. -###### \`dest\`Required +###### \`dest\`Required -- *Type:* IBucketNotificationDestination +- *Type:* IBucketNotificationDestination The notification destination (see onEvent). --- -###### \`filters\`Required +###### \`filters\`Required -- *Type:* NotificationKeyFilter +- *Type:* NotificationKeyFilter Filters (see onEvent). --- -##### \`addToResourcePolicy\` +##### \`addToResourcePolicy\` \`\`\`wing addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult @@ -200,15 +200,15 @@ it's not possible to tell whether the bucket already has a policy attached, let alone to re-use that policy to add more statements to it. So it's safest to do nothing in these cases. -###### \`permission\`Required +###### \`permission\`Required -- *Type:* PolicyStatement +- *Type:* PolicyStatement the policy statement to be added to the bucket's policy. --- -##### \`arnForObjects\` +##### \`arnForObjects\` \`\`\`wing arnForObjects(keyPattern: str): str @@ -216,19 +216,19 @@ arnForObjects(keyPattern: str): str Returns an ARN that represents all objects within the bucket that match the key pattern specified. -To represent all keys, specify \`\`\\"*\\"\`\`. +To represent all keys, specify \`\`"*"\`\`. If you need to specify a keyPattern with multiple components, concatenate them into a single string, e.g.: arnForObjects(\`home/\${team}/\${user}/*\`) -###### \`keyPattern\`Required +###### \`keyPattern\`Required - *Type:* str --- -##### \`grantDelete\` +##### \`grantDelete\` \`\`\`wing grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -236,15 +236,15 @@ grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. -###### \`identity\`Required +###### \`identity\`Required -- *Type:* IGrantable +- *Type:* IGrantable The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -252,7 +252,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantPublicAccess\` +##### \`grantPublicAccess\` \`\`\`wing grantPublicAccess(...allowedActions: Array, keyPrefix?: str): Grant @@ -265,8 +265,8 @@ in this bucket, which is useful for when you configure your bucket as a website and want everyone to be able to read objects in the bucket without needing to authenticate. -Without arguments, this method will grant read (\\"s3:GetObject\\") access to -all objects (\\"*\\") in the bucket. +Without arguments, this method will grant read ("s3:GetObject") access to +all objects ("*") in the bucket. The method returns the \`iam.Grant\` object, which can then be modified as needed. For example, you can add a condition that will restrict access only @@ -279,25 +279,25 @@ Note that if this \`IBucket\` refers to an existing bucket, possibly not managed by CloudFormation, this method will have no effect, since it's impossible to modify the policy of an existing bucket. -###### \`allowedActions\`Required +###### \`allowedActions\`Required - *Type:* str the set of S3 actions to allow. -Default is \\"s3:GetObject\\". +Default is "s3:GetObject". --- -###### \`keyPrefix\`Optional +###### \`keyPrefix\`Optional - *Type:* str -the prefix of S3 object keys (e.g. \`home/*\`). Default is \\"*\\". +the prefix of S3 object keys (e.g. \`home/*\`). Default is "*". --- -##### \`grantPut\` +##### \`grantPut\` \`\`\`wing grantPut(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -308,15 +308,15 @@ Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM princip If encryption is used, permission to use the key to encrypt the contents of written files will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required -- *Type:* IGrantable +- *Type:* IGrantable The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -324,7 +324,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantPutAcl\` +##### \`grantPutAcl\` \`\`\`wing grantPutAcl(identity: IGrantable, objectsKeyPattern?: str): Grant @@ -336,19 +336,19 @@ If your application has the '@aws-cdk/aws-s3:grantWriteWithoutAcl' feature flag calling {@link grantWrite} or {@link grantReadWrite} no longer grants permissions to modify the ACLs of the objects; in this case, if you need to modify object ACLs, call this method explicitly. -###### \`identity\`Required +###### \`identity\`Required -- *Type:* IGrantable +- *Type:* IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* str --- -##### \`grantRead\` +##### \`grantRead\` \`\`\`wing grantRead(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -359,15 +359,15 @@ Grant read permissions for this bucket and it's contents to an IAM principal (Ro If encryption is used, permission to use the key to decrypt the contents of the bucket will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required -- *Type:* IGrantable +- *Type:* IGrantable The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -375,7 +375,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantReadWrite\` +##### \`grantReadWrite\` \`\`\`wing grantReadWrite(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -394,19 +394,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required -- *Type:* IGrantable +- *Type:* IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any --- -##### \`grantWrite\` +##### \`grantWrite\` \`\`\`wing grantWrite(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -425,19 +425,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required -- *Type:* IGrantable +- *Type:* IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any --- -##### \`onCloudTrailEvent\` +##### \`onCloudTrailEvent\` \`\`\`wing onCloudTrailEvent(options?: OnCloudTrailBucketEventOptions): Rule @@ -448,15 +448,15 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`options\`Optional +###### \`options\`Optional -- *Type:* OnCloudTrailBucketEventOptions +- *Type:* OnCloudTrailBucketEventOptions Options for adding the rule. --- -##### \`onCloudTrailPutObject\` +##### \`onCloudTrailPutObject\` \`\`\`wing onCloudTrailPutObject(options?: OnCloudTrailBucketEventOptions): Rule @@ -471,15 +471,15 @@ so using \`onCloudTrailWriteObject\` may be preferable. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`options\`Optional +###### \`options\`Optional -- *Type:* OnCloudTrailBucketEventOptions +- *Type:* OnCloudTrailBucketEventOptions Options for adding the rule. --- -##### \`onCloudTrailWriteObject\` +##### \`onCloudTrailWriteObject\` \`\`\`wing onCloudTrailWriteObject(options?: OnCloudTrailBucketEventOptions): Rule @@ -497,15 +497,15 @@ so using this method may be preferable to \`onCloudTrailPutObject\`. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`options\`Optional +###### \`options\`Optional -- *Type:* OnCloudTrailBucketEventOptions +- *Type:* OnCloudTrailBucketEventOptions Options for adding the rule. --- -##### \`s3UrlForObject\` +##### \`s3UrlForObject\` \`\`\`wing s3UrlForObject(key?: str): str @@ -516,7 +516,7 @@ The S3 URL of an S3 object. For example:. \`s3://onlybucket\` - \`s3://bucket/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -527,7 +527,7 @@ bucket is returned. --- -##### \`transferAccelerationUrlForObject\` +##### \`transferAccelerationUrlForObject\` \`\`\`wing transferAccelerationUrlForObject(key?: str, options?: TransferAccelerationUrlOptions): str @@ -541,7 +541,7 @@ for dual-stack endpoint (connect to the bucket over IPv6). For example: - \`https://bucket.s3-accelerate.amazonaws.com\` - \`https://bucket.s3-accelerate.amazonaws.com/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -552,15 +552,15 @@ bucket is returned. --- -###### \`options\`Optional +###### \`options\`Optional -- *Type:* TransferAccelerationUrlOptions +- *Type:* TransferAccelerationUrlOptions Options for generating URL. --- -##### \`urlForObject\` +##### \`urlForObject\` \`\`\`wing urlForObject(key?: str): str @@ -572,7 +572,7 @@ The https URL of an S3 object. Specify \`regional: false\` at the options for no - \`https://s3.us-west-1.amazonaws.com/bucket/key\` - \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -583,7 +583,7 @@ bucket is returned. --- -##### \`virtualHostedUrlForObject\` +##### \`virtualHostedUrlForObject\` \`\`\`wing virtualHostedUrlForObject(key?: str, options?: VirtualHostedStyleUrlOptions): str @@ -596,7 +596,7 @@ The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the - \`https://bucket.s3.amazonaws.com/key\` - \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -607,15 +607,15 @@ bucket is returned. --- -###### \`options\`Optional +###### \`options\`Optional -- *Type:* VirtualHostedStyleUrlOptions +- *Type:* VirtualHostedStyleUrlOptions Options for generating URL. --- -##### \`addCorsRule\` +##### \`addCorsRule\` \`\`\`wing addCorsRule(rule: CorsRule): void @@ -623,15 +623,15 @@ addCorsRule(rule: CorsRule): void Adds a cross-origin access configuration for objects in an Amazon S3 bucket. -###### \`rule\`Required +###### \`rule\`Required -- *Type:* CorsRule +- *Type:* CorsRule The CORS configuration rule to add. --- -##### \`addInventory\` +##### \`addInventory\` \`\`\`wing addInventory(inventory: Inventory): void @@ -639,15 +639,15 @@ addInventory(inventory: Inventory): void Add an inventory configuration. -###### \`inventory\`Required +###### \`inventory\`Required -- *Type:* Inventory +- *Type:* Inventory configuration to add. --- -##### \`addLifecycleRule\` +##### \`addLifecycleRule\` \`\`\`wing addLifecycleRule(rule: LifecycleRule): void @@ -655,15 +655,15 @@ addLifecycleRule(rule: LifecycleRule): void Add a lifecycle rule to the bucket. -###### \`rule\`Required +###### \`rule\`Required -- *Type:* LifecycleRule +- *Type:* LifecycleRule The rule to add. --- -##### \`addMetric\` +##### \`addMetric\` \`\`\`wing addMetric(metric: BucketMetrics): void @@ -671,75 +671,75 @@ addMetric(metric: BucketMetrics): void Adds a metrics configuration for the CloudWatch request metrics from the bucket. -###### \`metric\`Required +###### \`metric\`Required -- *Type:* BucketMetrics +- *Type:* BucketMetrics The metric configuration to add. --- -##### \`greet\` +##### \`greet\` \`\`\`wing greet(): void \`\`\` -#### Static Functions +#### Static Functions | **Name** | **Description** | | --- | --- | -| isResource | Check whether the given construct is a Resource. | -| fromBucketArn | *No description.* | -| fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | -| fromBucketName | *No description.* | -| validateBucketName | Thrown an exception if the given bucket name is not valid. | +| isResource | Check whether the given construct is a Resource. | +| fromBucketArn | *No description.* | +| fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | +| fromBucketName | *No description.* | +| validateBucketName | Thrown an exception if the given bucket name is not valid. | --- -##### \`isResource\` +##### \`isResource\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.isResource(construct: IConstruct); \`\`\` Check whether the given construct is a Resource. -###### \`construct\`Required +###### \`construct\`Required -- *Type:* IConstruct +- *Type:* IConstruct --- -##### \`fromBucketArn\` +##### \`fromBucketArn\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.fromBucketArn(bucketArn: str); \`\`\` -###### \`bucketArn\`Required +###### \`bucketArn\`Required - *Type:* str --- -##### \`fromBucketAttributes\` +##### \`fromBucketAttributes\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.fromBucketAttributes(attrs: BucketAttributes); \`\`\` Creates a Bucket construct that represents an external bucket. -###### \`attrs\`Required +###### \`attrs\`Required -- *Type:* BucketAttributes +- *Type:* BucketAttributes A \`BucketAttributes\` object. @@ -748,31 +748,31 @@ Can be obtained from a call to --- -##### \`fromBucketName\` +##### \`fromBucketName\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.fromBucketName(bucketName: str); \`\`\` -###### \`bucketName\`Required +###### \`bucketName\`Required - *Type:* str --- -##### \`validateBucketName\` +##### \`validateBucketName\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.validateBucketName(physicalName: str); \`\`\` Thrown an exception if the given bucket name is not valid. -###### \`physicalName\`Required +###### \`physicalName\`Required - *Type:* str @@ -780,45 +780,45 @@ name of the bucket. --- -#### Properties +#### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | ConstructNode | The construct tree node associated with this construct. | -| env | ResourceEnvironment | The environment this resource belongs to. | -| stack | Stack | The stack in which this resource is defined. | -| bucketArn | str | The ARN of the bucket. | -| bucketDomainName | str | The IPv4 DNS name of the specified bucket. | -| bucketDualStackDomainName | str | The IPv6 DNS name of the specified bucket. | -| bucketName | str | The name of the bucket. | -| bucketRegionalDomainName | str | The regional domain name of the specified bucket. | -| bucketWebsiteDomainName | str | The Domain name of the static website. | -| bucketWebsiteUrl | str | The URL of the static website. | -| encryptionKey | IKey | Optional KMS encryption key associated with this bucket. | -| isWebsite | bool | If this bucket has been configured for static website hosting. | -| policy | BucketPolicy | The resource policy associated with this bucket. | +| node | ConstructNode | The construct tree node associated with this construct. | +| env | ResourceEnvironment | The environment this resource belongs to. | +| stack | Stack | The stack in which this resource is defined. | +| bucketArn | str | The ARN of the bucket. | +| bucketDomainName | str | The IPv4 DNS name of the specified bucket. | +| bucketDualStackDomainName | str | The IPv6 DNS name of the specified bucket. | +| bucketName | str | The name of the bucket. | +| bucketRegionalDomainName | str | The regional domain name of the specified bucket. | +| bucketWebsiteDomainName | str | The Domain name of the static website. | +| bucketWebsiteUrl | str | The URL of the static website. | +| encryptionKey | IKey | Optional KMS encryption key associated with this bucket. | +| isWebsite | bool | If this bucket has been configured for static website hosting. | +| policy | BucketPolicy | The resource policy associated with this bucket. | --- -##### \`node\`Required +##### \`node\`Required \`\`\`wing node: ConstructNode; \`\`\` -- *Type:* ConstructNode +- *Type:* ConstructNode The construct tree node associated with this construct. --- -##### \`env\`Required +##### \`env\`Required \`\`\`wing env: ResourceEnvironment; \`\`\` -- *Type:* ResourceEnvironment +- *Type:* ResourceEnvironment The environment this resource belongs to. @@ -831,19 +831,19 @@ that might be different than the stack they were imported into. --- -##### \`stack\`Required +##### \`stack\`Required \`\`\`wing stack: Stack; \`\`\` -- *Type:* Stack +- *Type:* Stack The stack in which this resource is defined. --- -##### \`bucketArn\`Required +##### \`bucketArn\`Required \`\`\`wing bucketArn: str; @@ -855,7 +855,7 @@ The ARN of the bucket. --- -##### \`bucketDomainName\`Required +##### \`bucketDomainName\`Required \`\`\`wing bucketDomainName: str; @@ -867,7 +867,7 @@ The IPv4 DNS name of the specified bucket. --- -##### \`bucketDualStackDomainName\`Required +##### \`bucketDualStackDomainName\`Required \`\`\`wing bucketDualStackDomainName: str; @@ -879,7 +879,7 @@ The IPv6 DNS name of the specified bucket. --- -##### \`bucketName\`Required +##### \`bucketName\`Required \`\`\`wing bucketName: str; @@ -891,7 +891,7 @@ The name of the bucket. --- -##### \`bucketRegionalDomainName\`Required +##### \`bucketRegionalDomainName\`Required \`\`\`wing bucketRegionalDomainName: str; @@ -903,7 +903,7 @@ The regional domain name of the specified bucket. --- -##### \`bucketWebsiteDomainName\`Required +##### \`bucketWebsiteDomainName\`Required \`\`\`wing bucketWebsiteDomainName: str; @@ -915,7 +915,7 @@ The Domain name of the static website. --- -##### \`bucketWebsiteUrl\`Required +##### \`bucketWebsiteUrl\`Required \`\`\`wing bucketWebsiteUrl: str; @@ -927,19 +927,19 @@ The URL of the static website. --- -##### \`encryptionKey\`Optional +##### \`encryptionKey\`Optional \`\`\`wing encryptionKey: IKey; \`\`\` -- *Type:* IKey +- *Type:* IKey Optional KMS encryption key associated with this bucket. --- -##### \`isWebsite\`Optional +##### \`isWebsite\`Optional \`\`\`wing isWebsite: bool; @@ -951,13 +951,13 @@ If this bucket has been configured for static website hosting. --- -##### \`policy\`Optional +##### \`policy\`Optional \`\`\`wing policy: BucketPolicy; \`\`\` -- *Type:* BucketPolicy +- *Type:* BucketPolicy The resource policy associated with this bucket. @@ -973,70 +973,70 @@ first call to addToResourcePolicy(s). " `; -exports[`simple link formatter wing snapshot 1`] = ` +exports[`simple link formatter > wing snapshot 1`] = ` "# construct-library This is a test project to make sure the \`jsii-docgen\` cli property renders API documentation for construct libraries. -# API Reference +# API Reference -## Resources +## Resources -### GreeterBucket +### GreeterBucket -#### Initializers +#### Initializers \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; new GreeterBucket(props?: BucketProps); \`\`\` | **Name** | **Type** | **Description** | | --- | --- | --- | -| props | BucketProps | *No description.* | +| props | BucketProps | *No description.* | --- -##### \`props\`Optional +##### \`props\`Optional -- *Type:* BucketProps +- *Type:* BucketProps --- -#### Methods +#### Methods | **Name** | **Description** | | --- | --- | -| applyRemovalPolicy | Apply the given removal policy to this resource. | -| addEventNotification | Adds a bucket notification event destination. | -| addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | -| addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | -| arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | -| grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | -| grantPublicAccess | Allows unrestricted access to objects from this bucket. | -| grantPut | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | -| grantPutAcl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | -| grantRead | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grantReadWrite | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | -| grantWrite | Grant write permissions to this bucket to an IAM principal. | -| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | -| onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | -| onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3UrlForObject | The S3 URL of an S3 object. For example:. | -| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | -| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | -| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | -| addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | -| addInventory | Add an inventory configuration. | -| addLifecycleRule | Add a lifecycle rule to the bucket. | -| addMetric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | -| greet | *No description.* | - ---- - -##### \`applyRemovalPolicy\` +| applyRemovalPolicy | Apply the given removal policy to this resource. | +| addEventNotification | Adds a bucket notification event destination. | +| addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | +| addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | +| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | +| grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | +| grantPublicAccess | Allows unrestricted access to objects from this bucket. | +| grantPut | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. | +| grantPutAcl | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. | +| grantRead | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grantReadWrite | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). | +| grantWrite | Grant write permissions to this bucket to an IAM principal. | +| onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | +| onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | +| onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | +| s3UrlForObject | The S3 URL of an S3 object. For example:. | +| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | +| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | +| addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | +| addInventory | Add an inventory configuration. | +| addLifecycleRule | Add a lifecycle rule to the bucket. | +| addMetric | Adds a metrics configuration for the CloudWatch request metrics from the bucket. | +| greet | *No description.* | + +--- + +##### \`applyRemovalPolicy\` \`\`\`wing applyRemovalPolicy(policy: RemovalPolicy): void @@ -1052,13 +1052,13 @@ to be replaced. The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). -###### \`policy\`Required +###### \`policy\`Required -- *Type:* RemovalPolicy +- *Type:* RemovalPolicy --- -##### \`addEventNotification\` +##### \`addEventNotification\` \`\`\`wing addEventNotification(event: EventType, dest: IBucketNotificationDestination, ...filters: Array): void @@ -1077,25 +1077,25 @@ Adds a bucket notification event destination. \`\`\` -###### \`event\`Required +###### \`event\`Required -- *Type:* EventType +- *Type:* EventType The event to trigger the notification. --- -###### \`dest\`Required +###### \`dest\`Required -- *Type:* IBucketNotificationDestination +- *Type:* IBucketNotificationDestination The notification destination (Lambda, SNS Topic or SQS Queue). --- -###### \`filters\`Required +###### \`filters\`Required -- *Type:* NotificationKeyFilter +- *Type:* NotificationKeyFilter S3 object key filter rules to determine which objects trigger this event. @@ -1105,7 +1105,7 @@ for details about allowed filter rules. --- -##### \`addObjectCreatedNotification\` +##### \`addObjectCreatedNotification\` \`\`\`wing addObjectCreatedNotification(dest: IBucketNotificationDestination, ...filters: Array): void @@ -1116,23 +1116,23 @@ Subscribes a destination to receive notifications when an object is created in t This is identical to calling \`onEvent(EventType.OBJECT_CREATED)\`. -###### \`dest\`Required +###### \`dest\`Required -- *Type:* IBucketNotificationDestination +- *Type:* IBucketNotificationDestination The notification destination (see onEvent). --- -###### \`filters\`Required +###### \`filters\`Required -- *Type:* NotificationKeyFilter +- *Type:* NotificationKeyFilter Filters (see onEvent). --- -##### \`addObjectRemovedNotification\` +##### \`addObjectRemovedNotification\` \`\`\`wing addObjectRemovedNotification(dest: IBucketNotificationDestination, ...filters: Array): void @@ -1143,23 +1143,23 @@ Subscribes a destination to receive notifications when an object is removed from This is identical to calling \`onEvent(EventType.OBJECT_REMOVED)\`. -###### \`dest\`Required +###### \`dest\`Required -- *Type:* IBucketNotificationDestination +- *Type:* IBucketNotificationDestination The notification destination (see onEvent). --- -###### \`filters\`Required +###### \`filters\`Required -- *Type:* NotificationKeyFilter +- *Type:* NotificationKeyFilter Filters (see onEvent). --- -##### \`addToResourcePolicy\` +##### \`addToResourcePolicy\` \`\`\`wing addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult @@ -1173,15 +1173,15 @@ it's not possible to tell whether the bucket already has a policy attached, let alone to re-use that policy to add more statements to it. So it's safest to do nothing in these cases. -###### \`permission\`Required +###### \`permission\`Required -- *Type:* PolicyStatement +- *Type:* PolicyStatement the policy statement to be added to the bucket's policy. --- -##### \`arnForObjects\` +##### \`arnForObjects\` \`\`\`wing arnForObjects(keyPattern: str): str @@ -1189,19 +1189,19 @@ arnForObjects(keyPattern: str): str Returns an ARN that represents all objects within the bucket that match the key pattern specified. -To represent all keys, specify \`\`\\"*\\"\`\`. +To represent all keys, specify \`\`"*"\`\`. If you need to specify a keyPattern with multiple components, concatenate them into a single string, e.g.: arnForObjects(\`home/\${team}/\${user}/*\`) -###### \`keyPattern\`Required +###### \`keyPattern\`Required - *Type:* str --- -##### \`grantDelete\` +##### \`grantDelete\` \`\`\`wing grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1209,15 +1209,15 @@ grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. -###### \`identity\`Required +###### \`identity\`Required -- *Type:* IGrantable +- *Type:* IGrantable The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -1225,7 +1225,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantPublicAccess\` +##### \`grantPublicAccess\` \`\`\`wing grantPublicAccess(...allowedActions: Array, keyPrefix?: str): Grant @@ -1238,8 +1238,8 @@ in this bucket, which is useful for when you configure your bucket as a website and want everyone to be able to read objects in the bucket without needing to authenticate. -Without arguments, this method will grant read (\\"s3:GetObject\\") access to -all objects (\\"*\\") in the bucket. +Without arguments, this method will grant read ("s3:GetObject") access to +all objects ("*") in the bucket. The method returns the \`iam.Grant\` object, which can then be modified as needed. For example, you can add a condition that will restrict access only @@ -1252,25 +1252,25 @@ Note that if this \`IBucket\` refers to an existing bucket, possibly not managed by CloudFormation, this method will have no effect, since it's impossible to modify the policy of an existing bucket. -###### \`allowedActions\`Required +###### \`allowedActions\`Required - *Type:* str the set of S3 actions to allow. -Default is \\"s3:GetObject\\". +Default is "s3:GetObject". --- -###### \`keyPrefix\`Optional +###### \`keyPrefix\`Optional - *Type:* str -the prefix of S3 object keys (e.g. \`home/*\`). Default is \\"*\\". +the prefix of S3 object keys (e.g. \`home/*\`). Default is "*". --- -##### \`grantPut\` +##### \`grantPut\` \`\`\`wing grantPut(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1281,15 +1281,15 @@ Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM princip If encryption is used, permission to use the key to encrypt the contents of written files will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required -- *Type:* IGrantable +- *Type:* IGrantable The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -1297,7 +1297,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantPutAcl\` +##### \`grantPutAcl\` \`\`\`wing grantPutAcl(identity: IGrantable, objectsKeyPattern?: str): Grant @@ -1309,19 +1309,19 @@ If your application has the '@aws-cdk/aws-s3:grantWriteWithoutAcl' feature flag calling {@link grantWrite} or {@link grantReadWrite} no longer grants permissions to modify the ACLs of the objects; in this case, if you need to modify object ACLs, call this method explicitly. -###### \`identity\`Required +###### \`identity\`Required -- *Type:* IGrantable +- *Type:* IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* str --- -##### \`grantRead\` +##### \`grantRead\` \`\`\`wing grantRead(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1332,15 +1332,15 @@ Grant read permissions for this bucket and it's contents to an IAM principal (Ro If encryption is used, permission to use the key to decrypt the contents of the bucket will also be granted to the same principal. -###### \`identity\`Required +###### \`identity\`Required -- *Type:* IGrantable +- *Type:* IGrantable The principal. --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any @@ -1348,7 +1348,7 @@ Restrict the permission to a certain key pattern (default '*'). --- -##### \`grantReadWrite\` +##### \`grantReadWrite\` \`\`\`wing grantReadWrite(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1367,19 +1367,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required -- *Type:* IGrantable +- *Type:* IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any --- -##### \`grantWrite\` +##### \`grantWrite\` \`\`\`wing grantWrite(identity: IGrantable, objectsKeyPattern?: any): Grant @@ -1398,19 +1398,19 @@ in the \`context\` key of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use the {@link grantPutAcl} method. -###### \`identity\`Required +###### \`identity\`Required -- *Type:* IGrantable +- *Type:* IGrantable --- -###### \`objectsKeyPattern\`Optional +###### \`objectsKeyPattern\`Optional - *Type:* any --- -##### \`onCloudTrailEvent\` +##### \`onCloudTrailEvent\` \`\`\`wing onCloudTrailEvent(options?: OnCloudTrailBucketEventOptions): Rule @@ -1421,15 +1421,15 @@ Define a CloudWatch event that triggers when something happens to this repositor Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`options\`Optional +###### \`options\`Optional -- *Type:* OnCloudTrailBucketEventOptions +- *Type:* OnCloudTrailBucketEventOptions Options for adding the rule. --- -##### \`onCloudTrailPutObject\` +##### \`onCloudTrailPutObject\` \`\`\`wing onCloudTrailPutObject(options?: OnCloudTrailBucketEventOptions): Rule @@ -1444,15 +1444,15 @@ so using \`onCloudTrailWriteObject\` may be preferable. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`options\`Optional +###### \`options\`Optional -- *Type:* OnCloudTrailBucketEventOptions +- *Type:* OnCloudTrailBucketEventOptions Options for adding the rule. --- -##### \`onCloudTrailWriteObject\` +##### \`onCloudTrailWriteObject\` \`\`\`wing onCloudTrailWriteObject(options?: OnCloudTrailBucketEventOptions): Rule @@ -1470,15 +1470,15 @@ so using this method may be preferable to \`onCloudTrailPutObject\`. Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail. -###### \`options\`Optional +###### \`options\`Optional -- *Type:* OnCloudTrailBucketEventOptions +- *Type:* OnCloudTrailBucketEventOptions Options for adding the rule. --- -##### \`s3UrlForObject\` +##### \`s3UrlForObject\` \`\`\`wing s3UrlForObject(key?: str): str @@ -1489,7 +1489,7 @@ The S3 URL of an S3 object. For example:. \`s3://onlybucket\` - \`s3://bucket/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -1500,7 +1500,7 @@ bucket is returned. --- -##### \`transferAccelerationUrlForObject\` +##### \`transferAccelerationUrlForObject\` \`\`\`wing transferAccelerationUrlForObject(key?: str, options?: TransferAccelerationUrlOptions): str @@ -1514,7 +1514,7 @@ for dual-stack endpoint (connect to the bucket over IPv6). For example: - \`https://bucket.s3-accelerate.amazonaws.com\` - \`https://bucket.s3-accelerate.amazonaws.com/key\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -1525,15 +1525,15 @@ bucket is returned. --- -###### \`options\`Optional +###### \`options\`Optional -- *Type:* TransferAccelerationUrlOptions +- *Type:* TransferAccelerationUrlOptions Options for generating URL. --- -##### \`urlForObject\` +##### \`urlForObject\` \`\`\`wing urlForObject(key?: str): str @@ -1545,7 +1545,7 @@ The https URL of an S3 object. Specify \`regional: false\` at the options for no - \`https://s3.us-west-1.amazonaws.com/bucket/key\` - \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -1556,7 +1556,7 @@ bucket is returned. --- -##### \`virtualHostedUrlForObject\` +##### \`virtualHostedUrlForObject\` \`\`\`wing virtualHostedUrlForObject(key?: str, options?: VirtualHostedStyleUrlOptions): str @@ -1569,7 +1569,7 @@ The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the - \`https://bucket.s3.amazonaws.com/key\` - \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` -###### \`key\`Optional +###### \`key\`Optional - *Type:* str @@ -1580,15 +1580,15 @@ bucket is returned. --- -###### \`options\`Optional +###### \`options\`Optional -- *Type:* VirtualHostedStyleUrlOptions +- *Type:* VirtualHostedStyleUrlOptions Options for generating URL. --- -##### \`addCorsRule\` +##### \`addCorsRule\` \`\`\`wing addCorsRule(rule: CorsRule): void @@ -1596,15 +1596,15 @@ addCorsRule(rule: CorsRule): void Adds a cross-origin access configuration for objects in an Amazon S3 bucket. -###### \`rule\`Required +###### \`rule\`Required -- *Type:* CorsRule +- *Type:* CorsRule The CORS configuration rule to add. --- -##### \`addInventory\` +##### \`addInventory\` \`\`\`wing addInventory(inventory: Inventory): void @@ -1612,15 +1612,15 @@ addInventory(inventory: Inventory): void Add an inventory configuration. -###### \`inventory\`Required +###### \`inventory\`Required -- *Type:* Inventory +- *Type:* Inventory configuration to add. --- -##### \`addLifecycleRule\` +##### \`addLifecycleRule\` \`\`\`wing addLifecycleRule(rule: LifecycleRule): void @@ -1628,15 +1628,15 @@ addLifecycleRule(rule: LifecycleRule): void Add a lifecycle rule to the bucket. -###### \`rule\`Required +###### \`rule\`Required -- *Type:* LifecycleRule +- *Type:* LifecycleRule The rule to add. --- -##### \`addMetric\` +##### \`addMetric\` \`\`\`wing addMetric(metric: BucketMetrics): void @@ -1644,75 +1644,75 @@ addMetric(metric: BucketMetrics): void Adds a metrics configuration for the CloudWatch request metrics from the bucket. -###### \`metric\`Required +###### \`metric\`Required -- *Type:* BucketMetrics +- *Type:* BucketMetrics The metric configuration to add. --- -##### \`greet\` +##### \`greet\` \`\`\`wing greet(): void \`\`\` -#### Static Functions +#### Static Functions | **Name** | **Description** | | --- | --- | -| isResource | Check whether the given construct is a Resource. | -| fromBucketArn | *No description.* | -| fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | -| fromBucketName | *No description.* | -| validateBucketName | Thrown an exception if the given bucket name is not valid. | +| isResource | Check whether the given construct is a Resource. | +| fromBucketArn | *No description.* | +| fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | +| fromBucketName | *No description.* | +| validateBucketName | Thrown an exception if the given bucket name is not valid. | --- -##### \`isResource\` +##### \`isResource\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.isResource(construct: IConstruct); \`\`\` Check whether the given construct is a Resource. -###### \`construct\`Required +###### \`construct\`Required -- *Type:* IConstruct +- *Type:* IConstruct --- -##### \`fromBucketArn\` +##### \`fromBucketArn\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.fromBucketArn(bucketArn: str); \`\`\` -###### \`bucketArn\`Required +###### \`bucketArn\`Required - *Type:* str --- -##### \`fromBucketAttributes\` +##### \`fromBucketAttributes\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.fromBucketAttributes(attrs: BucketAttributes); \`\`\` Creates a Bucket construct that represents an external bucket. -###### \`attrs\`Required +###### \`attrs\`Required -- *Type:* BucketAttributes +- *Type:* BucketAttributes A \`BucketAttributes\` object. @@ -1721,31 +1721,31 @@ Can be obtained from a call to --- -##### \`fromBucketName\` +##### \`fromBucketName\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.fromBucketName(bucketName: str); \`\`\` -###### \`bucketName\`Required +###### \`bucketName\`Required - *Type:* str --- -##### \`validateBucketName\` +##### \`validateBucketName\` \`\`\`wing -bring { GreeterBucket } from \\"construct-library\\"; +bring { GreeterBucket } from "construct-library"; GreeterBucket.validateBucketName(physicalName: str); \`\`\` Thrown an exception if the given bucket name is not valid. -###### \`physicalName\`Required +###### \`physicalName\`Required - *Type:* str @@ -1753,45 +1753,45 @@ name of the bucket. --- -#### Properties +#### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | ConstructNode | The construct tree node associated with this construct. | -| env | ResourceEnvironment | The environment this resource belongs to. | -| stack | Stack | The stack in which this resource is defined. | -| bucketArn | str | The ARN of the bucket. | -| bucketDomainName | str | The IPv4 DNS name of the specified bucket. | -| bucketDualStackDomainName | str | The IPv6 DNS name of the specified bucket. | -| bucketName | str | The name of the bucket. | -| bucketRegionalDomainName | str | The regional domain name of the specified bucket. | -| bucketWebsiteDomainName | str | The Domain name of the static website. | -| bucketWebsiteUrl | str | The URL of the static website. | -| encryptionKey | IKey | Optional KMS encryption key associated with this bucket. | -| isWebsite | bool | If this bucket has been configured for static website hosting. | -| policy | BucketPolicy | The resource policy associated with this bucket. | +| node | ConstructNode | The construct tree node associated with this construct. | +| env | ResourceEnvironment | The environment this resource belongs to. | +| stack | Stack | The stack in which this resource is defined. | +| bucketArn | str | The ARN of the bucket. | +| bucketDomainName | str | The IPv4 DNS name of the specified bucket. | +| bucketDualStackDomainName | str | The IPv6 DNS name of the specified bucket. | +| bucketName | str | The name of the bucket. | +| bucketRegionalDomainName | str | The regional domain name of the specified bucket. | +| bucketWebsiteDomainName | str | The Domain name of the static website. | +| bucketWebsiteUrl | str | The URL of the static website. | +| encryptionKey | IKey | Optional KMS encryption key associated with this bucket. | +| isWebsite | bool | If this bucket has been configured for static website hosting. | +| policy | BucketPolicy | The resource policy associated with this bucket. | --- -##### \`node\`Required +##### \`node\`Required \`\`\`wing node: ConstructNode; \`\`\` -- *Type:* ConstructNode +- *Type:* ConstructNode The construct tree node associated with this construct. --- -##### \`env\`Required +##### \`env\`Required \`\`\`wing env: ResourceEnvironment; \`\`\` -- *Type:* ResourceEnvironment +- *Type:* ResourceEnvironment The environment this resource belongs to. @@ -1804,19 +1804,19 @@ that might be different than the stack they were imported into. --- -##### \`stack\`Required +##### \`stack\`Required \`\`\`wing stack: Stack; \`\`\` -- *Type:* Stack +- *Type:* Stack The stack in which this resource is defined. --- -##### \`bucketArn\`Required +##### \`bucketArn\`Required \`\`\`wing bucketArn: str; @@ -1828,7 +1828,7 @@ The ARN of the bucket. --- -##### \`bucketDomainName\`Required +##### \`bucketDomainName\`Required \`\`\`wing bucketDomainName: str; @@ -1840,7 +1840,7 @@ The IPv4 DNS name of the specified bucket. --- -##### \`bucketDualStackDomainName\`Required +##### \`bucketDualStackDomainName\`Required \`\`\`wing bucketDualStackDomainName: str; @@ -1852,7 +1852,7 @@ The IPv6 DNS name of the specified bucket. --- -##### \`bucketName\`Required +##### \`bucketName\`Required \`\`\`wing bucketName: str; @@ -1864,7 +1864,7 @@ The name of the bucket. --- -##### \`bucketRegionalDomainName\`Required +##### \`bucketRegionalDomainName\`Required \`\`\`wing bucketRegionalDomainName: str; @@ -1876,7 +1876,7 @@ The regional domain name of the specified bucket. --- -##### \`bucketWebsiteDomainName\`Required +##### \`bucketWebsiteDomainName\`Required \`\`\`wing bucketWebsiteDomainName: str; @@ -1888,7 +1888,7 @@ The Domain name of the static website. --- -##### \`bucketWebsiteUrl\`Required +##### \`bucketWebsiteUrl\`Required \`\`\`wing bucketWebsiteUrl: str; @@ -1900,19 +1900,19 @@ The URL of the static website. --- -##### \`encryptionKey\`Optional +##### \`encryptionKey\`Optional \`\`\`wing encryptionKey: IKey; \`\`\` -- *Type:* IKey +- *Type:* IKey Optional KMS encryption key associated with this bucket. --- -##### \`isWebsite\`Optional +##### \`isWebsite\`Optional \`\`\`wing isWebsite: bool; @@ -1924,13 +1924,13 @@ If this bucket has been configured for static website hosting. --- -##### \`policy\`Optional +##### \`policy\`Optional \`\`\`wing policy: BucketPolicy; \`\`\` -- *Type:* BucketPolicy +- *Type:* BucketPolicy The resource policy associated with this bucket. diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/parameter.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/parameter.test.ts.snap index 949dd6218d4..fdf0d7ff7ef 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/parameter.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/parameter.test.ts.snap @@ -1,17 +1,17 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`csharp snapshot 1`] = ` -Object { +{ "default": undefined, "displayName": "Grantee", - "docs": Object {}, + "docs": {}, "fqn": "Amazon.CDK.AWS.ECR.AuthorizationToken.GrantRead.parameter.Grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "Amazon.CDK.AWS.IAM.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -24,7 +24,7 @@ Object { `; exports[`csharp snapshot 2`] = ` -" \`Grantee\`Required +" \`Grantee\`Required - *Type:* Amazon.CDK.AWS.IAM.IGrantable @@ -33,17 +33,17 @@ exports[`csharp snapshot 2`] = ` `; exports[`go snapshot 1`] = ` -Object { +{ "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.AuthorizationToken.GrantRead.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "github.com/aws/aws-cdk-go/awscdk/awsiam/awscdkawsiam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -56,7 +56,7 @@ Object { `; exports[`go snapshot 2`] = ` -" \`grantee\`Required +" \`grantee\`Required - *Type:* github.com/aws/aws-cdk-go/awscdk/awsiam/awscdkawsiam.IGrantable @@ -65,17 +65,17 @@ exports[`go snapshot 2`] = ` `; exports[`java snapshot 1`] = ` -Object { +{ "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "software.amazon.awscdk.services.ecr.AuthorizationToken.grantRead.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "software.amazon.awscdk.services.iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -88,7 +88,7 @@ Object { `; exports[`java snapshot 2`] = ` -" \`grantee\`Required +" \`grantee\`Required - *Type:* software.amazon.awscdk.services.iam.IGrantable @@ -97,7 +97,7 @@ exports[`java snapshot 2`] = ` `; exports[`newlines in "defaults" are removed 1`] = ` -" \`grantee\`Required +" \`grantee\`Required - *Type:* @aws-cdk/aws-iam.IGrantable - *Default:* default option with a newline @@ -107,17 +107,17 @@ exports[`newlines in "defaults" are removed 1`] = ` `; exports[`python snapshot 1`] = ` -Object { +{ "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "aws_cdk.aws_ecr.AuthorizationToken.grant_read.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "aws_cdk.aws_iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -130,7 +130,7 @@ Object { `; exports[`python snapshot 2`] = ` -" \`grantee\`Required +" \`grantee\`Required - *Type:* aws_cdk.aws_iam.IGrantable @@ -139,17 +139,17 @@ exports[`python snapshot 2`] = ` `; exports[`typescript snapshot 1`] = ` -Object { +{ "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -162,7 +162,7 @@ Object { `; exports[`typescript snapshot 2`] = ` -" \`grantee\`Required +" \`grantee\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -171,17 +171,17 @@ exports[`typescript snapshot 2`] = ` `; exports[`wing snapshot 1`] = ` -Object { +{ "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -194,7 +194,7 @@ Object { `; exports[`wing snapshot 2`] = ` -" \`grantee\`Required +" \`grantee\`Required - *Type:* @aws-cdk/aws-iam.IGrantable diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/property.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/property.test.ts.snap index 71dda23ddd6..bbe0ae9a138 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/property.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/property.test.ts.snap @@ -1,11 +1,11 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`csharp snapshot 1`] = ` -Object { +{ "default": undefined, "displayName": "RepositoryCatalogData", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorycatalogdata", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryCatalogData\`.", @@ -13,7 +13,7 @@ Object { "fqn": "Amazon.CDK.AWS.ECR.CfnPublicRepositoryProps.property.RepositoryCatalogData", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "optional": true, - "type": Object { + "type": { "formattingPattern": "object", }, "usage": "public object RepositoryCatalogData { get; set; }", @@ -21,7 +21,7 @@ Object { `; exports[`csharp snapshot 2`] = ` -" \`RepositoryCatalogData\`Optional +" \`RepositoryCatalogData\`Optional \`\`\`csharp public object RepositoryCatalogData { get; set; } @@ -38,11 +38,11 @@ public object RepositoryCatalogData { get; set; } `; exports[`go snapshot 1`] = ` -Object { +{ "default": undefined, "displayName": "RepositoryCatalogData", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorycatalogdata", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryCatalogData\`.", @@ -50,7 +50,7 @@ Object { "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.CfnPublicRepositoryProps.property.RepositoryCatalogData", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "optional": true, - "type": Object { + "type": { "formattingPattern": "interface{}", }, "usage": "RepositoryCatalogData interface{}", @@ -58,7 +58,7 @@ Object { `; exports[`go snapshot 2`] = ` -" \`RepositoryCatalogData\`Optional +" \`RepositoryCatalogData\`Optional \`\`\`go RepositoryCatalogData interface{} @@ -75,11 +75,11 @@ RepositoryCatalogData interface{} `; exports[`java snapshot 1`] = ` -Object { +{ "default": undefined, "displayName": "repositoryCatalogData", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorycatalogdata", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryCatalogData\`.", @@ -87,7 +87,7 @@ Object { "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "optional": true, - "type": Object { + "type": { "formattingPattern": "java.lang.Object", }, "usage": "public java.lang.Object getRepositoryCatalogData();", @@ -95,7 +95,7 @@ Object { `; exports[`java snapshot 2`] = ` -" \`repositoryCatalogData\`Optional +" \`repositoryCatalogData\`Optional \`\`\`java public java.lang.Object getRepositoryCatalogData(); @@ -112,11 +112,11 @@ public java.lang.Object getRepositoryCatalogData(); `; exports[`python snapshot 1`] = ` -Object { +{ "default": undefined, "displayName": "repository_catalog_data", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorycatalogdata", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryCatalogData\`.", @@ -124,7 +124,7 @@ Object { "fqn": "aws_cdk.aws_ecr.CfnPublicRepositoryProps.property.repository_catalog_data", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "optional": true, - "type": Object { + "type": { "formattingPattern": "typing.Any", }, "usage": "repository_catalog_data: typing.Any", @@ -132,7 +132,7 @@ Object { `; exports[`python snapshot 2`] = ` -" \`repository_catalog_data\`Optional +" \`repository_catalog_data\`Optional \`\`\`python repository_catalog_data: typing.Any @@ -149,11 +149,11 @@ repository_catalog_data: typing.Any `; exports[`typescript snapshot 1`] = ` -Object { +{ "default": undefined, "displayName": "repositoryCatalogData", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorycatalogdata", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryCatalogData\`.", @@ -161,7 +161,7 @@ Object { "fqn": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "optional": true, - "type": Object { + "type": { "formattingPattern": "any", }, "usage": "public readonly repositoryCatalogData: any;", @@ -169,7 +169,7 @@ Object { `; exports[`typescript snapshot 2`] = ` -" \`repositoryCatalogData\`Optional +" \`repositoryCatalogData\`Optional \`\`\`typescript public readonly repositoryCatalogData: any; @@ -186,11 +186,11 @@ public readonly repositoryCatalogData: any; `; exports[`wing snapshot 1`] = ` -Object { +{ "default": undefined, "displayName": "repositoryCatalogData", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorycatalogdata", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryCatalogData\`.", @@ -198,7 +198,7 @@ Object { "fqn": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "optional": true, - "type": Object { + "type": { "formattingPattern": "any", }, "usage": "repositoryCatalogData: any;", @@ -206,7 +206,7 @@ Object { `; exports[`wing snapshot 2`] = ` -" \`repositoryCatalogData\`Optional +" \`repositoryCatalogData\`Optional \`\`\`wing repositoryCatalogData: any; diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/static-function.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/static-function.test.ts.snap index b96d52c24c8..31afd61b70f 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/static-function.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/static-function.test.ts.snap @@ -1,25 +1,25 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`csharp snapshot 1`] = ` -Object { +{ "displayName": "GrantRead", - "docs": Object { + "docs": { "summary": "Grant access to retrieve an authorization token.", }, "fqn": "Amazon.CDK.AWS.ECR.AuthorizationToken.GrantRead", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "Grantee", - "docs": Object {}, + "docs": {}, "fqn": "Amazon.CDK.AWS.ECR.AuthorizationToken.GrantRead.parameter.Grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "Amazon.CDK.AWS.IAM.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -37,7 +37,7 @@ AuthorizationToken.GrantRead(IGrantable Grantee);", `; exports[`csharp snapshot 2`] = ` -" \`GrantRead\` +" \`GrantRead\` \`\`\`csharp using Amazon.CDK.AWS.ECR; @@ -47,7 +47,7 @@ AuthorizationToken.GrantRead(IGrantable Grantee); Grant access to retrieve an authorization token. -# \`Grantee\`Required +# \`Grantee\`Required - *Type:* Amazon.CDK.AWS.IAM.IGrantable @@ -56,25 +56,25 @@ Grant access to retrieve an authorization token. `; exports[`go snapshot 1`] = ` -Object { +{ "displayName": "GrantRead", - "docs": Object { + "docs": { "summary": "Grant access to retrieve an authorization token.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.AuthorizationToken.GrantRead", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.AuthorizationToken.GrantRead.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "github.com/aws/aws-cdk-go/awscdk/awsiam/awscdkawsiam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -85,24 +85,24 @@ Object { }, }, ], - "usage": "import \\"github.com/aws/aws-cdk-go/awscdkawsecr\\" + "usage": "import "github.com/aws/aws-cdk-go/awscdkawsecr" awscdkawsecr.AuthorizationToken_GrantRead(grantee IGrantable)", } `; exports[`go snapshot 2`] = ` -" \`GrantRead\` +" \`GrantRead\` \`\`\`go -import \\"github.com/aws/aws-cdk-go/awscdkawsecr\\" +import "github.com/aws/aws-cdk-go/awscdkawsecr" awscdkawsecr.AuthorizationToken_GrantRead(grantee IGrantable) \`\`\` Grant access to retrieve an authorization token. -# \`grantee\`Required +# \`grantee\`Required - *Type:* github.com/aws/aws-cdk-go/awscdk/awsiam/awscdkawsiam.IGrantable @@ -111,25 +111,25 @@ Grant access to retrieve an authorization token. `; exports[`java snapshot 1`] = ` -Object { +{ "displayName": "grantRead", - "docs": Object { + "docs": { "summary": "Grant access to retrieve an authorization token.", }, "fqn": "software.amazon.awscdk.services.ecr.AuthorizationToken.grantRead", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "software.amazon.awscdk.services.ecr.AuthorizationToken.grantRead.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "software.amazon.awscdk.services.iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -147,7 +147,7 @@ AuthorizationToken.grantRead(IGrantable grantee)", `; exports[`java snapshot 2`] = ` -" \`grantRead\` +" \`grantRead\` \`\`\`java import software.amazon.awscdk.services.ecr.AuthorizationToken; @@ -157,7 +157,7 @@ AuthorizationToken.grantRead(IGrantable grantee) Grant access to retrieve an authorization token. -# \`grantee\`Required +# \`grantee\`Required - *Type:* software.amazon.awscdk.services.iam.IGrantable @@ -166,25 +166,25 @@ Grant access to retrieve an authorization token. `; exports[`python snapshot 1`] = ` -Object { +{ "displayName": "grant_read", - "docs": Object { + "docs": { "summary": "Grant access to retrieve an authorization token.", }, "fqn": "aws_cdk.aws_ecr.AuthorizationToken.grant_read", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "aws_cdk.aws_ecr.AuthorizationToken.grant_read.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "aws_cdk.aws_iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -204,7 +204,7 @@ aws_cdk.aws_ecr.AuthorizationToken.grant_read( `; exports[`python snapshot 2`] = ` -" \`grant_read\` +" \`grant_read\` \`\`\`python import aws_cdk.aws_ecr @@ -216,7 +216,7 @@ aws_cdk.aws_ecr.AuthorizationToken.grant_read( Grant access to retrieve an authorization token. -# \`grantee\`Required +# \`grantee\`Required - *Type:* aws_cdk.aws_iam.IGrantable @@ -225,25 +225,25 @@ Grant access to retrieve an authorization token. `; exports[`typescript snapshot 1`] = ` -Object { +{ "displayName": "grantRead", - "docs": Object { + "docs": { "summary": "Grant access to retrieve an authorization token.", }, "fqn": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -261,7 +261,7 @@ AuthorizationToken.grantRead(grantee: IGrantable)", `; exports[`typescript snapshot 2`] = ` -" \`grantRead\` +" \`grantRead\` \`\`\`typescript import { AuthorizationToken } from '@aws-cdk/aws-ecr' @@ -271,7 +271,7 @@ AuthorizationToken.grantRead(grantee: IGrantable) Grant access to retrieve an authorization token. -# \`grantee\`Required +# \`grantee\`Required - *Type:* @aws-cdk/aws-iam.IGrantable @@ -280,25 +280,25 @@ Grant access to retrieve an authorization token. `; exports[`wing snapshot 1`] = ` -Object { +{ "displayName": "grantRead", - "docs": Object { + "docs": { "summary": "Grant access to retrieve an authorization token.", }, "fqn": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead", - "parameters": Array [ - Object { + "parameters": [ + { "default": undefined, "displayName": "grantee", - "docs": Object {}, + "docs": {}, "fqn": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "id": "@aws-cdk/aws-ecr.AuthorizationToken.grantRead.parameter.grantee", "optional": undefined, - "type": Object { + "type": { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "IGrantable", "fqn": "@aws-cdk/aws-iam.IGrantable", "id": "@aws-cdk/aws-iam.IGrantable", @@ -309,24 +309,24 @@ Object { }, }, ], - "usage": "bring { AuthorizationToken } from \\"@aws-cdk/aws-ecr\\"; + "usage": "bring { AuthorizationToken } from "@aws-cdk/aws-ecr"; AuthorizationToken.grantRead(grantee: IGrantable);", } `; exports[`wing snapshot 2`] = ` -" \`grantRead\` +" \`grantRead\` \`\`\`wing -bring { AuthorizationToken } from \\"@aws-cdk/aws-ecr\\"; +bring { AuthorizationToken } from "@aws-cdk/aws-ecr"; AuthorizationToken.grantRead(grantee: IGrantable); \`\`\` Grant access to retrieve an authorization token. -# \`grantee\`Required +# \`grantee\`Required - *Type:* @aws-cdk/aws-iam.IGrantable diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/struct.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/struct.test.ts.snap index 70c5fcef23c..e6137398bbf 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/struct.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/struct.test.ts.snap @@ -1,22 +1,22 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`csharp snapshot 1`] = ` -Object { +{ "displayName": "CfnPublicRepositoryProps", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html", ], "summary": "Properties for defining a \`AWS::ECR::PublicRepository\`.", }, "fqn": "Amazon.CDK.AWS.ECR.CfnPublicRepositoryProps", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps", - "properties": Array [ - Object { + "properties": [ + { "default": undefined, "displayName": "RepositoryCatalogData", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorycatalogdata", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryCatalogData\`.", @@ -24,16 +24,16 @@ Object { "fqn": "Amazon.CDK.AWS.ECR.CfnPublicRepositoryProps.property.RepositoryCatalogData", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "optional": true, - "type": Object { + "type": { "formattingPattern": "object", }, "usage": "public object RepositoryCatalogData { get; set; }", }, - Object { + { "default": undefined, "displayName": "RepositoryName", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositoryname", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryName\`.", @@ -41,16 +41,16 @@ Object { "fqn": "Amazon.CDK.AWS.ECR.CfnPublicRepositoryProps.property.RepositoryName", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryName", "optional": true, - "type": Object { + "type": { "formattingPattern": "string", }, "usage": "public string RepositoryName { get; set; }", }, - Object { + { "default": undefined, "displayName": "RepositoryPolicyText", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorypolicytext", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryPolicyText\`.", @@ -58,16 +58,16 @@ Object { "fqn": "Amazon.CDK.AWS.ECR.CfnPublicRepositoryProps.property.RepositoryPolicyText", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryPolicyText", "optional": true, - "type": Object { + "type": { "formattingPattern": "object", }, "usage": "public object RepositoryPolicyText { get; set; }", }, - Object { + { "default": undefined, "displayName": "Tags", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-tags", ], "summary": "\`AWS::ECR::PublicRepository.Tags\`.", @@ -75,13 +75,13 @@ Object { "fqn": "Amazon.CDK.AWS.ECR.CfnPublicRepositoryProps.property.Tags", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.tags", "optional": true, - "type": Object { + "type": { "formattingPattern": "%[]", - "types": Array [ - Object { + "types": [ + { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "CfnTag", "fqn": "Amazon.CDK.CfnTag", "id": "@aws-cdk/core.CfnTag", @@ -107,13 +107,13 @@ new CfnPublicRepositoryProps { `; exports[`csharp snapshot 2`] = ` -" CfnPublicRepositoryProps +" CfnPublicRepositoryProps Properties for defining a \`AWS::ECR::PublicRepository\`. > [http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html) -# Initializer +# Initializer \`\`\`csharp using Amazon.CDK.AWS.ECR; @@ -126,18 +126,18 @@ new CfnPublicRepositoryProps { }; \`\`\` -# Properties +# Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| RepositoryCatalogData | object | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | -| RepositoryName | string | \`AWS::ECR::PublicRepository.RepositoryName\`. | -| RepositoryPolicyText | object | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | -| Tags | Amazon.CDK.CfnTag[] | \`AWS::ECR::PublicRepository.Tags\`. | +| RepositoryCatalogData | object | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | +| RepositoryName | string | \`AWS::ECR::PublicRepository.RepositoryName\`. | +| RepositoryPolicyText | object | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | +| Tags | Amazon.CDK.CfnTag[] | \`AWS::ECR::PublicRepository.Tags\`. | --- -## \`RepositoryCatalogData\`Optional +## \`RepositoryCatalogData\`Optional \`\`\`csharp public object RepositoryCatalogData { get; set; } @@ -151,7 +151,7 @@ public object RepositoryCatalogData { get; set; } --- -## \`RepositoryName\`Optional +## \`RepositoryName\`Optional \`\`\`csharp public string RepositoryName { get; set; } @@ -165,7 +165,7 @@ public string RepositoryName { get; set; } --- -## \`RepositoryPolicyText\`Optional +## \`RepositoryPolicyText\`Optional \`\`\`csharp public object RepositoryPolicyText { get; set; } @@ -179,7 +179,7 @@ public object RepositoryPolicyText { get; set; } --- -## \`Tags\`Optional +## \`Tags\`Optional \`\`\`csharp public CfnTag[] Tags { get; set; } @@ -196,22 +196,22 @@ public CfnTag[] Tags { get; set; } `; exports[`go snapshot 1`] = ` -Object { +{ "displayName": "CfnPublicRepositoryProps", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html", ], "summary": "Properties for defining a \`AWS::ECR::PublicRepository\`.", }, "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.CfnPublicRepositoryProps", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps", - "properties": Array [ - Object { + "properties": [ + { "default": undefined, "displayName": "RepositoryCatalogData", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorycatalogdata", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryCatalogData\`.", @@ -219,16 +219,16 @@ Object { "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.CfnPublicRepositoryProps.property.RepositoryCatalogData", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "optional": true, - "type": Object { + "type": { "formattingPattern": "interface{}", }, "usage": "RepositoryCatalogData interface{}", }, - Object { + { "default": undefined, "displayName": "RepositoryName", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositoryname", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryName\`.", @@ -236,16 +236,16 @@ Object { "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.CfnPublicRepositoryProps.property.RepositoryName", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryName", "optional": true, - "type": Object { + "type": { "formattingPattern": "*string", }, "usage": "RepositoryName *string", }, - Object { + { "default": undefined, "displayName": "RepositoryPolicyText", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorypolicytext", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryPolicyText\`.", @@ -253,16 +253,16 @@ Object { "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.CfnPublicRepositoryProps.property.RepositoryPolicyText", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryPolicyText", "optional": true, - "type": Object { + "type": { "formattingPattern": "interface{}", }, "usage": "RepositoryPolicyText interface{}", }, - Object { + { "default": undefined, "displayName": "Tags", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-tags", ], "summary": "\`AWS::ECR::PublicRepository.Tags\`.", @@ -270,13 +270,13 @@ Object { "fqn": "github.com/aws/aws-cdk-go/awscdkawsecr.CfnPublicRepositoryProps.property.Tags", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.tags", "optional": true, - "type": Object { + "type": { "formattingPattern": "*[]%", - "types": Array [ - Object { + "types": [ + { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "CfnTag", "fqn": "github.com/aws/aws-cdk-go/awscdk/awscdkcore.CfnTag", "id": "@aws-cdk/core.CfnTag", @@ -290,7 +290,7 @@ Object { "usage": "Tags *[]CfnTag", }, ], - "usage": "import \\"github.com/aws/aws-cdk-go/awscdkawsecr\\" + "usage": "import "github.com/aws/aws-cdk-go/awscdkawsecr" &awscdkawsecr.CfnPublicRepositoryProps { RepositoryCatalogData: interface{}, @@ -302,16 +302,16 @@ Object { `; exports[`go snapshot 2`] = ` -" CfnPublicRepositoryProps +" CfnPublicRepositoryProps Properties for defining a \`AWS::ECR::PublicRepository\`. > [http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html) -# Initializer +# Initializer \`\`\`go -import \\"github.com/aws/aws-cdk-go/awscdkawsecr\\" +import "github.com/aws/aws-cdk-go/awscdkawsecr" &awscdkawsecr.CfnPublicRepositoryProps { RepositoryCatalogData: interface{}, @@ -321,18 +321,18 @@ import \\"github.com/aws/aws-cdk-go/awscdkawsecr\\" } \`\`\` -# Properties +# Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| RepositoryCatalogData | interface{} | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | -| RepositoryName | *string | \`AWS::ECR::PublicRepository.RepositoryName\`. | -| RepositoryPolicyText | interface{} | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | -| Tags | *[]github.com/aws/aws-cdk-go/awscdk/awscdkcore.CfnTag | \`AWS::ECR::PublicRepository.Tags\`. | +| RepositoryCatalogData | interface{} | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | +| RepositoryName | *string | \`AWS::ECR::PublicRepository.RepositoryName\`. | +| RepositoryPolicyText | interface{} | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | +| Tags | *[]github.com/aws/aws-cdk-go/awscdk/awscdkcore.CfnTag | \`AWS::ECR::PublicRepository.Tags\`. | --- -## \`RepositoryCatalogData\`Optional +## \`RepositoryCatalogData\`Optional \`\`\`go RepositoryCatalogData interface{} @@ -346,7 +346,7 @@ RepositoryCatalogData interface{} --- -## \`RepositoryName\`Optional +## \`RepositoryName\`Optional \`\`\`go RepositoryName *string @@ -360,7 +360,7 @@ RepositoryName *string --- -## \`RepositoryPolicyText\`Optional +## \`RepositoryPolicyText\`Optional \`\`\`go RepositoryPolicyText interface{} @@ -374,7 +374,7 @@ RepositoryPolicyText interface{} --- -## \`Tags\`Optional +## \`Tags\`Optional \`\`\`go Tags *[]CfnTag @@ -391,22 +391,22 @@ Tags *[]CfnTag `; exports[`java snapshot 1`] = ` -Object { +{ "displayName": "CfnPublicRepositoryProps", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html", ], "summary": "Properties for defining a \`AWS::ECR::PublicRepository\`.", }, "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepositoryProps", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps", - "properties": Array [ - Object { + "properties": [ + { "default": undefined, "displayName": "repositoryCatalogData", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorycatalogdata", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryCatalogData\`.", @@ -414,16 +414,16 @@ Object { "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "optional": true, - "type": Object { + "type": { "formattingPattern": "java.lang.Object", }, "usage": "public java.lang.Object getRepositoryCatalogData();", }, - Object { + { "default": undefined, "displayName": "repositoryName", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositoryname", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryName\`.", @@ -431,16 +431,16 @@ Object { "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepositoryProps.property.repositoryName", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryName", "optional": true, - "type": Object { + "type": { "formattingPattern": "java.lang.String", }, "usage": "public java.lang.String getRepositoryName();", }, - Object { + { "default": undefined, "displayName": "repositoryPolicyText", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorypolicytext", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryPolicyText\`.", @@ -448,16 +448,16 @@ Object { "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepositoryProps.property.repositoryPolicyText", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryPolicyText", "optional": true, - "type": Object { + "type": { "formattingPattern": "java.lang.Object", }, "usage": "public java.lang.Object getRepositoryPolicyText();", }, - Object { + { "default": undefined, "displayName": "tags", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-tags", ], "summary": "\`AWS::ECR::PublicRepository.Tags\`.", @@ -465,13 +465,13 @@ Object { "fqn": "software.amazon.awscdk.services.ecr.CfnPublicRepositoryProps.property.tags", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.tags", "optional": true, - "type": Object { + "type": { "formattingPattern": "java.util.List<%>", - "types": Array [ - Object { + "types": [ + { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "CfnTag", "fqn": "software.amazon.awscdk.core.CfnTag", "id": "@aws-cdk/core.CfnTag", @@ -497,13 +497,13 @@ CfnPublicRepositoryProps.builder() `; exports[`java snapshot 2`] = ` -" CfnPublicRepositoryProps +" CfnPublicRepositoryProps Properties for defining a \`AWS::ECR::PublicRepository\`. > [http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html) -# Initializer +# Initializer \`\`\`java import software.amazon.awscdk.services.ecr.CfnPublicRepositoryProps; @@ -516,18 +516,18 @@ CfnPublicRepositoryProps.builder() .build(); \`\`\` -# Properties +# Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| repositoryCatalogData | java.lang.Object | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | -| repositoryName | java.lang.String | \`AWS::ECR::PublicRepository.RepositoryName\`. | -| repositoryPolicyText | java.lang.Object | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | -| tags | java.util.List | \`AWS::ECR::PublicRepository.Tags\`. | +| repositoryCatalogData | java.lang.Object | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | +| repositoryName | java.lang.String | \`AWS::ECR::PublicRepository.RepositoryName\`. | +| repositoryPolicyText | java.lang.Object | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | +| tags | java.util.List | \`AWS::ECR::PublicRepository.Tags\`. | --- -## \`repositoryCatalogData\`Optional +## \`repositoryCatalogData\`Optional \`\`\`java public java.lang.Object getRepositoryCatalogData(); @@ -541,7 +541,7 @@ public java.lang.Object getRepositoryCatalogData(); --- -## \`repositoryName\`Optional +## \`repositoryName\`Optional \`\`\`java public java.lang.String getRepositoryName(); @@ -555,7 +555,7 @@ public java.lang.String getRepositoryName(); --- -## \`repositoryPolicyText\`Optional +## \`repositoryPolicyText\`Optional \`\`\`java public java.lang.Object getRepositoryPolicyText(); @@ -569,7 +569,7 @@ public java.lang.Object getRepositoryPolicyText(); --- -## \`tags\`Optional +## \`tags\`Optional \`\`\`java public java.util.List getTags(); @@ -586,22 +586,22 @@ public java.util.List getTags(); `; exports[`python snapshot 1`] = ` -Object { +{ "displayName": "CfnPublicRepositoryProps", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html", ], "summary": "Properties for defining a \`AWS::ECR::PublicRepository\`.", }, "fqn": "aws_cdk.aws_ecr.CfnPublicRepositoryProps", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps", - "properties": Array [ - Object { + "properties": [ + { "default": undefined, "displayName": "repository_catalog_data", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorycatalogdata", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryCatalogData\`.", @@ -609,16 +609,16 @@ Object { "fqn": "aws_cdk.aws_ecr.CfnPublicRepositoryProps.property.repository_catalog_data", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "optional": true, - "type": Object { + "type": { "formattingPattern": "typing.Any", }, "usage": "repository_catalog_data: typing.Any", }, - Object { + { "default": undefined, "displayName": "repository_name", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositoryname", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryName\`.", @@ -626,16 +626,16 @@ Object { "fqn": "aws_cdk.aws_ecr.CfnPublicRepositoryProps.property.repository_name", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryName", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "repository_name: str", }, - Object { + { "default": undefined, "displayName": "repository_policy_text", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorypolicytext", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryPolicyText\`.", @@ -643,16 +643,16 @@ Object { "fqn": "aws_cdk.aws_ecr.CfnPublicRepositoryProps.property.repository_policy_text", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryPolicyText", "optional": true, - "type": Object { + "type": { "formattingPattern": "typing.Any", }, "usage": "repository_policy_text: typing.Any", }, - Object { + { "default": undefined, "displayName": "tags", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-tags", ], "summary": "\`AWS::ECR::PublicRepository.Tags\`.", @@ -660,13 +660,13 @@ Object { "fqn": "aws_cdk.aws_ecr.CfnPublicRepositoryProps.property.tags", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.tags", "optional": true, - "type": Object { + "type": { "formattingPattern": "typing.List[%]", - "types": Array [ - Object { + "types": [ + { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "CfnTag", "fqn": "aws_cdk.core.CfnTag", "id": "@aws-cdk/core.CfnTag", @@ -692,13 +692,13 @@ aws_cdk.aws_ecr.CfnPublicRepositoryProps( `; exports[`python snapshot 2`] = ` -" CfnPublicRepositoryProps +" CfnPublicRepositoryProps Properties for defining a \`AWS::ECR::PublicRepository\`. > [http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html) -# Initializer +# Initializer \`\`\`python import aws_cdk.aws_ecr @@ -711,18 +711,18 @@ aws_cdk.aws_ecr.CfnPublicRepositoryProps( ) \`\`\` -# Properties +# Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| repository_catalog_data | typing.Any | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | -| repository_name | str | \`AWS::ECR::PublicRepository.RepositoryName\`. | -| repository_policy_text | typing.Any | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | -| tags | typing.List[aws_cdk.core.CfnTag] | \`AWS::ECR::PublicRepository.Tags\`. | +| repository_catalog_data | typing.Any | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | +| repository_name | str | \`AWS::ECR::PublicRepository.RepositoryName\`. | +| repository_policy_text | typing.Any | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | +| tags | typing.List[aws_cdk.core.CfnTag] | \`AWS::ECR::PublicRepository.Tags\`. | --- -## \`repository_catalog_data\`Optional +## \`repository_catalog_data\`Optional \`\`\`python repository_catalog_data: typing.Any @@ -736,7 +736,7 @@ repository_catalog_data: typing.Any --- -## \`repository_name\`Optional +## \`repository_name\`Optional \`\`\`python repository_name: str @@ -750,7 +750,7 @@ repository_name: str --- -## \`repository_policy_text\`Optional +## \`repository_policy_text\`Optional \`\`\`python repository_policy_text: typing.Any @@ -764,7 +764,7 @@ repository_policy_text: typing.Any --- -## \`tags\`Optional +## \`tags\`Optional \`\`\`python tags: typing.List[CfnTag] @@ -781,22 +781,22 @@ tags: typing.List[CfnTag] `; exports[`typescript snapshot 1`] = ` -Object { +{ "displayName": "CfnPublicRepositoryProps", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html", ], "summary": "Properties for defining a \`AWS::ECR::PublicRepository\`.", }, "fqn": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps", - "properties": Array [ - Object { + "properties": [ + { "default": undefined, "displayName": "repositoryCatalogData", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorycatalogdata", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryCatalogData\`.", @@ -804,16 +804,16 @@ Object { "fqn": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "optional": true, - "type": Object { + "type": { "formattingPattern": "any", }, "usage": "public readonly repositoryCatalogData: any;", }, - Object { + { "default": undefined, "displayName": "repositoryName", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositoryname", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryName\`.", @@ -821,16 +821,16 @@ Object { "fqn": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryName", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryName", "optional": true, - "type": Object { + "type": { "formattingPattern": "string", }, "usage": "public readonly repositoryName: string;", }, - Object { + { "default": undefined, "displayName": "repositoryPolicyText", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorypolicytext", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryPolicyText\`.", @@ -838,16 +838,16 @@ Object { "fqn": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryPolicyText", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryPolicyText", "optional": true, - "type": Object { + "type": { "formattingPattern": "any", }, "usage": "public readonly repositoryPolicyText: any;", }, - Object { + { "default": undefined, "displayName": "tags", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-tags", ], "summary": "\`AWS::ECR::PublicRepository.Tags\`.", @@ -855,13 +855,13 @@ Object { "fqn": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.tags", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.tags", "optional": true, - "type": Object { + "type": { "formattingPattern": "%[]", - "types": Array [ - Object { + "types": [ + { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "CfnTag", "fqn": "@aws-cdk/core.CfnTag", "id": "@aws-cdk/core.CfnTag", @@ -882,13 +882,13 @@ const cfnPublicRepositoryProps: CfnPublicRepositoryProps = { ... }", `; exports[`typescript snapshot 2`] = ` -" CfnPublicRepositoryProps +" CfnPublicRepositoryProps Properties for defining a \`AWS::ECR::PublicRepository\`. > [http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html) -# Initializer +# Initializer \`\`\`typescript import { CfnPublicRepositoryProps } from '@aws-cdk/aws-ecr' @@ -896,18 +896,18 @@ import { CfnPublicRepositoryProps } from '@aws-cdk/aws-ecr' const cfnPublicRepositoryProps: CfnPublicRepositoryProps = { ... } \`\`\` -# Properties +# Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| repositoryCatalogData | any | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | -| repositoryName | string | \`AWS::ECR::PublicRepository.RepositoryName\`. | -| repositoryPolicyText | any | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | -| tags | @aws-cdk/core.CfnTag[] | \`AWS::ECR::PublicRepository.Tags\`. | +| repositoryCatalogData | any | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | +| repositoryName | string | \`AWS::ECR::PublicRepository.RepositoryName\`. | +| repositoryPolicyText | any | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | +| tags | @aws-cdk/core.CfnTag[] | \`AWS::ECR::PublicRepository.Tags\`. | --- -## \`repositoryCatalogData\`Optional +## \`repositoryCatalogData\`Optional \`\`\`typescript public readonly repositoryCatalogData: any; @@ -921,7 +921,7 @@ public readonly repositoryCatalogData: any; --- -## \`repositoryName\`Optional +## \`repositoryName\`Optional \`\`\`typescript public readonly repositoryName: string; @@ -935,7 +935,7 @@ public readonly repositoryName: string; --- -## \`repositoryPolicyText\`Optional +## \`repositoryPolicyText\`Optional \`\`\`typescript public readonly repositoryPolicyText: any; @@ -949,7 +949,7 @@ public readonly repositoryPolicyText: any; --- -## \`tags\`Optional +## \`tags\`Optional \`\`\`typescript public readonly tags: CfnTag[]; @@ -966,22 +966,22 @@ public readonly tags: CfnTag[]; `; exports[`wing snapshot 1`] = ` -Object { +{ "displayName": "CfnPublicRepositoryProps", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html", ], "summary": "Properties for defining a \`AWS::ECR::PublicRepository\`.", }, "fqn": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps", - "properties": Array [ - Object { + "properties": [ + { "default": undefined, "displayName": "repositoryCatalogData", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorycatalogdata", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryCatalogData\`.", @@ -989,16 +989,16 @@ Object { "fqn": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryCatalogData", "optional": true, - "type": Object { + "type": { "formattingPattern": "any", }, "usage": "repositoryCatalogData: any;", }, - Object { + { "default": undefined, "displayName": "repositoryName", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositoryname", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryName\`.", @@ -1006,16 +1006,16 @@ Object { "fqn": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryName", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryName", "optional": true, - "type": Object { + "type": { "formattingPattern": "str", }, "usage": "repositoryName: str;", }, - Object { + { "default": undefined, "displayName": "repositoryPolicyText", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-repositorypolicytext", ], "summary": "\`AWS::ECR::PublicRepository.RepositoryPolicyText\`.", @@ -1023,16 +1023,16 @@ Object { "fqn": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryPolicyText", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.repositoryPolicyText", "optional": true, - "type": Object { + "type": { "formattingPattern": "any", }, "usage": "repositoryPolicyText: any;", }, - Object { + { "default": undefined, "displayName": "tags", - "docs": Object { - "links": Array [ + "docs": { + "links": [ "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html#cfn-ecr-publicrepository-tags", ], "summary": "\`AWS::ECR::PublicRepository.Tags\`.", @@ -1040,13 +1040,13 @@ Object { "fqn": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.tags", "id": "@aws-cdk/aws-ecr.CfnPublicRepositoryProps.property.tags", "optional": true, - "type": Object { + "type": { "formattingPattern": "MutArray<%>", - "types": Array [ - Object { + "types": [ + { "formattingPattern": "%", - "types": Array [ - Object { + "types": [ + { "displayName": "CfnTag", "fqn": "@aws-cdk/core.CfnTag", "id": "@aws-cdk/core.CfnTag", @@ -1060,39 +1060,39 @@ Object { "usage": "tags: MutArray<CfnTag>;", }, ], - "usage": "bring { CfnPublicRepositoryProps } from \\"@aws-cdk/aws-ecr\\"; + "usage": "bring { CfnPublicRepositoryProps } from "@aws-cdk/aws-ecr"; let CfnPublicRepositoryProps = CfnPublicRepositoryProps{ ... };", } `; exports[`wing snapshot 2`] = ` -" CfnPublicRepositoryProps +" CfnPublicRepositoryProps Properties for defining a \`AWS::ECR::PublicRepository\`. > [http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-publicrepository.html) -# Initializer +# Initializer \`\`\`wing -bring { CfnPublicRepositoryProps } from \\"@aws-cdk/aws-ecr\\"; +bring { CfnPublicRepositoryProps } from "@aws-cdk/aws-ecr"; let CfnPublicRepositoryProps = CfnPublicRepositoryProps{ ... }; \`\`\` -# Properties +# Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| repositoryCatalogData | any | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | -| repositoryName | str | \`AWS::ECR::PublicRepository.RepositoryName\`. | -| repositoryPolicyText | any | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | -| tags | MutArray<@aws-cdk/core.CfnTag> | \`AWS::ECR::PublicRepository.Tags\`. | +| repositoryCatalogData | any | \`AWS::ECR::PublicRepository.RepositoryCatalogData\`. | +| repositoryName | str | \`AWS::ECR::PublicRepository.RepositoryName\`. | +| repositoryPolicyText | any | \`AWS::ECR::PublicRepository.RepositoryPolicyText\`. | +| tags | MutArray<@aws-cdk/core.CfnTag> | \`AWS::ECR::PublicRepository.Tags\`. | --- -## \`repositoryCatalogData\`Optional +## \`repositoryCatalogData\`Optional \`\`\`wing repositoryCatalogData: any; @@ -1106,7 +1106,7 @@ repositoryCatalogData: any; --- -## \`repositoryName\`Optional +## \`repositoryName\`Optional \`\`\`wing repositoryName: str; @@ -1120,7 +1120,7 @@ repositoryName: str; --- -## \`repositoryPolicyText\`Optional +## \`repositoryPolicyText\`Optional \`\`\`wing repositoryPolicyText: any; @@ -1134,7 +1134,7 @@ repositoryPolicyText: any; --- -## \`tags\`Optional +## \`tags\`Optional \`\`\`wing tags: MutArray; diff --git a/apps/jsii-docgen/test/docgen/view/_npm.test.ts b/apps/jsii-docgen/test/docgen/view/_npm.test.ts index 7860fc640a5..95aaebde150 100644 --- a/apps/jsii-docgen/test/docgen/view/_npm.test.ts +++ b/apps/jsii-docgen/test/docgen/view/_npm.test.ts @@ -2,6 +2,7 @@ import { ChildProcess, spawn } from "child_process"; import { EventEmitter } from "events"; import { tmpdir } from "os"; import { Readable, Writable } from "stream"; +import { vi } from "vitest"; import { NoSpaceLeftOnDevice, NpmError, @@ -11,11 +12,8 @@ import { Npm } from "../../../src/docgen/view/_npm"; const TMPDIR = tmpdir(); -jest.mock("child_process"); -// eslint-disable-next-line @typescript-eslint/no-require-imports -const mockSpawn = require("child_process").spawn as jest.MockedFunction< - typeof spawn ->; +vi.mock("child_process"); +const mockSpawn = vi.mocked(spawn); test("NoSpaceLeftOnDevice error", () => { // GIVEN @@ -184,6 +182,8 @@ class MockChildProcess extends EventEmitter implements ChildProcess { public unref(): never { throw new UnsupportedCallError(); } + + [Symbol.dispose](): void {} } export class UnsupportedCallError extends Error { diff --git a/apps/jsii-docgen/test/docgen/view/class.test.ts b/apps/jsii-docgen/test/docgen/view/class.test.ts index 23a26729b33..5e05c8b3da6 100644 --- a/apps/jsii-docgen/test/docgen/view/class.test.ts +++ b/apps/jsii-docgen/test/docgen/view/class.test.ts @@ -19,7 +19,7 @@ const findClass = (): reflect.ClassType => { throw new Error("Assembly does not contain a class"); }; -test.each(Language.values())("%s snapshot", (language) => { +test.each(Language.values().map((l) => l.name))("%s snapshot", (language) => { const { transpile } = LANGUAGE_SPECIFIC[language.toString()]; const markdown = new MarkdownRenderer({ language, ...metadata }); const klass = new Class(transpile, findClass()).toJson(); diff --git a/apps/jsii-docgen/test/docgen/view/documentation.test.ts b/apps/jsii-docgen/test/docgen/view/documentation.test.ts index db753452ebd..6d82cef5cc9 100644 --- a/apps/jsii-docgen/test/docgen/view/documentation.test.ts +++ b/apps/jsii-docgen/test/docgen/view/documentation.test.ts @@ -1,8 +1,6 @@ import * as path from "path"; import { Documentation, Language } from "../../../src"; -jest.setTimeout(30 * 1000); - describe("wing", () => { test("single package", async () => { const docs = await Documentation.forProject( diff --git a/apps/jsii-docgen/test/docgen/view/enum.test.ts b/apps/jsii-docgen/test/docgen/view/enum.test.ts index 8567c392e64..ebfb4c68d94 100644 --- a/apps/jsii-docgen/test/docgen/view/enum.test.ts +++ b/apps/jsii-docgen/test/docgen/view/enum.test.ts @@ -19,7 +19,7 @@ const findEnum = (): reflect.EnumType => { throw new Error("Assembly does not contain an emum"); }; -test.each(Language.values())("%s snapshot", (language) => { +test.each(Language.values().map((l) => l.name))("%s snapshot", (language) => { const { transpile } = LANGUAGE_SPECIFIC[language.toString()]; const markdown = new MarkdownRenderer({ language, ...metadata }); const enu = new Enum(transpile, findEnum()).toJson(); diff --git a/apps/jsii-docgen/test/docgen/view/initializer.test.ts b/apps/jsii-docgen/test/docgen/view/initializer.test.ts index a08a3993959..68f123959c5 100644 --- a/apps/jsii-docgen/test/docgen/view/initializer.test.ts +++ b/apps/jsii-docgen/test/docgen/view/initializer.test.ts @@ -21,7 +21,7 @@ const findInitializer = (): reflect.Initializer => { throw new Error("Assembly does not contain an initializer"); }; -test.each(Language.values())("%s snapshot", (language) => { +test.each(Language.values().map((l) => l.name))("%s snapshot", (language) => { const { transpile } = LANGUAGE_SPECIFIC[language.toString()]; const markdown = new MarkdownRenderer({ language, ...metadata }); const init = new Initializer(transpile, findInitializer()).toJson(); diff --git a/apps/jsii-docgen/test/docgen/view/instance-method.test.ts b/apps/jsii-docgen/test/docgen/view/instance-method.test.ts index a61f6093bc9..59c45fe6979 100644 --- a/apps/jsii-docgen/test/docgen/view/instance-method.test.ts +++ b/apps/jsii-docgen/test/docgen/view/instance-method.test.ts @@ -23,7 +23,7 @@ const findInstanceMethod = (): reflect.Method => { throw new Error("Assembly does not contain an instance method"); }; -test.each(Language.values())("%s snapshot", (language) => { +test.each(Language.values().map((l) => l.name))("%s snapshot", (language) => { const { transpile } = LANGUAGE_SPECIFIC[language.toString()]; const markdown = new MarkdownRenderer({ language, ...metadata }); const method = new InstanceMethod(transpile, findInstanceMethod()).toJson(); diff --git a/apps/jsii-docgen/test/docgen/view/interface.test.ts b/apps/jsii-docgen/test/docgen/view/interface.test.ts index c33683ef436..f324b656fca 100644 --- a/apps/jsii-docgen/test/docgen/view/interface.test.ts +++ b/apps/jsii-docgen/test/docgen/view/interface.test.ts @@ -21,7 +21,7 @@ const findInterface = (): reflect.InterfaceType => { throw new Error("Assembly does not contain an interface"); }; -test.each(Language.values())("%s snapshot", (language) => { +test.each(Language.values().map((l) => l.name))("%s snapshot", (language) => { const { transpile } = LANGUAGE_SPECIFIC[language.toString()]; const markdown = new MarkdownRenderer({ language, ...metadata }); const iface = new Interface(transpile, findInterface()).toJson(); diff --git a/apps/jsii-docgen/test/docgen/view/markdown.test.ts b/apps/jsii-docgen/test/docgen/view/markdown.test.ts index 2eb6a26537f..5b6ec39c8c3 100644 --- a/apps/jsii-docgen/test/docgen/view/markdown.test.ts +++ b/apps/jsii-docgen/test/docgen/view/markdown.test.ts @@ -2,8 +2,6 @@ import * as path from "path"; import { Documentation, Language } from "../../../src"; import { JsiiEntity } from "../../../src/docgen/schema"; -jest.setTimeout(60 * 1000); - let docs: Documentation; beforeAll(async () => { diff --git a/apps/jsii-docgen/test/docgen/view/parameter.test.ts b/apps/jsii-docgen/test/docgen/view/parameter.test.ts index 8f01f9ef66e..a1dc5c34bfb 100644 --- a/apps/jsii-docgen/test/docgen/view/parameter.test.ts +++ b/apps/jsii-docgen/test/docgen/view/parameter.test.ts @@ -24,7 +24,7 @@ const findParameter = (): reflect.Parameter => { throw new Error("Assembly does not contain a parameter"); }; -test.each(Language.values())("%s snapshot", (language) => { +test.each(Language.values().map((l) => l.name))("%s snapshot", (language) => { const { transpile } = LANGUAGE_SPECIFIC[language.toString()]; const markdown = new MarkdownRenderer({ language, ...metadata }); const param = new Parameter(transpile, findParameter()).toJson(); diff --git a/apps/jsii-docgen/test/docgen/view/property.test.ts b/apps/jsii-docgen/test/docgen/view/property.test.ts index d8342f0e94c..f10f4192ca1 100644 --- a/apps/jsii-docgen/test/docgen/view/property.test.ts +++ b/apps/jsii-docgen/test/docgen/view/property.test.ts @@ -21,7 +21,7 @@ const findProperty = (): reflect.Property => { throw new Error("Assembly does not contain a property"); }; -test.each(Language.values())("%s snapshot", (language) => { +test.each(Language.values().map((l) => l.name))("%s snapshot", (language) => { const { transpile } = LANGUAGE_SPECIFIC[language.toString()]; const markdown = new MarkdownRenderer({ language, ...metadata }); const prop = new Property(transpile, findProperty()).toJson(); diff --git a/apps/jsii-docgen/test/docgen/view/static-function.test.ts b/apps/jsii-docgen/test/docgen/view/static-function.test.ts index 02584d40b78..a41240b0f5b 100644 --- a/apps/jsii-docgen/test/docgen/view/static-function.test.ts +++ b/apps/jsii-docgen/test/docgen/view/static-function.test.ts @@ -23,7 +23,7 @@ const findStaticFunction = (): reflect.Method => { throw new Error("Assembly does not contain a static function"); }; -test.each(Language.values())("%s snapshot", (language) => { +test.each(Language.values().map((l) => l.name))("%s snapshot", (language) => { const { transpile } = LANGUAGE_SPECIFIC[language.toString()]; const markdown = new MarkdownRenderer({ language, ...metadata }); const func = new StaticFunction(transpile, findStaticFunction()).toJson(); diff --git a/apps/jsii-docgen/test/docgen/view/struct.test.ts b/apps/jsii-docgen/test/docgen/view/struct.test.ts index 3c199a6a06d..c377d72db77 100644 --- a/apps/jsii-docgen/test/docgen/view/struct.test.ts +++ b/apps/jsii-docgen/test/docgen/view/struct.test.ts @@ -21,7 +21,7 @@ const findStruct = (): reflect.InterfaceType => { throw new Error("Assembly does not contain a struct"); }; -test.each(Language.values())("%s snapshot", (language) => { +test.each(Language.values().map((l) => l.name))("%s snapshot", (language) => { const { transpile } = LANGUAGE_SPECIFIC[language.toString()]; const markdown = new MarkdownRenderer({ language, ...metadata }); const struct = new Struct(transpile, findStruct()).toJson(); diff --git a/apps/jsii-docgen/turbo.json b/apps/jsii-docgen/turbo.json index 583ed6ae5d6..ceb2ceab59a 100644 --- a/apps/jsii-docgen/turbo.json +++ b/apps/jsii-docgen/turbo.json @@ -4,6 +4,9 @@ "pipeline": { "compile": { "outputs": ["lib/**"] + }, + "test": { + "outputs": ["test/**/*.snap"] } } } diff --git a/apps/jsii-docgen/vitest.config.mts b/apps/jsii-docgen/vitest.config.mts new file mode 100644 index 00000000000..1e5c12fc0ab --- /dev/null +++ b/apps/jsii-docgen/vitest.config.mts @@ -0,0 +1,9 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["test/**/*.test.ts"], + globals: true, + testTimeout: 60000, + }, +}); diff --git a/apps/vscode-wing/.projen/deps.json b/apps/vscode-wing/.projen/deps.json index 432892546f0..24b6d81e897 100644 --- a/apps/vscode-wing/.projen/deps.json +++ b/apps/vscode-wing/.projen/deps.json @@ -40,16 +40,6 @@ "name": "@vscode/vsce", "type": "build" }, - { - "name": "@wingconsole/app", - "version": "workspace:^", - "type": "build" - }, - { - "name": "@wingconsole/server", - "version": "workspace:^", - "type": "build" - }, { "name": "eslint-config-prettier", "type": "build" @@ -80,11 +70,6 @@ "version": "^2.6.7", "type": "build" }, - { - "name": "npm-check-updates", - "version": "^16", - "type": "build" - }, { "name": "open", "type": "build" @@ -98,11 +83,11 @@ "type": "build" }, { - "name": "ts-node", + "name": "tsup", "type": "build" }, { - "name": "tsup", + "name": "tsx", "type": "build" }, { @@ -125,6 +110,11 @@ { "name": "ws", "type": "build" + }, + { + "name": "@types/node", + "version": "^20.11.0", + "type": "devenv" } ], "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." diff --git a/apps/vscode-wing/.projen/tasks.json b/apps/vscode-wing/.projen/tasks.json index 07e05df05de..8d6ab3ccc74 100644 --- a/apps/vscode-wing/.projen/tasks.json +++ b/apps/vscode-wing/.projen/tasks.json @@ -70,7 +70,7 @@ "description": "Synthesize project files", "steps": [ { - "exec": "ts-node --project tsconfig.dev.json .projenrc.ts" + "exec": "tsx --tsconfig tsconfig.dev.json .projenrc.ts" } ] }, @@ -137,10 +137,6 @@ "name": "post-compile", "description": "Runs after successful compilation" }, - "post-upgrade": { - "name": "post-upgrade", - "description": "Runs after upgrading dependencies" - }, "pre-compile": { "name": "pre-compile", "description": "Prepare the project for compilation" @@ -154,45 +150,6 @@ } ] }, - "upgrade": { - "name": "upgrade", - "description": "upgrade dependencies", - "env": { - "CI": "0" - }, - "steps": [ - { - "exec": "pnpm update npm-check-updates" - }, - { - "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,winglang'" - }, - { - "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,winglang'" - }, - { - "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,winglang'" - }, - { - "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,winglang'" - }, - { - "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,winglang'" - }, - { - "exec": "pnpm i --no-frozen-lockfile" - }, - { - "exec": "pnpm update @trpc/client @types/node-fetch @types/node @types/vscode @types/which @types/ws @typescript-eslint/eslint-plugin @typescript-eslint/parser @vscode/vsce @wingconsole/app @wingconsole/server eslint-config-prettier eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import eslint-plugin-prettier eslint node-fetch npm-check-updates open prettier projen ts-node tsup typescript vscode-languageclient which winglang ws" - }, - { - "exec": "pnpm exec projen" - }, - { - "spawn": "post-upgrade" - } - ] - }, "watch": { "name": "watch", "description": "Watch & compile in the background", diff --git a/apps/vscode-wing/.projenrc.ts b/apps/vscode-wing/.projenrc.ts index 32cbf87b50b..4c3bd1faad5 100644 --- a/apps/vscode-wing/.projenrc.ts +++ b/apps/vscode-wing/.projenrc.ts @@ -1,4 +1,4 @@ -import { IgnoreFile } from "projen"; +import { IgnoreFile, DependencyType } from "projen"; import { NodePackageManager } from "projen/lib/javascript"; import { TypeScriptAppProject } from "projen/lib/typescript"; import { VSCodeExtensionContributions } from "./src/project/vscode_types"; @@ -35,6 +35,7 @@ const project = new TypeScriptAppProject({ buildWorkflow: false, jest: false, github: false, + depsUpgrade: false, npmignoreEnabled: false, entrypoint: "lib/extension.js", eslintOptions: { @@ -60,18 +61,19 @@ const project = new TypeScriptAppProject({ "@trpc/client", "ws", "open", + "tsx", "node-fetch@^2.6.7", - "@types/node", "@types/which", "@vscode/vsce", "@types/node-fetch", "@types/ws", - "@wingconsole/app@workspace:^", - "@wingconsole/server@workspace:^", "winglang@workspace:^", ], }); +project.defaultTask!.reset("tsx --tsconfig tsconfig.dev.json .projenrc.ts"); +project.deps.removeDependency("ts-node"); + // because we're bundling, allow dev deps in src project.eslint?.allowDevDeps("src/**"); @@ -93,6 +95,7 @@ vscodeIgnore.addPatterns( ); const contributes: VSCodeExtensionContributions = { + breakpoints: [{ language: "wing" }], languages: [ { id: "wing", @@ -105,6 +108,50 @@ const contributes: VSCodeExtensionContributions = { }, }, ], + debuggers: [ + { + type: "wing", + label: "Wing Debug", + program: "", + languages: ["wing"], + configurationAttributes: { + launch: { + entrypoint: { + type: "string", + description: "The entrypoint to run", + default: "${file}", + }, + arguments: { + type: "string", + description: "Wing CLI arguments", + default: "test", + }, + }, + }, + initialConfigurations: [ + { + label: "Wing Debug: Launch", + description: "Launch a Wing program", + body: { + type: "wing", + request: "launch", + name: "Launch", + }, + }, + ], + configurationSnippets: [ + { + label: "Wing Debug: Launch", + description: "Launch a Wing program", + body: { + type: "wing", + request: "launch", + name: "Launch", + }, + }, + ], + }, + ], grammars: [ { language: "wing", @@ -130,61 +177,14 @@ const contributes: VSCodeExtensionContributions = { dark: "resources/icon-dark.svg", }, }, - { - command: "wing.openFile", - title: "Open source file", - icon: { - light: "resources/icon-light.svg", - dark: "resources/icon-dark.svg", - }, - }, - { - command: "wingConsole.openResource", - title: "Open resource", - }, - { - command: "wingConsole.runTest", - title: "Run test", - icon: { - light: "resources/play-light.svg", - dark: "resources/play-dark.svg", - }, - }, - { - command: "wingConsole.runAllTests", - title: "Run all tests", - icon: { - light: "resources/play-all-light.svg", - dark: "resources/play-all-dark.svg", - }, - }, ], menus: { "editor/title": [ { - when: "resourceLangId == wing && activeWebviewPanelId != 'wing.console'", + when: "resourceLangId == wing", command: "wing.openConsole", group: "navigation", }, - { - when: "resourceLangId != wing && activeWebviewPanelId == 'wing.console'", - command: "wing.openFile", - group: "navigation", - }, - ], - "view/item/context": [ - { - command: "wingConsole.runTest", - when: "view == consoleTestsExplorer", - group: "inline", - }, - ], - "explorer/context": [ - { - command: "wingConsole.runAllTests", - when: "view == consoleTestsExplorer", - group: "inline", - }, ], }, configuration: [ @@ -199,18 +199,6 @@ const contributes: VSCodeExtensionContributions = { }, }, ], - views: { - explorer: [ - { - id: "consoleExplorer", - name: "Wing Resources", - }, - { - id: "consoleTestsExplorer", - name: "Wing Tests", - }, - ], - }, }; project.addFields({ @@ -223,7 +211,7 @@ project.addFields({ vscode: `^${VSCODE_BASE_VERSION}`, }, categories: ["Programming Languages"], - activationEvents: ["onLanguage:wing"], + activationEvents: ["onLanguage:wing", "onDebug"], contributes, }); @@ -251,4 +239,6 @@ project.tryRemoveFile(".npmrc"); project.addTask("dev").exec("node scripts/dev.mjs"); +project.deps.addDependency("@types/node@^20.11.0", DependencyType.DEVENV); + project.synth(); diff --git a/apps/vscode-wing/LICENSE b/apps/vscode-wing/LICENSE index 8baea73aae7..99cf6257708 100644 --- a/apps/vscode-wing/LICENSE +++ b/apps/vscode-wing/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2023 Wing Cloud +Copyright (c) 2024 Wing Cloud Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/apps/vscode-wing/README.md b/apps/vscode-wing/README.md index 22d2feb617c..7253e69c173 100644 --- a/apps/vscode-wing/README.md +++ b/apps/vscode-wing/README.md @@ -2,7 +2,7 @@

Docs ▪︎ - Community + Community ▪︎ FAQ ▪︎ diff --git a/apps/vscode-wing/language-configuration.json b/apps/vscode-wing/language-configuration.json index fd88e1791b2..29a6cef2f4a 100644 --- a/apps/vscode-wing/language-configuration.json +++ b/apps/vscode-wing/language-configuration.json @@ -1,51 +1,64 @@ { - "comments": { - "lineComment": "//", - "blockComment": [ "/*", "*/" ] + "comments": { + "lineComment": "//", + "blockComment": ["/*", "*/"] + }, + "wordPattern": "([a-zA-Z_$@][A-Za-z_$0-9]*)", + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + { + "open": "{", + "close": "}" }, - "wordPattern": "/([a-zA-Z_$][A-Za-z_$0-9]*)/", - "brackets": [ - ["{", "}"], - ["[", "]"], - ["(", ")"] - ], - "autoClosingPairs": [ - ["{", "}"], - ["[", "]"], - ["(", ")"], - ["\"", "\""], - ["'", "'"], - ["/*", "*/"] - ], - "surroundingPairs": [ - ["{", "}"], - ["[", "]"], - ["(", ")"], - ["\"", "\""], - ["'", "'"] - ], - "folding": { - "markers": { - "start": "^\\s*//\\s*#?region\\b", - "end": "^\\s*//\\s*#?endregion\\b" - } + { + "open": "[", + "close": "]" }, - "indentationRules": { - "increaseIndentPattern": "^\\s*(\\b(if|function|class|proc)\\b.*\\{[^}\"'`]*|\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$", - "decreaseIndentPattern": "^\\s*(\\b(else)\\b.*\\}|\\})$" + { + "open": "(", + "close": ")" }, - "colorizedBracketPairs": [ - [ - "(", - ")" - ], - [ - "[", - "]" - ], - [ - "{", - "}" - ] - ], -} \ No newline at end of file + { + "open": "\"", + "close": "\"" + }, + { + "open": "/*", + "close": "*/" + } + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""] + ], + "folding": { + "markers": { + "start": "^\\s*//\\s*#?region\\b", + "end": "^\\s*//\\s*#?endregion\\b" + } + }, + "indentationRules": { + "increaseIndentPattern": "^\\s*(\\b(if|function|class|proc)\\b.*\\{[^}\"'`]*|\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$", + "decreaseIndentPattern": "^\\s*(\\b(else)\\b.*\\}|\\})$" + }, + "colorizedBracketPairs": [ + ["(", ")"], + ["[", "]"], + ["{", "}"] + ], + "onEnterRules": [ + { + "beforeText": "^\\s*///.*", + "action": { + "indent": "none", + "appendText": "/// " + } + } + ] +} diff --git a/apps/vscode-wing/package.json b/apps/vscode-wing/package.json index 07fe5fe8c69..a54c41344e5 100644 --- a/apps/vscode-wing/package.json +++ b/apps/vscode-wing/package.json @@ -15,10 +15,8 @@ "eslint": "pnpm exec projen eslint", "package": "pnpm exec projen package", "post-compile": "pnpm exec projen post-compile", - "post-upgrade": "pnpm exec projen post-upgrade", "pre-compile": "pnpm exec projen pre-compile", "test": "pnpm exec projen test", - "upgrade": "pnpm exec projen upgrade", "watch": "pnpm exec projen watch", "projen": "pnpm exec projen" }, @@ -29,8 +27,8 @@ "organization": true }, "devDependencies": { - "@trpc/client": "^10.38.1", - "@types/node": "^16", + "@trpc/client": "^10.45.2", + "@types/node": "^20.11.0", "@types/node-fetch": "^2.6.4", "@types/vscode": "^1.70.0", "@types/which": "^3.0.0", @@ -38,8 +36,6 @@ "@typescript-eslint/eslint-plugin": "^5", "@typescript-eslint/parser": "^5", "@vscode/vsce": "^2.21.0", - "@wingconsole/app": "workspace:^", - "@wingconsole/server": "workspace:^", "eslint": "^8", "eslint-config-prettier": "^8.10.0", "eslint-import-resolver-node": "^0.3.9", @@ -47,13 +43,12 @@ "eslint-plugin-import": "^2.28.1", "eslint-plugin-prettier": "^4.2.1", "node-fetch": "^2.6.7", - "npm-check-updates": "^16", "open": "^8.4.2", "prettier": "^2.8.8", "projen": "^0.71.163", - "ts-node": "^10.9.1", - "tsup": "^6.7.0", - "typescript": "^4.9.5", + "tsup": "^8.0.2", + "tsx": "^4.7.0", + "typescript": "^5.3.3", "vscode-languageclient": "^8.1.0", "which": "^4.0.0", "winglang": "workspace:^", @@ -89,9 +84,15 @@ "Programming Languages" ], "activationEvents": [ - "onLanguage:wing" + "onLanguage:wing", + "onDebug" ], "contributes": { + "breakpoints": [ + { + "language": "wing" + } + ], "languages": [ { "id": "wing", @@ -110,6 +111,52 @@ } } ], + "debuggers": [ + { + "type": "wing", + "label": "Wing Debug", + "program": "", + "languages": [ + "wing" + ], + "configurationAttributes": { + "launch": { + "entrypoint": { + "type": "string", + "description": "The entrypoint to run", + "default": "${file}" + }, + "arguments": { + "type": "string", + "description": "Wing CLI arguments", + "default": "test" + } + } + }, + "initialConfigurations": [ + { + "label": "Wing Debug: Launch", + "description": "Launch a Wing program", + "body": { + "type": "wing", + "request": "launch", + "name": "Launch" + } + } + ], + "configurationSnippets": [ + { + "label": "Wing Debug: Launch", + "description": "Launch a Wing program", + "body": { + "type": "wing", + "request": "launch", + "name": "Launch" + } + } + ] + } + ], "grammars": [ { "language": "wing", @@ -135,61 +182,14 @@ "light": "resources/icon-light.svg", "dark": "resources/icon-dark.svg" } - }, - { - "command": "wing.openFile", - "title": "Open source file", - "icon": { - "light": "resources/icon-light.svg", - "dark": "resources/icon-dark.svg" - } - }, - { - "command": "wingConsole.openResource", - "title": "Open resource" - }, - { - "command": "wingConsole.runTest", - "title": "Run test", - "icon": { - "light": "resources/play-light.svg", - "dark": "resources/play-dark.svg" - } - }, - { - "command": "wingConsole.runAllTests", - "title": "Run all tests", - "icon": { - "light": "resources/play-all-light.svg", - "dark": "resources/play-all-dark.svg" - } } ], "menus": { "editor/title": [ { - "when": "resourceLangId == wing && activeWebviewPanelId != 'wing.console'", + "when": "resourceLangId == wing", "command": "wing.openConsole", "group": "navigation" - }, - { - "when": "resourceLangId != wing && activeWebviewPanelId == 'wing.console'", - "command": "wing.openFile", - "group": "navigation" - } - ], - "view/item/context": [ - { - "command": "wingConsole.runTest", - "when": "view == consoleTestsExplorer", - "group": "inline" - } - ], - "explorer/context": [ - { - "command": "wingConsole.runAllTests", - "when": "view == consoleTestsExplorer", - "group": "inline" } ] }, @@ -203,19 +203,7 @@ } } } - ], - "views": { - "explorer": [ - { - "id": "consoleExplorer", - "name": "Wing Resources" - }, - { - "id": "consoleTestsExplorer", - "name": "Wing Tests" - } - ] - } + ] }, "volta": { "extends": "../../package.json" diff --git a/apps/vscode-wing/resources/icon-dark.svg b/apps/vscode-wing/resources/icon-dark.svg index a9aec13f73f..4a2f9cc0f68 100644 --- a/apps/vscode-wing/resources/icon-dark.svg +++ b/apps/vscode-wing/resources/icon-dark.svg @@ -1,26 +1,11 @@ - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/apps/vscode-wing/resources/icon-light.svg b/apps/vscode-wing/resources/icon-light.svg index bfc34382868..695b0133d54 100644 --- a/apps/vscode-wing/resources/icon-light.svg +++ b/apps/vscode-wing/resources/icon-light.svg @@ -1,28 +1,10 @@ - - + - - - + + - - + + - \ No newline at end of file + diff --git a/apps/vscode-wing/resources/play-all-dark.svg b/apps/vscode-wing/resources/play-all-dark.svg deleted file mode 100644 index a8ff8f57595..00000000000 --- a/apps/vscode-wing/resources/play-all-dark.svg +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/apps/vscode-wing/resources/play-all-light.svg b/apps/vscode-wing/resources/play-all-light.svg deleted file mode 100644 index b2883623d14..00000000000 --- a/apps/vscode-wing/resources/play-all-light.svg +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/apps/vscode-wing/resources/play-dark.svg b/apps/vscode-wing/resources/play-dark.svg deleted file mode 100644 index 6e208f956e7..00000000000 --- a/apps/vscode-wing/resources/play-dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/apps/vscode-wing/resources/play-light.svg b/apps/vscode-wing/resources/play-light.svg deleted file mode 100644 index 032a2f0a2c5..00000000000 --- a/apps/vscode-wing/resources/play-light.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/apps/vscode-wing/resources/resource-icons/dark/archive-box.svg b/apps/vscode-wing/resources/resource-icons/dark/archive-box.svg deleted file mode 100644 index f6ef06fab73..00000000000 --- a/apps/vscode-wing/resources/resource-icons/dark/archive-box.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/dark/beaker.svg b/apps/vscode-wing/resources/resource-icons/dark/beaker.svg deleted file mode 100644 index c45c483c366..00000000000 --- a/apps/vscode-wing/resources/resource-icons/dark/beaker.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/dark/bolt.svg b/apps/vscode-wing/resources/resource-icons/dark/bolt.svg deleted file mode 100644 index 61574e4aee3..00000000000 --- a/apps/vscode-wing/resources/resource-icons/dark/bolt.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/dark/calculator.svg b/apps/vscode-wing/resources/resource-icons/dark/calculator.svg deleted file mode 100644 index d79e9726463..00000000000 --- a/apps/vscode-wing/resources/resource-icons/dark/calculator.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/dark/clock.svg b/apps/vscode-wing/resources/resource-icons/dark/clock.svg deleted file mode 100644 index 87eab2dc2dc..00000000000 --- a/apps/vscode-wing/resources/resource-icons/dark/clock.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/dark/cloud.svg b/apps/vscode-wing/resources/resource-icons/dark/cloud.svg deleted file mode 100644 index 4eb9e708fbb..00000000000 --- a/apps/vscode-wing/resources/resource-icons/dark/cloud.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/dark/cube.svg b/apps/vscode-wing/resources/resource-icons/dark/cube.svg deleted file mode 100644 index 8ce57410c00..00000000000 --- a/apps/vscode-wing/resources/resource-icons/dark/cube.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/dark/globe-alt.svg b/apps/vscode-wing/resources/resource-icons/dark/globe-alt.svg deleted file mode 100644 index ab078d2abb6..00000000000 --- a/apps/vscode-wing/resources/resource-icons/dark/globe-alt.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/dark/megaphone.svg b/apps/vscode-wing/resources/resource-icons/dark/megaphone.svg deleted file mode 100644 index f5c85040fe1..00000000000 --- a/apps/vscode-wing/resources/resource-icons/dark/megaphone.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/dark/queue-list.svg b/apps/vscode-wing/resources/resource-icons/dark/queue-list.svg deleted file mode 100644 index 7eec9855d33..00000000000 --- a/apps/vscode-wing/resources/resource-icons/dark/queue-list.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/dark/redis.svg b/apps/vscode-wing/resources/resource-icons/dark/redis.svg deleted file mode 100644 index 66e31bd3336..00000000000 --- a/apps/vscode-wing/resources/resource-icons/dark/redis.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - diff --git a/apps/vscode-wing/resources/resource-icons/dark/table-cells.svg b/apps/vscode-wing/resources/resource-icons/dark/table-cells.svg deleted file mode 100644 index 3902cf36eb9..00000000000 --- a/apps/vscode-wing/resources/resource-icons/dark/table-cells.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/light/archive-box.svg b/apps/vscode-wing/resources/resource-icons/light/archive-box.svg deleted file mode 100644 index 897ecf080e6..00000000000 --- a/apps/vscode-wing/resources/resource-icons/light/archive-box.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/light/beaker.svg b/apps/vscode-wing/resources/resource-icons/light/beaker.svg deleted file mode 100644 index 6bd47ac6aa2..00000000000 --- a/apps/vscode-wing/resources/resource-icons/light/beaker.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/light/bolt.svg b/apps/vscode-wing/resources/resource-icons/light/bolt.svg deleted file mode 100644 index 52b44d7d5b1..00000000000 --- a/apps/vscode-wing/resources/resource-icons/light/bolt.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/light/calculator.svg b/apps/vscode-wing/resources/resource-icons/light/calculator.svg deleted file mode 100644 index f8c51446893..00000000000 --- a/apps/vscode-wing/resources/resource-icons/light/calculator.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/light/clock.svg b/apps/vscode-wing/resources/resource-icons/light/clock.svg deleted file mode 100644 index f9ade369484..00000000000 --- a/apps/vscode-wing/resources/resource-icons/light/clock.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/light/cloud.svg b/apps/vscode-wing/resources/resource-icons/light/cloud.svg deleted file mode 100644 index 6ca053e0754..00000000000 --- a/apps/vscode-wing/resources/resource-icons/light/cloud.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/light/cube.svg b/apps/vscode-wing/resources/resource-icons/light/cube.svg deleted file mode 100644 index 7bd64203b32..00000000000 --- a/apps/vscode-wing/resources/resource-icons/light/cube.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/light/globe-alt.svg b/apps/vscode-wing/resources/resource-icons/light/globe-alt.svg deleted file mode 100644 index 4733d467555..00000000000 --- a/apps/vscode-wing/resources/resource-icons/light/globe-alt.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/light/megaphone.svg b/apps/vscode-wing/resources/resource-icons/light/megaphone.svg deleted file mode 100644 index 8d077b760b5..00000000000 --- a/apps/vscode-wing/resources/resource-icons/light/megaphone.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/light/queue-list.svg b/apps/vscode-wing/resources/resource-icons/light/queue-list.svg deleted file mode 100644 index fc0f71ee8d4..00000000000 --- a/apps/vscode-wing/resources/resource-icons/light/queue-list.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/resources/resource-icons/light/redis.svg b/apps/vscode-wing/resources/resource-icons/light/redis.svg deleted file mode 100644 index 930dc657380..00000000000 --- a/apps/vscode-wing/resources/resource-icons/light/redis.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - diff --git a/apps/vscode-wing/resources/resource-icons/light/table-cells.svg b/apps/vscode-wing/resources/resource-icons/light/table-cells.svg deleted file mode 100644 index eedec1524f4..00000000000 --- a/apps/vscode-wing/resources/resource-icons/light/table-cells.svg +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/vscode-wing/src/bin-helper.ts b/apps/vscode-wing/src/bin-helper.ts index 31265d47562..3fbc9b1a7f6 100644 --- a/apps/vscode-wing/src/bin-helper.ts +++ b/apps/vscode-wing/src/bin-helper.ts @@ -80,7 +80,7 @@ export async function getWingBin(): Promise { Loggers.default.appendLine( `"which ${configuredWingBin}" => "${whichPath}"` ); - return resolvePath(whichPath); + return await resolvePath(whichPath); } catch (e) { const choice = await window.showWarningMessage( `Unable to find wing from "${configuredWingBin}" (not in PATH). Install globally with \`npm install -g winglang@latest\`? (${e})`, @@ -120,7 +120,7 @@ export async function resolvePath(p: string) { if (!vResult) { return null; } else { - return resolvePath(vResult); + return await resolvePath(vResult); } } diff --git a/apps/vscode-wing/src/console/console-manager.ts b/apps/vscode-wing/src/console/console-manager.ts deleted file mode 100644 index 0a52cfb9c6b..00000000000 --- a/apps/vscode-wing/src/console/console-manager.ts +++ /dev/null @@ -1,331 +0,0 @@ -import { - window, - WebviewPanel, - commands, - TreeView, - ViewColumn, - Uri, - ExtensionContext, - Position, - Range, -} from "vscode"; - -import { - ResourceItem, - ResourcesExplorerProvider, -} from "./explorer-providers/ResourcesExplorerProvider"; -import { - TestItem, - TestsExplorerProvider, -} from "./explorer-providers/TestsExplorerProvider"; -import { type Client } from "./services/client"; -import { VIEW_TYPE_CONSOLE } from "../constants"; -import { Loggers } from "../logging"; - -export interface ConsoleInstance { - id: string; - wingfile: string; - url: string; - client: Client; - onDidClose: () => void; -} - -export interface ConsoleManager { - addInstance: (instance: ConsoleInstance) => Promise; - getInstance: (instanceId: string) => ConsoleInstance | undefined; - closeInstance: (instanceId: string) => void; - setActiveInstance: (instanceId: string) => Promise; - activeInstances: () => boolean; - getActiveInstanceId: () => string | undefined; - stopAll: () => Promise; -} - -export const createConsoleManager = ( - context: ExtensionContext -): ConsoleManager => { - const instances: Record = {}; - const resourcesExplorer = new ResourcesExplorerProvider(); - const testsExplorer = new TestsExplorerProvider(); - - let activeInstanceId: string | undefined; - let webviewPanel: WebviewPanel | undefined; - let explorerView: TreeView | undefined; - let testsExplorerView: TreeView | undefined; - - let timeout: NodeJS.Timeout | undefined; - let logsTimestamp: number = 0; - - const registerCommands = () => { - commands.registerCommand("wingConsole.openResource", async (resourceId) => { - if (!activeInstanceId) { - return; - } - const activePanel = getInstance(activeInstanceId); - if (!activePanel) { - return; - } - await activePanel.client.setSelectedNode(resourceId); - }); - - commands.registerCommand("wingConsole.runTest", async (test: TestItem) => { - if (!activeInstanceId) { - return; - } - const activePanel = getInstance(activeInstanceId); - if (!activePanel) { - return; - } - const tests = testsExplorer.getTests(); - testsExplorer.update( - tests.map((testItem) => { - if (testItem.id === test.id) { - return { - ...test, - status: "running", - }; - } - return testItem; - }) - ); - await activePanel.client.runTest(test.id); - }); - - commands.registerCommand("wingConsole.runAllTests", async () => { - if (!activeInstanceId) { - return; - } - const activePanel = getInstance(activeInstanceId); - if (!activePanel) { - return; - } - const tests = testsExplorer.getTests(); - testsExplorer.update( - tests.map((testItem) => { - return { - ...testItem, - status: "running", - }; - }) - ); - await activePanel.client.runAllTests(); - }); - }; - - const updateLogs = async (instance: ConsoleInstance) => { - const logs = await instance.client.getLogs({ time: logsTimestamp }); - - logs.forEach((log) => { - Loggers.console.appendLine(`[${log.level}] ${log.message}`); - }); - logsTimestamp = Date.now(); - }; - - const getTheme = () => { - const theme = window.activeColorTheme.kind; - if (theme === 1) { - return "light"; - } - return "dark"; - }; - - const getInstance = (instanceId: string) => { - if (!instanceId) { - return; - } - return instances[instanceId]; - }; - - const addInstance = async (instance: ConsoleInstance) => { - Loggers.console.appendLine( - `Wing Console is running at http://${instance.url}` - ); - - instance.client.onInvalidateQuery({ - onData: async (key) => { - if (activeInstanceId !== instance.id) { - return; - } - if (timeout) { - clearTimeout(timeout); - } - timeout = setTimeout(async () => { - if (!key || key === "app.logs") { - await updateLogs(instance); - } - resourcesExplorer.update(await instance.client.listResources()); - testsExplorer.update(await instance.client.listTests()); - }, 300); - }, - onError: (err) => { - Loggers.console.appendLine(err); - }, - }); - - instance.client.onOpenFileInEditor({ - onData: async (data) => { - const path = data?.path; - const line = data?.line - 1 || 0; - const column = data?.column || 0; - - const openEditor = window.visibleTextEditors.find((editor) => { - return editor.document.uri.fsPath === path; - }); - - if (!openEditor || !openEditor.viewColumn) { - await commands.executeCommand( - "vscode.open", - Uri.file(path), - new Position(line, column) - ); - return; - } - - await commands.executeCommand("workbench.action.focusFirstEditorGroup"); - for (let i = 0; i < openEditor.viewColumn - 1; i++) { - await commands.executeCommand("workbench.action.focusNextGroup"); - } - await window.showTextDocument(openEditor.document, { - selection: new Range( - new Position(line, column), - new Position(line, column) - ), - }); - }, - onError: (err) => { - Loggers.console.appendLine(err); - }, - }); - - instances[instance.id] = instance; - - await setActiveInstance(instance.id); - }; - - const setActiveInstance = async (instanceId: string) => { - const instance = getInstance(instanceId); - if (!instance) { - return; - } - - if (!webviewPanel) { - webviewPanel = window.createWebviewPanel( - VIEW_TYPE_CONSOLE, - `Console`, - ViewColumn.Beside, - { - enableScripts: true, - enableCommandUris: true, - } - ); - - webviewPanel.iconPath = { - light: Uri.joinPath( - context.extensionUri, - "resources", - "icon-light.svg" - ), - dark: Uri.joinPath(context.extensionUri, "resources", "icon-dark.svg"), - }; - - webviewPanel.onDidDispose(async () => { - resourcesExplorer.clear(); - testsExplorer.clear(); - webviewPanel = undefined; - activeInstanceId = undefined; - - Object.keys(instances).forEach(async (id) => { - await closeInstance(id); - }); - }); - Loggers.console.show(); - } - - webviewPanel.title = `${instance.wingfile} - [console]`; - webviewPanel.webview.html = ` - - - - - - - - -