@kensio/yulin 1.20.12 → 1.20.14
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/dist/service/acm/cfn/certificate/sim-cfn-acm-cert-creator.js +6 -4
- package/dist/service/acm/cfn/sim-cfn-acm-resource-factory.d.ts +2 -2
- package/dist/service/acm/cfn/sim-cfn-acm-resource-factory.js +3 -4
- package/dist/service/acm/cfn/validation/sim-cfn-acm-cert-validation.d.ts +2 -1
- package/dist/service/acm/cfn/validation/sim-cfn-acm-cert-validation.js +2 -2
- package/dist/service/acm/cfn/validation/sim-cfn-acm-validation-records.d.ts +2 -1
- package/dist/service/acm/cfn/validation/sim-cfn-acm-validation-records.js +4 -4
- package/dist/service/acm/command/delete-certificate/delete-certificate-authorizer.js +1 -0
- package/dist/service/acm/command/describe-certificate/describe-certificate-authorizer.js +1 -0
- package/dist/service/acm/command/list-certificates/list-certificates-authorizer.js +1 -0
- package/dist/service/acm/command/request-certificate/request-certificate-authorizer.js +1 -0
- package/dist/service/acm/sim-acm.d.ts +1 -1
- package/dist/service/acm/sim-acm.js +3 -2
- package/dist/service/apigateway/cfn/api/sim-cfn-rest-api-creator.d.ts +2 -1
- package/dist/service/apigateway/cfn/api/sim-cfn-rest-api-creator.js +11 -13
- package/dist/service/apigateway/cfn/authorizer/sim-cfn-rest-api-authorizer-creator.d.ts +2 -1
- package/dist/service/apigateway/cfn/authorizer/sim-cfn-rest-api-authorizer-creator.js +2 -4
- package/dist/service/apigateway/cfn/deployment/sim-cfn-rest-api-deployment-creator.d.ts +2 -1
- package/dist/service/apigateway/cfn/deployment/sim-cfn-rest-api-deployment-creator.js +2 -4
- package/dist/service/apigateway/cfn/method/sim-cfn-rest-api-method-creator.d.ts +2 -1
- package/dist/service/apigateway/cfn/method/sim-cfn-rest-api-method-creator.js +3 -5
- package/dist/service/apigateway/cfn/method/sim-cfn-rest-api-method-integration.d.ts +2 -1
- package/dist/service/apigateway/cfn/method/sim-cfn-rest-api-method-integration.js +3 -3
- package/dist/service/apigateway/cfn/resource/sim-cfn-rest-api-resource-creator.d.ts +2 -1
- package/dist/service/apigateway/cfn/resource/sim-cfn-rest-api-resource-creator.js +2 -4
- package/dist/service/apigateway/cfn/sim-cfn-api-gateway-resource-deleter.d.ts +2 -1
- package/dist/service/apigateway/cfn/sim-cfn-api-gateway-resource-deleter.js +3 -5
- package/dist/service/apigateway/cfn/sim-cfn-api-gateway-resource-factory.js +9 -7
- package/dist/service/apigateway/cfn/sim-cfn-rest-api-part-deleter.d.ts +2 -7
- package/dist/service/apigateway/cfn/sim-cfn-rest-api-part-deleter.js +12 -42
- package/dist/service/apigateway/cfn/sim-cfn-rest-api-part-values.d.ts +10 -0
- package/dist/service/apigateway/cfn/sim-cfn-rest-api-part-values.js +21 -0
- package/dist/service/apigateway/cfn/stage/sim-cfn-rest-api-stage-creator.d.ts +2 -1
- package/dist/service/apigateway/cfn/stage/sim-cfn-rest-api-stage-creator.js +2 -4
- package/dist/service/apigateway/serve/auth/sim-rest-api-authorizer-policy.js +3 -0
- package/dist/service/apigateway/serve/sim-api-gateway-router.js +5 -2
- package/dist/service/apigateway/sim-api-gateway-commands.d.ts +1 -1
- package/dist/service/apigateway/sim-api-gateway-commands.js +3 -2
- package/dist/service/apigatewayv2/cfn/api/sim-cfn-http-api-creator.d.ts +2 -1
- package/dist/service/apigatewayv2/cfn/api/sim-cfn-http-api-creator.js +5 -9
- package/dist/service/apigatewayv2/cfn/authorizer/sim-cfn-http-api-authorizer-creator.d.ts +2 -1
- package/dist/service/apigatewayv2/cfn/authorizer/sim-cfn-http-api-authorizer-creator.js +2 -4
- package/dist/service/apigatewayv2/cfn/domain/sim-cfn-api-mapping-creator.d.ts +2 -1
- package/dist/service/apigatewayv2/cfn/domain/sim-cfn-api-mapping-creator.js +2 -4
- package/dist/service/apigatewayv2/cfn/domain/sim-cfn-http-api-domain-creator.d.ts +2 -1
- package/dist/service/apigatewayv2/cfn/domain/sim-cfn-http-api-domain-creator.js +2 -4
- package/dist/service/apigatewayv2/cfn/integration/sim-cfn-http-api-integration-creator.d.ts +2 -1
- package/dist/service/apigatewayv2/cfn/integration/sim-cfn-http-api-integration-creator.js +2 -4
- package/dist/service/apigatewayv2/cfn/route/sim-cfn-http-api-route-creator.d.ts +2 -1
- package/dist/service/apigatewayv2/cfn/route/sim-cfn-http-api-route-creator.js +2 -4
- package/dist/service/apigatewayv2/cfn/sim-cfn-api-gateway-v2-resource-deleter.d.ts +2 -9
- package/dist/service/apigatewayv2/cfn/sim-cfn-api-gateway-v2-resource-deleter.js +19 -25
- package/dist/service/apigatewayv2/cfn/sim-cfn-api-gateway-v2-resource-factory.d.ts +0 -5
- package/dist/service/apigatewayv2/cfn/sim-cfn-api-gateway-v2-resource-factory.js +13 -29
- package/dist/service/apigatewayv2/cfn/sim-cfn-api-gateway-v2-unsupported.d.ts +5 -0
- package/dist/service/apigatewayv2/cfn/sim-cfn-api-gateway-v2-unsupported.js +19 -0
- package/dist/service/apigatewayv2/cfn/sim-cfn-http-api-part-deleter.d.ts +2 -1
- package/dist/service/apigatewayv2/cfn/sim-cfn-http-api-part-deleter.js +5 -13
- package/dist/service/apigatewayv2/cfn/stage/sim-cfn-http-api-stage-creator.d.ts +2 -1
- package/dist/service/apigatewayv2/cfn/stage/sim-cfn-http-api-stage-creator.js +2 -4
- package/dist/service/apigatewayv2/serve/auth/sim-http-api-authorizer-policy.js +3 -0
- package/dist/service/apigatewayv2/serve/sim-api-gateway-v2-router.js +5 -2
- package/dist/service/apigatewayv2/sim-api-gateway-v2-commands.d.ts +1 -1
- package/dist/service/apigatewayv2/sim-api-gateway-v2-commands.js +3 -2
- package/dist/service/athena/cfn/named-query/sim-cfn-athena-named-query-creator.d.ts +3 -2
- package/dist/service/athena/cfn/named-query/sim-cfn-athena-named-query-creator.js +4 -6
- package/dist/service/athena/cfn/sim-athena-cfn-resource-factory.d.ts +2 -2
- package/dist/service/athena/cfn/sim-athena-cfn-resource-factory.js +7 -6
- package/dist/service/athena/cfn/work-group/sim-cfn-athena-work-group-creator.d.ts +3 -2
- package/dist/service/athena/cfn/work-group/sim-cfn-athena-work-group-creator.js +7 -11
- package/dist/service/athena/engine/sim-athena-aggregate-shims.d.ts +10 -5
- package/dist/service/athena/engine/sim-athena-aggregate-shims.js +19 -16
- package/dist/service/athena/engine/sim-athena-binary-shims.d.ts +16 -0
- package/dist/service/athena/engine/sim-athena-binary-shims.js +49 -0
- package/dist/service/athena/engine/sim-athena-binary-text.d.ts +21 -0
- package/dist/service/athena/engine/sim-athena-binary-text.js +87 -0
- package/dist/service/athena/engine/sim-athena-count-distinct.d.ts +15 -0
- package/dist/service/athena/engine/sim-athena-count-distinct.js +103 -0
- package/dist/service/athena/engine/sim-athena-distinct-values.d.ts +19 -0
- package/dist/service/athena/engine/sim-athena-distinct-values.js +37 -0
- package/dist/service/athena/engine/sim-athena-hash-words.d.ts +14 -0
- package/dist/service/athena/engine/sim-athena-hash-words.js +22 -0
- package/dist/service/athena/engine/sim-athena-murmur3-mixing.d.ts +15 -0
- package/dist/service/athena/engine/sim-athena-murmur3-mixing.js +37 -0
- package/dist/service/athena/engine/sim-athena-murmur3.d.ts +11 -0
- package/dist/service/athena/engine/sim-athena-murmur3.js +51 -0
- package/dist/service/athena/engine/sim-athena-shim-registry.d.ts +9 -0
- package/dist/service/athena/engine/sim-athena-shim-registry.js +30 -1
- package/dist/service/athena/engine/sim-athena-shims.js +2 -0
- package/dist/service/athena/engine/sim-athena-sql-rewrites.d.ts +4 -2
- package/dist/service/athena/engine/sim-athena-sql-rewrites.js +6 -3
- package/dist/service/athena/engine/sim-athena-xxhash64.d.ts +8 -0
- package/dist/service/athena/engine/sim-athena-xxhash64.js +82 -0
- package/dist/service/athena/sim-athena-executions.d.ts +1 -1
- package/dist/service/athena/sim-athena-executions.js +3 -2
- package/dist/service/aws/factory/sim-aws-account-service-cache.d.ts +3 -0
- package/dist/service/aws/factory/sim-aws-account-service-cache.js +5 -0
- package/dist/service/aws/factory/sim-aws-service-factory.d.ts +9 -0
- package/dist/service/aws/factory/sim-aws-service-factory.js +10 -0
- package/dist/service/aws/sim-aws.d.ts +18 -0
- package/dist/service/aws/sim-aws.js +19 -0
- package/dist/service/bedrock/sim-bedrock.d.ts +1 -1
- package/dist/service/bedrock/sim-bedrock.js +3 -2
- package/dist/service/cloudformation/cdk/assets/sim-cdk-assets-publisher.d.ts +8 -0
- package/dist/service/cloudformation/cdk/assets/sim-cdk-assets-publisher.js +6 -4
- package/dist/service/cloudformation/command/create-stack/create-stack.handler.d.ts +4 -0
- package/dist/service/cloudformation/command/create-stack/create-stack.handler.js +4 -1
- package/dist/service/cloudformation/command/update-stack/update-stack.handler.d.ts +7 -0
- package/dist/service/cloudformation/command/update-stack/update-stack.handler.js +3 -1
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-deployer.js +2 -1
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-plan.d.ts +9 -2
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-plan.js +2 -1
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-stack-options.d.ts +10 -3
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-stack-options.js +4 -7
- package/dist/service/cloudformation/deploy/sim-cfn-template-deployer.d.ts +10 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-deployer.js +4 -2
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.d.ts +11 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.js +2 -1
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-updater.js +1 -0
- package/dist/service/cloudformation/resource/caller/sim-cfn-resource-caller-options.d.ts +16 -0
- package/dist/service/cloudformation/resource/caller/sim-cfn-resource-caller-options.js +6 -0
- package/dist/service/cloudformation/resource/cfn/organizations/sim-organizations-cfn-value-adapter.d.ts +6 -0
- package/dist/service/cloudformation/resource/cfn/organizations/sim-organizations-cfn-value-adapter.js +23 -0
- package/dist/service/cloudformation/resource/cfn/organizations/sim-organizations-cfn.d.ts +66 -0
- package/dist/service/cloudformation/resource/cfn/organizations/sim-organizations-cfn.js +136 -0
- package/dist/service/cloudformation/resource/cfn/scheduler/sim-scheduler-cfn-value-adapter.js +50 -0
- package/dist/service/cloudformation/resource/cfn/sim-cfn-service-value-adapters.js +2 -0
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-factories.js +7 -0
- package/dist/service/cloudformation/resource/sim-cfn-resource.type.d.ts +12 -0
- package/dist/service/cloudformation/sim-cloudformation.d.ts +1 -1
- package/dist/service/cloudformation/sim-cloudformation.js +3 -2
- package/dist/service/cloudformation/stack/deploy/sim-cfn-stack-resource-batch-creator.d.ts +3 -0
- package/dist/service/cloudformation/stack/deploy/sim-cfn-stack-resource-batch-creator.js +4 -1
- package/dist/service/cloudformation/stack/deploy/sim-cfn-stack-resource-creator.d.ts +2 -0
- package/dist/service/cloudformation/stack/deploy/sim-cfn-stack-resource-creator.js +2 -1
- package/dist/service/cloudformation/stack/sim-cfn-stack-resource-operations.d.ts +17 -2
- package/dist/service/cloudformation/stack/sim-cfn-stack-resource-operations.js +15 -4
- package/dist/service/cloudformation/stack/sim-cfn-stack.js +5 -5
- package/dist/service/cloudformation/stack/sim-cfn-stack.type.d.ts +12 -0
- package/dist/service/cloudformation/stack/teardown/sim-cfn-stack-resource-batch-deleter.d.ts +3 -0
- package/dist/service/cloudformation/stack/teardown/sim-cfn-stack-resource-batch-deleter.js +3 -0
- package/dist/service/cloudformation/stack/teardown/sim-cfn-stack-resource-deleter.d.ts +2 -0
- package/dist/service/cloudformation/stack/teardown/sim-cfn-stack-resource-deleter.js +2 -1
- package/dist/service/cloudfront/cfn/cff/sim-cfn-cff-creator.d.ts +5 -0
- package/dist/service/cloudfront/cfn/cff/sim-cfn-cff-creator.js +10 -3
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.js +2 -1
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-deleter.d.ts +2 -1
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-deleter.js +5 -7
- package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-creator.d.ts +3 -2
- package/dist/service/cloudfront/cfn/key-value-store/sim-cfn-cf-kvs-creator.js +6 -6
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.d.ts +2 -4
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js +7 -15
- package/dist/service/cloudfront/command/create-distribution/create-distribution-authorizer.js +1 -0
- package/dist/service/cloudfront/command/create-function/create-function-authorizer.js +1 -0
- package/dist/service/cloudfront/command/delete-distribution/delete-distribution-authorizer.js +1 -0
- package/dist/service/cloudfront/command/delete-function/delete-function-authorizer.js +1 -0
- package/dist/service/cloudfront/command/get-distribution/get-distribution-authorizer.js +1 -0
- package/dist/service/cloudfront/command/update-distribution/update-distribution-authorizer.js +1 -0
- package/dist/service/cloudfront/edge/sim-aws-cf-edge-functions.js +3 -2
- package/dist/service/cloudfront/edge/sim-cf-edge-association-auth-z.js +1 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.js +1 -0
- package/dist/service/cloudfront/sim-cloudfront-commands.d.ts +1 -1
- package/dist/service/cloudfront/sim-cloudfront-commands.js +5 -2
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-creator.d.ts +3 -2
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-creator.js +4 -6
- package/dist/service/cloudwatch/cfn/sim-cloudwatch-cfn-resource-factory.d.ts +2 -2
- package/dist/service/cloudwatch/cfn/sim-cloudwatch-cfn-resource-factory.js +4 -3
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-decide.js +1 -0
- package/dist/service/cloudwatch/sim-cloudwatch-commands.d.ts +1 -1
- package/dist/service/cloudwatch/sim-cloudwatch-commands.js +3 -2
- package/dist/service/cognito/cfn/client/sim-cfn-cognito-client-creator.d.ts +2 -1
- package/dist/service/cognito/cfn/client/sim-cfn-cognito-client-creator.js +2 -4
- package/dist/service/cognito/cfn/domain/sim-cfn-cognito-domain-creator.d.ts +2 -1
- package/dist/service/cognito/cfn/domain/sim-cfn-cognito-domain-creator.js +2 -4
- package/dist/service/cognito/cfn/group/sim-cfn-cognito-group-creator.d.ts +2 -1
- package/dist/service/cognito/cfn/group/sim-cfn-cognito-group-creator.js +2 -4
- package/dist/service/cognito/cfn/idp/sim-cfn-cognito-idp-creator.d.ts +2 -1
- package/dist/service/cognito/cfn/idp/sim-cfn-cognito-idp-creator.js +2 -4
- package/dist/service/cognito/cfn/sim-cfn-cognito-resource-deleter.d.ts +2 -1
- package/dist/service/cognito/cfn/sim-cfn-cognito-resource-deleter.js +18 -24
- package/dist/service/cognito/cfn/sim-cfn-cognito-resource-factory.d.ts +2 -2
- package/dist/service/cognito/cfn/sim-cfn-cognito-resource-factory.js +9 -7
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-user-pool-creator.d.ts +2 -1
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-user-pool-creator.js +5 -7
- package/dist/service/cognito/command/authorize/sim-cognito-authorizer.js +1 -0
- package/dist/service/cognito/sim-cognito-identity-provider.d.ts +1 -1
- package/dist/service/cognito/sim-cognito-identity-provider.js +3 -2
- package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.js +2 -1
- package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-creator.d.ts +2 -1
- package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-creator.js +2 -2
- package/dist/service/dynamodb/cfn/sim-cfn-dynamodb-resource-deleter.d.ts +2 -1
- package/dist/service/dynamodb/cfn/sim-cfn-dynamodb-resource-deleter.js +2 -4
- package/dist/service/dynamodb/cfn/sim-cfn-dynamodb-resource-factory.d.ts +2 -2
- package/dist/service/dynamodb/cfn/sim-cfn-dynamodb-resource-factory.js +6 -4
- package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-creator.d.ts +2 -1
- package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-creator.js +5 -7
- package/dist/service/dynamodb/command/authorize/sim-dynamodb-authorizer.js +1 -0
- package/dist/service/dynamodb/sim-dynamodb.js +3 -2
- package/dist/service/ecs/cfn/cluster/sim-cfn-ecs-cluster-creator.d.ts +3 -2
- package/dist/service/ecs/cfn/cluster/sim-cfn-ecs-cluster-creator.js +4 -6
- package/dist/service/ecs/cfn/service/sim-cfn-ecs-service-creator.d.ts +3 -2
- package/dist/service/ecs/cfn/service/sim-cfn-ecs-service-creator.js +4 -4
- package/dist/service/ecs/cfn/sim-cfn-ecs-created-resource.d.ts +5 -0
- package/dist/service/ecs/cfn/sim-cfn-ecs-created-resource.js +9 -0
- package/dist/service/ecs/cfn/sim-ecs-cfn-resource-factory.d.ts +2 -2
- package/dist/service/ecs/cfn/sim-ecs-cfn-resource-factory.js +11 -16
- package/dist/service/ecs/cfn/task-definition/sim-cfn-ecs-task-definition-creator.d.ts +3 -2
- package/dist/service/ecs/cfn/task-definition/sim-cfn-ecs-task-definition-creator.js +4 -6
- package/dist/service/ecs/sim-ecs-commands.js +3 -2
- package/dist/service/ecs/task/run/sim-ecs-container-environment.d.ts +12 -10
- package/dist/service/ecs/task/run/sim-ecs-container-environment.js +16 -18
- package/dist/service/elbv2/cfn/listener/sim-cfn-elbv2-listener-creator.d.ts +3 -2
- package/dist/service/elbv2/cfn/listener/sim-cfn-elbv2-listener-creator.js +4 -6
- package/dist/service/elbv2/cfn/load-balancer/sim-cfn-elbv2-load-balancer-creator.d.ts +3 -2
- package/dist/service/elbv2/cfn/load-balancer/sim-cfn-elbv2-load-balancer-creator.js +4 -6
- package/dist/service/elbv2/cfn/rule/sim-cfn-elbv2-listener-rule-creator.d.ts +3 -2
- package/dist/service/elbv2/cfn/rule/sim-cfn-elbv2-listener-rule-creator.js +4 -4
- package/dist/service/elbv2/cfn/sim-elbv2-cfn-resource-deleter.d.ts +2 -1
- package/dist/service/elbv2/cfn/sim-elbv2-cfn-resource-deleter.js +5 -5
- package/dist/service/elbv2/cfn/sim-elbv2-cfn-resource-factory.d.ts +2 -2
- package/dist/service/elbv2/cfn/sim-elbv2-cfn-resource-factory.js +8 -6
- package/dist/service/elbv2/cfn/target-group/sim-cfn-elbv2-target-group-creator.d.ts +3 -2
- package/dist/service/elbv2/cfn/target-group/sim-cfn-elbv2-target-group-creator.js +7 -11
- package/dist/service/elbv2/serve/sim-elbv2-router.js +2 -1
- package/dist/service/elbv2/sim-elbv2.js +3 -3
- package/dist/service/eventbridge/cfn/bus/sim-cfn-event-bus-creator.d.ts +2 -1
- package/dist/service/eventbridge/cfn/bus/sim-cfn-event-bus-creator.js +2 -4
- package/dist/service/eventbridge/cfn/rule/sim-cfn-event-rule-creator.d.ts +2 -1
- package/dist/service/eventbridge/cfn/rule/sim-cfn-event-rule-creator.js +5 -5
- package/dist/service/eventbridge/cfn/sim-cfn-event-bridge-resource-deleter.d.ts +2 -1
- package/dist/service/eventbridge/cfn/sim-cfn-event-bridge-resource-deleter.js +7 -7
- package/dist/service/eventbridge/cfn/sim-event-bridge-cfn-resource-factory.js +5 -3
- package/dist/service/eventbridge/delivery/sim-event-bridge-delivery-function.js +2 -1
- package/dist/service/eventbridge/delivery/sim-event-bridge-delivery-queue.js +2 -1
- package/dist/service/eventbridge/delivery/sim-event-bridge-delivery-task.js +4 -1
- package/dist/service/eventbridge/delivery/sim-event-bridge-delivery-topic.js +2 -1
- package/dist/service/eventbridge/delivery/sim-event-bridge-target-role.d.ts +8 -3
- package/dist/service/eventbridge/delivery/sim-event-bridge-target-role.js +9 -3
- package/dist/service/eventbridge/sim-event-bridge.d.ts +1 -1
- package/dist/service/eventbridge/sim-event-bridge.js +3 -2
- package/dist/service/firehose/cfn/delivery-stream/sim-cfn-firehose-delivery-stream-creator.d.ts +2 -1
- package/dist/service/firehose/cfn/delivery-stream/sim-cfn-firehose-delivery-stream-creator.js +2 -2
- package/dist/service/firehose/cfn/sim-cfn-firehose-resource-deleter.d.ts +2 -1
- package/dist/service/firehose/cfn/sim-cfn-firehose-resource-deleter.js +2 -4
- package/dist/service/firehose/cfn/sim-firehose-cfn-resource-factory.d.ts +1 -1
- package/dist/service/firehose/cfn/sim-firehose-cfn-resource-factory.js +4 -3
- package/dist/service/firehose/command/authorize/sim-firehose-authorizer.js +1 -0
- package/dist/service/firehose/sim-firehose.d.ts +1 -1
- package/dist/service/firehose/sim-firehose.js +3 -2
- package/dist/service/glue/command/authorize/sim-glue-authorize-resources.js +1 -0
- package/dist/service/glue/sim-glue.d.ts +1 -1
- package/dist/service/glue/sim-glue.js +3 -2
- package/dist/service/iam/authorize/allow/sim-iam-policy-evaluation.d.ts +45 -0
- package/dist/service/iam/authorize/allow/sim-iam-policy-evaluation.js +59 -0
- package/dist/service/iam/authorize/context/sim-iam-auth-z-context-builder.d.ts +30 -15
- package/dist/service/iam/authorize/context/sim-iam-auth-z-context-builder.js +20 -22
- package/dist/service/iam/authorize/context/sim-iam-auth-z-context.d.ts +31 -1
- package/dist/service/iam/authorize/context/sim-iam-auth-z-context.factory.js +1 -0
- package/dist/service/iam/authorize/context/sim-iam-auth-z-scp-source-builder.d.ts +46 -0
- package/dist/service/iam/authorize/context/sim-iam-auth-z-scp-source-builder.js +71 -0
- package/dist/service/iam/authorize/context/sim-iam-derived-conditions.d.ts +42 -0
- package/dist/service/iam/authorize/context/sim-iam-derived-conditions.js +44 -0
- package/dist/service/iam/authorize/match/condition/arn/equals/sim-iam-arn-equals.js +2 -2
- package/dist/service/iam/authorize/match/condition/arn/like/sim-iam-arn-like.js +2 -2
- package/dist/service/iam/authorize/match/condition/negated/sim-iam-negated-for-all-values-string-operator.d.ts +20 -0
- package/dist/service/iam/authorize/match/condition/negated/sim-iam-negated-for-all-values-string-operator.js +27 -0
- package/dist/service/iam/authorize/match/condition/negated/sim-iam-negated-for-any-value-string-operator.d.ts +21 -0
- package/dist/service/iam/authorize/match/condition/negated/sim-iam-negated-for-any-value-string-operator.js +28 -0
- package/dist/service/iam/authorize/match/condition/negated/sim-iam-negated-operator-factories.d.ts +5 -0
- package/dist/service/iam/authorize/match/condition/negated/sim-iam-negated-operator-factories.js +36 -0
- package/dist/service/iam/authorize/match/condition/negated/sim-iam-negated-scalar-string-operator.d.ts +20 -0
- package/dist/service/iam/authorize/match/condition/negated/sim-iam-negated-scalar-string-operator.js +29 -0
- package/dist/service/iam/authorize/match/condition/numeric/less-than-equals/sim-iam-number-lte.d.ts +1 -0
- package/dist/service/iam/authorize/match/condition/numeric/less-than-equals/sim-iam-number-lte.js +1 -0
- package/dist/service/iam/authorize/match/condition/sim-iam-condition-match.d.ts +26 -0
- package/dist/service/iam/authorize/match/condition/sim-iam-condition-match.js +1 -0
- package/dist/service/iam/authorize/match/condition/sim-iam-condition-operator-parser.js +2 -0
- package/dist/service/iam/authorize/match/condition/sim-iam-condition-operator.d.ts +15 -0
- package/dist/service/iam/authorize/match/condition/sim-iam-policy-condition-matcher.d.ts +11 -3
- package/dist/service/iam/authorize/match/condition/sim-iam-policy-condition-matcher.js +29 -11
- package/dist/service/iam/authorize/match/condition/sim-iam-string-comparison.d.ts +24 -0
- package/dist/service/iam/authorize/match/condition/sim-iam-string-comparison.js +17 -0
- package/dist/service/iam/authorize/match/condition/string/all-values/sim-iam-for-all-values-string-condition-operator.d.ts +1 -0
- package/dist/service/iam/authorize/match/condition/string/all-values/sim-iam-for-all-values-string-condition-operator.js +1 -0
- package/dist/service/iam/authorize/match/condition/string/all-values/sim-iam-for-all-values-string-equals.js +2 -1
- package/dist/service/iam/authorize/match/condition/string/all-values/sim-iam-for-all-values-string-like.js +2 -4
- package/dist/service/iam/authorize/match/condition/string/any-value/sim-iam-for-any-value-string-condition-operator.d.ts +1 -0
- package/dist/service/iam/authorize/match/condition/string/any-value/sim-iam-for-any-value-string-condition-operator.js +1 -0
- package/dist/service/iam/authorize/match/condition/string/any-value/sim-iam-for-any-value-string-equals.js +2 -1
- package/dist/service/iam/authorize/match/condition/string/any-value/sim-iam-for-any-value-string-like.js +2 -4
- package/dist/service/iam/authorize/match/condition/string/equals/sim-iam-string-equals.js +2 -1
- package/dist/service/iam/authorize/match/condition/string/like/sim-iam-string-like.js +2 -4
- package/dist/service/iam/authorize/match/condition/string/sim-iam-scalar-string-condition-operator.d.ts +1 -0
- package/dist/service/iam/authorize/match/condition/string/sim-iam-scalar-string-condition-operator.js +1 -0
- package/dist/service/iam/authorize/match/sim-iam-policy-statement-matcher.d.ts +18 -1
- package/dist/service/iam/authorize/match/sim-iam-policy-statement-matcher.js +32 -4
- package/dist/service/iam/authorize/scp/sim-iam-scp-gate.d.ts +96 -0
- package/dist/service/iam/authorize/scp/sim-iam-scp-gate.js +148 -0
- package/dist/service/iam/authorize/scp/sim-iam-scp-resolver.d.ts +53 -0
- package/dist/service/iam/authorize/scp/sim-iam-scp-resolver.js +1 -0
- package/dist/service/iam/authorize/sim-iam-account-auth-z.d.ts +8 -0
- package/dist/service/iam/authorize/sim-iam-account-auth-z.js +1 -0
- package/dist/service/iam/authorize/sim-iam-action-authorizer.js +1 -0
- package/dist/service/iam/authorize/sim-iam-authorizer.d.ts +2 -0
- package/dist/service/iam/authorize/sim-iam-authorizer.js +1 -0
- package/dist/service/iam/authorize/sim-iam-decision-value.d.ts +13 -0
- package/dist/service/iam/authorize/sim-iam-decision-value.js +12 -0
- package/dist/service/iam/authorize/sim-iam-decision.d.ts +44 -15
- package/dist/service/iam/authorize/sim-iam-decision.js +77 -48
- package/dist/service/iam/authorize/sim-iam-inter-service-auth-z.d.ts +8 -0
- package/dist/service/iam/authorize/sim-iam-inter-service-auth-z.js +1 -0
- package/dist/service/iam/authorize/sim-iam-region-auth-z.d.ts +31 -0
- package/dist/service/iam/authorize/sim-iam-region-auth-z.js +65 -0
- package/dist/service/iam/authorize/unevaluated/sim-iam-unevaluated-statement.type.d.ts +31 -0
- package/dist/service/iam/authorize/unevaluated/sim-iam-unevaluated-statement.type.js +1 -0
- package/dist/service/iam/authorize/unevaluated/sim-iam-unevaluated-statements.d.ts +31 -0
- package/dist/service/iam/authorize/unevaluated/sim-iam-unevaluated-statements.js +43 -0
- package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-attacher.d.ts +2 -1
- package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-attacher.js +2 -4
- package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.d.ts +2 -1
- package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.js +3 -3
- package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-creator.d.ts +2 -1
- package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-creator.js +7 -7
- package/dist/service/iam/cfn/role/sim-cfn-iam-role-creator.d.ts +2 -1
- package/dist/service/iam/cfn/role/sim-cfn-iam-role-creator.js +8 -8
- package/dist/service/iam/cfn/role/sim-cfn-iam-role-deleter.d.ts +2 -1
- package/dist/service/iam/cfn/role/sim-cfn-iam-role-deleter.js +10 -12
- package/dist/service/iam/cfn/sim-cfn-iam-resource-deleter.d.ts +2 -1
- package/dist/service/iam/cfn/sim-cfn-iam-resource-deleter.js +12 -16
- package/dist/service/iam/cfn/sim-cfn-iam-resource-factory.js +8 -5
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-creator.d.ts +2 -1
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-creator.js +11 -11
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-deleter.d.ts +4 -2
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-deleter.js +17 -3
- package/dist/service/iam/command/sim-iam-command-handlers.js +6 -1
- package/dist/service/iam/error/sim-iam.error.d.ts +8 -0
- package/dist/service/iam/error/sim-iam.error.js +2 -1
- package/dist/service/iam/sim-iam-account-parts.d.ts +9 -0
- package/dist/service/iam/sim-iam-account-parts.js +1 -0
- package/dist/service/kinesis/cfn/sim-cfn-kinesis-resource-deleter.d.ts +2 -1
- package/dist/service/kinesis/cfn/sim-cfn-kinesis-resource-deleter.js +2 -2
- package/dist/service/kinesis/cfn/sim-kinesis-cfn-resource-factory.d.ts +1 -1
- package/dist/service/kinesis/cfn/sim-kinesis-cfn-resource-factory.js +4 -3
- package/dist/service/kinesis/cfn/stream/sim-cfn-kinesis-stream-creator.d.ts +2 -1
- package/dist/service/kinesis/cfn/stream/sim-cfn-kinesis-stream-creator.js +5 -7
- package/dist/service/kinesis/command/authorize/sim-kinesis-authorizer.js +1 -0
- package/dist/service/kinesis/sim-kinesis.d.ts +1 -1
- package/dist/service/kinesis/sim-kinesis.js +3 -2
- package/dist/service/kms/cfn/alias/sim-cfn-kms-alias-creator.d.ts +2 -1
- package/dist/service/kms/cfn/alias/sim-cfn-kms-alias-creator.js +2 -2
- package/dist/service/kms/cfn/key/sim-cfn-kms-key-creator.d.ts +6 -6
- package/dist/service/kms/cfn/key/sim-cfn-kms-key-creator.js +11 -11
- package/dist/service/kms/cfn/sim-cfn-kms-resource-deleter.d.ts +2 -1
- package/dist/service/kms/cfn/sim-cfn-kms-resource-deleter.js +3 -5
- package/dist/service/kms/cfn/sim-cfn-kms-resource-factory.d.ts +2 -1
- package/dist/service/kms/cfn/sim-cfn-kms-resource-factory.js +6 -4
- package/dist/service/kms/command/authorize/sim-kms-authorizer.js +2 -0
- package/dist/service/kms/sim-kms-commands.d.ts +1 -1
- package/dist/service/kms/sim-kms-commands.js +3 -2
- package/dist/service/lambda/cfn/alias/sim-cfn-lambda-alias-creator.d.ts +2 -1
- package/dist/service/lambda/cfn/alias/sim-cfn-lambda-alias-creator.js +2 -2
- package/dist/service/lambda/cfn/event-invoke-config/sim-cfn-lambda-event-invoke-config-creator.d.ts +2 -1
- package/dist/service/lambda/cfn/event-invoke-config/sim-cfn-lambda-event-invoke-config-creator.js +2 -2
- package/dist/service/lambda/cfn/event-invoke-config/sim-cfn-lambda-event-invoke-config-remover.d.ts +2 -1
- package/dist/service/lambda/cfn/event-invoke-config/sim-cfn-lambda-event-invoke-config-remover.js +2 -4
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-creator.d.ts +2 -1
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-creator.js +2 -2
- package/dist/service/lambda/cfn/function/sim-cfn-lambda-function-creator.d.ts +2 -1
- package/dist/service/lambda/cfn/function/sim-cfn-lambda-function-creator.js +3 -4
- package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-creator.d.ts +2 -1
- package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-creator.js +2 -2
- package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-revoker.d.ts +2 -1
- package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-revoker.js +2 -2
- package/dist/service/lambda/cfn/sim-cfn-lambda-resource-deleter.d.ts +2 -8
- package/dist/service/lambda/cfn/sim-cfn-lambda-resource-deleter.js +18 -38
- package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.d.ts +2 -2
- package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.js +12 -9
- package/dist/service/lambda/cfn/url/sim-cfn-lambda-url-creator.d.ts +2 -1
- package/dist/service/lambda/cfn/url/sim-cfn-lambda-url-creator.js +2 -2
- package/dist/service/lambda/cfn/version/sim-cfn-lambda-version-creator.d.ts +2 -1
- package/dist/service/lambda/cfn/version/sim-cfn-lambda-version-creator.js +2 -2
- package/dist/service/lambda/command/create-function/create-function-authorizer.js +1 -0
- package/dist/service/lambda/command/delete-function/delete-function-authorizer.js +1 -0
- package/dist/service/lambda/command/event-invoke-config/event-invoke-config-authorizer.js +1 -0
- package/dist/service/lambda/command/function-url/function-url-authorizer.js +1 -0
- package/dist/service/lambda/command/get-function/get-function-authorizer.js +1 -0
- package/dist/service/lambda/command/invoke/invoke-authorizer.js +1 -0
- package/dist/service/lambda/command/list-functions/list-functions-authorizer.js +1 -0
- package/dist/service/lambda/command/update-function-code/update-function-code-authorizer.js +1 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.js +1 -0
- package/dist/service/lambda/command/version/version-authorizer.js +1 -0
- package/dist/service/lambda/serve/sim-lambda-url-router.js +2 -1
- package/dist/service/lambda/sim-lambda-commands.d.ts +1 -1
- package/dist/service/lambda/sim-lambda-commands.js +3 -2
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-creator.d.ts +3 -2
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-creator.js +4 -6
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-destination-creator.d.ts +3 -2
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-destination-creator.js +4 -6
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-source-creator.d.ts +3 -2
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-source-creator.js +4 -4
- package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.d.ts +2 -1
- package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.js +4 -4
- package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.d.ts +2 -2
- package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.js +7 -5
- package/dist/service/logs/command/authorize/sim-logs-authorizer.js +1 -0
- package/dist/service/logs/sim-logs-commands.d.ts +1 -1
- package/dist/service/logs/sim-logs-commands.js +3 -2
- package/dist/service/logs/subscription/lambda/sim-logs-destination-permission.js +2 -1
- package/dist/service/organizations/cfn/sim-cfn-organization-creator.d.ts +19 -0
- package/dist/service/organizations/cfn/sim-cfn-organization-creator.js +25 -0
- package/dist/service/organizations/cfn/sim-cfn-organizational-unit-creator.d.ts +16 -0
- package/dist/service/organizations/cfn/sim-cfn-organizational-unit-creator.js +21 -0
- package/dist/service/organizations/cfn/sim-cfn-organizations-account-creator.d.ts +20 -0
- package/dist/service/organizations/cfn/sim-cfn-organizations-account-creator.js +34 -0
- package/dist/service/organizations/cfn/sim-cfn-organizations-policy-creator.d.ts +21 -0
- package/dist/service/organizations/cfn/sim-cfn-organizations-policy-creator.js +40 -0
- package/dist/service/organizations/cfn/sim-cfn-organizations-policy-input.d.ts +20 -0
- package/dist/service/organizations/cfn/sim-cfn-organizations-policy-input.js +33 -0
- package/dist/service/organizations/cfn/sim-cfn-organizations-properties.d.ts +36 -0
- package/dist/service/organizations/cfn/sim-cfn-organizations-properties.js +78 -0
- package/dist/service/organizations/cfn/sim-cfn-organizations-record.d.ts +40 -0
- package/dist/service/organizations/cfn/sim-cfn-organizations-record.js +54 -0
- package/dist/service/organizations/cfn/sim-cfn-organizations-remover.d.ts +17 -0
- package/dist/service/organizations/cfn/sim-cfn-organizations-remover.js +40 -0
- package/dist/service/organizations/cfn/sim-organizations-cfn-resource-factory.d.ts +24 -0
- package/dist/service/organizations/cfn/sim-organizations-cfn-resource-factory.js +50 -0
- package/dist/service/organizations/index.d.ts +6 -0
- package/dist/service/organizations/index.js +6 -0
- package/dist/service/organizations/policy/sim-organizations-effective-policies.d.ts +43 -0
- package/dist/service/organizations/policy/sim-organizations-effective-policies.js +58 -0
- package/dist/service/organizations/policy/sim-organizations-scp-store.d.ts +61 -0
- package/dist/service/organizations/policy/sim-organizations-scp-store.js +103 -0
- package/dist/service/organizations/sim-organizations-structure.d.ts +94 -0
- package/dist/service/organizations/sim-organizations-structure.js +140 -0
- package/dist/service/organizations/sim-organizations.d.ts +95 -0
- package/dist/service/organizations/sim-organizations.js +99 -0
- package/dist/service/organizations/tree/sim-organizations-node.d.ts +57 -0
- package/dist/service/organizations/tree/sim-organizations-node.js +58 -0
- package/dist/service/organizations/tree/sim-organizations-tree.d.ts +91 -0
- package/dist/service/organizations/tree/sim-organizations-tree.js +154 -0
- package/dist/service/personalize/cfn/sim-cfn-personalize-dataset-creator.d.ts +3 -2
- package/dist/service/personalize/cfn/sim-cfn-personalize-dataset-creator.js +4 -6
- package/dist/service/personalize/cfn/sim-cfn-personalize-dataset-group-creator.d.ts +3 -2
- package/dist/service/personalize/cfn/sim-cfn-personalize-dataset-group-creator.js +4 -6
- package/dist/service/personalize/cfn/sim-cfn-personalize-event-tracker-creator.d.ts +3 -2
- package/dist/service/personalize/cfn/sim-cfn-personalize-event-tracker-creator.js +4 -6
- package/dist/service/personalize/cfn/sim-cfn-personalize-schema-creator.d.ts +3 -2
- package/dist/service/personalize/cfn/sim-cfn-personalize-schema-creator.js +4 -4
- package/dist/service/personalize/cfn/sim-cfn-personalize-solution-creator.d.ts +3 -2
- package/dist/service/personalize/cfn/sim-cfn-personalize-solution-creator.js +4 -6
- package/dist/service/personalize/cfn/sim-personalize-cfn-resource-factory.d.ts +2 -2
- package/dist/service/personalize/cfn/sim-personalize-cfn-resource-factory.js +7 -6
- package/dist/service/personalize/sim-personalize-data-operations.d.ts +1 -1
- package/dist/service/personalize/sim-personalize-data-operations.js +3 -2
- package/dist/service/rekognition/sim-rekognition.d.ts +1 -1
- package/dist/service/rekognition/sim-rekognition.js +3 -2
- package/dist/service/route53/cfn/dnssec/sim-cfn-r53-ksk-creator.d.ts +3 -2
- package/dist/service/route53/cfn/dnssec/sim-cfn-r53-ksk-creator.js +5 -5
- package/dist/service/route53/cfn/dnssec/sim-cfn-r53-zone-signing-creator.d.ts +3 -2
- package/dist/service/route53/cfn/dnssec/sim-cfn-r53-zone-signing-creator.js +4 -8
- package/dist/service/route53/cfn/hosted-zone/sim-cfn-r53-zone-creator.d.ts +2 -1
- package/dist/service/route53/cfn/hosted-zone/sim-cfn-r53-zone-creator.js +2 -2
- package/dist/service/route53/cfn/record-set/apply/sim-cfn-r53-record-set-applicator.d.ts +9 -1
- package/dist/service/route53/cfn/record-set/apply/sim-cfn-r53-record-set-applicator.js +23 -2
- package/dist/service/route53/cfn/sim-cfn-route53-resource-deleter.d.ts +5 -3
- package/dist/service/route53/cfn/sim-cfn-route53-resource-deleter.js +9 -28
- package/dist/service/route53/cfn/sim-cfn-route53-resource-factory.js +9 -5
- package/dist/service/route53/command/change-resource-record-sets/change-resource-record-sets-authorizer.js +1 -0
- package/dist/service/route53/command/create-hosted-zone/create-hosted-zone-authorizer.js +1 -0
- package/dist/service/route53/command/delete-hosted-zone/delete-hosted-zone-authorizer.js +1 -0
- package/dist/service/route53/command/dnssec/sim-route53-dnssec-authorizer.js +1 -0
- package/dist/service/route53/command/get-hosted-zone/get-hosted-zone-authorizer.js +1 -0
- package/dist/service/route53/command/list-hosted-zones-by-name/list-hosted-zones-by-name-authorizer.js +1 -0
- package/dist/service/route53/command/list-resource-record-sets/list-resource-record-sets-authorizer.js +1 -0
- package/dist/service/route53/sim-route53.d.ts +1 -1
- package/dist/service/route53/sim-route53.js +5 -2
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.d.ts +3 -0
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.js +6 -13
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-creator.d.ts +2 -1
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-creator.js +3 -2
- package/dist/service/s3/cfn/bucket-policy/sim-cfn-s3-bucket-policy-creator.d.ts +2 -1
- package/dist/service/s3/cfn/bucket-policy/sim-cfn-s3-bucket-policy-creator.js +2 -2
- package/dist/service/s3/cfn/sim-cfn-s3-resource-deleter.d.ts +2 -1
- package/dist/service/s3/cfn/sim-cfn-s3-resource-deleter.js +3 -7
- package/dist/service/s3/cfn/sim-cfn-s3-resource-factory.d.ts +2 -2
- package/dist/service/s3/cfn/sim-cfn-s3-resource-factory.js +6 -4
- package/dist/service/s3/command/create-bucket/create-bucket.handler.js +1 -0
- package/dist/service/s3/command/delete-bucket/delete-bucket-authorizer.js +1 -0
- package/dist/service/s3/command/delete-bucket-policy/delete-bucket-policy-authorizer.js +1 -0
- package/dist/service/s3/command/delete-object/delete-object-authorizer.js +1 -0
- package/dist/service/s3/command/get-bucket-policy/get-bucket-policy-authorizer.js +1 -0
- package/dist/service/s3/command/get-object/get-object-authorizer.js +1 -0
- package/dist/service/s3/command/head-bucket/head-bucket-authorizer.js +1 -0
- package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-authorizer.js +1 -0
- package/dist/service/s3/command/list-buckets/list-buckets-authorizer.js +1 -0
- package/dist/service/s3/command/list-objects/list-objects-authorizer.js +1 -0
- package/dist/service/s3/command/multipart/sim-s3-multipart-authorizer.js +1 -0
- package/dist/service/s3/command/notification/sim-s3-notification-authorizer.js +1 -0
- package/dist/service/s3/command/public-access-block/sim-s3-public-access-block-authorizer.js +1 -0
- package/dist/service/s3/command/put-bucket-policy/put-bucket-policy-authorizer.js +1 -0
- package/dist/service/s3/command/put-bucket-website/put-bucket-website-authorizer.js +1 -0
- package/dist/service/s3/command/put-object/put-object-authorizer.js +1 -0
- package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.js +2 -1
- package/dist/service/s3/notification/destination/sns/sim-s3-notification-topic.js +2 -1
- package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue.js +2 -1
- package/dist/service/s3/sim-s3-commands.d.ts +1 -1
- package/dist/service/s3/sim-s3-commands.js +3 -2
- package/dist/service/scheduler/cfn/sim-cfn-schedule-creator.d.ts +26 -0
- package/dist/service/scheduler/cfn/sim-cfn-schedule-creator.js +49 -0
- package/dist/service/scheduler/cfn/sim-cfn-schedule-group-creator.d.ts +31 -0
- package/dist/service/scheduler/cfn/sim-cfn-schedule-group-creator.js +48 -0
- package/dist/service/scheduler/cfn/sim-cfn-schedule-group-properties.d.ts +26 -0
- package/dist/service/scheduler/cfn/sim-cfn-schedule-group-properties.js +68 -0
- package/dist/service/scheduler/cfn/sim-cfn-schedule-properties.js +4 -10
- package/dist/service/scheduler/cfn/sim-cfn-scheduler-resource-error.d.ts +14 -3
- package/dist/service/scheduler/cfn/sim-cfn-scheduler-resource-error.js +28 -6
- package/dist/service/scheduler/cfn/sim-cfn-scheduler-resource-lookup.d.ts +10 -4
- package/dist/service/scheduler/cfn/sim-cfn-scheduler-resource-lookup.js +9 -6
- package/dist/service/scheduler/cfn/sim-scheduler-cfn-resource-factory.d.ts +6 -8
- package/dist/service/scheduler/cfn/sim-scheduler-cfn-resource-factory.js +20 -33
- package/dist/service/scheduler/command/authorize/sim-scheduler-authorizer.d.ts +9 -8
- package/dist/service/scheduler/command/authorize/sim-scheduler-authorizer.js +14 -15
- package/dist/service/scheduler/command/group/group.command.d.ts +90 -0
- package/dist/service/scheduler/command/group/group.command.js +1 -0
- package/dist/service/scheduler/command/group/sim-scheduler-described-group.d.ts +15 -0
- package/dist/service/scheduler/command/group/sim-scheduler-described-group.js +29 -0
- package/dist/service/scheduler/command/group/sim-scheduler-group-access.d.ts +57 -0
- package/dist/service/scheduler/command/group/sim-scheduler-group-access.js +70 -0
- package/dist/service/scheduler/command/group/sim-scheduler-group-commands.d.ts +46 -0
- package/dist/service/scheduler/command/group/sim-scheduler-group-commands.js +72 -0
- package/dist/service/scheduler/command/group/sim-scheduler-listed-groups.d.ts +6 -0
- package/dist/service/scheduler/command/group/sim-scheduler-listed-groups.js +10 -0
- package/dist/service/scheduler/command/group/sim-scheduler-unsimulated-group-input.d.ts +14 -0
- package/dist/service/scheduler/command/group/sim-scheduler-unsimulated-group-input.js +19 -0
- package/dist/service/scheduler/command/schedule/sim-scheduler-create-schedule.js +1 -0
- package/dist/service/scheduler/command/schedule/sim-scheduler-schedule-access.d.ts +16 -0
- package/dist/service/scheduler/command/schedule/sim-scheduler-schedule-access.js +23 -3
- package/dist/service/scheduler/command/sim-scheduler-command.types.d.ts +1 -0
- package/dist/service/scheduler/command/sim-scheduler-commands.d.ts +4 -0
- package/dist/service/scheduler/command/sim-scheduler-commands.js +14 -1
- package/dist/service/scheduler/delivery/sim-aws-scheduler-delivery-targets.js +1 -1
- package/dist/service/scheduler/delivery/sim-scheduler-delivery-function.js +2 -1
- package/dist/service/scheduler/delivery/sim-scheduler-delivery-queue.js +2 -1
- package/dist/service/scheduler/delivery/sim-scheduler-delivery-topic.js +2 -1
- package/dist/service/scheduler/delivery/sim-scheduler-execution-role.d.ts +9 -3
- package/dist/service/scheduler/delivery/sim-scheduler-execution-role.js +10 -3
- package/dist/service/scheduler/group/sim-scheduler-schedule-group-arn.d.ts +11 -0
- package/dist/service/scheduler/group/sim-scheduler-schedule-group-arn.js +13 -0
- package/dist/service/scheduler/group/sim-scheduler-schedule-group-store.d.ts +46 -0
- package/dist/service/scheduler/group/sim-scheduler-schedule-group-store.js +65 -0
- package/dist/service/scheduler/group/sim-scheduler-schedule-group.d.ts +25 -0
- package/dist/service/scheduler/group/sim-scheduler-schedule-group.js +32 -0
- package/dist/service/scheduler/index.d.ts +2 -0
- package/dist/service/scheduler/index.js +2 -0
- package/dist/service/scheduler/schedule/sim-scheduler-schedule-name.d.ts +11 -9
- package/dist/service/scheduler/schedule/sim-scheduler-schedule-name.js +15 -18
- package/dist/service/scheduler/schedule/sim-scheduler-schedule-store.d.ts +7 -0
- package/dist/service/scheduler/schedule/sim-scheduler-schedule-store.js +13 -0
- package/dist/service/scheduler/schedule/sim-scheduler-schedule.d.ts +13 -0
- package/dist/service/scheduler/schedule/sim-scheduler-schedule.js +16 -0
- package/dist/service/scheduler/sdk/sim-scheduler-sdk-command-router.js +16 -0
- package/dist/service/scheduler/sim-scheduler-inspection.d.ts +14 -0
- package/dist/service/scheduler/sim-scheduler-inspection.js +15 -0
- package/dist/service/scheduler/sim-scheduler.d.ts +19 -1
- package/dist/service/scheduler/sim-scheduler.js +38 -2
- package/dist/service/secretsmanager/cfn/secret/sim-cfn-secrets-manager-secret-creator.d.ts +2 -1
- package/dist/service/secretsmanager/cfn/secret/sim-cfn-secrets-manager-secret-creator.js +2 -2
- package/dist/service/secretsmanager/cfn/sim-cfn-secrets-manager-resource-factory.d.ts +2 -2
- package/dist/service/secretsmanager/cfn/sim-cfn-secrets-manager-resource-factory.js +4 -5
- package/dist/service/secretsmanager/command/authorize/sim-secrets-manager-authorizer.js +1 -0
- package/dist/service/secretsmanager/sim-secrets-manager.d.ts +1 -1
- package/dist/service/secretsmanager/sim-secrets-manager.js +3 -2
- package/dist/service/ses/cfn/configuration-set/sim-cfn-ses-configuration-set-creator.d.ts +3 -2
- package/dist/service/ses/cfn/configuration-set/sim-cfn-ses-configuration-set-creator.js +4 -4
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-creator.d.ts +3 -2
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-creator.js +4 -8
- package/dist/service/ses/cfn/sim-ses-cfn-resource-factory.d.ts +2 -2
- package/dist/service/ses/cfn/sim-ses-cfn-resource-factory.js +7 -6
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-creator.d.ts +3 -2
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-creator.js +4 -8
- package/dist/service/ses/command/authorize/sim-ses-authorizer.js +1 -0
- package/dist/service/ses/sim-ses-commands.d.ts +1 -1
- package/dist/service/ses/sim-ses-commands.js +3 -2
- package/dist/service/sns/cfn/sim-cfn-sns-resource-deleter.d.ts +5 -8
- package/dist/service/sns/cfn/sim-cfn-sns-resource-deleter.js +10 -28
- package/dist/service/sns/cfn/sim-sns-cfn-resource-factory.js +10 -5
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-creator.d.ts +2 -1
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-creator.js +2 -2
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-creator.d.ts +2 -1
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-creator.js +5 -7
- package/dist/service/sns/cfn/topic-policy/sim-cfn-sns-topic-policy-creator.d.ts +9 -1
- package/dist/service/sns/cfn/topic-policy/sim-cfn-sns-topic-policy-creator.js +20 -4
- package/dist/service/sns/delivery/lambda/sim-sns-delivery-function.js +2 -1
- package/dist/service/sns/delivery/sqs/sim-sns-delivery-queue.js +2 -1
- package/dist/service/sns/sim-sns.d.ts +1 -1
- package/dist/service/sns/sim-sns.js +3 -2
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.d.ts +2 -1
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.js +2 -4
- package/dist/service/sqs/cfn/queue-policy/sim-cfn-sqs-queue-policy-creator.d.ts +2 -1
- package/dist/service/sqs/cfn/queue-policy/sim-cfn-sqs-queue-policy-creator.js +4 -4
- package/dist/service/sqs/cfn/sim-cfn-sqs-resource-deleter.d.ts +2 -1
- package/dist/service/sqs/cfn/sim-cfn-sqs-resource-deleter.js +7 -7
- package/dist/service/sqs/cfn/sim-sqs-cfn-resource-factory.js +5 -3
- package/dist/service/sqs/command/authorize/sim-sqs-authorizer.js +1 -0
- package/dist/service/sqs/sim-sqs.d.ts +1 -1
- package/dist/service/sqs/sim-sqs.js +3 -2
- package/dist/service/ssm/cfn/parameter/sim-cfn-ssm-parameter-creator.d.ts +2 -1
- package/dist/service/ssm/cfn/parameter/sim-cfn-ssm-parameter-creator.js +2 -2
- package/dist/service/ssm/cfn/sim-cfn-ssm-resource-factory.d.ts +2 -2
- package/dist/service/ssm/cfn/sim-cfn-ssm-resource-factory.js +4 -3
- package/dist/service/ssm/command/authorize/sim-ssm-authorizer.js +1 -0
- package/dist/service/ssm/sim-ssm.d.ts +1 -1
- package/dist/service/ssm/sim-ssm.js +3 -2
- package/dist/service/stepfunctions/cfn/sim-cfn-step-functions-resource-deleter.d.ts +2 -1
- package/dist/service/stepfunctions/cfn/sim-cfn-step-functions-resource-deleter.js +2 -4
- package/dist/service/stepfunctions/cfn/sim-step-functions-cfn-resource-factory.d.ts +1 -1
- package/dist/service/stepfunctions/cfn/sim-step-functions-cfn-resource-factory.js +4 -3
- package/dist/service/stepfunctions/cfn/state-machine/sim-cfn-state-machine-creator.d.ts +2 -1
- package/dist/service/stepfunctions/cfn/state-machine/sim-cfn-state-machine-creator.js +2 -2
- package/dist/service/stepfunctions/task/sim-aws-states-task-targets.js +2 -4
- package/dist/service/stepfunctions/task/sim-states-execution-role.d.ts +3 -3
- package/dist/service/stepfunctions/task/sim-states-execution-role.js +4 -3
- package/dist/service/stepfunctions/task/sim-states-task-function.js +2 -1
- package/dist/service/sts/auth-z/assume-role-auth-z-coordinator.d.ts +3 -0
- package/dist/service/sts/auth-z/assume-role-auth-z-coordinator.js +2 -7
- package/dist/service/sts/auth-z/assume-role-source-account-auth-z.d.ts +6 -0
- package/dist/service/sts/auth-z/assume-role-source-account-auth-z.js +3 -0
- package/dist/service/sts/auth-z/assume-role-target-auth-z.d.ts +6 -0
- package/dist/service/sts/auth-z/assume-role-target-auth-z.js +3 -0
- package/dist/service/sts/auth-z/assume-role-trust-policy-authorizer.d.ts +6 -0
- package/dist/service/sts/auth-z/assume-role-trust-policy-authorizer.js +1 -0
- package/dist/service/sts/command/assume-role/assume-role.handler.d.ts +5 -0
- package/dist/service/sts/command/assume-role/assume-role.handler.js +2 -1
- package/dist/service/sts/service-role/sim-service-role-source.d.ts +33 -0
- package/dist/service/sts/service-role/sim-service-role-source.js +26 -0
- package/dist/service/sts/service-role/sim-service-role-target.d.ts +26 -0
- package/dist/service/sts/service-role/sim-service-role-target.js +27 -0
- package/dist/service/sts/service-role/sim-service-role.d.ts +16 -20
- package/dist/service/sts/service-role/sim-service-role.js +7 -21
- package/dist/service/sts/sim-sts.js +1 -0
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-creator.d.ts +3 -2
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-creator.js +4 -6
- package/dist/service/wafv2/cfn/ip-set/sim-cfn-waf-ip-set-creator.d.ts +3 -2
- package/dist/service/wafv2/cfn/ip-set/sim-cfn-waf-ip-set-creator.js +4 -4
- package/dist/service/wafv2/cfn/regex-pattern-set/sim-cfn-waf-regex-set-creator.d.ts +3 -2
- package/dist/service/wafv2/cfn/regex-pattern-set/sim-cfn-waf-regex-set-creator.js +4 -4
- package/dist/service/wafv2/cfn/sim-cfn-waf-resource-deleter.d.ts +2 -1
- package/dist/service/wafv2/cfn/sim-cfn-waf-resource-deleter.js +5 -5
- package/dist/service/wafv2/cfn/sim-waf-cfn-resource-factory.d.ts +2 -2
- package/dist/service/wafv2/cfn/sim-waf-cfn-resource-factory.js +8 -6
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-creator.d.ts +3 -2
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-creator.js +4 -6
- package/dist/service/wafv2/command/authorize/sim-wafv2-authorizer.js +1 -0
- package/dist/service/wafv2/sim-wafv2-commands.d.ts +1 -1
- package/dist/service/wafv2/sim-wafv2-commands.js +3 -2
- package/dist/util/clock/sim-clock-control.d.ts +3 -1
- package/dist/util/clock/sim-clock-control.js +2 -0
- package/dist/util/clock/sim-controllable-clock.d.ts +3 -1
- package/dist/util/clock/sim-controllable-clock.js +2 -0
- package/dist/util/clock/sim-duration.d.ts +6 -2
- package/dist/util/clock/sim-duration.js +8 -1
- package/package.json +5 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Resource types belonging to a WebSocket API, which is the half of API
|
|
3
|
+
* Gateway v2 this simulation does not model at all.
|
|
4
|
+
*/
|
|
5
|
+
const webSocketResourceTypeNames = new Set([
|
|
6
|
+
"Model",
|
|
7
|
+
"RouteResponse",
|
|
8
|
+
"IntegrationResponse",
|
|
9
|
+
]);
|
|
10
|
+
/**
|
|
11
|
+
* Say why a Resource type is unsupported when there is more to say than that
|
|
12
|
+
* nothing creates it yet.
|
|
13
|
+
*/
|
|
14
|
+
export function simCfnApiGatewayV2UnsupportedReason(resourceTypeName) {
|
|
15
|
+
if (webSocketResourceTypeNames.has(resourceTypeName)) {
|
|
16
|
+
return ", which belongs to a WebSocket API and is not simulated";
|
|
17
|
+
}
|
|
18
|
+
return "";
|
|
19
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SimCfnResource } from "../../cloudformation/resource/sim-cfn-resource.js";
|
|
2
2
|
import type { SimCfnTemplateValueRecord } from "../../cloudformation/template/value/sim-cfn-template-value.js";
|
|
3
3
|
import type { SimApiGatewayV2 } from "../sim-api-gateway-v2.js";
|
|
4
|
+
import type { SimCfnResourceCallerOptions } from "../../cloudformation/resource/caller/sim-cfn-resource-caller-options.js";
|
|
4
5
|
interface SimCfnHttpApiPartDeleterProperties {
|
|
5
6
|
readonly apiGatewayV2: SimApiGatewayV2;
|
|
6
7
|
}
|
|
@@ -22,7 +23,7 @@ export declare class SimCfnHttpApiPartDeleter {
|
|
|
22
23
|
/**
|
|
23
24
|
* Delete one part of an HTTP API, or report a part type nothing deletes.
|
|
24
25
|
*/
|
|
25
|
-
delete(resourceTypeName: string, resource: SimCfnResource, properties: SimCfnTemplateValueRecord): Promise<void>;
|
|
26
|
+
delete(resourceTypeName: string, resource: SimCfnResource, properties: SimCfnTemplateValueRecord, options?: SimCfnResourceCallerOptions): Promise<void>;
|
|
26
27
|
private part;
|
|
27
28
|
private apiId;
|
|
28
29
|
}
|
|
@@ -19,35 +19,27 @@ export class SimCfnHttpApiPartDeleter {
|
|
|
19
19
|
/**
|
|
20
20
|
* Delete one part of an HTTP API, or report a part type nothing deletes.
|
|
21
21
|
*/
|
|
22
|
-
async delete(resourceTypeName, resource, properties) {
|
|
22
|
+
async delete(resourceTypeName, resource, properties, options) {
|
|
23
23
|
const apiId = this.apiId(resource, properties);
|
|
24
24
|
switch (resourceTypeName) {
|
|
25
25
|
case "Authorizer": {
|
|
26
26
|
const { authorizerId } = this.part(resource);
|
|
27
|
-
await this.apiGatewayV2.deleteAuthorizer({
|
|
28
|
-
input: { ApiId: apiId, AuthorizerId: authorizerId },
|
|
29
|
-
});
|
|
27
|
+
await this.apiGatewayV2.deleteAuthorizer({ input: { ApiId: apiId, AuthorizerId: authorizerId } }, options);
|
|
30
28
|
return;
|
|
31
29
|
}
|
|
32
30
|
case "Integration": {
|
|
33
31
|
const { integrationId } = this.part(resource);
|
|
34
|
-
await this.apiGatewayV2.deleteIntegration({
|
|
35
|
-
input: { ApiId: apiId, IntegrationId: integrationId },
|
|
36
|
-
});
|
|
32
|
+
await this.apiGatewayV2.deleteIntegration({ input: { ApiId: apiId, IntegrationId: integrationId } }, options);
|
|
37
33
|
return;
|
|
38
34
|
}
|
|
39
35
|
case "Route": {
|
|
40
36
|
const { routeId } = this.part(resource);
|
|
41
|
-
await this.apiGatewayV2.deleteRoute({
|
|
42
|
-
input: { ApiId: apiId, RouteId: routeId },
|
|
43
|
-
});
|
|
37
|
+
await this.apiGatewayV2.deleteRoute({ input: { ApiId: apiId, RouteId: routeId } }, options);
|
|
44
38
|
return;
|
|
45
39
|
}
|
|
46
40
|
case "Stage": {
|
|
47
41
|
const { stageName } = this.part(resource);
|
|
48
|
-
await this.apiGatewayV2.deleteStage({
|
|
49
|
-
input: { ApiId: apiId, StageName: stageName },
|
|
50
|
-
});
|
|
42
|
+
await this.apiGatewayV2.deleteStage({ input: { ApiId: apiId, StageName: stageName } }, options);
|
|
51
43
|
return;
|
|
52
44
|
}
|
|
53
45
|
default: {
|
|
@@ -2,6 +2,7 @@ import type { SimCfnResource } from "../../../cloudformation/resource/sim-cfn-re
|
|
|
2
2
|
import type { SimCfnTemplateValueRecord } from "../../../cloudformation/template/value/sim-cfn-template-value.js";
|
|
3
3
|
import type { SimHttpApiStage } from "../../api/stage/sim-http-api-stage.js";
|
|
4
4
|
import type { SimApiGatewayV2 } from "../../sim-api-gateway-v2.js";
|
|
5
|
+
import type { SimCfnResourceCallerOptions } from "../../../cloudformation/resource/caller/sim-cfn-resource-caller-options.js";
|
|
5
6
|
interface SimCfnHttpApiStageCreatorProperties {
|
|
6
7
|
readonly apiGatewayV2: SimApiGatewayV2;
|
|
7
8
|
}
|
|
@@ -19,6 +20,6 @@ export declare class SimCfnHttpApiStageCreator {
|
|
|
19
20
|
/**
|
|
20
21
|
* Create a stage from an AWS::ApiGatewayV2::Stage Resource.
|
|
21
22
|
*/
|
|
22
|
-
create(resource: SimCfnResource, properties: SimCfnTemplateValueRecord): Promise<SimHttpApiStage>;
|
|
23
|
+
create(resource: SimCfnResource, properties: SimCfnTemplateValueRecord, options?: SimCfnResourceCallerOptions): Promise<SimHttpApiStage>;
|
|
23
24
|
}
|
|
24
25
|
export {};
|
|
@@ -16,15 +16,13 @@ export class SimCfnHttpApiStageCreator {
|
|
|
16
16
|
/**
|
|
17
17
|
* Create a stage from an AWS::ApiGatewayV2::Stage Resource.
|
|
18
18
|
*/
|
|
19
|
-
async create(resource, properties) {
|
|
19
|
+
async create(resource, properties, options) {
|
|
20
20
|
const stageProperties = new SimCfnHttpApiStageProperties({
|
|
21
21
|
resource,
|
|
22
22
|
properties,
|
|
23
23
|
});
|
|
24
24
|
const apiId = stageProperties.apiId();
|
|
25
|
-
const created = await this.apiGatewayV2.createStage({
|
|
26
|
-
input: stageProperties.createStageInput(),
|
|
27
|
-
});
|
|
25
|
+
const created = await this.apiGatewayV2.createStage({ input: stageProperties.createStageInput() }, options);
|
|
28
26
|
const stage = this.apiGatewayV2
|
|
29
27
|
.findApi(apiId)
|
|
30
28
|
?.stages.find(created.StageName);
|
|
@@ -39,6 +39,9 @@ export class SimHttpApiAuthorizerPolicy {
|
|
|
39
39
|
},
|
|
40
40
|
],
|
|
41
41
|
resourcePolicies: [],
|
|
42
|
+
// An authorizer's policy document is evaluated on its own. No Account
|
|
43
|
+
// boundary is being crossed here, so no service control policy applies.
|
|
44
|
+
serviceControlPolicies: { applies: false, levels: [] },
|
|
42
45
|
allowRequirement: new SimIamEitherSideAllowRequirement(),
|
|
43
46
|
action: simExecuteApiInvokeAction,
|
|
44
47
|
resource: routeArn,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SimAws } from "../../aws/sim-aws.js";
|
|
2
|
+
import { simScopeIamAuthZ } from "../../iam/authorize/sim-iam-region-auth-z.js";
|
|
2
3
|
/**
|
|
3
4
|
* Routes a served HTTP API request to the API behind it, and an integration to
|
|
4
5
|
* the function behind that.
|
|
@@ -45,7 +46,7 @@ export class SimApiGatewayV2Router {
|
|
|
45
46
|
*/
|
|
46
47
|
iamFor(api) {
|
|
47
48
|
const { accountId, regionName } = api.accountRegionScope;
|
|
48
|
-
return this.simAws.accountRegionScope(accountId, regionName)
|
|
49
|
+
return simScopeIamAuthZ(this.simAws.accountRegionScope(accountId, regionName));
|
|
49
50
|
}
|
|
50
51
|
/**
|
|
51
52
|
* Find the function an integration invokes, and the IAM deciding whether it
|
|
@@ -77,6 +78,8 @@ export class SimApiGatewayV2Router {
|
|
|
77
78
|
const target = scope
|
|
78
79
|
.lambda()
|
|
79
80
|
.getSimFunctionTarget(lambdaUri.functionName, lambdaUri.qualifier);
|
|
80
|
-
return target === undefined
|
|
81
|
+
return target === undefined
|
|
82
|
+
? undefined
|
|
83
|
+
: { ...target, iam: simScopeIamAuthZ(scope) };
|
|
81
84
|
}
|
|
82
85
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type BackgroundScheduler } from "../../util/background/background.js";
|
|
2
2
|
import type { SimAwsAccountRegionScope } from "../aws/sim-aws-account-region-scope.js";
|
|
3
|
-
import {
|
|
3
|
+
import type { SimIamInterServiceAuthZ } from "../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
4
4
|
import { type SimHttpApiJwtIssuerKeys } from "./api/authorizer/sim-http-api-jwt-issuer-keys.js";
|
|
5
5
|
import { SimHttpApiStore } from "./api/sim-http-api-store.js";
|
|
6
6
|
import { SimHttpApiDomainStore } from "./domain/sim-http-api-domain-store.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BackgroundTasks, } from "../../util/background/background.js";
|
|
2
2
|
import { simAwsAccountRegionScopeFactory } from "../aws/sim-aws-account-region-scope.factory.js";
|
|
3
|
-
import {
|
|
3
|
+
import { simIamInRegion } from "../iam/authorize/sim-iam-region-auth-z.js";
|
|
4
4
|
import { SimHttpApiNoJwtIssuerKeys, } from "./api/authorizer/sim-http-api-jwt-issuer-keys.js";
|
|
5
5
|
import { SimHttpApiStore } from "./api/sim-http-api-store.js";
|
|
6
6
|
import { SimHttpApiDomainStore } from "./domain/sim-http-api-domain-store.js";
|
|
@@ -38,7 +38,8 @@ export class SimApiGatewayV2Commands {
|
|
|
38
38
|
apiMappings;
|
|
39
39
|
background;
|
|
40
40
|
constructor(properties = {}) {
|
|
41
|
-
const { accountRegionScope = simAwsAccountRegionScopeFactory.make(),
|
|
41
|
+
const { accountRegionScope = simAwsAccountRegionScopeFactory.make(), background = new BackgroundTasks(), registry = new SimHttpApiRegistry(), domainRegistry = new SimHttpApiDomainRegistry(), jwtIssuerKeys = new SimHttpApiNoJwtIssuerKeys(), } = properties;
|
|
42
|
+
const iam = simIamInRegion(properties.iam, accountRegionScope.regionName);
|
|
42
43
|
const authorizer = new SimApiGatewayV2Authorizer({
|
|
43
44
|
iam,
|
|
44
45
|
accountRegionScope,
|
|
@@ -2,6 +2,7 @@ import type { SimCfnResource } from "../../../cloudformation/resource/sim-cfn-re
|
|
|
2
2
|
import type { SimCfnTemplateValueRecord } from "../../../cloudformation/template/value/sim-cfn-template-value.js";
|
|
3
3
|
import type { SimAthenaNamedQuery } from "../../named-query/sim-athena-named-query.js";
|
|
4
4
|
import type { SimAthena } from "../../sim-athena.js";
|
|
5
|
+
import type { SimCfnResourceCallerOptions } from "../../../cloudformation/resource/caller/sim-cfn-resource-caller-options.js";
|
|
5
6
|
interface SimCfnAthenaNamedQueryCreatorProperties {
|
|
6
7
|
readonly athena: SimAthena;
|
|
7
8
|
}
|
|
@@ -20,10 +21,10 @@ export declare class SimCfnAthenaNamedQueryCreator {
|
|
|
20
21
|
/**
|
|
21
22
|
* Create the named query a Resource declares.
|
|
22
23
|
*/
|
|
23
|
-
create(resource: SimCfnResource, properties: SimCfnTemplateValueRecord): Promise<SimAthenaNamedQuery>;
|
|
24
|
+
create(resource: SimCfnResource, properties: SimCfnTemplateValueRecord, options?: SimCfnResourceCallerOptions): Promise<SimAthenaNamedQuery>;
|
|
24
25
|
/**
|
|
25
26
|
* Delete the named query a Resource created.
|
|
26
27
|
*/
|
|
27
|
-
delete(namedQuery: SimAthenaNamedQuery): Promise<void>;
|
|
28
|
+
delete(namedQuery: SimAthenaNamedQuery, options?: SimCfnResourceCallerOptions): Promise<void>;
|
|
28
29
|
}
|
|
29
30
|
export {};
|
|
@@ -19,7 +19,7 @@ export class SimCfnAthenaNamedQueryCreator {
|
|
|
19
19
|
/**
|
|
20
20
|
* Create the named query a Resource declares.
|
|
21
21
|
*/
|
|
22
|
-
async create(resource, properties) {
|
|
22
|
+
async create(resource, properties, options) {
|
|
23
23
|
const read = new SimCfnAthenaNamedQueryProperties({
|
|
24
24
|
resource,
|
|
25
25
|
properties,
|
|
@@ -27,7 +27,7 @@ export class SimCfnAthenaNamedQueryCreator {
|
|
|
27
27
|
read.recordIgnoredProperties();
|
|
28
28
|
const input = read.createInput();
|
|
29
29
|
return await simCfnAthenaResourceCreation(athenaNamedQueryResourceType, resource.logicalId, async () => {
|
|
30
|
-
const created = await this.athena.createNamedQuery({ input });
|
|
30
|
+
const created = await this.athena.createNamedQuery({ input }, options);
|
|
31
31
|
const namedQuery = this.athena
|
|
32
32
|
.namedQueries()
|
|
33
33
|
.find((candidate) => candidate.namedQueryId === created.NamedQueryId);
|
|
@@ -39,9 +39,7 @@ export class SimCfnAthenaNamedQueryCreator {
|
|
|
39
39
|
/**
|
|
40
40
|
* Delete the named query a Resource created.
|
|
41
41
|
*/
|
|
42
|
-
async delete(namedQuery) {
|
|
43
|
-
await this.athena.deleteNamedQuery({
|
|
44
|
-
input: { NamedQueryId: namedQuery.namedQueryId },
|
|
45
|
-
});
|
|
42
|
+
async delete(namedQuery, options) {
|
|
43
|
+
await this.athena.deleteNamedQuery({ input: { NamedQueryId: namedQuery.namedQueryId } }, options);
|
|
46
44
|
}
|
|
47
45
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SimCfnServiceResourceFactory } from "../../cloudformation/resource/factory/sim-cfn-resource-factory.type.js";
|
|
2
|
-
import type { SimCfnResource, SimCloudFormationResourceCreateContext } from "../../cloudformation/resource/sim-cfn-resource.js";
|
|
2
|
+
import type { SimCfnResource, SimCloudFormationResourceCreateContext, SimCloudFormationResourceDeleteContext } from "../../cloudformation/resource/sim-cfn-resource.js";
|
|
3
3
|
import type { SimAthena } from "../sim-athena.js";
|
|
4
4
|
interface SimAthenaCfnResourceFactoryProperties {
|
|
5
5
|
readonly athena: SimAthena;
|
|
@@ -22,7 +22,7 @@ export declare class SimAthenaCfnResourceFactory implements SimCfnServiceResourc
|
|
|
22
22
|
/**
|
|
23
23
|
* Delete a simulated Athena resource created from a CloudFormation Resource.
|
|
24
24
|
*/
|
|
25
|
-
delete(resourceTypeName: string, resource: SimCfnResource): Promise<void>;
|
|
25
|
+
delete(resourceTypeName: string, resource: SimCfnResource, context: SimCloudFormationResourceDeleteContext): Promise<void>;
|
|
26
26
|
private handler;
|
|
27
27
|
}
|
|
28
28
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { assertDefined } from "../../../util/type-guard/defined.js";
|
|
2
|
+
import { simCfnResourceCallerOptions, } from "../../cloudformation/resource/caller/sim-cfn-resource-caller-options.js";
|
|
2
3
|
import { SimCfnAthenaNamedQueryCreator } from "./named-query/sim-cfn-athena-named-query-creator.js";
|
|
3
4
|
import { athenaNamedQueryResourceTypeName, athenaWorkGroupResourceTypeName, } from "./sim-cfn-athena-resource-types.js";
|
|
4
5
|
import { SimCfnAthenaWorkGroupCreator } from "./work-group/sim-cfn-athena-work-group-creator.js";
|
|
@@ -29,13 +30,13 @@ export class SimAthenaCfnResourceFactory {
|
|
|
29
30
|
* Create a simulated Athena resource from a CloudFormation Resource.
|
|
30
31
|
*/
|
|
31
32
|
async create(resourceTypeName, resource, context) {
|
|
32
|
-
return await this.handler(resourceTypeName, "").create(resource, context.resolvedProperties ?? resource.properties);
|
|
33
|
+
return await this.handler(resourceTypeName, "").create(resource, context.resolvedProperties ?? resource.properties, simCfnResourceCallerOptions(context.caller));
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
36
|
* Delete a simulated Athena resource created from a CloudFormation Resource.
|
|
36
37
|
*/
|
|
37
|
-
async delete(resourceTypeName, resource) {
|
|
38
|
-
await this.handler(resourceTypeName, " deletion").delete(resource);
|
|
38
|
+
async delete(resourceTypeName, resource, context) {
|
|
39
|
+
await this.handler(resourceTypeName, " deletion").delete(resource, simCfnResourceCallerOptions(context.caller));
|
|
39
40
|
}
|
|
40
41
|
handler(resourceTypeName, operationSuffix) {
|
|
41
42
|
const handler = this.#handlers.get(resourceTypeName);
|
|
@@ -53,9 +54,9 @@ export class SimAthenaCfnResourceFactory {
|
|
|
53
54
|
*/
|
|
54
55
|
function handler(creator, described) {
|
|
55
56
|
return {
|
|
56
|
-
create: async (resource, properties) => await creator.create(resource, properties),
|
|
57
|
-
delete: async (resource) => {
|
|
58
|
-
await creator.delete(created(resource, described));
|
|
57
|
+
create: async (resource, properties, options) => await creator.create(resource, properties, options),
|
|
58
|
+
delete: async (resource, options) => {
|
|
59
|
+
await creator.delete(created(resource, described), options);
|
|
59
60
|
},
|
|
60
61
|
};
|
|
61
62
|
}
|
|
@@ -2,6 +2,7 @@ import type { SimCfnResource } from "../../../cloudformation/resource/sim-cfn-re
|
|
|
2
2
|
import type { SimCfnTemplateValueRecord } from "../../../cloudformation/template/value/sim-cfn-template-value.js";
|
|
3
3
|
import type { SimAthena } from "../../sim-athena.js";
|
|
4
4
|
import type { SimAthenaWorkGroup } from "../../workgroup/sim-athena-work-group.js";
|
|
5
|
+
import type { SimCfnResourceCallerOptions } from "../../../cloudformation/resource/caller/sim-cfn-resource-caller-options.js";
|
|
5
6
|
interface SimCfnAthenaWorkGroupCreatorProperties {
|
|
6
7
|
readonly athena: SimAthena;
|
|
7
8
|
}
|
|
@@ -19,14 +20,14 @@ export declare class SimCfnAthenaWorkGroupCreator {
|
|
|
19
20
|
/**
|
|
20
21
|
* Create the workgroup a Resource declares.
|
|
21
22
|
*/
|
|
22
|
-
create(resource: SimCfnResource, properties: SimCfnTemplateValueRecord): Promise<SimAthenaWorkGroup>;
|
|
23
|
+
create(resource: SimCfnResource, properties: SimCfnTemplateValueRecord, options?: SimCfnResourceCallerOptions): Promise<SimAthenaWorkGroup>;
|
|
23
24
|
/**
|
|
24
25
|
* Delete the workgroup a Resource created.
|
|
25
26
|
*
|
|
26
27
|
* Deleted recursively, so a workgroup the stack also gave named queries goes
|
|
27
28
|
* with them rather than failing the stack deletion.
|
|
28
29
|
*/
|
|
29
|
-
delete(workGroup: SimAthenaWorkGroup): Promise<void>;
|
|
30
|
+
delete(workGroup: SimAthenaWorkGroup, options?: SimCfnResourceCallerOptions): Promise<void>;
|
|
30
31
|
private applyState;
|
|
31
32
|
private read;
|
|
32
33
|
}
|
|
@@ -19,7 +19,7 @@ export class SimCfnAthenaWorkGroupCreator {
|
|
|
19
19
|
/**
|
|
20
20
|
* Create the workgroup a Resource declares.
|
|
21
21
|
*/
|
|
22
|
-
async create(resource, properties) {
|
|
22
|
+
async create(resource, properties, options) {
|
|
23
23
|
const read = this.read(resource, properties);
|
|
24
24
|
read.recordIgnoredProperties();
|
|
25
25
|
const input = read.createInput();
|
|
@@ -31,8 +31,8 @@ export class SimCfnAthenaWorkGroupCreator {
|
|
|
31
31
|
* to be refused while there is still nothing to leave behind.
|
|
32
32
|
*/
|
|
33
33
|
const state = workGroupStateFrom(read.state());
|
|
34
|
-
await this.athena.createWorkGroup({ input });
|
|
35
|
-
await this.applyState(String(input.Name), state);
|
|
34
|
+
await this.athena.createWorkGroup({ input }, options);
|
|
35
|
+
await this.applyState(String(input.Name), state, options);
|
|
36
36
|
const workGroup = this.athena.findWorkGroup(String(input.Name));
|
|
37
37
|
assertDefined(workGroup, `sim Athena workgroup ${String(input.Name)} after CloudFormation ` +
|
|
38
38
|
`creation`);
|
|
@@ -45,18 +45,14 @@ export class SimCfnAthenaWorkGroupCreator {
|
|
|
45
45
|
* Deleted recursively, so a workgroup the stack also gave named queries goes
|
|
46
46
|
* with them rather than failing the stack deletion.
|
|
47
47
|
*/
|
|
48
|
-
async delete(workGroup) {
|
|
49
|
-
await this.athena.deleteWorkGroup({
|
|
50
|
-
input: { WorkGroup: workGroup.name, RecursiveDeleteOption: true },
|
|
51
|
-
});
|
|
48
|
+
async delete(workGroup, options) {
|
|
49
|
+
await this.athena.deleteWorkGroup({ input: { WorkGroup: workGroup.name, RecursiveDeleteOption: true } }, options);
|
|
52
50
|
}
|
|
53
|
-
async applyState(name, state) {
|
|
51
|
+
async applyState(name, state, options) {
|
|
54
52
|
if (state === undefined) {
|
|
55
53
|
return;
|
|
56
54
|
}
|
|
57
|
-
await this.athena.updateWorkGroup({
|
|
58
|
-
input: { WorkGroup: name, State: state },
|
|
59
|
-
});
|
|
55
|
+
await this.athena.updateWorkGroup({ input: { WorkGroup: name, State: state } }, options);
|
|
60
56
|
}
|
|
61
57
|
read(resource, properties) {
|
|
62
58
|
return new SimCfnAthenaWorkGroupProperties({ resource, properties });
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import type { DatabaseSync } from "node:sqlite";
|
|
2
2
|
/**
|
|
3
|
-
* Trino's two approximate aggregates, computed exactly
|
|
3
|
+
* Trino's two approximate aggregates, computed exactly, and the exact count
|
|
4
|
+
* behind `count(DISTINCT <expression>)`.
|
|
4
5
|
*
|
|
5
|
-
* Real Athena answers
|
|
6
|
-
* themselves, so the simulation is the more accurate of the two. At
|
|
7
|
-
* a test seeds that difference cannot show, and the alternative is a
|
|
8
|
-
* that refuses to run at all.
|
|
6
|
+
* Real Athena answers the approximate pair from a sketch and this answers from
|
|
7
|
+
* the values themselves, so the simulation is the more accurate of the two. At
|
|
8
|
+
* the scale a test seeds that difference cannot show, and the alternative is a
|
|
9
|
+
* query that refuses to run at all.
|
|
10
|
+
*
|
|
11
|
+
* `count_distinct` is nobody's function to write. It is what the SQL rewrite
|
|
12
|
+
* turns `count(DISTINCT <expression>)` into, because the parser's Athena
|
|
13
|
+
* grammar takes a column after `DISTINCT` and nothing else.
|
|
9
14
|
*
|
|
10
15
|
* The state travels as JSON because SQLite carries an aggregate's accumulator
|
|
11
16
|
* as one of its own values rather than as an object.
|
|
@@ -1,26 +1,29 @@
|
|
|
1
|
+
import { countDistinctShim } from "./sim-athena-count-distinct.js";
|
|
2
|
+
import { countedDistinctValues, noDistinctValues, withDistinctValue, } from "./sim-athena-distinct-values.js";
|
|
1
3
|
/**
|
|
2
|
-
* Trino's two approximate aggregates, computed exactly
|
|
4
|
+
* Trino's two approximate aggregates, computed exactly, and the exact count
|
|
5
|
+
* behind `count(DISTINCT <expression>)`.
|
|
3
6
|
*
|
|
4
|
-
* Real Athena answers
|
|
5
|
-
* themselves, so the simulation is the more accurate of the two. At
|
|
6
|
-
* a test seeds that difference cannot show, and the alternative is a
|
|
7
|
-
* that refuses to run at all.
|
|
7
|
+
* Real Athena answers the approximate pair from a sketch and this answers from
|
|
8
|
+
* the values themselves, so the simulation is the more accurate of the two. At
|
|
9
|
+
* the scale a test seeds that difference cannot show, and the alternative is a
|
|
10
|
+
* query that refuses to run at all.
|
|
11
|
+
*
|
|
12
|
+
* `count_distinct` is nobody's function to write. It is what the SQL rewrite
|
|
13
|
+
* turns `count(DISTINCT <expression>)` into, because the parser's Athena
|
|
14
|
+
* grammar takes a column after `DISTINCT` and nothing else.
|
|
8
15
|
*
|
|
9
16
|
* The state travels as JSON because SQLite carries an aggregate's accumulator
|
|
10
17
|
* as one of its own values rather than as an object.
|
|
11
18
|
*/
|
|
12
19
|
export function simAthenaInstallAggregateShims(database) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return JSON.stringify([...seen]);
|
|
21
|
-
},
|
|
22
|
-
result: (accumulator) => JSON.parse(accumulator).length,
|
|
23
|
-
});
|
|
20
|
+
for (const name of ["approx_distinct", countDistinctShim]) {
|
|
21
|
+
database.aggregate(name, {
|
|
22
|
+
start: noDistinctValues,
|
|
23
|
+
step: withDistinctValue,
|
|
24
|
+
result: countedDistinctValues,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
24
27
|
database.aggregate("approx_percentile", {
|
|
25
28
|
start: () => JSON.stringify({ values: [], percentile: 0.5 }),
|
|
26
29
|
step: (accumulator, value, at) => {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DatabaseSync } from "node:sqlite";
|
|
2
|
+
/**
|
|
3
|
+
* Trino's hashing functions and the encodings that carry bytes in and out of
|
|
4
|
+
* them.
|
|
5
|
+
*
|
|
6
|
+
* A `varbinary` is held as a SQLite blob, so a digest travels as bytes the way
|
|
7
|
+
* it does in Athena and a `to_hex` around it reads the same. Trino refuses text
|
|
8
|
+
* where a `varbinary` is wanted and SQLite has no analysis to refuse it with,
|
|
9
|
+
* so a column reaching one of these without a `to_utf8` around it is hashed as
|
|
10
|
+
* its UTF-8 bytes.
|
|
11
|
+
*
|
|
12
|
+
* `spooky_hash_v2_32` and `spooky_hash_v2_64` are absent. Nothing an access log
|
|
13
|
+
* query reaches for spells either, and a name registered for one would have to
|
|
14
|
+
* carry a third hash written out by hand.
|
|
15
|
+
*/
|
|
16
|
+
export declare function simAthenaInstallBinaryShims(database: DatabaseSync): void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { crc32 } from "node:zlib";
|
|
3
|
+
import { simAthenaMurmur3 } from "./sim-athena-murmur3.js";
|
|
4
|
+
import { simAthenaDecodedText, simAthenaFromUtf8, } from "./sim-athena-binary-text.js";
|
|
5
|
+
import { shimBytes, shimText, simAthenaScalarShim, } from "./sim-athena-shim-registry.js";
|
|
6
|
+
import { simAthenaXxHash64 } from "./sim-athena-xxhash64.js";
|
|
7
|
+
/** The `node:crypto` digest each Trino hashing function is spelled with. */
|
|
8
|
+
const digests = new Map([
|
|
9
|
+
["md5", "md5"],
|
|
10
|
+
["sha1", "sha1"],
|
|
11
|
+
["sha256", "sha256"],
|
|
12
|
+
["sha512", "sha512"],
|
|
13
|
+
]);
|
|
14
|
+
/**
|
|
15
|
+
* Trino's hashing functions and the encodings that carry bytes in and out of
|
|
16
|
+
* them.
|
|
17
|
+
*
|
|
18
|
+
* A `varbinary` is held as a SQLite blob, so a digest travels as bytes the way
|
|
19
|
+
* it does in Athena and a `to_hex` around it reads the same. Trino refuses text
|
|
20
|
+
* where a `varbinary` is wanted and SQLite has no analysis to refuse it with,
|
|
21
|
+
* so a column reaching one of these without a `to_utf8` around it is hashed as
|
|
22
|
+
* its UTF-8 bytes.
|
|
23
|
+
*
|
|
24
|
+
* `spooky_hash_v2_32` and `spooky_hash_v2_64` are absent. Nothing an access log
|
|
25
|
+
* query reaches for spells either, and a name registered for one would have to
|
|
26
|
+
* carry a third hash written out by hand.
|
|
27
|
+
*/
|
|
28
|
+
export function simAthenaInstallBinaryShims(database) {
|
|
29
|
+
for (const [name, algorithm] of digests) {
|
|
30
|
+
simAthenaScalarShim(database, name, (value) => overBytes(value, (bytes) => new Uint8Array(createHash(algorithm).update(bytes).digest())));
|
|
31
|
+
}
|
|
32
|
+
simAthenaScalarShim(database, "xxhash64", (value) => overBytes(value, simAthenaXxHash64));
|
|
33
|
+
simAthenaScalarShim(database, "murmur3", (value) => overBytes(value, simAthenaMurmur3));
|
|
34
|
+
simAthenaScalarShim(database, "crc32", (value) => overBytes(value, (bytes) => crc32(bytes)));
|
|
35
|
+
simAthenaScalarShim(database, "to_hex", (value) => overBytes(value, (bytes) => Buffer.from(bytes).toString("hex").toUpperCase()));
|
|
36
|
+
simAthenaScalarShim(database, "to_base64", (value) => overBytes(value, (bytes) => Buffer.from(bytes).toString("base64")));
|
|
37
|
+
simAthenaScalarShim(database, "from_hex", (value) => simAthenaDecodedText(shimText(value), "hex"));
|
|
38
|
+
simAthenaScalarShim(database, "from_base64", (value) => simAthenaDecodedText(shimText(value), "base64"));
|
|
39
|
+
simAthenaScalarShim(database, "to_utf8", (value) => {
|
|
40
|
+
const text = shimText(value);
|
|
41
|
+
return text === undefined ? null : new TextEncoder().encode(text);
|
|
42
|
+
});
|
|
43
|
+
simAthenaScalarShim(database, "from_utf8", (...values) => simAthenaFromUtf8(shimBytes(values.at(0)), values));
|
|
44
|
+
}
|
|
45
|
+
/** One binary function over its argument, answering null where it is null. */
|
|
46
|
+
function overBytes(value, read) {
|
|
47
|
+
const bytes = shimBytes(value);
|
|
48
|
+
return bytes === undefined ? null : read(bytes);
|
|
49
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SQLOutputValue } from "node:sqlite";
|
|
2
|
+
/**
|
|
3
|
+
* One encoded string read back to bytes, or null where it is null.
|
|
4
|
+
*
|
|
5
|
+
* Trino fails the query over text the encoding cannot carry, and `Buffer` reads
|
|
6
|
+
* as much of it as it can and drops the rest. Raising here turns the query down
|
|
7
|
+
* instead, which is nearer to Trino's answer than bytes nobody wrote.
|
|
8
|
+
*/
|
|
9
|
+
export declare function simAthenaDecodedText(text: string | undefined, encoding: "base64" | "hex"): Uint8Array | null;
|
|
10
|
+
/**
|
|
11
|
+
* Bytes read back as text, with whatever was no UTF-8 replaced.
|
|
12
|
+
*
|
|
13
|
+
* Trino writes `U+FFFD` where a call named no replacement, which is what a
|
|
14
|
+
* decoder writes anyway. A call naming one has that written instead, and the
|
|
15
|
+
* replacement has to be a single character or empty, as Trino's does.
|
|
16
|
+
*
|
|
17
|
+
* Bytes carrying `U+FFFD` of their own leave nothing to tell the two apart
|
|
18
|
+
* once the decoder has run, so a call naming a replacement over those raises
|
|
19
|
+
* rather than replacing text that was never broken.
|
|
20
|
+
*/
|
|
21
|
+
export declare function simAthenaFromUtf8(bytes: Uint8Array | undefined, values: readonly SQLOutputValue[]): string | null;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { SimAthenaSetUpError } from "../error/sim-athena.error.js";
|
|
2
|
+
import { isExplicitNull } from "./sim-athena-shim-registry.js";
|
|
3
|
+
/** What each encoding will read back, in either case and padded or not. */
|
|
4
|
+
const shapes = new Map([
|
|
5
|
+
["hex", /^[\dA-Fa-f]*$/u],
|
|
6
|
+
["base64", /^[\d+/A-Za-z]*={0,2}$/u],
|
|
7
|
+
]);
|
|
8
|
+
/** Whether the length of this text is one the encoding could have written. */
|
|
9
|
+
const lengths = new Map([
|
|
10
|
+
["hex", (text) => text.length % 2 === 0],
|
|
11
|
+
["base64", isBase64Length],
|
|
12
|
+
]);
|
|
13
|
+
/** One character or none, counted in code points the way Trino counts them. */
|
|
14
|
+
const oneCharacter = /^.?$/u;
|
|
15
|
+
/** The character a UTF-8 decoder writes where the bytes were no UTF-8. */
|
|
16
|
+
const replacementCharacter = "\u{FFFD}";
|
|
17
|
+
/** The bytes that encode that character, which are valid UTF-8 themselves. */
|
|
18
|
+
const encodedReplacement = Buffer.from([0xef, 0xbf, 0xbd]);
|
|
19
|
+
/**
|
|
20
|
+
* One encoded string read back to bytes, or null where it is null.
|
|
21
|
+
*
|
|
22
|
+
* Trino fails the query over text the encoding cannot carry, and `Buffer` reads
|
|
23
|
+
* as much of it as it can and drops the rest. Raising here turns the query down
|
|
24
|
+
* instead, which is nearer to Trino's answer than bytes nobody wrote.
|
|
25
|
+
*/
|
|
26
|
+
export function simAthenaDecodedText(text, encoding) {
|
|
27
|
+
if (text === undefined) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
const read = shapes.get(encoding)?.test(text) === true &&
|
|
31
|
+
lengths.get(encoding)?.(text) === true;
|
|
32
|
+
if (!read) {
|
|
33
|
+
throw new SimAthenaSetUpError(`from_${encoding} takes ${encoding} text`);
|
|
34
|
+
}
|
|
35
|
+
return new Uint8Array(Buffer.from(text, encoding));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Whether base64 of this length decodes, padding and all.
|
|
39
|
+
*
|
|
40
|
+
* Base64 carries three bytes in every four characters, and a length one over a
|
|
41
|
+
* multiple of four is a length no encoder could have written. Padding fills the
|
|
42
|
+
* last four out, so text carrying any has to be a multiple of four long.
|
|
43
|
+
* `Buffer` takes `A=` and `AAAA=` and answers with bytes nobody wrote.
|
|
44
|
+
*/
|
|
45
|
+
function isBase64Length(text) {
|
|
46
|
+
let padding = 0;
|
|
47
|
+
while (text.charAt(text.length - padding - 1) === "=") {
|
|
48
|
+
padding += 1;
|
|
49
|
+
}
|
|
50
|
+
const body = text.length - padding;
|
|
51
|
+
return body % 4 !== 1 && (padding === 0 || text.length % 4 === 0);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Bytes read back as text, with whatever was no UTF-8 replaced.
|
|
55
|
+
*
|
|
56
|
+
* Trino writes `U+FFFD` where a call named no replacement, which is what a
|
|
57
|
+
* decoder writes anyway. A call naming one has that written instead, and the
|
|
58
|
+
* replacement has to be a single character or empty, as Trino's does.
|
|
59
|
+
*
|
|
60
|
+
* Bytes carrying `U+FFFD` of their own leave nothing to tell the two apart
|
|
61
|
+
* once the decoder has run, so a call naming a replacement over those raises
|
|
62
|
+
* rather than replacing text that was never broken.
|
|
63
|
+
*/
|
|
64
|
+
export function simAthenaFromUtf8(bytes, values) {
|
|
65
|
+
if (bytes === undefined) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
const decoded = new TextDecoder().decode(bytes);
|
|
69
|
+
if (values.length < 2) {
|
|
70
|
+
return decoded;
|
|
71
|
+
}
|
|
72
|
+
if (isExplicitNull(values, 1)) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
const replacement = replacementFor(bytes, values);
|
|
76
|
+
return decoded.replaceAll(replacementCharacter, () => replacement);
|
|
77
|
+
}
|
|
78
|
+
function replacementFor(bytes, values) {
|
|
79
|
+
const replacement = String(values.at(1));
|
|
80
|
+
if (!oneCharacter.test(replacement)) {
|
|
81
|
+
throw new SimAthenaSetUpError("from_utf8 takes a replacement of one character or none");
|
|
82
|
+
}
|
|
83
|
+
if (Buffer.from(bytes).includes(encodedReplacement)) {
|
|
84
|
+
throw new SimAthenaSetUpError("from_utf8 cannot tell a replacement character it decoded from one the bytes carried");
|
|
85
|
+
}
|
|
86
|
+
return replacement;
|
|
87
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** The name the rewrite calls, which the aggregate shims register. */
|
|
2
|
+
export declare const countDistinctShim = "count_distinct";
|
|
3
|
+
/**
|
|
4
|
+
* `count(DISTINCT <expression>)`, written as a call the parser will take.
|
|
5
|
+
*
|
|
6
|
+
* The parser's Athena grammar takes a column after `DISTINCT` and nothing else,
|
|
7
|
+
* so `count(DISTINCT concat(a, b))` is refused outright and the whole query
|
|
8
|
+
* falls back. SQLite takes the same expression happily, and so does Athena, so
|
|
9
|
+
* the gap is the grammar rather than the engine.
|
|
10
|
+
*
|
|
11
|
+
* A plain column is left alone, since that already parses and SQLite counts it
|
|
12
|
+
* natively. Everything else becomes a call to one aggregate of the simulator's
|
|
13
|
+
* own, which counts the distinct values the same way.
|
|
14
|
+
*/
|
|
15
|
+
export declare function simAthenaCountDistinct(sql: string): string;
|