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,668 @@
|
|
|
1
|
+
import { IDependable } from "constructs";
|
|
2
|
+
import { IOpenIdConnectProvider } from "./oidc-provider";
|
|
3
|
+
import { IPolicyDocument } from "./policy-document";
|
|
4
|
+
import { PolicyStatement, Condition, Conditions } from "./policy-statement";
|
|
5
|
+
import { ISamlProvider } from "./saml-provider";
|
|
6
|
+
/**
|
|
7
|
+
* Terraform Principal Props
|
|
8
|
+
*
|
|
9
|
+
* The `principals` and `not_principals` blocks of a policy statement
|
|
10
|
+
*
|
|
11
|
+
* Ref: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#principals-and-not_principals
|
|
12
|
+
*/
|
|
13
|
+
export interface PrincipalProps {
|
|
14
|
+
/**
|
|
15
|
+
* List of identifiers for principals.
|
|
16
|
+
*
|
|
17
|
+
* When type is AWS, these are IAM principal ARNs, e.g., arn:aws:iam::12345678901:role/yak-role.
|
|
18
|
+
*
|
|
19
|
+
* When type is Service, these are AWS Service roles, e.g., lambda.amazonaws.com.
|
|
20
|
+
*
|
|
21
|
+
* When type is Federated, these are web identity users or SAML provider ARNs,
|
|
22
|
+
* e.g., accounts.google.com or arn:aws:iam::12345678901:saml-provider/yak-saml-provider.
|
|
23
|
+
*
|
|
24
|
+
* When type is CanonicalUser, these are canonical user IDs,
|
|
25
|
+
* e.g., 79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be.
|
|
26
|
+
*
|
|
27
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/aws/5.68.0/docs/data-sources/iam_policy_document#identifiers DataAwsIamPolicyDocument#identifiers}
|
|
28
|
+
*/
|
|
29
|
+
readonly identifiers: string[];
|
|
30
|
+
/**
|
|
31
|
+
* Type of principal.
|
|
32
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/aws/5.68.0/docs/data-sources/iam_policy_document#type DataAwsIamPolicyDocument#type}
|
|
33
|
+
*/
|
|
34
|
+
readonly type: PrincipalType;
|
|
35
|
+
}
|
|
36
|
+
export declare enum PrincipalType {
|
|
37
|
+
AWS = "AWS",
|
|
38
|
+
FEDERATED = "Federated",
|
|
39
|
+
SERVICE = "Service",
|
|
40
|
+
CANONICALUSER = "CanonicalUser",
|
|
41
|
+
ANY = "*"
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Any object that has an associated principal that a permission can be granted to
|
|
45
|
+
*/
|
|
46
|
+
export interface IGrantable {
|
|
47
|
+
/**
|
|
48
|
+
* The principal to grant permissions to
|
|
49
|
+
*/
|
|
50
|
+
readonly grantPrincipal: IPrincipal;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Represents a logical IAM principal.
|
|
54
|
+
*
|
|
55
|
+
* An IPrincipal describes a logical entity that can perform AWS API calls
|
|
56
|
+
* against sets of resources, optionally under certain conditions.
|
|
57
|
+
*
|
|
58
|
+
* Examples of simple principals are IAM objects that you create, such
|
|
59
|
+
* as Users or Roles.
|
|
60
|
+
*
|
|
61
|
+
* An example of a more complex principals is a `ServicePrincipal` (such as
|
|
62
|
+
* `new ServicePrincipal("sns.amazonaws.com")`, which represents the Simple
|
|
63
|
+
* Notifications Service).
|
|
64
|
+
*
|
|
65
|
+
* A single logical Principal may also map to a set of physical principals.
|
|
66
|
+
* For example, `new OrganizationPrincipal('o-1234')` represents all
|
|
67
|
+
* identities that are part of the given AWS Organization.
|
|
68
|
+
*/
|
|
69
|
+
export interface IPrincipal extends IGrantable {
|
|
70
|
+
/**
|
|
71
|
+
* When this Principal is used in an AssumeRole policy, the action to use.
|
|
72
|
+
*/
|
|
73
|
+
readonly assumeRoleAction: string;
|
|
74
|
+
/**
|
|
75
|
+
* Return the policy fragment that identifies this principal in a Policy.
|
|
76
|
+
*/
|
|
77
|
+
readonly policyFragment: PrincipalPolicyFragment;
|
|
78
|
+
/**
|
|
79
|
+
* The AWS account ID of this principal.
|
|
80
|
+
* Can be undefined when the account is not known
|
|
81
|
+
* (for example, for service principals).
|
|
82
|
+
* Can be a Token - in that case,
|
|
83
|
+
* it's assumed to be a reference to the DataAwsCallerIdentity
|
|
84
|
+
*/
|
|
85
|
+
readonly principalAccount?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Add to the policy of this principal.
|
|
88
|
+
*
|
|
89
|
+
* @returns true if the statement was added, false if the principal in
|
|
90
|
+
* question does not have a policy document to add the statement to.
|
|
91
|
+
*
|
|
92
|
+
* @deprecated Use `addToPrincipalPolicy` instead.
|
|
93
|
+
*/
|
|
94
|
+
addToPolicy(statement: PolicyStatement): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Add to the policy of this principal.
|
|
97
|
+
*/
|
|
98
|
+
addToPrincipalPolicy(statement: PolicyStatement): AddToPrincipalPolicyResult;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* A collection of the fields in a PolicyStatement that can be used to identify a principal.
|
|
102
|
+
*
|
|
103
|
+
* This consists of the Terraform PrincipalProps representing the
|
|
104
|
+
* `principals` block(s) in a policy statement.
|
|
105
|
+
*
|
|
106
|
+
* Generally, AWS principal JSON looks like:
|
|
107
|
+
*
|
|
108
|
+
* { '<TYPE>': ['ID', 'ID', ...] }
|
|
109
|
+
*
|
|
110
|
+
* And this is also the type of the field `principalJson`.
|
|
111
|
+
*
|
|
112
|
+
* However, there is a special type of principal that is just the string '*',
|
|
113
|
+
* which is treated differently by some services.
|
|
114
|
+
*
|
|
115
|
+
* To represent that principal, `principalJson` should contain `*`.
|
|
116
|
+
* To represent that principal in Terraform principals block(s), the
|
|
117
|
+
* type should be `PrincipalType.ANY` and the identifiers should be `['*']`.
|
|
118
|
+
*/
|
|
119
|
+
export declare class PrincipalPolicyFragment {
|
|
120
|
+
readonly principals: Array<PrincipalProps>;
|
|
121
|
+
/**
|
|
122
|
+
* The conditions under which the policy is in effect.
|
|
123
|
+
* See [the IAM documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html).
|
|
124
|
+
*/
|
|
125
|
+
readonly conditions: Conditions;
|
|
126
|
+
/**
|
|
127
|
+
* Parses a JSON object with the AWS IAM Principal structure
|
|
128
|
+
*
|
|
129
|
+
* Refer to the `fromPrincipalJson` and `fromConditionJson` functions for more information
|
|
130
|
+
*/
|
|
131
|
+
static fromJson(principalJson: any, conditionsJson?: {
|
|
132
|
+
[key: string]: any;
|
|
133
|
+
}): PrincipalPolicyFragment;
|
|
134
|
+
get principalJson(): AwsPrincipalJson;
|
|
135
|
+
get conditionsJson(): {
|
|
136
|
+
[key: string]: any;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
*
|
|
140
|
+
* @param principals Array of "principals" block in a policy statement
|
|
141
|
+
* @param conditions conditions that need to be applied to this policy
|
|
142
|
+
*/
|
|
143
|
+
constructor(principals: Array<PrincipalProps>,
|
|
144
|
+
/**
|
|
145
|
+
* The conditions under which the policy is in effect.
|
|
146
|
+
* See [the IAM documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html).
|
|
147
|
+
*/
|
|
148
|
+
conditions?: Conditions);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Typed representation of AWS Principal JSON
|
|
152
|
+
*/
|
|
153
|
+
export type AwsPrincipalJson = string | {
|
|
154
|
+
[key: string]: string | string[];
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Read from AWS Principal JSON to Terraform principals block(s)
|
|
158
|
+
*
|
|
159
|
+
* Handles special case: if principal is "*" and turns it into the `StarPrincipal`,
|
|
160
|
+
*
|
|
161
|
+
* Even though the IAM Documentation states that "Principal": "*" and "Principal": {"AWS": "*"} are equivalent,
|
|
162
|
+
* those principal elements have different behavior in some situations, e.g., IAM Role Trust Policy.
|
|
163
|
+
*
|
|
164
|
+
* To have Terraform render JSON containing "Principal": "*", use type = "*" and identifiers = ["*"].
|
|
165
|
+
* To have Terraform render JSON containing "Principal": {"AWS": "*"}, use type = "AWS" and identifiers = ["*"].
|
|
166
|
+
*/
|
|
167
|
+
export declare function fromPrincipalJson(principalJson?: any): PrincipalProps[];
|
|
168
|
+
/**
|
|
169
|
+
* Convert Terraform principals blocks back to AWS Principal JSON
|
|
170
|
+
*/
|
|
171
|
+
export declare function toPrincipalJson(...principalProps: PrincipalProps[]): AwsPrincipalJson;
|
|
172
|
+
/**
|
|
173
|
+
* A type of principal that has more control over its own representation in AssumeRolePolicyDocuments
|
|
174
|
+
*
|
|
175
|
+
* More complex types of identity providers need more control over Role's policy documents
|
|
176
|
+
* than simply `{ Effect: 'Allow', Action: 'AssumeRole', Principal: <Whatever> }`.
|
|
177
|
+
*
|
|
178
|
+
* If that control is necessary, they can implement `IAssumeRolePrincipal` to get full
|
|
179
|
+
* access to a Role's AssumeRolePolicyDocument.
|
|
180
|
+
*/
|
|
181
|
+
export interface IAssumeRolePrincipal extends IPrincipal {
|
|
182
|
+
/**
|
|
183
|
+
* Add the principal to the AssumeRolePolicyDocument
|
|
184
|
+
*
|
|
185
|
+
* Add the statements to the AssumeRolePolicyDocument necessary to give this principal
|
|
186
|
+
* permissions to assume the given role.
|
|
187
|
+
*/
|
|
188
|
+
addToAssumeRolePolicy(document: IPolicyDocument): void;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Result of calling `addToPrincipalPolicy`
|
|
192
|
+
*/
|
|
193
|
+
export interface AddToPrincipalPolicyResult {
|
|
194
|
+
/**
|
|
195
|
+
* Whether the statement was added to the identity's policies.
|
|
196
|
+
*
|
|
197
|
+
*/
|
|
198
|
+
readonly statementAdded: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Dependable which allows depending on the policy change being applied
|
|
201
|
+
*
|
|
202
|
+
* @default - Required if `statementAdded` is true.
|
|
203
|
+
*/
|
|
204
|
+
readonly policyDependable?: IDependable;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Base class for policy principals
|
|
208
|
+
*/
|
|
209
|
+
export declare abstract class PrincipalBase implements IAssumeRolePrincipal {
|
|
210
|
+
readonly grantPrincipal: IPrincipal;
|
|
211
|
+
readonly principalAccount: string | undefined;
|
|
212
|
+
/**
|
|
213
|
+
* Return the policy fragment that identifies this principal in a Policy.
|
|
214
|
+
*/
|
|
215
|
+
abstract readonly policyFragment: PrincipalPolicyFragment;
|
|
216
|
+
/**
|
|
217
|
+
* When this Principal is used in an AssumeRole policy, the action to use.
|
|
218
|
+
*/
|
|
219
|
+
readonly assumeRoleAction: string;
|
|
220
|
+
addToPolicy(statement: PolicyStatement): boolean;
|
|
221
|
+
addToPrincipalPolicy(_statement: PolicyStatement): AddToPrincipalPolicyResult;
|
|
222
|
+
addToAssumeRolePolicy(document: IPolicyDocument): void;
|
|
223
|
+
toString(): string;
|
|
224
|
+
/**
|
|
225
|
+
* JSON-ify the principal
|
|
226
|
+
*
|
|
227
|
+
* Used when JSON.stringify() is called
|
|
228
|
+
*/
|
|
229
|
+
toJSON(): AwsPrincipalJson;
|
|
230
|
+
/**
|
|
231
|
+
* Returns a new PrincipalWithConditions using this principal as the base, with the
|
|
232
|
+
* passed conditions added.
|
|
233
|
+
*
|
|
234
|
+
* When there is a value for the same operator and key in both the principal and the
|
|
235
|
+
* conditions parameter, the value from the conditions parameter will be used.
|
|
236
|
+
*
|
|
237
|
+
* @returns a new PrincipalWithConditions object.
|
|
238
|
+
*/
|
|
239
|
+
withConditions(...conditions: Conditions): PrincipalBase;
|
|
240
|
+
/**
|
|
241
|
+
* Returns a new principal using this principal as the base, with session tags enabled.
|
|
242
|
+
*
|
|
243
|
+
* @returns a new SessionTagsPrincipal object.
|
|
244
|
+
*/
|
|
245
|
+
withSessionTags(): PrincipalBase;
|
|
246
|
+
/**
|
|
247
|
+
* Return whether or not this principal is equal to the given principal
|
|
248
|
+
*/
|
|
249
|
+
abstract dedupeString(): string | undefined;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Specify a principal by the Amazon Resource Name (ARN).
|
|
253
|
+
* You can specify AWS accounts, IAM users, Federated SAML users, IAM roles, and specific assumed-role sessions.
|
|
254
|
+
* You cannot specify IAM groups or instance profiles as principals
|
|
255
|
+
*
|
|
256
|
+
* @see https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html
|
|
257
|
+
*/
|
|
258
|
+
export declare class ArnPrincipal extends PrincipalBase {
|
|
259
|
+
readonly arn: string;
|
|
260
|
+
/**
|
|
261
|
+
*
|
|
262
|
+
* @param arn Amazon Resource Name (ARN) of the principal entity (i.e. arn:aws:iam::123456789012:user/user-name)
|
|
263
|
+
*/
|
|
264
|
+
constructor(arn: string);
|
|
265
|
+
get policyFragment(): PrincipalPolicyFragment;
|
|
266
|
+
toString(): string;
|
|
267
|
+
/**
|
|
268
|
+
* A convenience method for adding a condition that the principal is part of the specified
|
|
269
|
+
* AWS Organization.
|
|
270
|
+
*/
|
|
271
|
+
inOrganization(organizationId: string): PrincipalBase;
|
|
272
|
+
dedupeString(): string | undefined;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Specify AWS account ID as the principal entity in a policy to delegate authority to the account.
|
|
276
|
+
*/
|
|
277
|
+
export declare class AccountPrincipal extends ArnPrincipal {
|
|
278
|
+
readonly accountId: any;
|
|
279
|
+
readonly principalAccount: string | undefined;
|
|
280
|
+
/**
|
|
281
|
+
*
|
|
282
|
+
* @param accountId AWS account ID (i.e. '123456789012')
|
|
283
|
+
*/
|
|
284
|
+
constructor(accountId: any);
|
|
285
|
+
toString(): string;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Options for a service principal.
|
|
289
|
+
*/
|
|
290
|
+
export interface ServicePrincipalOpts {
|
|
291
|
+
/**
|
|
292
|
+
* The region in which you want to reference the service
|
|
293
|
+
*
|
|
294
|
+
* This is only necessary for *cross-region* references.
|
|
295
|
+
*
|
|
296
|
+
* Note: We always return the full service principal name, including the region.
|
|
297
|
+
* Normally, the region is only required for *opt-in* regions. In those
|
|
298
|
+
* cases, the region name needs to be included to reference the correct service principal.
|
|
299
|
+
* In all other cases, the global service principal name is sufficient.
|
|
300
|
+
*
|
|
301
|
+
* @default - the resolving Stack's region.
|
|
302
|
+
*/
|
|
303
|
+
readonly region?: string;
|
|
304
|
+
/**
|
|
305
|
+
* Additional conditions to add to the Service Principal
|
|
306
|
+
*
|
|
307
|
+
* @default - No conditions
|
|
308
|
+
*/
|
|
309
|
+
readonly conditions?: Conditions;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* An IAM principal that represents an AWS service (i.e. `sqs.amazonaws.com`).
|
|
313
|
+
*/
|
|
314
|
+
export declare class ServicePrincipal extends PrincipalBase {
|
|
315
|
+
readonly service: string;
|
|
316
|
+
private readonly opts;
|
|
317
|
+
/**
|
|
318
|
+
* Return the service principal name based on the region it's used in.
|
|
319
|
+
*
|
|
320
|
+
* Some service principal names used to be different for different partitions,
|
|
321
|
+
* and some were not.
|
|
322
|
+
*
|
|
323
|
+
* These days all service principal names are standardized, and they are all
|
|
324
|
+
* of the form `<servicename>.amazonaws.com`.
|
|
325
|
+
*
|
|
326
|
+
* To avoid breaking changes, handling is provided for services added with the formats below,
|
|
327
|
+
* however, no additional handling will be added for new regions or partitions.
|
|
328
|
+
* - s3
|
|
329
|
+
* - s3.amazonaws.com
|
|
330
|
+
* - s3.amazonaws.com.cn
|
|
331
|
+
* - s3.c2s.ic.gov
|
|
332
|
+
* - s3.sc2s.sgov.gov
|
|
333
|
+
*
|
|
334
|
+
* @example
|
|
335
|
+
* const principalName = iam.ServicePrincipal.servicePrincipalName('ec2');
|
|
336
|
+
*/
|
|
337
|
+
static servicePrincipalName(service: string): string;
|
|
338
|
+
/**
|
|
339
|
+
* Reference an AWS service, optionally in a given region
|
|
340
|
+
*
|
|
341
|
+
* @param service AWS service (i.e. sqs.amazonaws.com)
|
|
342
|
+
*/
|
|
343
|
+
constructor(service: string, opts?: ServicePrincipalOpts);
|
|
344
|
+
get policyFragment(): PrincipalPolicyFragment;
|
|
345
|
+
toString(): string;
|
|
346
|
+
dedupeString(): string | undefined;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* A principal that represents an AWS Organization
|
|
350
|
+
*/
|
|
351
|
+
export declare class OrganizationPrincipal extends PrincipalBase {
|
|
352
|
+
readonly organizationId: string;
|
|
353
|
+
/**
|
|
354
|
+
*
|
|
355
|
+
* @param organizationId The unique identifier (ID) of an organization (i.e. o-12345abcde)
|
|
356
|
+
*/
|
|
357
|
+
constructor(organizationId: string);
|
|
358
|
+
get policyFragment(): PrincipalPolicyFragment;
|
|
359
|
+
toString(): string;
|
|
360
|
+
dedupeString(): string | undefined;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* A policy principal for canonicalUserIds - useful for S3 bucket policies that use
|
|
364
|
+
* Origin Access identities.
|
|
365
|
+
*
|
|
366
|
+
* See https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html
|
|
367
|
+
*
|
|
368
|
+
* and
|
|
369
|
+
*
|
|
370
|
+
* https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html
|
|
371
|
+
*
|
|
372
|
+
* for more details.
|
|
373
|
+
*
|
|
374
|
+
*/
|
|
375
|
+
export declare class CanonicalUserPrincipal extends PrincipalBase {
|
|
376
|
+
readonly canonicalUserId: string;
|
|
377
|
+
/**
|
|
378
|
+
*
|
|
379
|
+
* @param canonicalUserId unique identifier assigned by AWS for every account.
|
|
380
|
+
* root user and IAM users for an account all see the same ID.
|
|
381
|
+
* (i.e. 79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be)
|
|
382
|
+
*/
|
|
383
|
+
constructor(canonicalUserId: string);
|
|
384
|
+
get policyFragment(): PrincipalPolicyFragment;
|
|
385
|
+
toString(): string;
|
|
386
|
+
dedupeString(): string | undefined;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Principal entity that represents a federated identity provider such as Amazon Cognito,
|
|
390
|
+
* that can be used to provide temporary security credentials to users who have been authenticated.
|
|
391
|
+
* Additional condition keys are available when the temporary security credentials are used to make a request.
|
|
392
|
+
* You can use these keys to write policies that limit the access of federated users.
|
|
393
|
+
*
|
|
394
|
+
* @see https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#condition-keys-wif
|
|
395
|
+
*/
|
|
396
|
+
export declare class FederatedPrincipal extends PrincipalBase {
|
|
397
|
+
readonly federated: string;
|
|
398
|
+
readonly assumeRoleAction: string;
|
|
399
|
+
/**
|
|
400
|
+
* The conditions under which the policy is in effect.
|
|
401
|
+
* @see https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html
|
|
402
|
+
*/
|
|
403
|
+
readonly conditions: Conditions;
|
|
404
|
+
/**
|
|
405
|
+
*
|
|
406
|
+
* @param federated federated identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito)
|
|
407
|
+
* @param sessionTags Whether to enable session tagging (see https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
|
|
408
|
+
*/
|
|
409
|
+
constructor(federated: string, conditions?: Conditions, assumeRoleAction?: string);
|
|
410
|
+
get policyFragment(): PrincipalPolicyFragment;
|
|
411
|
+
toString(): string;
|
|
412
|
+
dedupeString(): string | undefined;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* A principal that represents a federated identity provider as Web Identity such as Cognito, Amazon,
|
|
416
|
+
* Facebook, Google, etc.
|
|
417
|
+
*/
|
|
418
|
+
export declare class WebIdentityPrincipal extends FederatedPrincipal {
|
|
419
|
+
/**
|
|
420
|
+
*
|
|
421
|
+
* @param identityProvider identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito)
|
|
422
|
+
* @param conditions The conditions under which the policy is in effect.
|
|
423
|
+
* See [the IAM documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html).
|
|
424
|
+
* @param sessionTags Whether to enable session tagging (see https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
|
|
425
|
+
*/
|
|
426
|
+
constructor(identityProvider: string, conditions?: Conditions);
|
|
427
|
+
get policyFragment(): PrincipalPolicyFragment;
|
|
428
|
+
toString(): string;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* A principal that represents a federated identity provider as from a OpenID Connect provider.
|
|
432
|
+
*/
|
|
433
|
+
export declare class OpenIdConnectPrincipal extends WebIdentityPrincipal {
|
|
434
|
+
/**
|
|
435
|
+
*
|
|
436
|
+
* @param openIdConnectProvider OpenID Connect provider
|
|
437
|
+
* @param conditions The conditions under which the policy is in effect.
|
|
438
|
+
* See [the IAM documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html).
|
|
439
|
+
*/
|
|
440
|
+
constructor(openIdConnectProvider: IOpenIdConnectProvider, conditions?: Conditions);
|
|
441
|
+
get policyFragment(): PrincipalPolicyFragment;
|
|
442
|
+
toString(): string;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Principal entity that represents a SAML federated identity provider
|
|
446
|
+
*/
|
|
447
|
+
export declare class SamlPrincipal extends FederatedPrincipal {
|
|
448
|
+
constructor(samlProvider: ISamlProvider, conditions: Conditions);
|
|
449
|
+
toString(): string;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Principal entity that represents a SAML federated identity provider for
|
|
453
|
+
* programmatic and AWS Management Console access.
|
|
454
|
+
*/
|
|
455
|
+
export declare class SamlConsolePrincipal extends SamlPrincipal {
|
|
456
|
+
/**
|
|
457
|
+
* enum Partition {
|
|
458
|
+
* Default = 'aws',
|
|
459
|
+
* Cn = 'aws-cn',
|
|
460
|
+
* UsGov = 'aws-us-gov',
|
|
461
|
+
* UsIso = 'aws-iso',
|
|
462
|
+
* UsIsoB = 'aws-iso-b',
|
|
463
|
+
* UsIsoF = 'aws-iso-f',
|
|
464
|
+
* EuIsoE = 'aws-iso-e',
|
|
465
|
+
* }
|
|
466
|
+
* SAML Sign On urls could be...
|
|
467
|
+
* [Partition.Default]: 'https://signin.aws.amazon.com/saml',
|
|
468
|
+
* [Partition.Cn]: 'https://signin.amazonaws.cn/saml',
|
|
469
|
+
* [Partition.UsGov]: 'https://signin.amazonaws-us-gov.com/saml',
|
|
470
|
+
* [Partition.UsIso]: 'https://signin.c2shome.ic.gov/saml',
|
|
471
|
+
* [Partition.UsIsoB]: 'https://signin.sc2shome.sgov.gov/saml',
|
|
472
|
+
*/
|
|
473
|
+
/**
|
|
474
|
+
* @param samlProvider The SAML provider
|
|
475
|
+
*/
|
|
476
|
+
constructor(samlProvider: ISamlProvider, conditions?: Conditions);
|
|
477
|
+
toString(): string;
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Use the AWS account into which a stack is deployed as the principal entity in a policy
|
|
481
|
+
*/
|
|
482
|
+
export declare class AccountRootPrincipal extends AccountPrincipal {
|
|
483
|
+
constructor();
|
|
484
|
+
toString(): string;
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* A principal representing all AWS identities in all accounts
|
|
488
|
+
*
|
|
489
|
+
* Some services behave differently when you specify `Principal: '*'`
|
|
490
|
+
* or `Principal: { AWS: "*" }` in their resource policy.
|
|
491
|
+
*
|
|
492
|
+
* `AnyPrincipal` renders to `Principal: { AWS: "*" }`. This is correct
|
|
493
|
+
* most of the time, but in cases where you need the other principal,
|
|
494
|
+
* use `StarPrincipal` instead.
|
|
495
|
+
*/
|
|
496
|
+
export declare class AnyPrincipal extends ArnPrincipal {
|
|
497
|
+
constructor();
|
|
498
|
+
toString(): string;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* A principal representing all identities in all accounts
|
|
502
|
+
* @deprecated use `AnyPrincipal`
|
|
503
|
+
*/
|
|
504
|
+
export declare class Anyone extends AnyPrincipal {
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* A principal that uses a literal '*' in the IAM JSON language
|
|
508
|
+
*
|
|
509
|
+
* Some services behave differently when you specify `Principal: "*"`
|
|
510
|
+
* or `Principal: { AWS: "*" }` in their resource policy.
|
|
511
|
+
*
|
|
512
|
+
* `StarPrincipal` renders to `Principal: *`. Most of the time, you
|
|
513
|
+
* should use `AnyPrincipal` instead.
|
|
514
|
+
*/
|
|
515
|
+
export declare class StarPrincipal extends PrincipalBase {
|
|
516
|
+
readonly policyFragment: PrincipalPolicyFragment;
|
|
517
|
+
toString(): string;
|
|
518
|
+
dedupeString(): string | undefined;
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Represents a principal that has multiple types of principals. A composite principal cannot
|
|
522
|
+
* have conditions. i.e. multiple ServicePrincipals that form a composite principal
|
|
523
|
+
*/
|
|
524
|
+
export declare class CompositePrincipal extends PrincipalBase {
|
|
525
|
+
readonly assumeRoleAction: string;
|
|
526
|
+
private readonly _principals;
|
|
527
|
+
constructor(...principals: IPrincipal[]);
|
|
528
|
+
/**
|
|
529
|
+
* Adds IAM principals to the composite principal. Composite principals cannot have
|
|
530
|
+
* conditions.
|
|
531
|
+
*
|
|
532
|
+
* @param principals IAM principals that will be added to the composite principal
|
|
533
|
+
*/
|
|
534
|
+
addPrincipals(...principals: IPrincipal[]): this;
|
|
535
|
+
addToAssumeRolePolicy(doc: IPolicyDocument): void;
|
|
536
|
+
get policyFragment(): PrincipalPolicyFragment;
|
|
537
|
+
toString(): string;
|
|
538
|
+
dedupeString(): string | undefined;
|
|
539
|
+
/**
|
|
540
|
+
* Returns the principals that make up the CompositePrincipal
|
|
541
|
+
*/
|
|
542
|
+
get principals(): IPrincipal[];
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Base class for Principals that wrap other principals
|
|
546
|
+
*/
|
|
547
|
+
declare abstract class PrincipalAdapter extends PrincipalBase {
|
|
548
|
+
protected readonly wrapped: IPrincipal;
|
|
549
|
+
readonly assumeRoleAction: string;
|
|
550
|
+
readonly principalAccount: string | undefined;
|
|
551
|
+
constructor(wrapped: IPrincipal);
|
|
552
|
+
get policyFragment(): PrincipalPolicyFragment;
|
|
553
|
+
addToPrincipalPolicy(statement: PolicyStatement): AddToPrincipalPolicyResult;
|
|
554
|
+
/**
|
|
555
|
+
* Append the given string to the wrapped principal's dedupe string (if available)
|
|
556
|
+
*/
|
|
557
|
+
protected appendDedupe(append: string): string | undefined;
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Interface for principals that can be compared.
|
|
561
|
+
*
|
|
562
|
+
* This only needs to be implemented for principals that could potentially be value-equal.
|
|
563
|
+
* Identity-equal principals will be handled correctly by default.
|
|
564
|
+
*/
|
|
565
|
+
export interface IComparablePrincipal extends IPrincipal {
|
|
566
|
+
/**
|
|
567
|
+
* Return a string format of this principal which should be identical if the two
|
|
568
|
+
* principals are the same.
|
|
569
|
+
*/
|
|
570
|
+
dedupeString(): string | undefined;
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Helper class for working with `IComparablePrincipal`s
|
|
574
|
+
*/
|
|
575
|
+
export declare class ComparablePrincipal {
|
|
576
|
+
/**
|
|
577
|
+
* Whether or not the given principal is a comparable principal
|
|
578
|
+
*/
|
|
579
|
+
static isComparablePrincipal(x: IPrincipal): x is IComparablePrincipal;
|
|
580
|
+
/**
|
|
581
|
+
* Return the dedupeString of the given principal, if available
|
|
582
|
+
*/
|
|
583
|
+
static dedupeStringFor(x: IPrincipal): string | undefined;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* An IAM principal with additional conditions specifying when the policy is in effect.
|
|
587
|
+
*
|
|
588
|
+
* For more information about conditions, see:
|
|
589
|
+
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html
|
|
590
|
+
*/
|
|
591
|
+
export declare class PrincipalWithConditions extends PrincipalAdapter {
|
|
592
|
+
private additionalConditions;
|
|
593
|
+
constructor(principal: IPrincipal, conditions: Conditions);
|
|
594
|
+
addToAssumeRolePolicy(doc: IPolicyDocument): void;
|
|
595
|
+
/**
|
|
596
|
+
* Add a condition to the principal
|
|
597
|
+
*/
|
|
598
|
+
addCondition(condition: Condition): void;
|
|
599
|
+
/**
|
|
600
|
+
* Add a conditionObject to the principal
|
|
601
|
+
*
|
|
602
|
+
* A conditionObject has the format of test: { variable: value | values[] }
|
|
603
|
+
*
|
|
604
|
+
* For example:
|
|
605
|
+
*
|
|
606
|
+
* ```ts
|
|
607
|
+
* const condition1 = {'StringEquals', { 'aws:SomeField': '1' }};
|
|
608
|
+
* // or
|
|
609
|
+
* const condition2 = {'StringEquals', { 'aws:SomeField': ['1', '2'] }};
|
|
610
|
+
* ```
|
|
611
|
+
*/
|
|
612
|
+
addConditionObject(key: string, value: unknown): void;
|
|
613
|
+
/**
|
|
614
|
+
* Adds multiple conditions to the principal
|
|
615
|
+
*
|
|
616
|
+
* Values from the conditions parameter will overwrite existing values with the same operator
|
|
617
|
+
* and key.
|
|
618
|
+
*/
|
|
619
|
+
addConditions(conditions: Conditions): void;
|
|
620
|
+
/**
|
|
621
|
+
* Adds multiple conditionObjects to the principal
|
|
622
|
+
*
|
|
623
|
+
* Values from the conditions parameter will overwrite existing values with the same operator
|
|
624
|
+
* and key.
|
|
625
|
+
*/
|
|
626
|
+
addConditionObjects(conditions: {
|
|
627
|
+
[key: string]: unknown;
|
|
628
|
+
}): void;
|
|
629
|
+
/**
|
|
630
|
+
* The conditions under which the policy is in effect.
|
|
631
|
+
* See [the IAM documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html).
|
|
632
|
+
*/
|
|
633
|
+
get conditions(): Conditions;
|
|
634
|
+
get policyFragment(): PrincipalPolicyFragment;
|
|
635
|
+
toString(): string;
|
|
636
|
+
/**
|
|
637
|
+
* JSON-ify the principal
|
|
638
|
+
*
|
|
639
|
+
* Used when JSON.stringify() is called
|
|
640
|
+
*/
|
|
641
|
+
toJSON(): AwsPrincipalJson;
|
|
642
|
+
dedupeString(): string | undefined;
|
|
643
|
+
private mergeConditions;
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Enables session tags on role assumptions from a principal
|
|
647
|
+
*
|
|
648
|
+
* For more information on session tags, see:
|
|
649
|
+
* https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
|
650
|
+
*/
|
|
651
|
+
export declare class SessionTagsPrincipal extends PrincipalAdapter {
|
|
652
|
+
constructor(principal: IPrincipal);
|
|
653
|
+
addToAssumeRolePolicy(doc: IPolicyDocument): void;
|
|
654
|
+
dedupeString(): string | undefined;
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Add a principal to an AssumeRolePolicyDocument in the right way
|
|
658
|
+
*
|
|
659
|
+
* Delegate to the principal if it can do the job itself, do a default job if it can't.
|
|
660
|
+
*/
|
|
661
|
+
export declare function defaultAddPrincipalToAssumeRole(principal: IPrincipal, doc: IPolicyDocument): void;
|
|
662
|
+
/**
|
|
663
|
+
* Merge two arrays that represent IAM principals
|
|
664
|
+
*
|
|
665
|
+
* Does an in-place merge into target.
|
|
666
|
+
*/
|
|
667
|
+
export declare function mergePrincipal(target: PrincipalProps[], source: PrincipalProps[]): void;
|
|
668
|
+
export {};
|