terraconstructs 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.envrc +5 -0
- package/.jsii +79780 -0
- package/.mise.toml +8 -0
- package/.nvmrc +1 -0
- package/.terraform-version +1 -0
- package/.terraform.d/plugin-cache/.gitignore +5 -0
- package/LICENSE +674 -0
- package/NOTICE.txt +12 -0
- package/README.md +42 -0
- package/bun.lockb +0 -0
- package/go.mod +158 -0
- package/go.sum +1206 -0
- package/lib/aws/arn.d.ts +187 -0
- package/lib/aws/arn.js +383 -0
- package/lib/aws/aws-construct.d.ts +76 -0
- package/lib/aws/aws-construct.js +38 -0
- package/lib/aws/aws-stack.d.ts +201 -0
- package/lib/aws/aws-stack.js +303 -0
- package/lib/aws/cloudwatch/actions/ec2.d.ts +35 -0
- package/lib/aws/cloudwatch/actions/ec2.js +48 -0
- package/lib/aws/cloudwatch/actions/index.d.ts +2 -0
- package/lib/aws/cloudwatch/actions/index.js +24 -0
- package/lib/aws/cloudwatch/actions/lambda.d.ts +16 -0
- package/lib/aws/cloudwatch/actions/lambda.js +48 -0
- package/lib/aws/cloudwatch/alarm-action.d.ts +23 -0
- package/lib/aws/cloudwatch/alarm-action.js +4 -0
- package/lib/aws/cloudwatch/alarm-base.d.ts +84 -0
- package/lib/aws/cloudwatch/alarm-base.js +64 -0
- package/lib/aws/cloudwatch/alarm-rule.d.ts +61 -0
- package/lib/aws/cloudwatch/alarm-rule.js +116 -0
- package/lib/aws/cloudwatch/alarm-status-widget.d.ts +77 -0
- package/lib/aws/cloudwatch/alarm-status-widget.js +62 -0
- package/lib/aws/cloudwatch/alarm.d.ts +158 -0
- package/lib/aws/cloudwatch/alarm.js +410 -0
- package/lib/aws/cloudwatch/composite-alarm.d.ts +88 -0
- package/lib/aws/cloudwatch/composite-alarm.js +98 -0
- package/lib/aws/cloudwatch/dashboard.d.ts +137 -0
- package/lib/aws/cloudwatch/dashboard.js +141 -0
- package/lib/aws/cloudwatch/data-protection-policy.d.ts +184 -0
- package/lib/aws/cloudwatch/data-protection-policy.js +246 -0
- package/lib/aws/cloudwatch/graph.d.ts +792 -0
- package/lib/aws/cloudwatch/graph.js +537 -0
- package/lib/aws/cloudwatch/index.d.ts +26 -0
- package/lib/aws/cloudwatch/index.js +49 -0
- package/lib/aws/cloudwatch/layout.d.ts +89 -0
- package/lib/aws/cloudwatch/layout.js +147 -0
- package/lib/aws/cloudwatch/log-destinations/index.d.ts +2 -0
- package/lib/aws/cloudwatch/log-destinations/index.js +20 -0
- package/lib/aws/cloudwatch/log-destinations/kinesis.d.ts +29 -0
- package/lib/aws/cloudwatch/log-destinations/kinesis.js +52 -0
- package/lib/aws/cloudwatch/log-destinations/lambda.d.ts +22 -0
- package/lib/aws/cloudwatch/log-destinations/lambda.js +46 -0
- package/lib/aws/cloudwatch/log-group.d.ts +453 -0
- package/lib/aws/cloudwatch/log-group.js +350 -0
- package/lib/aws/cloudwatch/log-query.d.ts +91 -0
- package/lib/aws/cloudwatch/log-query.js +85 -0
- package/lib/aws/cloudwatch/log-stream.d.ts +57 -0
- package/lib/aws/cloudwatch/log-stream.js +57 -0
- package/lib/aws/cloudwatch/metric-filter.d.ts +30 -0
- package/lib/aws/cloudwatch/metric-filter.js +69 -0
- package/lib/aws/cloudwatch/metric-types.d.ts +407 -0
- package/lib/aws/cloudwatch/metric-types.js +151 -0
- package/lib/aws/cloudwatch/metric.d.ts +492 -0
- package/lib/aws/cloudwatch/metric.js +493 -0
- package/lib/aws/cloudwatch/pattern.d.ts +195 -0
- package/lib/aws/cloudwatch/pattern.js +412 -0
- package/lib/aws/cloudwatch/policy.d.ts +43 -0
- package/lib/aws/cloudwatch/policy.js +50 -0
- package/lib/aws/cloudwatch/private/drop-empty-object-at-the-end-of-an-array-token.d.ts +14 -0
- package/lib/aws/cloudwatch/private/drop-empty-object-at-the-end-of-an-array-token.js +37 -0
- package/lib/aws/cloudwatch/private/env-tokens.d.ts +8 -0
- package/lib/aws/cloudwatch/private/env-tokens.js +48 -0
- package/lib/aws/cloudwatch/private/metric-util.d.ts +60 -0
- package/lib/aws/cloudwatch/private/metric-util.js +132 -0
- package/lib/aws/cloudwatch/private/object.d.ts +1 -0
- package/lib/aws/cloudwatch/private/object.js +18 -0
- package/lib/aws/cloudwatch/private/rendering.d.ts +60 -0
- package/lib/aws/cloudwatch/private/rendering.js +181 -0
- package/lib/aws/cloudwatch/private/statistic.d.ts +51 -0
- package/lib/aws/cloudwatch/private/statistic.js +176 -0
- package/lib/aws/cloudwatch/query-definition.d.ts +150 -0
- package/lib/aws/cloudwatch/query-definition.js +114 -0
- package/lib/aws/cloudwatch/stats.d.ts +150 -0
- package/lib/aws/cloudwatch/stats.js +207 -0
- package/lib/aws/cloudwatch/subscription-filter.d.ts +75 -0
- package/lib/aws/cloudwatch/subscription-filter.js +51 -0
- package/lib/aws/cloudwatch/text.d.ts +52 -0
- package/lib/aws/cloudwatch/text.js +53 -0
- package/lib/aws/cloudwatch/variable.d.ts +156 -0
- package/lib/aws/cloudwatch/variable.js +156 -0
- package/lib/aws/cloudwatch/widget.d.ts +62 -0
- package/lib/aws/cloudwatch/widget.js +45 -0
- package/lib/aws/compute/activity.d.ts +81 -0
- package/lib/aws/compute/activity.js +132 -0
- package/lib/aws/compute/architecture.d.ts +33 -0
- package/lib/aws/compute/architecture.js +42 -0
- package/lib/aws/compute/chain.d.ts +52 -0
- package/lib/aws/compute/chain.js +68 -0
- package/lib/aws/compute/condition.d.ts +202 -0
- package/lib/aws/compute/condition.js +409 -0
- package/lib/aws/compute/event-invoke-config.d.ts +74 -0
- package/lib/aws/compute/event-invoke-config.js +63 -0
- package/lib/aws/compute/event-source-filter.d.ts +64 -0
- package/lib/aws/compute/event-source-filter.js +86 -0
- package/lib/aws/compute/event-source-mapping.d.ts +310 -0
- package/lib/aws/compute/event-source-mapping.js +267 -0
- package/lib/aws/compute/event-sources/index.d.ts +4 -0
- package/lib/aws/compute/event-sources/index.js +28 -0
- package/lib/aws/compute/event-sources/s3-onfailure-destination.d.ts +13 -0
- package/lib/aws/compute/event-sources/s3-onfailure-destination.js +26 -0
- package/lib/aws/compute/event-sources/s3.d.ts +24 -0
- package/lib/aws/compute/event-sources/s3.js +25 -0
- package/lib/aws/compute/event-sources/sqs-dlq.d.ts +13 -0
- package/lib/aws/compute/event-sources/sqs-dlq.js +26 -0
- package/lib/aws/compute/event-sources/sqs.d.ts +75 -0
- package/lib/aws/compute/event-sources/sqs.js +84 -0
- package/lib/aws/compute/fields.d.ts +367 -0
- package/lib/aws/compute/fields.js +546 -0
- package/lib/aws/compute/function-alias.d.ts +148 -0
- package/lib/aws/compute/function-alias.js +176 -0
- package/lib/aws/compute/function-base.d.ts +314 -0
- package/lib/aws/compute/function-base.js +421 -0
- package/lib/aws/compute/function-destination.d.ts +42 -0
- package/lib/aws/compute/function-destination.js +18 -0
- package/lib/aws/compute/function-destinations/event-bridge.d.ts +19 -0
- package/lib/aws/compute/function-destinations/event-bridge.js +46 -0
- package/lib/aws/compute/function-destinations/function.d.ts +34 -0
- package/lib/aws/compute/function-destinations/function.js +55 -0
- package/lib/aws/compute/function-destinations/index.d.ts +3 -0
- package/lib/aws/compute/function-destinations/index.js +22 -0
- package/lib/aws/compute/function-destinations/sqs.d.ts +14 -0
- package/lib/aws/compute/function-destinations/sqs.js +27 -0
- package/lib/aws/compute/function-nodejs.d.ts +55 -0
- package/lib/aws/compute/function-nodejs.js +70 -0
- package/lib/aws/compute/function-permission.d.ts +83 -0
- package/lib/aws/compute/function-permission.js +3 -0
- package/lib/aws/compute/function-url.d.ts +210 -0
- package/lib/aws/compute/function-url.js +148 -0
- package/lib/aws/compute/function-vpc-config.generated.d.ts +36 -0
- package/lib/aws/compute/function-vpc-config.generated.js +3 -0
- package/lib/aws/compute/function.d.ts +492 -0
- package/lib/aws/compute/function.js +692 -0
- package/lib/aws/compute/index.d.ts +42 -0
- package/lib/aws/compute/index.js +64 -0
- package/lib/aws/compute/private/intrinstics.d.ts +86 -0
- package/lib/aws/compute/private/intrinstics.js +220 -0
- package/lib/aws/compute/private/json-path.d.ts +57 -0
- package/lib/aws/compute/private/json-path.js +351 -0
- package/lib/aws/compute/private/util.d.ts +1 -0
- package/lib/aws/compute/private/util.js +38 -0
- package/lib/aws/compute/state-graph.d.ts +100 -0
- package/lib/aws/compute/state-graph.js +177 -0
- package/lib/aws/compute/state-machine-fragment.d.ts +61 -0
- package/lib/aws/compute/state-machine-fragment.js +56 -0
- package/lib/aws/compute/state-machine.d.ts +323 -0
- package/lib/aws/compute/state-machine.js +392 -0
- package/lib/aws/compute/states/choice.d.ts +94 -0
- package/lib/aws/compute/states/choice.js +81 -0
- package/lib/aws/compute/states/custom-state.d.ts +55 -0
- package/lib/aws/compute/states/custom-state.js +114 -0
- package/lib/aws/compute/states/distributed-map/item-batcher.d.ts +64 -0
- package/lib/aws/compute/states/distributed-map/item-batcher.js +58 -0
- package/lib/aws/compute/states/distributed-map/item-reader.d.ts +256 -0
- package/lib/aws/compute/states/distributed-map/item-reader.js +253 -0
- package/lib/aws/compute/states/distributed-map/result-writer.d.ts +41 -0
- package/lib/aws/compute/states/distributed-map/result-writer.js +66 -0
- package/lib/aws/compute/states/distributed-map.d.ts +153 -0
- package/lib/aws/compute/states/distributed-map.js +207 -0
- package/lib/aws/compute/states/fail.d.ts +74 -0
- package/lib/aws/compute/states/fail.js +83 -0
- package/lib/aws/compute/states/map-base.d.ts +145 -0
- package/lib/aws/compute/states/map-base.js +109 -0
- package/lib/aws/compute/states/map.d.ts +76 -0
- package/lib/aws/compute/states/map.js +110 -0
- package/lib/aws/compute/states/parallel.d.ts +113 -0
- package/lib/aws/compute/states/parallel.js +100 -0
- package/lib/aws/compute/states/pass.d.ts +122 -0
- package/lib/aws/compute/states/pass.js +99 -0
- package/lib/aws/compute/states/private/state-type.d.ts +13 -0
- package/lib/aws/compute/states/private/state-type.js +19 -0
- package/lib/aws/compute/states/state.d.ts +276 -0
- package/lib/aws/compute/states/state.js +482 -0
- package/lib/aws/compute/states/succeed.d.ts +51 -0
- package/lib/aws/compute/states/succeed.js +32 -0
- package/lib/aws/compute/states/task-base.d.ts +225 -0
- package/lib/aws/compute/states/task-base.js +160 -0
- package/lib/aws/compute/states/task.d.ts +127 -0
- package/lib/aws/compute/states/task.js +92 -0
- package/lib/aws/compute/states/wait.d.ts +78 -0
- package/lib/aws/compute/states/wait.js +90 -0
- package/lib/aws/compute/step-functions-task.d.ts +78 -0
- package/lib/aws/compute/step-functions-task.js +27 -0
- package/lib/aws/compute/task-credentials.d.ts +45 -0
- package/lib/aws/compute/task-credentials.js +52 -0
- package/lib/aws/compute/task-input.d.ts +86 -0
- package/lib/aws/compute/task-input.js +107 -0
- package/lib/aws/compute/tasks/aws-sdk/call-aws-service.d.ts +73 -0
- package/lib/aws/compute/tasks/aws-sdk/call-aws-service.js +69 -0
- package/lib/aws/compute/tasks/eventbridge/put-events.d.ts +74 -0
- package/lib/aws/compute/tasks/eventbridge/put-events.js +94 -0
- package/lib/aws/compute/tasks/http/invoke.d.ts +104 -0
- package/lib/aws/compute/tasks/http/invoke.js +117 -0
- package/lib/aws/compute/tasks/index.d.ts +7 -0
- package/lib/aws/compute/tasks/index.js +42 -0
- package/lib/aws/compute/tasks/lambda/invoke.d.ts +106 -0
- package/lib/aws/compute/tasks/lambda/invoke.js +125 -0
- package/lib/aws/compute/tasks/private/task-utils.d.ts +8 -0
- package/lib/aws/compute/tasks/private/task-utils.js +36 -0
- package/lib/aws/compute/tasks/resource-arn-suffix.d.ts +3 -0
- package/lib/aws/compute/tasks/resource-arn-suffix.js +25 -0
- package/lib/aws/compute/tasks/sqs/send-message.d.ts +62 -0
- package/lib/aws/compute/tasks/sqs/send-message.js +70 -0
- package/lib/aws/compute/tasks/stepfunctions/invoke-activity.d.ts +36 -0
- package/lib/aws/compute/tasks/stepfunctions/invoke-activity.js +45 -0
- package/lib/aws/compute/tasks/stepfunctions/start-execution.d.ts +63 -0
- package/lib/aws/compute/tasks/stepfunctions/start-execution.js +123 -0
- package/lib/aws/compute/types.d.ts +214 -0
- package/lib/aws/compute/types.js +103 -0
- package/lib/aws/compute/util.d.ts +12 -0
- package/lib/aws/compute/util.js +29 -0
- package/lib/aws/edge/certificate.d.ts +144 -0
- package/lib/aws/edge/certificate.js +191 -0
- package/lib/aws/edge/distribution.d.ts +505 -0
- package/lib/aws/edge/distribution.js +444 -0
- package/lib/aws/edge/dns-alias-record-targets.d.ts +29 -0
- package/lib/aws/edge/dns-alias-record-targets.js +46 -0
- package/lib/aws/edge/dns-record.d.ts +536 -0
- package/lib/aws/edge/dns-record.js +532 -0
- package/lib/aws/edge/dns-zone.d.ts +169 -0
- package/lib/aws/edge/dns-zone.js +149 -0
- package/lib/aws/edge/function.d.ts +185 -0
- package/lib/aws/edge/function.js +141 -0
- package/lib/aws/edge/index.d.ts +8 -0
- package/lib/aws/edge/index.js +25 -0
- package/lib/aws/edge/key-value-store.d.ts +162 -0
- package/lib/aws/edge/key-value-store.js +163 -0
- package/lib/aws/edge/origin.d.ts +160 -0
- package/lib/aws/edge/origin.js +245 -0
- package/lib/aws/encryption/alias.d.ts +137 -0
- package/lib/aws/encryption/alias.js +216 -0
- package/lib/aws/encryption/index.d.ts +4 -0
- package/lib/aws/encryption/index.js +21 -0
- package/lib/aws/encryption/key-lookup.d.ts +11 -0
- package/lib/aws/encryption/key-lookup.js +4 -0
- package/lib/aws/encryption/key.d.ts +461 -0
- package/lib/aws/encryption/key.js +586 -0
- package/lib/aws/encryption/private/perms.d.ts +5 -0
- package/lib/aws/encryption/private/perms.js +30 -0
- package/lib/aws/encryption/via-service-principal.d.ts +11 -0
- package/lib/aws/encryption/via-service-principal.js +39 -0
- package/lib/aws/iam/grant.d.ts +221 -0
- package/lib/aws/iam/grant.js +239 -0
- package/lib/aws/iam/identity-base.d.ts +20 -0
- package/lib/aws/iam/identity-base.js +3 -0
- package/lib/aws/iam/index.d.ts +16 -0
- package/lib/aws/iam/index.js +34 -0
- package/lib/aws/iam/managed-policy.d.ts +227 -0
- package/lib/aws/iam/managed-policy.js +237 -0
- package/lib/aws/iam/oidc-provider.d.ts +120 -0
- package/lib/aws/iam/oidc-provider.js +82 -0
- package/lib/aws/iam/policy-document-config.generated.d.ts +78 -0
- package/lib/aws/iam/policy-document-config.generated.js +3 -0
- package/lib/aws/iam/policy-document.d.ts +150 -0
- package/lib/aws/iam/policy-document.js +172 -0
- package/lib/aws/iam/policy-statement-props.generated.d.ts +55 -0
- package/lib/aws/iam/policy-statement-props.generated.js +3 -0
- package/lib/aws/iam/policy-statement.d.ts +451 -0
- package/lib/aws/iam/policy-statement.js +947 -0
- package/lib/aws/iam/policy.d.ts +122 -0
- package/lib/aws/iam/policy.js +192 -0
- package/lib/aws/iam/principals.d.ts +668 -0
- package/lib/aws/iam/principals.js +1032 -0
- package/lib/aws/iam/private/adapter.d.ts +21 -0
- package/lib/aws/iam/private/adapter.js +51 -0
- package/lib/aws/iam/private/assume-role-policy.d.ts +8 -0
- package/lib/aws/iam/private/assume-role-policy.js +27 -0
- package/lib/aws/iam/private/comparable-principal.d.ts +6 -0
- package/lib/aws/iam/private/comparable-principal.js +20 -0
- package/lib/aws/iam/private/immutable-role.d.ts +43 -0
- package/lib/aws/iam/private/immutable-role.js +76 -0
- package/lib/aws/iam/private/imported-role.d.ts +49 -0
- package/lib/aws/iam/private/imported-role.js +103 -0
- package/lib/aws/iam/private/merge-statements.d.ts +44 -0
- package/lib/aws/iam/private/merge-statements.js +214 -0
- package/lib/aws/iam/private/postprocess-policy-document.d.ts +15 -0
- package/lib/aws/iam/private/postprocess-policy-document.js +102 -0
- package/lib/aws/iam/private/util.d.ts +37 -0
- package/lib/aws/iam/private/util.js +87 -0
- package/lib/aws/iam/role.d.ts +425 -0
- package/lib/aws/iam/role.js +407 -0
- package/lib/aws/iam/saml-provider.d.ts +79 -0
- package/lib/aws/iam/saml-provider.js +79 -0
- package/lib/aws/iam/unknown-principal.d.ts +32 -0
- package/lib/aws/iam/unknown-principal.js +45 -0
- package/lib/aws/iam/utils.d.ts +12 -0
- package/lib/aws/iam/utils.js +41 -0
- package/lib/aws/index.d.ts +13 -0
- package/lib/aws/index.js +34 -0
- package/lib/aws/log-retention.d.ts +97 -0
- package/lib/aws/log-retention.js +103 -0
- package/lib/aws/network/index.d.ts +4 -0
- package/lib/aws/network/index.js +21 -0
- package/lib/aws/network/network.d.ts +77 -0
- package/lib/aws/network/network.js +3 -0
- package/lib/aws/network/simple-ipv4-vpc.d.ts +84 -0
- package/lib/aws/network/simple-ipv4-vpc.js +236 -0
- package/lib/aws/network/subnet-group.d.ts +42 -0
- package/lib/aws/network/subnet-group.js +72 -0
- package/lib/aws/network/subnet.d.ts +95 -0
- package/lib/aws/network/subnet.js +123 -0
- package/lib/aws/notify/archive.d.ts +77 -0
- package/lib/aws/notify/archive.js +62 -0
- package/lib/aws/notify/connection.d.ts +276 -0
- package/lib/aws/notify/connection.js +261 -0
- package/lib/aws/notify/event-bus.d.ts +298 -0
- package/lib/aws/notify/event-bus.js +326 -0
- package/lib/aws/notify/event-pattern.d.ts +220 -0
- package/lib/aws/notify/event-pattern.js +197 -0
- package/lib/aws/notify/index.d.ts +15 -0
- package/lib/aws/notify/index.js +35 -0
- package/lib/aws/notify/input.d.ts +126 -0
- package/lib/aws/notify/input.js +282 -0
- package/lib/aws/notify/kinesis-canned-metrics.generated.d.ts +68 -0
- package/lib/aws/notify/kinesis-canned-metrics.generated.js +103 -0
- package/lib/aws/notify/kinesis-fixed-canned-metrics.d.ts +195 -0
- package/lib/aws/notify/kinesis-fixed-canned-metrics.js +155 -0
- package/lib/aws/notify/kinesis-stream.d.ts +705 -0
- package/lib/aws/notify/kinesis-stream.js +541 -0
- package/lib/aws/notify/on-event-options.d.ts +54 -0
- package/lib/aws/notify/on-event-options.js +3 -0
- package/lib/aws/notify/queue-config.generated.d.ts +85 -0
- package/lib/aws/notify/queue-config.generated.js +3 -0
- package/lib/aws/notify/queue-policy.d.ts +35 -0
- package/lib/aws/notify/queue-policy.js +39 -0
- package/lib/aws/notify/queue.d.ts +355 -0
- package/lib/aws/notify/queue.js +305 -0
- package/lib/aws/notify/resource-policy.d.ts +41 -0
- package/lib/aws/notify/resource-policy.js +43 -0
- package/lib/aws/notify/rule.d.ts +153 -0
- package/lib/aws/notify/rule.js +227 -0
- package/lib/aws/notify/schedule.d.ts +83 -0
- package/lib/aws/notify/schedule.js +116 -0
- package/lib/aws/notify/target.d.ts +102 -0
- package/lib/aws/notify/target.js +3 -0
- package/lib/aws/notify/targets/event-bus.d.ts +39 -0
- package/lib/aws/notify/targets/event-bus.js +40 -0
- package/lib/aws/notify/targets/function.d.ts +31 -0
- package/lib/aws/notify/targets/function.js +36 -0
- package/lib/aws/notify/targets/index.d.ts +6 -0
- package/lib/aws/notify/targets/index.js +37 -0
- package/lib/aws/notify/targets/log-group.d.ts +89 -0
- package/lib/aws/notify/targets/log-group.js +110 -0
- package/lib/aws/notify/targets/sqs.d.ts +45 -0
- package/lib/aws/notify/targets/sqs.js +73 -0
- package/lib/aws/notify/targets/state-machine.d.ts +36 -0
- package/lib/aws/notify/targets/state-machine.js +39 -0
- package/lib/aws/notify/targets/util.d.ts +71 -0
- package/lib/aws/notify/targets/util.js +130 -0
- package/lib/aws/notify/util.d.ts +13 -0
- package/lib/aws/notify/util.js +69 -0
- package/lib/aws/provider-config.generated.d.ts +220 -0
- package/lib/aws/provider-config.generated.js +3 -0
- package/lib/aws/storage/bucket-destination.d.ts +41 -0
- package/lib/aws/storage/bucket-destination.js +13 -0
- package/lib/aws/storage/bucket-notifications.d.ts +58 -0
- package/lib/aws/storage/bucket-notifications.js +169 -0
- package/lib/aws/storage/bucket-perms.d.ts +9 -0
- package/lib/aws/storage/bucket-perms.js +33 -0
- package/lib/aws/storage/bucket-policy.d.ts +51 -0
- package/lib/aws/storage/bucket-policy.js +53 -0
- package/lib/aws/storage/bucket-source.d.ts +41 -0
- package/lib/aws/storage/bucket-source.js +79 -0
- package/lib/aws/storage/bucket.d.ts +941 -0
- package/lib/aws/storage/bucket.js +869 -0
- package/lib/aws/storage/cors-config.generated.d.ts +57 -0
- package/lib/aws/storage/cors-config.generated.js +3 -0
- package/lib/aws/storage/cors-rule-config.generated.d.ts +38 -0
- package/lib/aws/storage/cors-rule-config.generated.js +3 -0
- package/lib/aws/storage/index.d.ts +12 -0
- package/lib/aws/storage/index.js +31 -0
- package/lib/aws/storage/lifecycle-config.generated.d.ts +55 -0
- package/lib/aws/storage/lifecycle-config.generated.js +3 -0
- package/lib/aws/storage/notification-targets/function.d.ts +11 -0
- package/lib/aws/storage/notification-targets/function.js +48 -0
- package/lib/aws/storage/notification-targets/index.d.ts +2 -0
- package/lib/aws/storage/notification-targets/index.js +21 -0
- package/lib/aws/storage/notification-targets/queue.d.ts +15 -0
- package/lib/aws/storage/notification-targets/queue.js +58 -0
- package/lib/aws/storage/origin-access-identity.d.ts +91 -0
- package/lib/aws/storage/origin-access-identity.js +76 -0
- package/lib/aws/storage/util.d.ts +40 -0
- package/lib/aws/storage/util.js +85 -0
- package/lib/aws/storage/website-config.generated.d.ts +73 -0
- package/lib/aws/storage/website-config.generated.js +3 -0
- package/lib/aws/util.d.ts +4 -0
- package/lib/aws/util.js +25 -0
- package/lib/construct-base.d.ts +69 -0
- package/lib/construct-base.js +89 -0
- package/lib/duration.d.ts +160 -0
- package/lib/duration.js +327 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +24 -0
- package/lib/private/index.d.ts +2 -0
- package/lib/private/index.js +19 -0
- package/lib/private/terraform-dependables-aspect.d.ts +20 -0
- package/lib/private/terraform-dependables-aspect.js +95 -0
- package/lib/private/unique-resource-name.d.ts +9 -0
- package/lib/private/unique-resource-name.js +145 -0
- package/lib/size.d.ts +146 -0
- package/lib/size.js +220 -0
- package/lib/stack-base.d.ts +188 -0
- package/lib/stack-base.js +183 -0
- package/lib/token.d.ts +32 -0
- package/lib/token.js +54 -0
- package/node_modules/camel-case/LICENSE +21 -0
- package/node_modules/camel-case/README.md +47 -0
- package/node_modules/camel-case/dist/index.d.ts +5 -0
- package/node_modules/camel-case/dist/index.js +23 -0
- package/node_modules/camel-case/dist/index.js.map +1 -0
- package/node_modules/camel-case/dist/index.spec.d.ts +1 -0
- package/node_modules/camel-case/dist/index.spec.js +26 -0
- package/node_modules/camel-case/dist/index.spec.js.map +1 -0
- package/node_modules/camel-case/dist.es2015/index.d.ts +5 -0
- package/node_modules/camel-case/dist.es2015/index.js +17 -0
- package/node_modules/camel-case/dist.es2015/index.js.map +1 -0
- package/node_modules/camel-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/camel-case/dist.es2015/index.spec.js +24 -0
- package/node_modules/camel-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/camel-case/package.json +89 -0
- package/node_modules/capital-case/LICENSE +21 -0
- package/node_modules/capital-case/README.md +37 -0
- package/node_modules/capital-case/dist/index.d.ts +4 -0
- package/node_modules/capital-case/dist/index.js +16 -0
- package/node_modules/capital-case/dist/index.js.map +1 -0
- package/node_modules/capital-case/dist/index.spec.d.ts +1 -0
- package/node_modules/capital-case/dist/index.spec.js +24 -0
- package/node_modules/capital-case/dist/index.spec.js.map +1 -0
- package/node_modules/capital-case/dist.es2015/index.d.ts +4 -0
- package/node_modules/capital-case/dist.es2015/index.js +11 -0
- package/node_modules/capital-case/dist.es2015/index.js.map +1 -0
- package/node_modules/capital-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/capital-case/dist.es2015/index.spec.js +22 -0
- package/node_modules/capital-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/capital-case/package.json +90 -0
- package/node_modules/change-case/LICENSE +21 -0
- package/node_modules/change-case/README.md +44 -0
- package/node_modules/change-case/dist/index.d.ts +11 -0
- package/node_modules/change-case/dist/index.js +15 -0
- package/node_modules/change-case/dist/index.js.map +1 -0
- package/node_modules/change-case/dist/index.spec.d.ts +1 -0
- package/node_modules/change-case/dist/index.spec.js +9 -0
- package/node_modules/change-case/dist/index.spec.js.map +1 -0
- package/node_modules/change-case/dist.es2015/index.d.ts +11 -0
- package/node_modules/change-case/dist.es2015/index.js +12 -0
- package/node_modules/change-case/dist.es2015/index.js.map +1 -0
- package/node_modules/change-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/change-case/dist.es2015/index.spec.js +7 -0
- package/node_modules/change-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/change-case/package.json +101 -0
- package/node_modules/constant-case/LICENSE +21 -0
- package/node_modules/constant-case/README.md +37 -0
- package/node_modules/constant-case/dist/index.d.ts +3 -0
- package/node_modules/constant-case/dist/index.js +12 -0
- package/node_modules/constant-case/dist/index.js.map +1 -0
- package/node_modules/constant-case/dist/index.spec.d.ts +1 -0
- package/node_modules/constant-case/dist/index.spec.js +26 -0
- package/node_modules/constant-case/dist/index.spec.js.map +1 -0
- package/node_modules/constant-case/dist.es2015/index.d.ts +3 -0
- package/node_modules/constant-case/dist.es2015/index.js +8 -0
- package/node_modules/constant-case/dist.es2015/index.js.map +1 -0
- package/node_modules/constant-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/constant-case/dist.es2015/index.spec.js +24 -0
- package/node_modules/constant-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/constant-case/package.json +90 -0
- package/node_modules/dot-case/LICENSE +21 -0
- package/node_modules/dot-case/README.md +37 -0
- package/node_modules/dot-case/dist/index.d.ts +3 -0
- package/node_modules/dot-case/dist/index.js +11 -0
- package/node_modules/dot-case/dist/index.js.map +1 -0
- package/node_modules/dot-case/dist/index.spec.d.ts +1 -0
- package/node_modules/dot-case/dist/index.spec.js +26 -0
- package/node_modules/dot-case/dist/index.spec.js.map +1 -0
- package/node_modules/dot-case/dist.es2015/index.d.ts +3 -0
- package/node_modules/dot-case/dist.es2015/index.js +7 -0
- package/node_modules/dot-case/dist.es2015/index.js.map +1 -0
- package/node_modules/dot-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/dot-case/dist.es2015/index.spec.js +24 -0
- package/node_modules/dot-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/dot-case/package.json +89 -0
- package/node_modules/esbuild-wasm/LICENSE.md +21 -0
- package/node_modules/esbuild-wasm/README.md +3 -0
- package/node_modules/esbuild-wasm/bin/esbuild +91 -0
- package/node_modules/esbuild-wasm/esbuild.wasm +0 -0
- package/node_modules/esbuild-wasm/esm/browser.d.ts +705 -0
- package/node_modules/esbuild-wasm/esm/browser.js +2370 -0
- package/node_modules/esbuild-wasm/esm/browser.min.js +20 -0
- package/node_modules/esbuild-wasm/lib/browser.d.ts +705 -0
- package/node_modules/esbuild-wasm/lib/browser.js +2415 -0
- package/node_modules/esbuild-wasm/lib/browser.min.js +22 -0
- package/node_modules/esbuild-wasm/lib/main.d.ts +705 -0
- package/node_modules/esbuild-wasm/lib/main.js +2051 -0
- package/node_modules/esbuild-wasm/package.json +19 -0
- package/node_modules/esbuild-wasm/wasm_exec.js +561 -0
- package/node_modules/esbuild-wasm/wasm_exec_node.js +39 -0
- package/node_modules/header-case/LICENSE +21 -0
- package/node_modules/header-case/README.md +37 -0
- package/node_modules/header-case/dist/index.d.ts +3 -0
- package/node_modules/header-case/dist/index.js +11 -0
- package/node_modules/header-case/dist/index.js.map +1 -0
- package/node_modules/header-case/dist/index.spec.d.ts +1 -0
- package/node_modules/header-case/dist/index.spec.js +24 -0
- package/node_modules/header-case/dist/index.spec.js.map +1 -0
- package/node_modules/header-case/dist.es2015/index.d.ts +3 -0
- package/node_modules/header-case/dist.es2015/index.js +7 -0
- package/node_modules/header-case/dist.es2015/index.js.map +1 -0
- package/node_modules/header-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/header-case/dist.es2015/index.spec.js +22 -0
- package/node_modules/header-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/header-case/package.json +89 -0
- package/node_modules/lower-case/LICENSE +21 -0
- package/node_modules/lower-case/README.md +35 -0
- package/node_modules/lower-case/dist/index.d.ts +8 -0
- package/node_modules/lower-case/dist/index.js +53 -0
- package/node_modules/lower-case/dist/index.js.map +1 -0
- package/node_modules/lower-case/dist/index.spec.d.ts +1 -0
- package/node_modules/lower-case/dist/index.spec.js +36 -0
- package/node_modules/lower-case/dist/index.spec.js.map +1 -0
- package/node_modules/lower-case/dist.es2015/index.d.ts +8 -0
- package/node_modules/lower-case/dist.es2015/index.js +48 -0
- package/node_modules/lower-case/dist.es2015/index.js.map +1 -0
- package/node_modules/lower-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/lower-case/dist.es2015/index.spec.js +34 -0
- package/node_modules/lower-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/lower-case/package.json +87 -0
- package/node_modules/mime-db/HISTORY.md +507 -0
- package/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/mime-db/README.md +100 -0
- package/node_modules/mime-db/db.json +8519 -0
- package/node_modules/mime-db/index.js +12 -0
- package/node_modules/mime-db/package.json +60 -0
- package/node_modules/mime-types/HISTORY.md +397 -0
- package/node_modules/mime-types/LICENSE +23 -0
- package/node_modules/mime-types/README.md +113 -0
- package/node_modules/mime-types/index.js +188 -0
- package/node_modules/mime-types/package.json +44 -0
- package/node_modules/no-case/LICENSE +21 -0
- package/node_modules/no-case/README.md +37 -0
- package/node_modules/no-case/dist/index.d.ts +10 -0
- package/node_modules/no-case/dist/index.js +35 -0
- package/node_modules/no-case/dist/index.js.map +1 -0
- package/node_modules/no-case/dist/index.spec.d.ts +1 -0
- package/node_modules/no-case/dist/index.spec.js +59 -0
- package/node_modules/no-case/dist/index.spec.js.map +1 -0
- package/node_modules/no-case/dist.es2015/index.d.ts +10 -0
- package/node_modules/no-case/dist.es2015/index.js +31 -0
- package/node_modules/no-case/dist.es2015/index.js.map +1 -0
- package/node_modules/no-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/no-case/dist.es2015/index.spec.js +57 -0
- package/node_modules/no-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/no-case/package.json +85 -0
- package/node_modules/param-case/LICENSE +21 -0
- package/node_modules/param-case/README.md +37 -0
- package/node_modules/param-case/dist/index.d.ts +3 -0
- package/node_modules/param-case/dist/index.js +11 -0
- package/node_modules/param-case/dist/index.js.map +1 -0
- package/node_modules/param-case/dist/index.spec.d.ts +1 -0
- package/node_modules/param-case/dist/index.spec.js +24 -0
- package/node_modules/param-case/dist/index.spec.js.map +1 -0
- package/node_modules/param-case/dist.es2015/index.d.ts +3 -0
- package/node_modules/param-case/dist.es2015/index.js +7 -0
- package/node_modules/param-case/dist.es2015/index.js.map +1 -0
- package/node_modules/param-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/param-case/dist.es2015/index.spec.js +22 -0
- package/node_modules/param-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/param-case/package.json +91 -0
- package/node_modules/pascal-case/LICENSE +21 -0
- package/node_modules/pascal-case/README.md +47 -0
- package/node_modules/pascal-case/dist/index.d.ts +5 -0
- package/node_modules/pascal-case/dist/index.js +24 -0
- package/node_modules/pascal-case/dist/index.js.map +1 -0
- package/node_modules/pascal-case/dist/index.spec.d.ts +1 -0
- package/node_modules/pascal-case/dist/index.spec.js +25 -0
- package/node_modules/pascal-case/dist/index.spec.js.map +1 -0
- package/node_modules/pascal-case/dist.es2015/index.d.ts +5 -0
- package/node_modules/pascal-case/dist.es2015/index.js +18 -0
- package/node_modules/pascal-case/dist.es2015/index.js.map +1 -0
- package/node_modules/pascal-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/pascal-case/dist.es2015/index.spec.js +23 -0
- package/node_modules/pascal-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/pascal-case/package.json +90 -0
- package/node_modules/path-case/LICENSE +21 -0
- package/node_modules/path-case/README.md +37 -0
- package/node_modules/path-case/dist/index.d.ts +3 -0
- package/node_modules/path-case/dist/index.js +11 -0
- package/node_modules/path-case/dist/index.js.map +1 -0
- package/node_modules/path-case/dist/index.spec.d.ts +1 -0
- package/node_modules/path-case/dist/index.spec.js +24 -0
- package/node_modules/path-case/dist/index.spec.js.map +1 -0
- package/node_modules/path-case/dist.es2015/index.d.ts +3 -0
- package/node_modules/path-case/dist.es2015/index.js +7 -0
- package/node_modules/path-case/dist.es2015/index.js.map +1 -0
- package/node_modules/path-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/path-case/dist.es2015/index.spec.js +22 -0
- package/node_modules/path-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/path-case/package.json +88 -0
- package/node_modules/sentence-case/LICENSE +21 -0
- package/node_modules/sentence-case/README.md +37 -0
- package/node_modules/sentence-case/dist/index.d.ts +4 -0
- package/node_modules/sentence-case/dist/index.js +19 -0
- package/node_modules/sentence-case/dist/index.js.map +1 -0
- package/node_modules/sentence-case/dist/index.spec.d.ts +1 -0
- package/node_modules/sentence-case/dist/index.spec.js +24 -0
- package/node_modules/sentence-case/dist/index.spec.js.map +1 -0
- package/node_modules/sentence-case/dist.es2015/index.d.ts +4 -0
- package/node_modules/sentence-case/dist.es2015/index.js +14 -0
- package/node_modules/sentence-case/dist.es2015/index.js.map +1 -0
- package/node_modules/sentence-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/sentence-case/dist.es2015/index.spec.js +22 -0
- package/node_modules/sentence-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/sentence-case/package.json +89 -0
- package/node_modules/snake-case/LICENSE +21 -0
- package/node_modules/snake-case/README.md +37 -0
- package/node_modules/snake-case/dist/index.d.ts +3 -0
- package/node_modules/snake-case/dist/index.js +11 -0
- package/node_modules/snake-case/dist/index.js.map +1 -0
- package/node_modules/snake-case/dist/index.spec.d.ts +1 -0
- package/node_modules/snake-case/dist/index.spec.js +25 -0
- package/node_modules/snake-case/dist/index.spec.js.map +1 -0
- package/node_modules/snake-case/dist.es2015/index.d.ts +3 -0
- package/node_modules/snake-case/dist.es2015/index.js +7 -0
- package/node_modules/snake-case/dist.es2015/index.js.map +1 -0
- package/node_modules/snake-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/snake-case/dist.es2015/index.spec.js +23 -0
- package/node_modules/snake-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/snake-case/package.json +90 -0
- package/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/node_modules/tslib/LICENSE.txt +12 -0
- package/node_modules/tslib/README.md +164 -0
- package/node_modules/tslib/SECURITY.md +41 -0
- package/node_modules/tslib/modules/index.d.ts +37 -0
- package/node_modules/tslib/modules/index.js +68 -0
- package/node_modules/tslib/modules/package.json +3 -0
- package/node_modules/tslib/package.json +47 -0
- package/node_modules/tslib/tslib.d.ts +453 -0
- package/node_modules/tslib/tslib.es6.html +1 -0
- package/node_modules/tslib/tslib.es6.js +374 -0
- package/node_modules/tslib/tslib.es6.mjs +373 -0
- package/node_modules/tslib/tslib.html +1 -0
- package/node_modules/tslib/tslib.js +424 -0
- package/node_modules/upper-case/README.md +34 -0
- package/node_modules/upper-case/dist/index.d.ts +8 -0
- package/node_modules/upper-case/dist/index.js +49 -0
- package/node_modules/upper-case/dist/index.js.map +1 -0
- package/node_modules/upper-case/dist/index.spec.d.ts +1 -0
- package/node_modules/upper-case/dist/index.spec.js +34 -0
- package/node_modules/upper-case/dist/index.spec.js.map +1 -0
- package/node_modules/upper-case/dist.es2015/index.d.ts +8 -0
- package/node_modules/upper-case/dist.es2015/index.js +44 -0
- package/node_modules/upper-case/dist.es2015/index.js.map +1 -0
- package/node_modules/upper-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/upper-case/dist.es2015/index.spec.js +32 -0
- package/node_modules/upper-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/upper-case/package.json +86 -0
- package/node_modules/upper-case-first/LICENSE +21 -0
- package/node_modules/upper-case-first/README.md +32 -0
- package/node_modules/upper-case-first/dist/index.d.ts +4 -0
- package/node_modules/upper-case-first/dist/index.js +11 -0
- package/node_modules/upper-case-first/dist/index.js.map +1 -0
- package/node_modules/upper-case-first/dist/index.spec.d.ts +1 -0
- package/node_modules/upper-case-first/dist/index.spec.js +20 -0
- package/node_modules/upper-case-first/dist/index.spec.js.map +1 -0
- package/node_modules/upper-case-first/dist.es2015/index.d.ts +4 -0
- package/node_modules/upper-case-first/dist.es2015/index.js +7 -0
- package/node_modules/upper-case-first/dist.es2015/index.js.map +1 -0
- package/node_modules/upper-case-first/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/upper-case-first/dist.es2015/index.spec.js +18 -0
- package/node_modules/upper-case-first/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/upper-case-first/package.json +87 -0
- package/package.json +152 -0
- package/setup.js +2 -0
|
@@ -0,0 +1,941 @@
|
|
|
1
|
+
import { s3Bucket, s3BucketCorsConfiguration, s3BucketWebsiteConfiguration } from "@cdktf/provider-aws";
|
|
2
|
+
import { Construct } from "constructs";
|
|
3
|
+
import { WebsiteConfig, CorsConfig, LifecycleConfigurationRule, BucketPolicy, IBucketNotificationDestination } from ".";
|
|
4
|
+
import { AwsConstructBase, IAwsConstruct, AwsConstructProps } from "..";
|
|
5
|
+
import * as iam from "../iam";
|
|
6
|
+
export interface CloudfrontAccessConfig {
|
|
7
|
+
/**
|
|
8
|
+
* Enable Cloudfront access via Origin Access Identity.
|
|
9
|
+
*/
|
|
10
|
+
readonly enabled: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Object key patterns for cloudfront access.
|
|
13
|
+
*
|
|
14
|
+
* @default "*"
|
|
15
|
+
*/
|
|
16
|
+
readonly keyPatterns?: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface BucketProps extends AwsConstructProps {
|
|
19
|
+
/**
|
|
20
|
+
* The path(s) to static directories or files to upload, relative to the Stack file.
|
|
21
|
+
*
|
|
22
|
+
* @example "./dist"
|
|
23
|
+
* @default - No files are uploaded.
|
|
24
|
+
*/
|
|
25
|
+
readonly sources?: string | string[] | AddSourceOptions[];
|
|
26
|
+
/**
|
|
27
|
+
* Enable public read access for all the files in the bucket.
|
|
28
|
+
*
|
|
29
|
+
* Enable this only if you're not using CDN (CloudFront) to serve files from the bucket.
|
|
30
|
+
* Should only be turned on if you want to host public files directly from the bucket.
|
|
31
|
+
*
|
|
32
|
+
* @default `false`
|
|
33
|
+
*/
|
|
34
|
+
readonly public?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* A name for the bucket.
|
|
37
|
+
*
|
|
38
|
+
* Must be lowercase and between 3 (min) and 63 (max) characters long.
|
|
39
|
+
*
|
|
40
|
+
* The name must not be in the format [bucket_name]--[azid]--x-s3. Use the
|
|
41
|
+
* `aws_s3_directory_bucket` resource to manage S3 Express buckets.
|
|
42
|
+
*
|
|
43
|
+
* A full list of bucket naming rules [may be found here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
|
|
44
|
+
*
|
|
45
|
+
* @default - If omitted, Refer to `namePrefix`.
|
|
46
|
+
*/
|
|
47
|
+
readonly bucketName?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Creates a unique name beginning with the specified prefix.
|
|
50
|
+
* Conflicts with `bucketName`.
|
|
51
|
+
*
|
|
52
|
+
* Terraform Prefixes must reserve 26 characters for the terraform generated suffix.
|
|
53
|
+
*
|
|
54
|
+
* @default - If omitted, ET will assign a random, unique name prefixed by GridUUID.
|
|
55
|
+
*/
|
|
56
|
+
readonly namePrefix?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Boolean that indicates all objects (including any locked objects)
|
|
59
|
+
* should be deleted from the bucket when the bucket is destroyed
|
|
60
|
+
* so that the bucket can be destroyed without error.
|
|
61
|
+
*
|
|
62
|
+
* These objects are not recoverable. This only deletes objects when
|
|
63
|
+
* the bucket is destroyed, not when setting this parameter to true.
|
|
64
|
+
*
|
|
65
|
+
* Once this parameter is set to true, there must be a successful
|
|
66
|
+
* terraform apply run before a destroy is required to update this
|
|
67
|
+
* value in the resource state.
|
|
68
|
+
*
|
|
69
|
+
* Without a successful terraform apply after this parameter is set,
|
|
70
|
+
* this flag will have no effect. If setting this field in the same
|
|
71
|
+
* operation that would require replacing the bucket or destroying
|
|
72
|
+
* the bucket, this flag will not work.
|
|
73
|
+
*
|
|
74
|
+
* Additionally when importing a bucket, a successful terraform apply
|
|
75
|
+
* is required to set this value in state before it will take effect
|
|
76
|
+
* on a destroy operation.
|
|
77
|
+
*
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
readonly forceDestroy?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Provides an S3 bucket website configuration resource.
|
|
83
|
+
*
|
|
84
|
+
* Important: Amazon S3 website endpoints do not support HTTPS or access points.
|
|
85
|
+
* If you want to use HTTPS, you can use edge Distribution to serve a static
|
|
86
|
+
* website hosted in a bucket.
|
|
87
|
+
*
|
|
88
|
+
* Use OriginAccessIdentity property to control ingress through edge Distribution.
|
|
89
|
+
*
|
|
90
|
+
* For more information, see [Hosting Websites on S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html).
|
|
91
|
+
*/
|
|
92
|
+
readonly websiteConfig?: WebsiteConfig;
|
|
93
|
+
/**
|
|
94
|
+
* Provides an S3 bucket CORS configuration resource.
|
|
95
|
+
*
|
|
96
|
+
* For more information about CORS, go to
|
|
97
|
+
* [Enabling Cross-Origin Resource Sharing](https://docs.aws.amazon.com/AmazonS3/latest/userguide/cors.html)
|
|
98
|
+
* in the Amazon S3 User Guide.
|
|
99
|
+
*/
|
|
100
|
+
readonly corsConfig?: CorsConfig;
|
|
101
|
+
/**
|
|
102
|
+
* One or more Lifecycle rules. Each rule consists of the following:
|
|
103
|
+
*
|
|
104
|
+
* - Rule id
|
|
105
|
+
* - Filter identifying objects to which the rule applies
|
|
106
|
+
* - One or more transition or expiration actions
|
|
107
|
+
*
|
|
108
|
+
* For more information see the Amazon S3 User Guide on [Lifecycle Configuration Elements](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html).
|
|
109
|
+
*/
|
|
110
|
+
readonly lifecycleRules?: LifecycleConfigurationRule[];
|
|
111
|
+
/**
|
|
112
|
+
* Controls versioning on the S3 bucket.
|
|
113
|
+
*
|
|
114
|
+
* Setting this to false will suspend versioning if the associated S3 bucket is versioned.
|
|
115
|
+
*
|
|
116
|
+
* If you are enabling versioning on the bucket for the first time, AWS recommends that you wait for 15 minutes after enabling versioning before issuing write operations (PUT or DELETE) on objects in the bucket.
|
|
117
|
+
* This will cause 15m delay if `path` is configured.
|
|
118
|
+
*
|
|
119
|
+
* @default false
|
|
120
|
+
*/
|
|
121
|
+
readonly versioned?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Whether this bucket should send notifications to Amazon EventBridge or not.
|
|
124
|
+
*
|
|
125
|
+
* @default false
|
|
126
|
+
*/
|
|
127
|
+
readonly eventBridgeEnabled?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Enforces SSL for requests. S3.5 of the AWS Foundational Security Best Practices Regarding S3.
|
|
130
|
+
* @see https://docs.aws.amazon.com/config/latest/developerguide/s3-bucket-ssl-requests-only.html
|
|
131
|
+
*
|
|
132
|
+
* @default false
|
|
133
|
+
*/
|
|
134
|
+
readonly enforceSSL?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Enforces minimum TLS version for requests.
|
|
137
|
+
*
|
|
138
|
+
* Requires `enforceSSL` to be enabled.
|
|
139
|
+
*
|
|
140
|
+
* @see https://docs.aws.amazon.com/AmazonS3/latest/userguide/amazon-s3-policy-keys.html#example-object-tls-version
|
|
141
|
+
*
|
|
142
|
+
* @default No minimum TLS version is enforced.
|
|
143
|
+
*/
|
|
144
|
+
readonly minimumTLSVersion?: number;
|
|
145
|
+
/**
|
|
146
|
+
* Enable Cloudfront access via Origin Access Identity.
|
|
147
|
+
*
|
|
148
|
+
* Note: recommended to migrate to OAC in future.
|
|
149
|
+
*
|
|
150
|
+
* @default - no cloudfront access
|
|
151
|
+
*/
|
|
152
|
+
readonly cloudfrontAccess?: CloudfrontAccessConfig;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Outputs which may be registered for output via the Grid.
|
|
156
|
+
*/
|
|
157
|
+
export interface BucketOutputs {
|
|
158
|
+
/**
|
|
159
|
+
* AWS Bucket name
|
|
160
|
+
* @attribute
|
|
161
|
+
*/
|
|
162
|
+
readonly name: string;
|
|
163
|
+
/**
|
|
164
|
+
* AWS Bucket arn
|
|
165
|
+
* @attribute
|
|
166
|
+
*/
|
|
167
|
+
readonly arn: string;
|
|
168
|
+
/**
|
|
169
|
+
* The URL of the static website.
|
|
170
|
+
* @attribute
|
|
171
|
+
*/
|
|
172
|
+
readonly websiteUrl?: string;
|
|
173
|
+
/**
|
|
174
|
+
* The Domain name of the static website.
|
|
175
|
+
* @attribute
|
|
176
|
+
*/
|
|
177
|
+
readonly websiteDomainName?: string;
|
|
178
|
+
/**
|
|
179
|
+
* The IPv4 DNS name of the specified bucket.
|
|
180
|
+
* @attribute
|
|
181
|
+
*/
|
|
182
|
+
readonly domainName: string;
|
|
183
|
+
/**
|
|
184
|
+
* The regional domain name of the specified bucket.
|
|
185
|
+
* @attribute
|
|
186
|
+
*/
|
|
187
|
+
readonly regionalDomainName: string;
|
|
188
|
+
/**
|
|
189
|
+
* Origin Access Identity, if cloudfrontAccess is enabled.
|
|
190
|
+
* @attribute
|
|
191
|
+
*/
|
|
192
|
+
readonly originAccessIdentity?: string;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Imported or created Bucket attributes
|
|
196
|
+
*/
|
|
197
|
+
export interface IBucket extends IAwsConstruct {
|
|
198
|
+
/** Strongly typed outputs */
|
|
199
|
+
readonly bucketOutputs: BucketOutputs;
|
|
200
|
+
/**
|
|
201
|
+
* AWS Bucket name
|
|
202
|
+
*/
|
|
203
|
+
readonly bucketName: string;
|
|
204
|
+
/**
|
|
205
|
+
* AWS Bucket arn
|
|
206
|
+
*/
|
|
207
|
+
readonly bucketArn: string;
|
|
208
|
+
/** Whether the bucket has versioning enabled */
|
|
209
|
+
readonly versioned: boolean;
|
|
210
|
+
/** The hosted Zone Id for the bucket */
|
|
211
|
+
readonly hostedZoneId: string;
|
|
212
|
+
/**
|
|
213
|
+
* The Domain name of the static website.
|
|
214
|
+
* @attribute
|
|
215
|
+
*/
|
|
216
|
+
readonly websiteDomainName?: string;
|
|
217
|
+
/**
|
|
218
|
+
* Enable public read access for all the files in the bucket.
|
|
219
|
+
*
|
|
220
|
+
* This explicitly disables the default S3 bucket security settings. This
|
|
221
|
+
* should be done with caution, as all bucket objects become publicly exposed.
|
|
222
|
+
*
|
|
223
|
+
* You don't need to enable this if you're using CloudFront to serve files from the bucket.
|
|
224
|
+
*
|
|
225
|
+
* @default `false`
|
|
226
|
+
*/
|
|
227
|
+
public?: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* The resource policy associated with this bucket.
|
|
230
|
+
*
|
|
231
|
+
* If `autoCreatePolicy` is true, a `BucketPolicy` will be created upon the
|
|
232
|
+
* first call to addToResourcePolicy(s).
|
|
233
|
+
*/
|
|
234
|
+
policy?: BucketPolicy;
|
|
235
|
+
/**
|
|
236
|
+
* Add a source of files for upload to the bucket.
|
|
237
|
+
*/
|
|
238
|
+
addSource(props: AddSourceOptions, sourceId?: string): string;
|
|
239
|
+
/**
|
|
240
|
+
* If this bucket has been configured for static website hosting.
|
|
241
|
+
*/
|
|
242
|
+
isWebsite(): this is {
|
|
243
|
+
websiteDomainName: string;
|
|
244
|
+
bucketOutputs: {
|
|
245
|
+
websiteUrl: string;
|
|
246
|
+
websiteDomainName: string;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* The https URL of an S3 object. For example:
|
|
251
|
+
*
|
|
252
|
+
* - `https://s3.us-west-1.amazonaws.com/onlybucket`
|
|
253
|
+
* - `https://s3.us-west-1.amazonaws.com/bucket/key`
|
|
254
|
+
* - `https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey`
|
|
255
|
+
* @param key The S3 key of the object. If not specified, the URL of the
|
|
256
|
+
* bucket is returned.
|
|
257
|
+
* @returns an ObjectS3Url token
|
|
258
|
+
*/
|
|
259
|
+
urlForObject(key?: string): string;
|
|
260
|
+
/**
|
|
261
|
+
* The S3 URL of an S3 object. For example:
|
|
262
|
+
* - `s3://onlybucket`
|
|
263
|
+
* - `s3://bucket/key`
|
|
264
|
+
* @param key The S3 key of the object. If not specified, the S3 URL of the
|
|
265
|
+
* bucket is returned.
|
|
266
|
+
* @returns an ObjectS3Url token
|
|
267
|
+
*/
|
|
268
|
+
s3UrlForObject(key?: string): string;
|
|
269
|
+
/**
|
|
270
|
+
* Returns an ARN that represents all objects within the bucket that match
|
|
271
|
+
* the key pattern specified. To represent all keys, specify ``"*"``.
|
|
272
|
+
*/
|
|
273
|
+
arnForObjects(keyPattern: string): string;
|
|
274
|
+
/**
|
|
275
|
+
* Adds a statement to the resource policy for a principal (i.e.
|
|
276
|
+
* account/role/service) to perform actions on this bucket and/or its
|
|
277
|
+
* contents. Use `bucketArn` and `arnForObjects(keys)` to obtain ARNs for
|
|
278
|
+
* this bucket or objects.
|
|
279
|
+
*
|
|
280
|
+
* Note that the policy statement may or may not be added to the policy.
|
|
281
|
+
* For example, when an `IBucket` is created from an existing bucket,
|
|
282
|
+
* it's not possible to tell whether the bucket already has a policy
|
|
283
|
+
* attached, let alone to re-use that policy to add more statements to it.
|
|
284
|
+
* So it's safest to do nothing in these cases.
|
|
285
|
+
*
|
|
286
|
+
* @param permission the policy statement to be added to the bucket's
|
|
287
|
+
* policy.
|
|
288
|
+
* @returns metadata about the execution of this method. If the policy
|
|
289
|
+
* was not added, the value of `statementAdded` will be `false`. You
|
|
290
|
+
* should always check this value to make sure that the operation was
|
|
291
|
+
* actually carried out. Otherwise, synthesis and deploy will terminate
|
|
292
|
+
* silently, which may be confusing.
|
|
293
|
+
*/
|
|
294
|
+
addToResourcePolicy(permission: iam.PolicyStatement): iam.AddToResourcePolicyResult;
|
|
295
|
+
/**
|
|
296
|
+
* Grant read permissions for this bucket and it's contents to an IAM
|
|
297
|
+
* principal (Role/Group/User).
|
|
298
|
+
*
|
|
299
|
+
* If encryption is used, permission to use the key to decrypt the contents
|
|
300
|
+
* of the bucket will also be granted to the same principal.
|
|
301
|
+
*
|
|
302
|
+
* @param identity The principal
|
|
303
|
+
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
|
|
304
|
+
*/
|
|
305
|
+
grantRead(identity: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;
|
|
306
|
+
/**
|
|
307
|
+
* Grant write permissions to this bucket to an IAM principal.
|
|
308
|
+
*
|
|
309
|
+
* If encryption is used, permission to use the key to encrypt the contents
|
|
310
|
+
* of written files will also be granted to the same principal.
|
|
311
|
+
*
|
|
312
|
+
* This does not include `s3:PutObjectAcl`, which could be used to grant read/write object access to IAM principals in other accounts.
|
|
313
|
+
*
|
|
314
|
+
* If you need the principal to have permissions to modify the ACLs,
|
|
315
|
+
* use the `grantPutAcl` method.
|
|
316
|
+
*
|
|
317
|
+
* @param identity The principal
|
|
318
|
+
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
|
|
319
|
+
* @param allowedActionPatterns Restrict the permissions to certain list of action patterns
|
|
320
|
+
*/
|
|
321
|
+
grantWrite(identity: iam.IGrantable, objectsKeyPattern?: any, allowedActionPatterns?: string[]): iam.Grant;
|
|
322
|
+
/**
|
|
323
|
+
* Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal.
|
|
324
|
+
*
|
|
325
|
+
* If encryption is used, permission to use the key to encrypt the contents
|
|
326
|
+
* of written files will also be granted to the same principal.
|
|
327
|
+
* @param identity The principal
|
|
328
|
+
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
|
|
329
|
+
*/
|
|
330
|
+
grantPut(identity: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;
|
|
331
|
+
/**
|
|
332
|
+
* Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket.
|
|
333
|
+
*
|
|
334
|
+
* calling `grantWrite` or `grantReadWrite` does not grant permissions to modify the ACLs of the objects;
|
|
335
|
+
* in this case, if you need to modify object ACLs, call this method explicitly.
|
|
336
|
+
*
|
|
337
|
+
* @param identity The principal
|
|
338
|
+
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*')
|
|
339
|
+
*/
|
|
340
|
+
grantPutAcl(identity: iam.IGrantable, objectsKeyPattern?: string): iam.Grant;
|
|
341
|
+
/**
|
|
342
|
+
* Grants s3:DeleteObject* permission to an IAM principal for objects
|
|
343
|
+
* in this bucket.
|
|
344
|
+
*
|
|
345
|
+
* @param identity The principal
|
|
346
|
+
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
|
|
347
|
+
*/
|
|
348
|
+
grantDelete(identity: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;
|
|
349
|
+
/**
|
|
350
|
+
* Grants read/write permissions for this bucket and it's contents to an IAM
|
|
351
|
+
* principal (Role/Group/User).
|
|
352
|
+
*
|
|
353
|
+
* If an encryption key is used, permission to use the key for
|
|
354
|
+
* encrypt/decrypt will also be granted.
|
|
355
|
+
*
|
|
356
|
+
* This does not include `s3:PutObjectAcl`, which could be used to grant read/write object access to IAM principals in other accounts.
|
|
357
|
+
*
|
|
358
|
+
* If you need the principal to have permissions to modify the ACLs,
|
|
359
|
+
* use the `grantPutAcl` method.
|
|
360
|
+
*
|
|
361
|
+
* @param identity The principal
|
|
362
|
+
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
|
|
363
|
+
*/
|
|
364
|
+
grantReadWrite(identity: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;
|
|
365
|
+
/**
|
|
366
|
+
* Adds a bucket notification event destination.
|
|
367
|
+
* @param event The event to trigger the notification
|
|
368
|
+
* @param dest The notification destination (Lambda, SNS Topic or SQS Queue)
|
|
369
|
+
*
|
|
370
|
+
* @param filters S3 object key filter rules to determine which objects
|
|
371
|
+
* trigger this event. Each filter must include a `prefix` and/or `suffix`
|
|
372
|
+
* that will be matched against the s3 object key. Refer to the S3 Developer Guide
|
|
373
|
+
* for details about allowed filter rules.
|
|
374
|
+
*
|
|
375
|
+
* @see https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html#notification-how-to-filtering
|
|
376
|
+
*
|
|
377
|
+
* @example
|
|
378
|
+
*
|
|
379
|
+
* declare const myLambda: lambda.Function;
|
|
380
|
+
* const bucket = new s3.Bucket(this, 'MyBucket');
|
|
381
|
+
* bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myLambda), {prefix: 'home/myusername/*'})
|
|
382
|
+
*
|
|
383
|
+
* @see
|
|
384
|
+
* https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html
|
|
385
|
+
*/
|
|
386
|
+
addEventNotification(event: EventType, dest: IBucketNotificationDestination, ...filters: NotificationKeyFilter[]): void;
|
|
387
|
+
/**
|
|
388
|
+
* Subscribes a destination to receive notifications when an object is
|
|
389
|
+
* created in the bucket. This is identical to calling
|
|
390
|
+
* `onEvent(s3.EventType.OBJECT_CREATED)`.
|
|
391
|
+
*
|
|
392
|
+
* @param dest The notification destination (see onEvent)
|
|
393
|
+
* @param filters Filters (see onEvent)
|
|
394
|
+
*/
|
|
395
|
+
addObjectCreatedNotification(dest: IBucketNotificationDestination, ...filters: NotificationKeyFilter[]): void;
|
|
396
|
+
/**
|
|
397
|
+
* Subscribes a destination to receive notifications when an object is
|
|
398
|
+
* removed from the bucket. This is identical to calling
|
|
399
|
+
* `onEvent(EventType.OBJECT_REMOVED)`.
|
|
400
|
+
*
|
|
401
|
+
* @param dest The notification destination (see onEvent)
|
|
402
|
+
* @param filters Filters (see onEvent)
|
|
403
|
+
*/
|
|
404
|
+
addObjectRemovedNotification(dest: IBucketNotificationDestination, ...filters: NotificationKeyFilter[]): void;
|
|
405
|
+
/**
|
|
406
|
+
* Enables event bridge notification, causing all events below to be sent to EventBridge:
|
|
407
|
+
*
|
|
408
|
+
* - Object Deleted (DeleteObject)
|
|
409
|
+
* - Object Deleted (Lifecycle expiration)
|
|
410
|
+
* - Object Restore Initiated
|
|
411
|
+
* - Object Restore Completed
|
|
412
|
+
* - Object Restore Expired
|
|
413
|
+
* - Object Storage Class Changed
|
|
414
|
+
* - Object Access Tier Changed
|
|
415
|
+
* - Object ACL Updated
|
|
416
|
+
* - Object Tags Added
|
|
417
|
+
* - Object Tags Deleted
|
|
418
|
+
*/
|
|
419
|
+
enableEventBridgeNotification(): void;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* The `Bucket` beacon provides an [AWS S3 Bucket](https://aws.amazon.com/s3/).
|
|
423
|
+
*
|
|
424
|
+
* ```ts
|
|
425
|
+
* new storage.Bucket(stack, "MyWebsite", {
|
|
426
|
+
* path: path.join(__dirname, "dist"),
|
|
427
|
+
* });
|
|
428
|
+
* ```
|
|
429
|
+
*
|
|
430
|
+
* #### Public read access
|
|
431
|
+
*
|
|
432
|
+
* Enables `public` read access for all the files in the bucket. Dangerous and
|
|
433
|
+
* recommended to use edge.Distribution instead.
|
|
434
|
+
*
|
|
435
|
+
* Useful for hosting public files directly from S3.
|
|
436
|
+
*
|
|
437
|
+
* ```ts
|
|
438
|
+
* new storage.Bucket("MyBucket", {
|
|
439
|
+
* public: true
|
|
440
|
+
* });
|
|
441
|
+
* ```
|
|
442
|
+
*
|
|
443
|
+
* @resource aws_s3_bucket
|
|
444
|
+
* @terraconstruct storage.IBucket
|
|
445
|
+
*/
|
|
446
|
+
export declare class Bucket extends AwsConstructBase implements IBucket {
|
|
447
|
+
protected readonly resource: s3Bucket.S3Bucket;
|
|
448
|
+
protected readonly websiteConfig?: s3BucketWebsiteConfiguration.S3BucketWebsiteConfiguration;
|
|
449
|
+
protected readonly corsConfig?: s3BucketCorsConfiguration.S3BucketCorsConfiguration;
|
|
450
|
+
/** @internal */
|
|
451
|
+
private readonly sources;
|
|
452
|
+
/** @internal */
|
|
453
|
+
private readonly _versioned;
|
|
454
|
+
get versioned(): boolean;
|
|
455
|
+
/** @internal */
|
|
456
|
+
private readonly _isWebsite;
|
|
457
|
+
/** @internal */
|
|
458
|
+
private sourceSleep?;
|
|
459
|
+
/** @internal */
|
|
460
|
+
private readonly _outputs;
|
|
461
|
+
get bucketOutputs(): BucketOutputs;
|
|
462
|
+
get outputs(): Record<string, any>;
|
|
463
|
+
get bucketName(): string;
|
|
464
|
+
get bucketArn(): string;
|
|
465
|
+
get hostedZoneId(): string;
|
|
466
|
+
get websiteDomainName(): string | undefined;
|
|
467
|
+
policy?: BucketPolicy;
|
|
468
|
+
/**
|
|
469
|
+
* Whether the bucket is public or not.
|
|
470
|
+
*/
|
|
471
|
+
public?: boolean;
|
|
472
|
+
private notifications?;
|
|
473
|
+
private readonly eventBridgeEnabled?;
|
|
474
|
+
constructor(scope: Construct, name: string, props?: BucketProps);
|
|
475
|
+
/**
|
|
476
|
+
* Adds a statement to the resource policy for a principal (i.e.
|
|
477
|
+
* account/role/service) to perform actions on this bucket and/or its
|
|
478
|
+
* contents. Use `bucketArn` and `arnForObjects(keys)` to obtain ARNs for
|
|
479
|
+
* this bucket or objects.
|
|
480
|
+
*
|
|
481
|
+
* Note that the policy statement may or may not be added to the policy.
|
|
482
|
+
* For example, when an `IBucket` is created from an existing bucket,
|
|
483
|
+
* it's not possible to tell whether the bucket already has a policy
|
|
484
|
+
* attached, let alone to re-use that policy to add more statements to it.
|
|
485
|
+
* So it's safest to do nothing in these cases.
|
|
486
|
+
*
|
|
487
|
+
* @param permission the policy statement to be added to the bucket's
|
|
488
|
+
* policy.
|
|
489
|
+
* @returns metadata about the execution of this method. If the policy
|
|
490
|
+
* was not added, the value of `statementAdded` will be `false`. You
|
|
491
|
+
* should always check this value to make sure that the operation was
|
|
492
|
+
* actually carried out. Otherwise, synthesis and deploy will terminate
|
|
493
|
+
* silently, which may be confusing.
|
|
494
|
+
*/
|
|
495
|
+
addToResourcePolicy(permission: iam.PolicyStatement): iam.AddToResourcePolicyResult;
|
|
496
|
+
/**
|
|
497
|
+
* Grant read permissions for this bucket and it's contents to an IAM
|
|
498
|
+
* principal (Role/Group/User).
|
|
499
|
+
*
|
|
500
|
+
* If encryption is used, permission to use the key to decrypt the contents
|
|
501
|
+
* of the bucket will also be granted to the same principal.
|
|
502
|
+
*
|
|
503
|
+
* @param identity The principal
|
|
504
|
+
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
|
|
505
|
+
*/
|
|
506
|
+
grantRead(identity: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;
|
|
507
|
+
grantWrite(identity: iam.IGrantable, objectsKeyPattern?: any, allowedActionPatterns?: string[]): iam.Grant;
|
|
508
|
+
/**
|
|
509
|
+
* Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal.
|
|
510
|
+
*
|
|
511
|
+
* If encryption is used, permission to use the key to encrypt the contents
|
|
512
|
+
* of written files will also be granted to the same principal.
|
|
513
|
+
* @param identity The principal
|
|
514
|
+
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
|
|
515
|
+
*/
|
|
516
|
+
grantPut(identity: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;
|
|
517
|
+
grantPutAcl(identity: iam.IGrantable, objectsKeyPattern?: string): iam.Grant;
|
|
518
|
+
/**
|
|
519
|
+
* Grants s3:DeleteObject* permission to an IAM principal for objects
|
|
520
|
+
* in this bucket.
|
|
521
|
+
*
|
|
522
|
+
* @param identity The principal
|
|
523
|
+
* @param objectsKeyPattern Restrict the permission to a certain key pattern (default '*'). Parameter type is `any` but `string` should be passed in.
|
|
524
|
+
*/
|
|
525
|
+
grantDelete(identity: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;
|
|
526
|
+
grantReadWrite(identity: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;
|
|
527
|
+
/**
|
|
528
|
+
* Adds a bucket notification event destination.
|
|
529
|
+
*
|
|
530
|
+
* S3 Buckets only support a single notification configuration resource.
|
|
531
|
+
* Declaring multiple `aws_s3_bucket_notification` resources to the same
|
|
532
|
+
* S3 Bucket will cause a perpetual difference in configuration.
|
|
533
|
+
*
|
|
534
|
+
* Calling this function will overwrite any existing event notifications configured
|
|
535
|
+
* for the S3 bucket outside of this beacon.
|
|
536
|
+
*
|
|
537
|
+
* @param event The event to trigger the notification
|
|
538
|
+
* @param dest The notification destination (Lambda, SNS Topic or SQS Queue)
|
|
539
|
+
*
|
|
540
|
+
* @param filters S3 object key filter rules to determine which objects
|
|
541
|
+
* trigger this event. Each filter must include a `prefix` and/or `suffix`
|
|
542
|
+
* that will be matched against the s3 object key. Refer to the S3 Developer Guide
|
|
543
|
+
* for details about allowed filter rules.
|
|
544
|
+
*
|
|
545
|
+
* @see https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html#notification-how-to-filtering
|
|
546
|
+
*
|
|
547
|
+
* @example
|
|
548
|
+
*
|
|
549
|
+
* declare const myFunction: compute.Function;
|
|
550
|
+
* const bucket = new storage.Bucket(this, 'MyBucket');
|
|
551
|
+
* bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myFunction), {prefix: 'home/myusername/*'});
|
|
552
|
+
*
|
|
553
|
+
* @see
|
|
554
|
+
* https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html
|
|
555
|
+
*/
|
|
556
|
+
addEventNotification(event: EventType, dest: IBucketNotificationDestination, ...filters: NotificationKeyFilter[]): void;
|
|
557
|
+
private withNotifications;
|
|
558
|
+
/**
|
|
559
|
+
* Subscribes a destination to receive notifications when an object is
|
|
560
|
+
* created in the bucket. This is identical to calling
|
|
561
|
+
* `onEvent(EventType.OBJECT_CREATED)`.
|
|
562
|
+
*
|
|
563
|
+
* @param dest The notification destination (see onEvent)
|
|
564
|
+
* @param filters Filters (see onEvent)
|
|
565
|
+
*/
|
|
566
|
+
addObjectCreatedNotification(dest: IBucketNotificationDestination, ...filters: NotificationKeyFilter[]): void;
|
|
567
|
+
/**
|
|
568
|
+
* Subscribes a destination to receive notifications when an object is
|
|
569
|
+
* removed from the bucket. This is identical to calling
|
|
570
|
+
* `onEvent(EventType.OBJECT_REMOVED)`.
|
|
571
|
+
*
|
|
572
|
+
* @param dest The notification destination (see onEvent)
|
|
573
|
+
* @param filters Filters (see onEvent)
|
|
574
|
+
*/
|
|
575
|
+
addObjectRemovedNotification(dest: IBucketNotificationDestination, ...filters: NotificationKeyFilter[]): void;
|
|
576
|
+
/**
|
|
577
|
+
* Enables event bridge notification, causing all events below to be sent to EventBridge:
|
|
578
|
+
*
|
|
579
|
+
* - Object Deleted (DeleteObject)
|
|
580
|
+
* - Object Deleted (Lifecycle expiration)
|
|
581
|
+
* - Object Restore Initiated
|
|
582
|
+
* - Object Restore Completed
|
|
583
|
+
* - Object Restore Expired
|
|
584
|
+
* - Object Storage Class Changed
|
|
585
|
+
* - Object Access Tier Changed
|
|
586
|
+
* - Object ACL Updated
|
|
587
|
+
* - Object Tags Added
|
|
588
|
+
* - Object Tags Deleted
|
|
589
|
+
*/
|
|
590
|
+
enableEventBridgeNotification(): void;
|
|
591
|
+
private grant;
|
|
592
|
+
private get writeActions();
|
|
593
|
+
/**
|
|
594
|
+
* Add a source to the bucket.
|
|
595
|
+
*
|
|
596
|
+
* @param props The properties of the source to add
|
|
597
|
+
*/
|
|
598
|
+
addSource(props: AddSourceOptions, sourceId?: string): string;
|
|
599
|
+
isWebsite(): this is {
|
|
600
|
+
websiteDomainName: string;
|
|
601
|
+
bucketOutputs: {
|
|
602
|
+
websiteUrl: string;
|
|
603
|
+
websiteDomainName: string;
|
|
604
|
+
};
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* The https URL of an S3 object. Specify `regional: false` at the options
|
|
608
|
+
* for non-regional URLs. For example:
|
|
609
|
+
*
|
|
610
|
+
* - `https://s3.us-west-1.amazonaws.com/onlybucket`
|
|
611
|
+
* - `https://s3.us-west-1.amazonaws.com/bucket/key`
|
|
612
|
+
* - `https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey`
|
|
613
|
+
*
|
|
614
|
+
* @param key The S3 key of the object. If not specified, the URL of the
|
|
615
|
+
* bucket is returned.
|
|
616
|
+
* @returns an ObjectS3Url token
|
|
617
|
+
*/
|
|
618
|
+
urlForObject(key?: string): string;
|
|
619
|
+
/**
|
|
620
|
+
* The S3 URL of an S3 object. For example:
|
|
621
|
+
*
|
|
622
|
+
* - `s3://onlybucket`
|
|
623
|
+
* - `s3://bucket/key`
|
|
624
|
+
*
|
|
625
|
+
* @param key The S3 key of the object. If not specified, the S3 URL of the
|
|
626
|
+
* bucket is returned.
|
|
627
|
+
* @returns an ObjectS3Url token
|
|
628
|
+
*/
|
|
629
|
+
s3UrlForObject(key?: string): string;
|
|
630
|
+
/**
|
|
631
|
+
* Returns an ARN that represents all objects within the bucket that match
|
|
632
|
+
* the key pattern specified. To represent all keys, specify ``"*"``.
|
|
633
|
+
*
|
|
634
|
+
* If you need to specify a keyPattern with multiple components, concatenate them into a single string, e.g.:
|
|
635
|
+
*
|
|
636
|
+
* arnForObjects(`home/${team}/${user}/*`)
|
|
637
|
+
*
|
|
638
|
+
*/
|
|
639
|
+
arnForObjects(keyPattern: string): string;
|
|
640
|
+
private urlJoin;
|
|
641
|
+
/**
|
|
642
|
+
* Adds an iam statement to enforce SSL requests only.
|
|
643
|
+
*/
|
|
644
|
+
private enforceSSLStatement;
|
|
645
|
+
/**
|
|
646
|
+
* Adds an iam statement to allow requests with a minimum TLS
|
|
647
|
+
* version only.
|
|
648
|
+
*/
|
|
649
|
+
private minimumTLSVersionStatement;
|
|
650
|
+
/**
|
|
651
|
+
* Adds resource to the Terraform JSON output at Synth time.
|
|
652
|
+
*
|
|
653
|
+
* called by TerraformStack.prepareStack()
|
|
654
|
+
*/
|
|
655
|
+
toTerraform(): any;
|
|
656
|
+
}
|
|
657
|
+
export interface AddSourceOptions {
|
|
658
|
+
/**
|
|
659
|
+
* Local path to the source files
|
|
660
|
+
*/
|
|
661
|
+
readonly path: string;
|
|
662
|
+
/**
|
|
663
|
+
* Prefix to add to the uploaded objects
|
|
664
|
+
*/
|
|
665
|
+
readonly prefix?: string;
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* Storage class to move an object to
|
|
669
|
+
*/
|
|
670
|
+
export declare enum StorageClass {
|
|
671
|
+
/**
|
|
672
|
+
* Storage class for data that is accessed less frequently, but requires rapid
|
|
673
|
+
* access when needed.
|
|
674
|
+
*
|
|
675
|
+
* Has lower availability than Standard storage.
|
|
676
|
+
*/
|
|
677
|
+
INFREQUENT_ACCESS = "STANDARD_IA",
|
|
678
|
+
/**
|
|
679
|
+
* Infrequent Access that's only stored in one availability zone.
|
|
680
|
+
*
|
|
681
|
+
* Has lower availability than standard InfrequentAccess.
|
|
682
|
+
*/
|
|
683
|
+
ONE_ZONE_INFREQUENT_ACCESS = "ONEZONE_IA",
|
|
684
|
+
/**
|
|
685
|
+
* Storage class for long-term archival that can take between minutes and
|
|
686
|
+
* hours to access.
|
|
687
|
+
*
|
|
688
|
+
* Use for archives where portions of the data might need to be retrieved in
|
|
689
|
+
* minutes. Data stored in the GLACIER storage class has a minimum storage
|
|
690
|
+
* duration period of 90 days and can be accessed in as little as 1-5 minutes
|
|
691
|
+
* using expedited retrieval. If you delete an object before the 90-day
|
|
692
|
+
* minimum, you are charged for 90 days.
|
|
693
|
+
*/
|
|
694
|
+
GLACIER = "GLACIER",
|
|
695
|
+
/**
|
|
696
|
+
* Storage class for long-term archival that can be accessed in a few milliseconds.
|
|
697
|
+
*
|
|
698
|
+
* It is ideal for data that is accessed once or twice per quarter, and
|
|
699
|
+
* that requires immediate access. Data stored in the GLACIER_IR storage class
|
|
700
|
+
* has a minimum storage duration period of 90 days and can be accessed in
|
|
701
|
+
* as milliseconds. If you delete an object before the 90-day minimum,
|
|
702
|
+
* you are charged for 90 days.
|
|
703
|
+
*/
|
|
704
|
+
GLACIER_INSTANT_RETRIEVAL = "GLACIER_IR",
|
|
705
|
+
/**
|
|
706
|
+
* Use for archiving data that rarely needs to be accessed. Data stored in the
|
|
707
|
+
* DEEP_ARCHIVE storage class has a minimum storage duration period of 180
|
|
708
|
+
* days and a default retrieval time of 12 hours. If you delete an object
|
|
709
|
+
* before the 180-day minimum, you are charged for 180 days. For pricing
|
|
710
|
+
* information, see Amazon S3 Pricing.
|
|
711
|
+
*/
|
|
712
|
+
DEEP_ARCHIVE = "DEEP_ARCHIVE",
|
|
713
|
+
/**
|
|
714
|
+
* The INTELLIGENT_TIERING storage class is designed to optimize storage costs
|
|
715
|
+
* by automatically moving data to the most cost-effective storage access
|
|
716
|
+
* tier, without performance impact or operational overhead.
|
|
717
|
+
* INTELLIGENT_TIERING delivers automatic cost savings by moving data on a
|
|
718
|
+
* granular object level between two access tiers, a frequent access tier and
|
|
719
|
+
* a lower-cost infrequent access tier, when access patterns change. The
|
|
720
|
+
* INTELLIGENT_TIERING storage class is ideal if you want to optimize storage
|
|
721
|
+
* costs automatically for long-lived data when access patterns are unknown or
|
|
722
|
+
* unpredictable.
|
|
723
|
+
*/
|
|
724
|
+
INTELLIGENT_TIERING = "INTELLIGENT_TIERING"
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* Notification event types.
|
|
728
|
+
* @link https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-event-types-and-destinations.html#supported-notification-event-types
|
|
729
|
+
*/
|
|
730
|
+
export declare enum EventType {
|
|
731
|
+
/**
|
|
732
|
+
* Amazon S3 APIs such as PUT, POST, and COPY can create an object. Using
|
|
733
|
+
* these event types, you can enable notification when an object is created
|
|
734
|
+
* using a specific API, or you can use the s3:ObjectCreated:* event type to
|
|
735
|
+
* request notification regardless of the API that was used to create an
|
|
736
|
+
* object.
|
|
737
|
+
*/
|
|
738
|
+
OBJECT_CREATED = "s3:ObjectCreated:*",
|
|
739
|
+
/**
|
|
740
|
+
* Amazon S3 APIs such as PUT, POST, and COPY can create an object. Using
|
|
741
|
+
* these event types, you can enable notification when an object is created
|
|
742
|
+
* using a specific API, or you can use the s3:ObjectCreated:* event type to
|
|
743
|
+
* request notification regardless of the API that was used to create an
|
|
744
|
+
* object.
|
|
745
|
+
*/
|
|
746
|
+
OBJECT_CREATED_PUT = "s3:ObjectCreated:Put",
|
|
747
|
+
/**
|
|
748
|
+
* Amazon S3 APIs such as PUT, POST, and COPY can create an object. Using
|
|
749
|
+
* these event types, you can enable notification when an object is created
|
|
750
|
+
* using a specific API, or you can use the s3:ObjectCreated:* event type to
|
|
751
|
+
* request notification regardless of the API that was used to create an
|
|
752
|
+
* object.
|
|
753
|
+
*/
|
|
754
|
+
OBJECT_CREATED_POST = "s3:ObjectCreated:Post",
|
|
755
|
+
/**
|
|
756
|
+
* Amazon S3 APIs such as PUT, POST, and COPY can create an object. Using
|
|
757
|
+
* these event types, you can enable notification when an object is created
|
|
758
|
+
* using a specific API, or you can use the s3:ObjectCreated:* event type to
|
|
759
|
+
* request notification regardless of the API that was used to create an
|
|
760
|
+
* object.
|
|
761
|
+
*/
|
|
762
|
+
OBJECT_CREATED_COPY = "s3:ObjectCreated:Copy",
|
|
763
|
+
/**
|
|
764
|
+
* Amazon S3 APIs such as PUT, POST, and COPY can create an object. Using
|
|
765
|
+
* these event types, you can enable notification when an object is created
|
|
766
|
+
* using a specific API, or you can use the s3:ObjectCreated:* event type to
|
|
767
|
+
* request notification regardless of the API that was used to create an
|
|
768
|
+
* object.
|
|
769
|
+
*/
|
|
770
|
+
OBJECT_CREATED_COMPLETE_MULTIPART_UPLOAD = "s3:ObjectCreated:CompleteMultipartUpload",
|
|
771
|
+
/**
|
|
772
|
+
* By using the ObjectRemoved event types, you can enable notification when
|
|
773
|
+
* an object or a batch of objects is removed from a bucket.
|
|
774
|
+
*
|
|
775
|
+
* You can request notification when an object is deleted or a versioned
|
|
776
|
+
* object is permanently deleted by using the s3:ObjectRemoved:Delete event
|
|
777
|
+
* type. Or you can request notification when a delete marker is created for
|
|
778
|
+
* a versioned object by using s3:ObjectRemoved:DeleteMarkerCreated. For
|
|
779
|
+
* information about deleting versioned objects, see Deleting Object
|
|
780
|
+
* Versions. You can also use a wildcard s3:ObjectRemoved:* to request
|
|
781
|
+
* notification anytime an object is deleted.
|
|
782
|
+
*
|
|
783
|
+
* You will not receive event notifications from automatic deletes from
|
|
784
|
+
* lifecycle policies or from failed operations.
|
|
785
|
+
*/
|
|
786
|
+
OBJECT_REMOVED = "s3:ObjectRemoved:*",
|
|
787
|
+
/**
|
|
788
|
+
* By using the ObjectRemoved event types, you can enable notification when
|
|
789
|
+
* an object or a batch of objects is removed from a bucket.
|
|
790
|
+
*
|
|
791
|
+
* You can request notification when an object is deleted or a versioned
|
|
792
|
+
* object is permanently deleted by using the s3:ObjectRemoved:Delete event
|
|
793
|
+
* type. Or you can request notification when a delete marker is created for
|
|
794
|
+
* a versioned object by using s3:ObjectRemoved:DeleteMarkerCreated. For
|
|
795
|
+
* information about deleting versioned objects, see Deleting Object
|
|
796
|
+
* Versions. You can also use a wildcard s3:ObjectRemoved:* to request
|
|
797
|
+
* notification anytime an object is deleted.
|
|
798
|
+
*
|
|
799
|
+
* You will not receive event notifications from automatic deletes from
|
|
800
|
+
* lifecycle policies or from failed operations.
|
|
801
|
+
*/
|
|
802
|
+
OBJECT_REMOVED_DELETE = "s3:ObjectRemoved:Delete",
|
|
803
|
+
/**
|
|
804
|
+
* By using the ObjectRemoved event types, you can enable notification when
|
|
805
|
+
* an object or a batch of objects is removed from a bucket.
|
|
806
|
+
*
|
|
807
|
+
* You can request notification when an object is deleted or a versioned
|
|
808
|
+
* object is permanently deleted by using the s3:ObjectRemoved:Delete event
|
|
809
|
+
* type. Or you can request notification when a delete marker is created for
|
|
810
|
+
* a versioned object by using s3:ObjectRemoved:DeleteMarkerCreated. For
|
|
811
|
+
* information about deleting versioned objects, see Deleting Object
|
|
812
|
+
* Versions. You can also use a wildcard s3:ObjectRemoved:* to request
|
|
813
|
+
* notification anytime an object is deleted.
|
|
814
|
+
*
|
|
815
|
+
* You will not receive event notifications from automatic deletes from
|
|
816
|
+
* lifecycle policies or from failed operations.
|
|
817
|
+
*/
|
|
818
|
+
OBJECT_REMOVED_DELETE_MARKER_CREATED = "s3:ObjectRemoved:DeleteMarkerCreated",
|
|
819
|
+
/**
|
|
820
|
+
* Using restore object event types you can receive notifications for
|
|
821
|
+
* initiation and completion when restoring objects from the S3 Glacier
|
|
822
|
+
* storage class.
|
|
823
|
+
*
|
|
824
|
+
* You use s3:ObjectRestore:Post to request notification of object restoration
|
|
825
|
+
* initiation.
|
|
826
|
+
*/
|
|
827
|
+
OBJECT_RESTORE_POST = "s3:ObjectRestore:Post",
|
|
828
|
+
/**
|
|
829
|
+
* Using restore object event types you can receive notifications for
|
|
830
|
+
* initiation and completion when restoring objects from the S3 Glacier
|
|
831
|
+
* storage class.
|
|
832
|
+
*
|
|
833
|
+
* You use s3:ObjectRestore:Completed to request notification of
|
|
834
|
+
* restoration completion.
|
|
835
|
+
*/
|
|
836
|
+
OBJECT_RESTORE_COMPLETED = "s3:ObjectRestore:Completed",
|
|
837
|
+
/**
|
|
838
|
+
* Using restore object event types you can receive notifications for
|
|
839
|
+
* initiation and completion when restoring objects from the S3 Glacier
|
|
840
|
+
* storage class.
|
|
841
|
+
*
|
|
842
|
+
* You use s3:ObjectRestore:Delete to request notification of
|
|
843
|
+
* restoration completion.
|
|
844
|
+
*/
|
|
845
|
+
OBJECT_RESTORE_DELETE = "s3:ObjectRestore:Delete",
|
|
846
|
+
/**
|
|
847
|
+
* You can use this event type to request Amazon S3 to send a notification
|
|
848
|
+
* message when Amazon S3 detects that an object of the RRS storage class is
|
|
849
|
+
* lost.
|
|
850
|
+
*/
|
|
851
|
+
REDUCED_REDUNDANCY_LOST_OBJECT = "s3:ReducedRedundancyLostObject",
|
|
852
|
+
/**
|
|
853
|
+
* You receive this notification event when an object that was eligible for
|
|
854
|
+
* replication using Amazon S3 Replication Time Control failed to replicate.
|
|
855
|
+
*/
|
|
856
|
+
REPLICATION_OPERATION_FAILED_REPLICATION = "s3:Replication:OperationFailedReplication",
|
|
857
|
+
/**
|
|
858
|
+
* You receive this notification event when an object that was eligible for
|
|
859
|
+
* replication using Amazon S3 Replication Time Control exceeded the 15-minute
|
|
860
|
+
* threshold for replication.
|
|
861
|
+
*/
|
|
862
|
+
REPLICATION_OPERATION_MISSED_THRESHOLD = "s3:Replication:OperationMissedThreshold",
|
|
863
|
+
/**
|
|
864
|
+
* You receive this notification event for an object that was eligible for
|
|
865
|
+
* replication using the Amazon S3 Replication Time Control feature replicated
|
|
866
|
+
* after the 15-minute threshold.
|
|
867
|
+
*/
|
|
868
|
+
REPLICATION_OPERATION_REPLICATED_AFTER_THRESHOLD = "s3:Replication:OperationReplicatedAfterThreshold",
|
|
869
|
+
/**
|
|
870
|
+
* You receive this notification event for an object that was eligible for
|
|
871
|
+
* replication using Amazon S3 Replication Time Control but is no longer tracked
|
|
872
|
+
* by replication metrics.
|
|
873
|
+
*/
|
|
874
|
+
REPLICATION_OPERATION_NOT_TRACKED = "s3:Replication:OperationNotTracked",
|
|
875
|
+
/**
|
|
876
|
+
* By using the LifecycleExpiration event types, you can receive a notification
|
|
877
|
+
* when Amazon S3 deletes an object based on your S3 Lifecycle configuration.
|
|
878
|
+
*/
|
|
879
|
+
LIFECYCLE_EXPIRATION = "s3:LifecycleExpiration:*",
|
|
880
|
+
/**
|
|
881
|
+
* The s3:LifecycleExpiration:Delete event type notifies you when an object
|
|
882
|
+
* in an unversioned bucket is deleted.
|
|
883
|
+
* It also notifies you when an object version is permanently deleted by an
|
|
884
|
+
* S3 Lifecycle configuration.
|
|
885
|
+
*/
|
|
886
|
+
LIFECYCLE_EXPIRATION_DELETE = "s3:LifecycleExpiration:Delete",
|
|
887
|
+
/**
|
|
888
|
+
* The s3:LifecycleExpiration:DeleteMarkerCreated event type notifies you
|
|
889
|
+
* when S3 Lifecycle creates a delete marker when a current version of an
|
|
890
|
+
* object in versioned bucket is deleted.
|
|
891
|
+
*/
|
|
892
|
+
LIFECYCLE_EXPIRATION_DELETE_MARKER_CREATED = "s3:LifecycleExpiration:DeleteMarkerCreated",
|
|
893
|
+
/**
|
|
894
|
+
* You receive this notification event when an object is transitioned to
|
|
895
|
+
* another Amazon S3 storage class by an S3 Lifecycle configuration.
|
|
896
|
+
*/
|
|
897
|
+
LIFECYCLE_TRANSITION = "s3:LifecycleTransition",
|
|
898
|
+
/**
|
|
899
|
+
* You receive this notification event when an object within the
|
|
900
|
+
* S3 Intelligent-Tiering storage class moved to the Archive Access tier or
|
|
901
|
+
* Deep Archive Access tier.
|
|
902
|
+
*/
|
|
903
|
+
INTELLIGENT_TIERING = "s3:IntelligentTiering",
|
|
904
|
+
/**
|
|
905
|
+
* By using the ObjectTagging event types, you can enable notification when
|
|
906
|
+
* an object tag is added or deleted from an object.
|
|
907
|
+
*/
|
|
908
|
+
OBJECT_TAGGING = "s3:ObjectTagging:*",
|
|
909
|
+
/**
|
|
910
|
+
* The s3:ObjectTagging:Put event type notifies you when a tag is PUT on an
|
|
911
|
+
* object or an existing tag is updated.
|
|
912
|
+
|
|
913
|
+
*/
|
|
914
|
+
OBJECT_TAGGING_PUT = "s3:ObjectTagging:Put",
|
|
915
|
+
/**
|
|
916
|
+
* The s3:ObjectTagging:Delete event type notifies you when a tag is removed
|
|
917
|
+
* from an object.
|
|
918
|
+
*/
|
|
919
|
+
OBJECT_TAGGING_DELETE = "s3:ObjectTagging:Delete",
|
|
920
|
+
/**
|
|
921
|
+
* You receive this notification event when an ACL is PUT on an object or when
|
|
922
|
+
* an existing ACL is changed.
|
|
923
|
+
* An event is not generated when a request results in no change to an
|
|
924
|
+
* object’s ACL.
|
|
925
|
+
*/
|
|
926
|
+
OBJECT_ACL_PUT = "s3:ObjectAcl:Put"
|
|
927
|
+
}
|
|
928
|
+
export interface NotificationKeyFilter {
|
|
929
|
+
/**
|
|
930
|
+
* Unique identifier for each of the notification configurations.
|
|
931
|
+
*/
|
|
932
|
+
readonly id?: string;
|
|
933
|
+
/**
|
|
934
|
+
* S3 keys must have the specified prefix.
|
|
935
|
+
*/
|
|
936
|
+
readonly prefix?: string;
|
|
937
|
+
/**
|
|
938
|
+
* S3 keys must have the specified suffix.
|
|
939
|
+
*/
|
|
940
|
+
readonly suffix?: string;
|
|
941
|
+
}
|