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,55 @@
|
|
|
1
|
+
import { Construct } from "constructs";
|
|
2
|
+
import { Chain } from "..";
|
|
3
|
+
import { State } from "./state";
|
|
4
|
+
import { CatchProps, IChainable, INextable, RetryProps } from "../types";
|
|
5
|
+
/**
|
|
6
|
+
* Properties for defining a custom state definition
|
|
7
|
+
*/
|
|
8
|
+
export interface CustomStateProps {
|
|
9
|
+
/**
|
|
10
|
+
* Amazon States Language (JSON-based) definition of the state
|
|
11
|
+
*
|
|
12
|
+
* @see https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html
|
|
13
|
+
*/
|
|
14
|
+
readonly stateJson: {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* State defined by supplying Amazon States Language (ASL) in the state machine.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
export declare class CustomState extends State implements IChainable, INextable {
|
|
23
|
+
readonly endStates: INextable[];
|
|
24
|
+
/**
|
|
25
|
+
* Amazon States Language (JSON-based) definition of the state
|
|
26
|
+
*/
|
|
27
|
+
private readonly stateJson;
|
|
28
|
+
constructor(scope: Construct, id: string, props: CustomStateProps);
|
|
29
|
+
/**
|
|
30
|
+
* Add retry configuration for this state
|
|
31
|
+
*
|
|
32
|
+
* This controls if and how the execution will be retried if a particular
|
|
33
|
+
* error occurs.
|
|
34
|
+
*/
|
|
35
|
+
addRetry(props?: RetryProps): CustomState;
|
|
36
|
+
/**
|
|
37
|
+
* Add a recovery handler for this state
|
|
38
|
+
*
|
|
39
|
+
* When a particular error occurs, execution will continue at the error
|
|
40
|
+
* handler instead of failing the state machine execution.
|
|
41
|
+
*/
|
|
42
|
+
addCatch(handler: IChainable, props?: CatchProps): CustomState;
|
|
43
|
+
/**
|
|
44
|
+
* Continue normal execution with the given state
|
|
45
|
+
*/
|
|
46
|
+
next(next: IChainable): Chain;
|
|
47
|
+
/**
|
|
48
|
+
* Returns the Amazon States Language object for this state
|
|
49
|
+
*/
|
|
50
|
+
toStateJson(): object;
|
|
51
|
+
private hasMultipleRetrySources;
|
|
52
|
+
private hasMultipleCatchSources;
|
|
53
|
+
private addMultipleRetrySourcesWarning;
|
|
54
|
+
private addMultipleCatchSourcesWarning;
|
|
55
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CustomState = void 0;
|
|
5
|
+
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
6
|
+
// https://github.com/aws/aws-cdk/blob/v2.160.0/packages/aws-cdk-lib/aws-stepfunctions/lib/states/custom-state.ts
|
|
7
|
+
const cdktf_1 = require("cdktf");
|
|
8
|
+
const __1 = require("..");
|
|
9
|
+
const state_1 = require("./state");
|
|
10
|
+
/**
|
|
11
|
+
* State defined by supplying Amazon States Language (ASL) in the state machine.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
class CustomState extends state_1.State {
|
|
15
|
+
constructor(scope, id, props) {
|
|
16
|
+
super(scope, id, {});
|
|
17
|
+
this.endStates = [this];
|
|
18
|
+
this.stateJson = props.stateJson;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Add retry configuration for this state
|
|
22
|
+
*
|
|
23
|
+
* This controls if and how the execution will be retried if a particular
|
|
24
|
+
* error occurs.
|
|
25
|
+
*/
|
|
26
|
+
addRetry(props = {}) {
|
|
27
|
+
super._addRetry(props);
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Add a recovery handler for this state
|
|
32
|
+
*
|
|
33
|
+
* When a particular error occurs, execution will continue at the error
|
|
34
|
+
* handler instead of failing the state machine execution.
|
|
35
|
+
*/
|
|
36
|
+
addCatch(handler, props = {}) {
|
|
37
|
+
super._addCatch(handler.startState, props);
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Continue normal execution with the given state
|
|
42
|
+
*/
|
|
43
|
+
next(next) {
|
|
44
|
+
super.makeNext(next.startState);
|
|
45
|
+
return __1.Chain.sequence(this, next);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns the Amazon States Language object for this state
|
|
49
|
+
*/
|
|
50
|
+
toStateJson() {
|
|
51
|
+
const state = {
|
|
52
|
+
...this.renderNextEnd(),
|
|
53
|
+
...this.stateJson,
|
|
54
|
+
...this.renderRetryCatch(),
|
|
55
|
+
};
|
|
56
|
+
if (this.hasMultipleRetrySources(state)) {
|
|
57
|
+
this.addMultipleRetrySourcesWarning();
|
|
58
|
+
}
|
|
59
|
+
if (this.hasMultipleCatchSources(state)) {
|
|
60
|
+
this.addMultipleCatchSourcesWarning();
|
|
61
|
+
}
|
|
62
|
+
// Retriers and Catchers can be specified directly in the stateJson or indirectly to the construct with addRetry() and addCatch().
|
|
63
|
+
// renderRetryCatch() only renders the indirectly supplied Retriers and Catchers, so we need to manually merge in those directly in the stateJson
|
|
64
|
+
if (Array.isArray(this.stateJson.Retry)) {
|
|
65
|
+
state.Retry = Array.isArray(state.Retry)
|
|
66
|
+
? [...state.Retry, ...this.stateJson.Retry]
|
|
67
|
+
: [...this.stateJson.Retry];
|
|
68
|
+
}
|
|
69
|
+
if (Array.isArray(this.stateJson.Catch)) {
|
|
70
|
+
state.Catch = Array.isArray(state.Catch)
|
|
71
|
+
? [...state.Catch, ...this.stateJson.Catch]
|
|
72
|
+
: [...this.stateJson.Catch];
|
|
73
|
+
}
|
|
74
|
+
return state;
|
|
75
|
+
}
|
|
76
|
+
hasMultipleRetrySources(state) {
|
|
77
|
+
if (!Array.isArray(state.Retry)) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
if (!Array.isArray(this.stateJson.Retry)) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
return state.Retry.length > 0 && this.stateJson.Retry.length > 0;
|
|
84
|
+
}
|
|
85
|
+
hasMultipleCatchSources(state) {
|
|
86
|
+
if (!Array.isArray(state.Catch)) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
if (!Array.isArray(this.stateJson.Catch)) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
return state.Catch.length > 0 && this.stateJson.Catch.length > 0;
|
|
93
|
+
}
|
|
94
|
+
addMultipleRetrySourcesWarning() {
|
|
95
|
+
// "@aws-cdk/aws-stepfunctions:multipleRetrySources", // TODO: CDKTF does not support acknowledgeable warnings
|
|
96
|
+
cdktf_1.Annotations.of(this).addWarning([
|
|
97
|
+
"CustomState constructs can configure state retries using the stateJson property or by using the addRetry() function.",
|
|
98
|
+
"When retries are configured using both of these, the state definition's Retry field is generated ",
|
|
99
|
+
"by first rendering retries from addRetry(), then rendering retries from the stateJson.",
|
|
100
|
+
].join("\n"));
|
|
101
|
+
}
|
|
102
|
+
addMultipleCatchSourcesWarning() {
|
|
103
|
+
// "@aws-cdk/aws-stepfunctions:multipleCatchSources", // TODO: CDKTF does not support acknowledgeable warnings
|
|
104
|
+
cdktf_1.Annotations.of(this).addWarning([
|
|
105
|
+
"CustomState constructs can configure state catchers using the stateJson property or by using the addCatch() function.",
|
|
106
|
+
"When catchers are configured using both of these, the state definition's Catch field is generated ",
|
|
107
|
+
"by first rendering catchers from addCatch(), then rendering catchers from the stateJson.",
|
|
108
|
+
].join("\n"));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
exports.CustomState = CustomState;
|
|
112
|
+
_a = JSII_RTTI_SYMBOL_1;
|
|
113
|
+
CustomState[_a] = { fqn: "terraconstructs.aws.compute.CustomState", version: "0.0.8" };
|
|
114
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLXN0YXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2F3cy9jb21wdXRlL3N0YXRlcy9jdXN0b20tc3RhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxpSEFBaUg7QUFFakgsaUNBQW9DO0FBRXBDLDBCQUEyQjtBQUMzQixtQ0FBZ0M7QUFlaEM7OztHQUdHO0FBQ0gsTUFBYSxXQUFZLFNBQVEsYUFBSztJQVFwQyxZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLEtBQXVCO1FBQy9ELEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxFQUFFLEVBQUUsQ0FBQyxDQUFDO1FBRXJCLElBQUksQ0FBQyxTQUFTLEdBQUcsQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUN4QixJQUFJLENBQUMsU0FBUyxHQUFHLEtBQUssQ0FBQyxTQUFTLENBQUM7SUFDbkMsQ0FBQztJQUVEOzs7OztPQUtHO0lBQ0ksUUFBUSxDQUFDLFFBQW9CLEVBQUU7UUFDcEMsS0FBSyxDQUFDLFNBQVMsQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUN2QixPQUFPLElBQUksQ0FBQztJQUNkLENBQUM7SUFFRDs7Ozs7T0FLRztJQUNJLFFBQVEsQ0FBQyxPQUFtQixFQUFFLFFBQW9CLEVBQUU7UUFDekQsS0FBSyxDQUFDLFNBQVMsQ0FBQyxPQUFPLENBQUMsVUFBVSxFQUFFLEtBQUssQ0FBQyxDQUFDO1FBQzNDLE9BQU8sS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64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for ItemBatcher configuration properties
|
|
3
|
+
*/
|
|
4
|
+
export interface ItemBatcherProps {
|
|
5
|
+
/**
|
|
6
|
+
* MaxItemsPerBatch
|
|
7
|
+
*
|
|
8
|
+
* Specifies the maximum number of items that each child workflow execution processes, as static number
|
|
9
|
+
*
|
|
10
|
+
* @default - uses value of `maxItemsPerBatchPath` as the max items per batch,
|
|
11
|
+
* no limits on the number of items in a batch under the 256KB limit if that property was also not provided
|
|
12
|
+
*/
|
|
13
|
+
readonly maxItemsPerBatch?: number;
|
|
14
|
+
/**
|
|
15
|
+
* MaxItemsPerBatchPath
|
|
16
|
+
*
|
|
17
|
+
* Specifies the maximum number of items that each child workflow execution processes, as JsonPath
|
|
18
|
+
*
|
|
19
|
+
* @default - uses value of `maxItemsPerBatch` as the max items per batch,
|
|
20
|
+
* no limits on the number of items in a batch under the 256KB limit if that property was also not provided
|
|
21
|
+
*/
|
|
22
|
+
readonly maxItemsPerBatchPath?: string;
|
|
23
|
+
/**
|
|
24
|
+
* MaxInputBytesPerBatch
|
|
25
|
+
*
|
|
26
|
+
* Specifies the maximum number of bytes that each child workflow execution processes, as static number
|
|
27
|
+
*
|
|
28
|
+
* @default - uses value of `maxInputBytesPerBatchPath` as the max size per batch,
|
|
29
|
+
* no limits on the batch size under the 256KB limit if that property was also not provided
|
|
30
|
+
*/
|
|
31
|
+
readonly maxInputBytesPerBatch?: number;
|
|
32
|
+
/**
|
|
33
|
+
* MaxInputBytesPerBatchPath
|
|
34
|
+
*
|
|
35
|
+
* Specifies the maximum number of bytes that each child workflow execution processes, as JsonPath
|
|
36
|
+
*
|
|
37
|
+
* @default - uses value of `maxInputBytesPerBatch` as the max size per batch,
|
|
38
|
+
* no limits on the batch size under the 256KB limit if that property was also not provided
|
|
39
|
+
*/
|
|
40
|
+
readonly maxInputBytesPerBatchPath?: string;
|
|
41
|
+
/**
|
|
42
|
+
* BatchInput
|
|
43
|
+
*
|
|
44
|
+
* Fixed JSON input to include in each batch passed to each child workflow execution
|
|
45
|
+
*
|
|
46
|
+
* @default - No batchInput
|
|
47
|
+
*/
|
|
48
|
+
readonly batchInput?: object;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Configuration for processing a group of items in a single child workflow execution
|
|
52
|
+
*/
|
|
53
|
+
export declare class ItemBatcher {
|
|
54
|
+
private props;
|
|
55
|
+
constructor(props: ItemBatcherProps);
|
|
56
|
+
/**
|
|
57
|
+
* Render ItemBatcher in ASL JSON format
|
|
58
|
+
*/
|
|
59
|
+
render(): any;
|
|
60
|
+
/**
|
|
61
|
+
* Validate this ItemBatcher
|
|
62
|
+
*/
|
|
63
|
+
validateItemBatcher(): string[];
|
|
64
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ItemBatcher = void 0;
|
|
5
|
+
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for processing a group of items in a single child workflow execution
|
|
8
|
+
*/
|
|
9
|
+
class ItemBatcher {
|
|
10
|
+
constructor(props) {
|
|
11
|
+
this.props = props;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Render ItemBatcher in ASL JSON format
|
|
15
|
+
*/
|
|
16
|
+
render() {
|
|
17
|
+
return {
|
|
18
|
+
...(this.props.maxItemsPerBatch && {
|
|
19
|
+
MaxItemsPerBatch: this.props.maxItemsPerBatch,
|
|
20
|
+
}),
|
|
21
|
+
...(this.props.maxItemsPerBatchPath && {
|
|
22
|
+
MaxItemsPerBatchPath: this.props.maxItemsPerBatchPath,
|
|
23
|
+
}),
|
|
24
|
+
...(this.props.maxInputBytesPerBatch && {
|
|
25
|
+
MaxInputBytesPerBatch: this.props.maxInputBytesPerBatch,
|
|
26
|
+
}),
|
|
27
|
+
...(this.props.maxInputBytesPerBatchPath && {
|
|
28
|
+
MaxInputBytesPerBatchPath: this.props.maxInputBytesPerBatchPath,
|
|
29
|
+
}),
|
|
30
|
+
...(this.props.batchInput && { BatchInput: this.props.batchInput }),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Validate this ItemBatcher
|
|
35
|
+
*/
|
|
36
|
+
validateItemBatcher() {
|
|
37
|
+
const errors = [];
|
|
38
|
+
if (this.props.maxItemsPerBatch && this.props.maxItemsPerBatchPath) {
|
|
39
|
+
errors.push("Provide either `maxItemsPerBatch` or `maxItemsPerBatchPath`, but not both");
|
|
40
|
+
}
|
|
41
|
+
if (this.props.maxInputBytesPerBatch &&
|
|
42
|
+
this.props.maxInputBytesPerBatchPath) {
|
|
43
|
+
errors.push("Provide either `maxInputBytesPerBatch` or `maxInputBytesPerBatchPath`, but not both");
|
|
44
|
+
}
|
|
45
|
+
if (!this.props.maxItemsPerBatch &&
|
|
46
|
+
!this.props.maxItemsPerBatchPath &&
|
|
47
|
+
!this.props.maxInputBytesPerBatch &&
|
|
48
|
+
!this.props.maxInputBytesPerBatchPath &&
|
|
49
|
+
!this.props.batchInput) {
|
|
50
|
+
errors.push("Provide at least one value to the ItemBatcher");
|
|
51
|
+
}
|
|
52
|
+
return errors;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.ItemBatcher = ItemBatcher;
|
|
56
|
+
_a = JSII_RTTI_SYMBOL_1;
|
|
57
|
+
ItemBatcher[_a] = { fqn: "terraconstructs.aws.compute.ItemBatcher", version: "0.0.8" };
|
|
58
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXRlbS1iYXRjaGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2F3cy9jb21wdXRlL3N0YXRlcy9kaXN0cmlidXRlZC1tYXAvaXRlbS1iYXRjaGVyLnRzIl0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gfVxuXG4gICAgaWYgKFxuICAgICAgIXRoaXMucHJvcHMubWF4SXRlbXNQZXJCYXRjaCAmJlxuICAgICAgIXRoaXMucHJvcHMubWF4SXRlbXNQZXJCYXRjaFBhdGggJiZcbiAgICAgICF0aGlzLnByb3BzLm1heElucHV0Qnl0ZXNQZXJCYXRjaCAmJlxuICAgICAgIXRoaXMucHJvcHMubWF4SW5wdXRCeXRlc1BlckJhdGNoUGF0aCAmJlxuICAgICAgIXRoaXMucHJvcHMuYmF0Y2hJbnB1dFxuICAgICkge1xuICAgICAgZXJyb3JzLnB1c2goXCJQcm92aWRlIGF0IGxlYXN0IG9uZSB2YWx1ZSB0byB0aGUgSXRlbUJhdGNoZXJcIik7XG4gICAgfVxuXG4gICAgcmV0dXJuIGVycm9ycztcbiAgfVxufVxuIl19
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { Construct } from "constructs";
|
|
2
|
+
import * as iam from "../../../iam";
|
|
3
|
+
import { IBucket } from "../../../storage";
|
|
4
|
+
/**
|
|
5
|
+
* Base interface for Item Reader configurations
|
|
6
|
+
*/
|
|
7
|
+
export interface IItemReader {
|
|
8
|
+
/**
|
|
9
|
+
* S3 Bucket containing objects to iterate over or a file with a list to iterate over
|
|
10
|
+
*/
|
|
11
|
+
readonly bucket?: IBucket;
|
|
12
|
+
/**
|
|
13
|
+
* S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath
|
|
14
|
+
*/
|
|
15
|
+
readonly bucketNamePath?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The Amazon S3 API action that Step Functions must invoke depending on the specified dataset.
|
|
18
|
+
*/
|
|
19
|
+
readonly resource: string;
|
|
20
|
+
/**
|
|
21
|
+
* Limits the number of items passed to the Distributed Map state
|
|
22
|
+
*
|
|
23
|
+
* @default - Distributed Map state will iterate over all items provided by the ItemReader
|
|
24
|
+
*/
|
|
25
|
+
readonly maxItems?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Render the ItemReader as JSON object
|
|
28
|
+
*/
|
|
29
|
+
render(): any;
|
|
30
|
+
/**
|
|
31
|
+
* Compile policy statements to provide relevent permissions to the state machine
|
|
32
|
+
*/
|
|
33
|
+
providePolicyStatements(): iam.PolicyStatement[];
|
|
34
|
+
/**
|
|
35
|
+
* Validate that ItemReader contains exactly either @see bucket or @see bucketNamePath
|
|
36
|
+
*/
|
|
37
|
+
validateItemReader(): string[];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Base interface for Item Reader configuration properties
|
|
41
|
+
*/
|
|
42
|
+
export interface ItemReaderProps {
|
|
43
|
+
/**
|
|
44
|
+
* S3 Bucket containing objects to iterate over or a file with a list to iterate over
|
|
45
|
+
*
|
|
46
|
+
* @default - S3 bucket will be determined from @see bucketNamePath
|
|
47
|
+
*/
|
|
48
|
+
readonly bucket?: IBucket;
|
|
49
|
+
/**
|
|
50
|
+
* S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath
|
|
51
|
+
*
|
|
52
|
+
* @default - S3 bucket will be determined from @see bucket
|
|
53
|
+
*/
|
|
54
|
+
readonly bucketNamePath?: string;
|
|
55
|
+
/**
|
|
56
|
+
* S3 bucket name scope, only required if @see bucketNamePath is provided
|
|
57
|
+
*/
|
|
58
|
+
readonly bucketNameScope?: Construct;
|
|
59
|
+
/**
|
|
60
|
+
* Limits the number of items passed to the Distributed Map state
|
|
61
|
+
*
|
|
62
|
+
* @default - Distributed Map state will iterate over all items provided by the ItemReader
|
|
63
|
+
*/
|
|
64
|
+
readonly maxItems?: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Properties for configuring an Item Reader that iterates over objects in an S3 bucket
|
|
68
|
+
*/
|
|
69
|
+
export interface S3ObjectsItemReaderProps extends ItemReaderProps {
|
|
70
|
+
/**
|
|
71
|
+
* S3 prefix used to limit objects to iterate over
|
|
72
|
+
*
|
|
73
|
+
* @default - No prefix
|
|
74
|
+
*/
|
|
75
|
+
readonly prefix?: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Item Reader configuration for iterating over objects in an S3 bucket
|
|
79
|
+
*/
|
|
80
|
+
export declare class S3ObjectsItemReader implements IItemReader {
|
|
81
|
+
/**
|
|
82
|
+
* S3 Bucket containing objects to iterate over
|
|
83
|
+
*/
|
|
84
|
+
readonly bucket?: IBucket;
|
|
85
|
+
/**
|
|
86
|
+
* S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath
|
|
87
|
+
*/
|
|
88
|
+
readonly bucketNamePath?: string;
|
|
89
|
+
/**
|
|
90
|
+
* ARN for the `listObjectsV2` method of the S3 API
|
|
91
|
+
* This API method is used to iterate all objects in the S3 bucket/prefix
|
|
92
|
+
*/
|
|
93
|
+
readonly resource: string;
|
|
94
|
+
/**
|
|
95
|
+
* S3 prefix used to limit objects to iterate over
|
|
96
|
+
*
|
|
97
|
+
* @default - No prefix
|
|
98
|
+
*/
|
|
99
|
+
readonly prefix?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Limits the number of items passed to the Distributed Map state
|
|
102
|
+
*
|
|
103
|
+
* @default - Distributed Map state will iterate over all items provided by the ItemReader
|
|
104
|
+
*/
|
|
105
|
+
readonly maxItems?: number;
|
|
106
|
+
/**
|
|
107
|
+
* S3 bucket name scope
|
|
108
|
+
*/
|
|
109
|
+
readonly bucketNameScope?: Construct;
|
|
110
|
+
protected get partition(): string;
|
|
111
|
+
constructor(props: S3ObjectsItemReaderProps);
|
|
112
|
+
/**
|
|
113
|
+
* Renders the ItemReader configuration as JSON object
|
|
114
|
+
* @returns - JSON object
|
|
115
|
+
*/
|
|
116
|
+
render(): any;
|
|
117
|
+
/**
|
|
118
|
+
* Compile policy statements to provide relevent permissions to the state machine
|
|
119
|
+
*/
|
|
120
|
+
providePolicyStatements(): iam.PolicyStatement[];
|
|
121
|
+
/**
|
|
122
|
+
* Validate that ItemReader contains exactly either @see bucket or @see bucketNamePath
|
|
123
|
+
*/
|
|
124
|
+
validateItemReader(): string[];
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Base interface for Item Reader configuration properties the iterate over entries in a S3 file
|
|
128
|
+
*/
|
|
129
|
+
export interface S3FileItemReaderProps extends ItemReaderProps {
|
|
130
|
+
/**
|
|
131
|
+
* Key of file stored in S3 bucket containing an array to iterate over
|
|
132
|
+
*/
|
|
133
|
+
readonly key: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Base Item Reader configuration for iterating over entries in a S3 file
|
|
137
|
+
*/
|
|
138
|
+
declare abstract class S3FileItemReader implements IItemReader {
|
|
139
|
+
/**
|
|
140
|
+
* S3 Bucket containing a file with a list to iterate over
|
|
141
|
+
*/
|
|
142
|
+
readonly bucket?: IBucket;
|
|
143
|
+
/**
|
|
144
|
+
* S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath
|
|
145
|
+
*/
|
|
146
|
+
readonly bucketNamePath?: string;
|
|
147
|
+
/**
|
|
148
|
+
* S3 key of a file with a list to iterate over
|
|
149
|
+
*/
|
|
150
|
+
readonly key: string;
|
|
151
|
+
/**
|
|
152
|
+
* ARN for the `getObject` method of the S3 API
|
|
153
|
+
* This API method is used to iterate all objects in the S3 bucket/prefix
|
|
154
|
+
*/
|
|
155
|
+
readonly resource: string;
|
|
156
|
+
/**
|
|
157
|
+
* Limits the number of items passed to the Distributed Map state
|
|
158
|
+
*
|
|
159
|
+
* @default - No maxItems
|
|
160
|
+
*/
|
|
161
|
+
readonly maxItems?: number;
|
|
162
|
+
/**
|
|
163
|
+
* S3 bucket name scope
|
|
164
|
+
*/
|
|
165
|
+
readonly bucketNameScope?: Construct;
|
|
166
|
+
protected get partition(): string;
|
|
167
|
+
protected abstract readonly inputType: string;
|
|
168
|
+
constructor(props: S3FileItemReaderProps);
|
|
169
|
+
/**
|
|
170
|
+
* Renders the ItemReader configuration as JSON object
|
|
171
|
+
* @returns - JSON object
|
|
172
|
+
*/
|
|
173
|
+
render(): any;
|
|
174
|
+
/**
|
|
175
|
+
* Compile policy statements to provide relevent permissions to the state machine
|
|
176
|
+
*/
|
|
177
|
+
providePolicyStatements(): iam.PolicyStatement[];
|
|
178
|
+
/**
|
|
179
|
+
* Validate that ItemReader contains exactly either @see bucket or @see bucketNamePath and @see bucketNameScope
|
|
180
|
+
*/
|
|
181
|
+
validateItemReader(): string[];
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Item Reader configuration for iterating over items in a JSON array stored in a S3 file
|
|
185
|
+
*/
|
|
186
|
+
export declare class S3JsonItemReader extends S3FileItemReader {
|
|
187
|
+
protected readonly inputType: string;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* CSV header location options
|
|
191
|
+
*/
|
|
192
|
+
export declare enum CsvHeaderLocation {
|
|
193
|
+
/**
|
|
194
|
+
* Headers will be read from first row of CSV file
|
|
195
|
+
*/
|
|
196
|
+
FIRST_ROW = "FIRST_ROW",
|
|
197
|
+
/**
|
|
198
|
+
* Headers are provided in CSVHeaders property
|
|
199
|
+
*/
|
|
200
|
+
GIVEN = "GIVEN"
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Configuration for CSV header options for a CSV Item Reader
|
|
204
|
+
*/
|
|
205
|
+
export declare class CsvHeaders {
|
|
206
|
+
/**
|
|
207
|
+
* Configures S3CsvItemReader to read headers from the first row of the CSV file
|
|
208
|
+
* @returns - CsvHeaders
|
|
209
|
+
*/
|
|
210
|
+
static useFirstRow(): CsvHeaders;
|
|
211
|
+
/**
|
|
212
|
+
* Configures S3CsvItemReader to use the headers provided in the `headers` parameter
|
|
213
|
+
* @param headers - List of headers
|
|
214
|
+
* @returns - CsvHeaders
|
|
215
|
+
*/
|
|
216
|
+
static use(headers: string[]): CsvHeaders;
|
|
217
|
+
/**
|
|
218
|
+
* Location of headers in CSV file
|
|
219
|
+
*/
|
|
220
|
+
readonly headerLocation: CsvHeaderLocation;
|
|
221
|
+
/**
|
|
222
|
+
* List of headers if `headerLocation` is `GIVEN`
|
|
223
|
+
*/
|
|
224
|
+
readonly headers?: string[];
|
|
225
|
+
private constructor();
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Properties for configuring an Item Reader that iterates over items in a CSV file in S3
|
|
229
|
+
*/
|
|
230
|
+
export interface S3CsvItemReaderProps extends S3FileItemReaderProps {
|
|
231
|
+
/**
|
|
232
|
+
* CSV file header configuration
|
|
233
|
+
*
|
|
234
|
+
* @default - CsvHeaders with CsvHeadersLocation.FIRST_ROW
|
|
235
|
+
*/
|
|
236
|
+
readonly csvHeaders?: CsvHeaders;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Item Reader configuration for iterating over items in a CSV file stored in S3
|
|
240
|
+
*/
|
|
241
|
+
export declare class S3CsvItemReader extends S3FileItemReader {
|
|
242
|
+
/**
|
|
243
|
+
* CSV headers configuration
|
|
244
|
+
*/
|
|
245
|
+
readonly csvHeaders: CsvHeaders;
|
|
246
|
+
protected readonly inputType: string;
|
|
247
|
+
constructor(props: S3CsvItemReaderProps);
|
|
248
|
+
render(): any;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Item Reader configuration for iterating over items in a S3 inventory manifest file stored in S3
|
|
252
|
+
*/
|
|
253
|
+
export declare class S3ManifestItemReader extends S3FileItemReader {
|
|
254
|
+
protected readonly inputType: string;
|
|
255
|
+
}
|
|
256
|
+
export {};
|