@kensio/yulin 1.20.16 → 1.21.0
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/athena/engine/sim-athena-comparison-shims.d.ts +13 -0
- package/dist/service/athena/engine/sim-athena-comparison-shims.js +68 -0
- package/dist/service/athena/engine/sim-athena-shims.js +2 -0
- package/dist/service/aws/caller/sim-aws-ambient-caller.d.ts +23 -0
- package/dist/service/aws/caller/sim-aws-ambient-caller.js +12 -0
- package/dist/service/aws/caller/sim-aws-caller-resolver.d.ts +17 -6
- package/dist/service/aws/caller/sim-aws-caller-resolver.js +21 -26
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts +6 -0
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +3 -0
- package/dist/service/aws/factory/sim-aws-account-service-cache.d.ts +6 -0
- package/dist/service/aws/factory/sim-aws-account-service-cache.js +5 -1
- package/dist/service/aws/factory/sim-aws-registered-service-builder.js +3 -1
- package/dist/service/aws/factory/sim-aws-service-factory.js +9 -1
- 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/deploy/sim-cfn-cdk-out-deployer.js +2 -1
- package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-plan.d.ts +11 -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 +6 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-deployer.d.ts +11 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-deployer.js +17 -15
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.d.ts +12 -0
- package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.js +2 -1
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cache-policy-cfn.d.ts +23 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cache-policy-cfn.js +30 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cfn-value-adapter.js +16 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-orp-cfn.d.ts +24 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-orp-cfn.js +31 -0
- package/dist/service/cloudformation/resource/name/sim-cfn-generated-resource-name.d.ts +29 -12
- package/dist/service/cloudformation/resource/name/sim-cfn-generated-resource-name.js +51 -20
- package/dist/service/cloudformation/stack/deploy/sim-cfn-resource-order.d.ts +19 -0
- package/dist/service/cloudformation/stack/deploy/sim-cfn-resource-order.js +6 -0
- package/dist/service/cloudformation/stack/deploy/sim-cfn-stack-resource-batch-creator.d.ts +7 -0
- package/dist/service/cloudformation/stack/deploy/sim-cfn-stack-resource-batch-creator.js +9 -2
- 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 +6 -0
- package/dist/service/cloudformation/stack/sim-cfn-stack-resource-operations.js +4 -1
- package/dist/service/cloudformation/stack/sim-cfn-stack.js +2 -1
- package/dist/service/cloudformation/stack/sim-cfn-stack.type.d.ts +6 -0
- package/dist/service/cloudfront/behaviour/sim-cloud-front-behavior.d.ts +16 -0
- package/dist/service/cloudfront/cache/sim-cf-accept-encoding.d.ts +11 -0
- package/dist/service/cloudfront/cache/sim-cf-accept-encoding.js +27 -0
- package/dist/service/cloudfront/cache/sim-cf-cache-control.d.ts +28 -0
- package/dist/service/cloudfront/cache/sim-cf-cache-control.js +49 -0
- package/dist/service/cloudfront/cache/sim-cf-cache-entry-key-path.d.ts +11 -0
- package/dist/service/cloudfront/cache/sim-cf-cache-entry-key-path.js +22 -0
- package/dist/service/cloudfront/cache/sim-cf-cache-entry-key.d.ts +32 -0
- package/dist/service/cloudfront/cache/sim-cf-cache-entry-key.js +112 -0
- package/dist/service/cloudfront/cache/sim-cf-cache-status.d.ts +27 -0
- package/dist/service/cloudfront/cache/sim-cf-cache-status.js +53 -0
- package/dist/service/cloudfront/cache/sim-cf-cache-ttl.d.ts +28 -0
- package/dist/service/cloudfront/cache/sim-cf-cache-ttl.js +50 -0
- package/dist/service/cloudfront/cache/sim-cf-cacheable-request.d.ts +35 -0
- package/dist/service/cloudfront/cache/sim-cf-cacheable-request.js +32 -0
- package/dist/service/cloudfront/cache/sim-cf-distribution-cache.d.ts +57 -0
- package/dist/service/cloudfront/cache/sim-cf-distribution-cache.js +115 -0
- package/dist/service/cloudfront/cache/sim-cf-edge.d.ts +37 -0
- package/dist/service/cloudfront/cache/sim-cf-edge.js +34 -0
- package/dist/service/cloudfront/cache/sim-cf-error-cache-ttl.d.ts +36 -0
- package/dist/service/cloudfront/cache/sim-cf-error-cache-ttl.js +28 -0
- package/dist/service/cloudfront/cache/sim-cf-http-date.d.ts +15 -0
- package/dist/service/cloudfront/cache/sim-cf-http-date.js +40 -0
- package/dist/service/cloudfront/cache-policy/sim-cf-cache-key.d.ts +63 -0
- package/dist/service/cloudfront/cache-policy/sim-cf-cache-key.js +70 -0
- package/dist/service/cloudfront/cache-policy/sim-cf-cache-policy-registry.d.ts +37 -0
- package/dist/service/cloudfront/cache-policy/sim-cf-cache-policy-registry.js +50 -0
- package/dist/service/cloudfront/cache-policy/sim-cf-cache-policy.d.ts +35 -0
- package/dist/service/cloudfront/cache-policy/sim-cf-cache-policy.js +49 -0
- package/dist/service/cloudfront/cache-policy/sim-cf-managed-cache-policies.d.ts +33 -0
- package/dist/service/cloudfront/cache-policy/sim-cf-managed-cache-policies.js +132 -0
- package/dist/service/cloudfront/cff/function-code-input/cff-function-code-input.d.ts +8 -0
- package/dist/service/cloudfront/cff/function-code-input/cff-function-code-input.js +13 -0
- package/dist/service/cloudfront/cff/sim-cf-function-commands.d.ts +52 -0
- package/dist/service/cloudfront/cff/sim-cf-function-commands.js +51 -0
- package/dist/service/cloudfront/cff/sim-cff-configuration.d.ts +41 -0
- package/dist/service/cloudfront/cff/sim-cff-configuration.js +34 -0
- package/dist/service/cloudfront/cff/sim-cff-search-distribution.fixture.js +4 -0
- package/dist/service/cloudfront/cff/sim-cff-stage.d.ts +23 -0
- package/dist/service/cloudfront/cff/sim-cff-stage.js +30 -0
- package/dist/service/cloudfront/cff/sim-cloudfront-function.d.ts +6 -1
- package/dist/service/cloudfront/cff/sim-cloudfront-function.js +6 -0
- package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-config.d.ts +28 -0
- package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-config.js +71 -0
- package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-creator.d.ts +24 -0
- package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-creator.js +32 -0
- package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-key.d.ts +10 -0
- package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-key.js +50 -0
- package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-section.d.ts +28 -0
- package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-section.js +29 -0
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-behavior-policy-kinds.d.ts +16 -0
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-behavior-policy-kinds.js +23 -0
- package/dist/service/cloudfront/cfn/distro/{sim-cfn-cf-distro-response-headers-policy.d.ts → sim-cfn-cf-distro-behavior-policies.d.ts} +9 -7
- package/dist/service/cloudfront/cfn/distro/{sim-cfn-cf-distro-response-headers-policy.js → sim-cfn-cf-distro-behavior-policies.js} +12 -37
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.d.ts +6 -5
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.js +8 -7
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-policy-drops.d.ts +23 -0
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-policy-drops.js +35 -0
- package/dist/service/cloudfront/cfn/origin-request-policy/sim-cfn-cf-orp-config.d.ts +28 -0
- package/dist/service/cloudfront/cfn/origin-request-policy/sim-cfn-cf-orp-config.js +46 -0
- package/dist/service/cloudfront/cfn/origin-request-policy/sim-cfn-cf-orp-creator.d.ts +24 -0
- package/dist/service/cloudfront/cfn/origin-request-policy/sim-cfn-cf-orp-creator.js +32 -0
- package/dist/service/cloudfront/cfn/origin-request-policy/sim-cfn-cf-orp-forwarding.d.ts +10 -0
- package/dist/service/cloudfront/cfn/origin-request-policy/sim-cfn-cf-orp-forwarding.js +51 -0
- package/dist/service/cloudfront/cfn/policy/sim-cfn-cf-policy-section.d.ts +22 -0
- package/dist/service/cloudfront/cfn/policy/sim-cfn-cf-policy-section.js +54 -0
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.d.ts +2 -0
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js +22 -0
- package/dist/service/cloudfront/command/create-distribution/create-distribution.command.d.ts +2 -0
- package/dist/service/cloudfront/command/create-distribution/create-distribution.handler.d.ts +4 -0
- package/dist/service/cloudfront/command/create-function/create-function.handler.js +7 -1
- package/dist/service/cloudfront/command/function/sim-cf-describe-function.d.ts +22 -0
- package/dist/service/cloudfront/command/function/sim-cf-describe-function.js +32 -0
- package/dist/service/cloudfront/command/function/sim-cf-function-access.d.ts +48 -0
- package/dist/service/cloudfront/command/function/sim-cf-function-access.js +48 -0
- package/dist/service/cloudfront/command/function/sim-cf-function-command.types.d.ts +97 -0
- package/dist/service/cloudfront/command/function/sim-cf-function-command.types.js +10 -0
- package/dist/service/cloudfront/command/function/sim-cf-function-lookup.d.ts +12 -0
- package/dist/service/cloudfront/command/function/sim-cf-function-lookup.js +21 -0
- package/dist/service/cloudfront/command/function/sim-cf-function-summary.d.ts +11 -0
- package/dist/service/cloudfront/command/function/sim-cf-function-summary.js +30 -0
- package/dist/service/cloudfront/command/function/sim-cf-get-function.d.ts +23 -0
- package/dist/service/cloudfront/command/function/sim-cf-get-function.js +33 -0
- package/dist/service/cloudfront/command/function/sim-cf-list-functions.d.ts +22 -0
- package/dist/service/cloudfront/command/function/sim-cf-list-functions.js +38 -0
- package/dist/service/cloudfront/command/invalidation/sim-cf-create-invalidation.d.ts +28 -0
- package/dist/service/cloudfront/command/invalidation/sim-cf-create-invalidation.js +59 -0
- package/dist/service/cloudfront/command/invalidation/sim-cf-get-invalidation.d.ts +19 -0
- package/dist/service/cloudfront/command/invalidation/sim-cf-get-invalidation.js +32 -0
- package/dist/service/cloudfront/command/invalidation/sim-cf-invalidation-access.d.ts +36 -0
- package/dist/service/cloudfront/command/invalidation/sim-cf-invalidation-access.js +45 -0
- package/dist/service/cloudfront/command/invalidation/sim-cf-invalidation-command.types.d.ts +80 -0
- package/dist/service/cloudfront/command/invalidation/sim-cf-invalidation-command.types.js +1 -0
- package/dist/service/cloudfront/command/invalidation/sim-cf-invalidation-commands.d.ts +39 -0
- package/dist/service/cloudfront/command/invalidation/sim-cf-invalidation-commands.js +35 -0
- package/dist/service/cloudfront/command/invalidation/sim-cf-list-invalidations.d.ts +23 -0
- package/dist/service/cloudfront/command/invalidation/sim-cf-list-invalidations.js +39 -0
- package/dist/service/cloudfront/command/update-distribution/update-distribution.handler.d.ts +4 -0
- package/dist/service/cloudfront/controller/content/sim-cf-content-stage.d.ts +51 -0
- package/dist/service/cloudfront/controller/content/sim-cf-content-stage.js +65 -0
- package/dist/service/cloudfront/controller/dependency/sim-cf-controller-dependency.d.ts +2 -3
- package/dist/service/cloudfront/controller/dependency/sim-cf-controller-dependency.js +4 -4
- package/dist/service/cloudfront/controller/error/sim-cf-custom-error-responder.d.ts +4 -0
- package/dist/service/cloudfront/controller/error/sim-cf-custom-error-responder.js +12 -8
- package/dist/service/cloudfront/controller/origin/sim-cf-origin-stage.d.ts +2 -2
- package/dist/service/cloudfront/controller/origin/sim-cf-origin-stage.js +2 -2
- package/dist/service/cloudfront/controller/sim-cloudfront-request-pipeline.d.ts +6 -6
- package/dist/service/cloudfront/controller/sim-cloudfront-request-pipeline.js +35 -20
- package/dist/service/cloudfront/custom-error/sim-cloudfront-custom-error-response.d.ts +23 -5
- package/dist/service/cloudfront/custom-error/sim-cloudfront-custom-error-response.js +8 -0
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-cache-policy.d.ts +18 -0
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-cache-policy.js +30 -0
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-origin-request-policy.d.ts +18 -0
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-origin-request-policy.js +30 -0
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-policies.d.ts +30 -0
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-policies.js +44 -0
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-properties.d.ts +2 -2
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-properties.js +9 -3
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.d.ts +0 -10
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.js +0 -19
- package/dist/service/cloudfront/distribution/configurator/sim-cf-distribution-configurator.factory.d.ts +4 -0
- package/dist/service/cloudfront/distribution/configurator/sim-cf-distribution-configurator.factory.js +8 -2
- package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-behavior-configurator.d.ts +3 -3
- package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-behavior-configurator.js +5 -5
- package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-custom-error-configurator.d.ts +13 -3
- package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-custom-error-configurator.js +27 -6
- package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-distribution-configurator.d.ts +3 -3
- package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-distribution-configurator.js +4 -4
- package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-origin-configurator.d.ts +3 -1
- package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-origin-configurator.js +4 -1
- package/dist/service/cloudfront/distribution/sim-cf-distribution-configuration-state.d.ts +7 -3
- package/dist/service/cloudfront/distribution/sim-cf-distribution-reconfigurer.d.ts +4 -0
- package/dist/service/cloudfront/distribution/sim-cf-distribution-view.js +1 -1
- package/dist/service/cloudfront/distribution/sim-cloudfront-distribution.d.ts +25 -2
- package/dist/service/cloudfront/distribution/sim-cloudfront-distribution.js +24 -0
- package/dist/service/cloudfront/error/sim-cf-invalidation.error.d.ts +22 -0
- package/dist/service/cloudfront/error/sim-cf-invalidation.error.js +26 -0
- package/dist/service/cloudfront/error/sim-cf-origin-request-policy.error.d.ts +22 -0
- package/dist/service/cloudfront/error/sim-cf-origin-request-policy.error.js +26 -0
- package/dist/service/cloudfront/error/sim-cloudfront.error.d.ts +21 -0
- package/dist/service/cloudfront/error/sim-cloudfront.error.js +25 -0
- package/dist/service/cloudfront/index.d.ts +2 -0
- package/dist/service/cloudfront/index.js +1 -0
- package/dist/service/cloudfront/invalidation/sim-cf-invalidation-path.d.ts +22 -0
- package/dist/service/cloudfront/invalidation/sim-cf-invalidation-path.js +32 -0
- package/dist/service/cloudfront/invalidation/sim-cf-invalidation-view.d.ts +43 -0
- package/dist/service/cloudfront/invalidation/sim-cf-invalidation-view.js +33 -0
- package/dist/service/cloudfront/invalidation/sim-cf-invalidation.d.ts +55 -0
- package/dist/service/cloudfront/invalidation/sim-cf-invalidation.js +56 -0
- package/dist/service/cloudfront/invalidation/sim-cf-invalidations.d.ts +41 -0
- package/dist/service/cloudfront/invalidation/sim-cf-invalidations.js +58 -0
- package/dist/service/cloudfront/invalidation/sim-cf-repeated-invalidation.d.ts +15 -0
- package/dist/service/cloudfront/invalidation/sim-cf-repeated-invalidation.js +23 -0
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.js +2 -10
- package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store.js +2 -1
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-forwarding.d.ts +19 -0
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-forwarding.js +116 -0
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.d.ts +15 -5
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.js +13 -8
- package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-signer.js +8 -5
- package/dist/service/cloudfront/origin/custom/sim-cloudfront-custom-origin.d.ts +13 -0
- package/dist/service/cloudfront/origin/custom/sim-cloudfront-custom-origin.js +8 -0
- package/dist/service/cloudfront/origin-request-policy/sim-cf-behavior-forwarded.d.ts +24 -0
- package/dist/service/cloudfront/origin-request-policy/sim-cf-behavior-forwarded.js +21 -0
- package/dist/service/cloudfront/origin-request-policy/sim-cf-forwarded-to-origin.d.ts +57 -0
- package/dist/service/cloudfront/origin-request-policy/sim-cf-forwarded-to-origin.js +129 -0
- package/dist/service/cloudfront/origin-request-policy/sim-cf-managed-origin-request-policies.d.ts +30 -0
- package/dist/service/cloudfront/origin-request-policy/sim-cf-managed-origin-request-policies.js +121 -0
- package/dist/service/cloudfront/origin-request-policy/sim-cf-origin-request-forwarding.d.ts +56 -0
- package/dist/service/cloudfront/origin-request-policy/sim-cf-origin-request-forwarding.js +67 -0
- package/dist/service/cloudfront/origin-request-policy/sim-cf-origin-request-policy-registry.d.ts +38 -0
- package/dist/service/cloudfront/origin-request-policy/sim-cf-origin-request-policy-registry.js +51 -0
- package/dist/service/cloudfront/origin-request-policy/sim-cf-origin-request-policy.d.ts +32 -0
- package/dist/service/cloudfront/origin-request-policy/sim-cf-origin-request-policy.js +30 -0
- package/dist/service/cloudfront/registry/sim-cloud-front-registry.d.ts +25 -0
- package/dist/service/cloudfront/registry/sim-cloud-front-registry.js +23 -0
- package/dist/service/cloudfront/sdk/sim-cloudfront-sdk-command-router.js +24 -0
- package/dist/service/cloudfront/sim-cf-authorize.d.ts +16 -0
- package/dist/service/cloudfront/sim-cf-authorize.js +19 -0
- package/dist/service/cloudfront/sim-cf-etag.d.ts +7 -0
- package/dist/service/cloudfront/sim-cf-etag.js +10 -0
- package/dist/service/cloudfront/sim-cloudfront-caching.d.ts +31 -0
- package/dist/service/cloudfront/sim-cloudfront-caching.js +38 -0
- package/dist/service/cloudfront/sim-cloudfront-commands.d.ts +20 -12
- package/dist/service/cloudfront/sim-cloudfront-commands.js +20 -17
- package/dist/service/cloudfront/sim-cloudfront-distributions.d.ts +21 -0
- package/dist/service/cloudfront/sim-cloudfront-distributions.js +23 -0
- package/dist/service/cloudfront/sim-cloudfront-origin-access-controls.d.ts +30 -0
- package/dist/service/cloudfront/sim-cloudfront-origin-access-controls.js +35 -0
- package/dist/service/cloudfront/sim-cloudfront-policies.d.ts +60 -0
- package/dist/service/cloudfront/sim-cloudfront-policies.js +75 -0
- package/dist/service/cloudfront/sim-cloudfront.d.ts +24 -44
- package/dist/service/cloudfront/sim-cloudfront.js +37 -58
- package/dist/service/ecr/authorize/sim-ecr-authorizer.d.ts +31 -0
- package/dist/service/ecr/authorize/sim-ecr-authorizer.js +38 -0
- package/dist/service/ecr/cfn/repository/sim-cfn-ecr-repository-creator.d.ts +11 -2
- package/dist/service/ecr/cfn/repository/sim-cfn-ecr-repository-creator.js +11 -2
- package/dist/service/ecr/cfn/sim-ecr-cfn-resource-factory.d.ts +4 -2
- package/dist/service/ecr/cfn/sim-ecr-cfn-resource-factory.js +8 -9
- package/dist/service/ecr/cfn/sim-ecr-cfn-unsupported-resource.d.ts +7 -0
- package/dist/service/ecr/cfn/sim-ecr-cfn-unsupported-resource.js +9 -0
- package/dist/service/ecr/sim-ecr.d.ts +7 -0
- package/dist/service/ecr/sim-ecr.js +16 -4
- package/dist/service/ecs/command/authorize/sim-ecs-authorizer.d.ts +12 -0
- package/dist/service/ecs/command/authorize/sim-ecs-authorizer.js +21 -0
- package/dist/service/ecs/command/register-task-definition/register-task-definition.handler.js +1 -0
- package/dist/service/ecs/sim-ecs-service-principal.d.ts +8 -0
- package/dist/service/ecs/sim-ecs-service-principal.js +8 -0
- package/dist/service/eventbridge/command/authorize/sim-event-bridge-authorizer.d.ts +12 -0
- package/dist/service/eventbridge/command/authorize/sim-event-bridge-authorizer.js +21 -0
- package/dist/service/eventbridge/command/rule/sim-event-bridge-rule-access.d.ts +13 -0
- package/dist/service/eventbridge/command/rule/sim-event-bridge-rule-access.js +9 -0
- package/dist/service/eventbridge/command/target/sim-event-bridge-put-targets.js +1 -0
- package/dist/service/firehose/command/authorize/sim-firehose-authorizer.d.ts +12 -0
- package/dist/service/firehose/command/authorize/sim-firehose-authorizer.js +20 -0
- package/dist/service/firehose/command/sim-firehose-delivery-stream-access.d.ts +4 -0
- package/dist/service/firehose/command/sim-firehose-delivery-stream-access.js +6 -0
- package/dist/service/firehose/command/stream/sim-firehose-create-delivery-stream.js +3 -1
- package/dist/service/firehose/sim-firehose-service-principal.d.ts +8 -0
- package/dist/service/firehose/sim-firehose-service-principal.js +8 -0
- package/dist/service/firehose/source/sim-firehose-source.d.ts +5 -0
- package/dist/service/firehose/source/sim-firehose-source.js +5 -0
- package/dist/service/glue/cfn/database/sim-cfn-glue-database-properties.js +2 -2
- package/dist/service/glue/cfn/sim-cfn-glue-generated-name.d.ts +10 -0
- package/dist/service/glue/cfn/sim-cfn-glue-generated-name.js +25 -0
- package/dist/service/glue/cfn/table/sim-cfn-glue-table-properties.js +2 -3
- package/dist/service/iam/authorize/allow/sim-iam-allow-requirement.d.ts +34 -2
- package/dist/service/iam/authorize/allow/sim-iam-allow-requirement.js +34 -2
- package/dist/service/iam/authorize/allow/sim-iam-allow-statements.d.ts +4 -3
- package/dist/service/iam/authorize/allow/sim-iam-allow-statements.js +9 -3
- package/dist/service/iam/authorize/context/sim-iam-auth-z-allow-requirement.d.ts +14 -5
- package/dist/service/iam/authorize/context/sim-iam-auth-z-allow-requirement.js +16 -12
- package/dist/service/iam/authorize/context/sim-iam-auth-z-caller-context-builder.d.ts +9 -3
- package/dist/service/iam/authorize/context/sim-iam-auth-z-caller-context-builder.js +5 -3
- package/dist/service/iam/authorize/context/sim-iam-auth-z-context-builder.d.ts +9 -71
- package/dist/service/iam/authorize/context/sim-iam-auth-z-context-builder.js +2 -1
- package/dist/service/iam/authorize/context/sim-iam-auth-z-input.d.ts +89 -0
- package/dist/service/iam/authorize/context/sim-iam-auth-z-input.js +1 -0
- package/dist/service/iam/authorize/match/sim-iam-policy-principal-matcher.d.ts +11 -3
- package/dist/service/iam/authorize/match/sim-iam-policy-principal-matcher.js +20 -8
- package/dist/service/iam/authorize/match/sim-iam-principal-match.d.ts +29 -8
- package/dist/service/iam/authorize/match/sim-iam-principal-match.js +38 -13
- package/dist/service/iam/authorize/pass-role/sim-iam-pass-role-authorizer.d.ts +74 -0
- package/dist/service/iam/authorize/pass-role/sim-iam-pass-role-authorizer.js +92 -0
- package/dist/service/iam/authorize/sim-iam-account-auth-z.d.ts +14 -5
- package/dist/service/iam/authorize/sim-iam-account-auth-z.js +6 -4
- package/dist/service/iam/authorize/sim-iam-authorizer.d.ts +3 -1
- package/dist/service/iam/authorize/sim-iam-authorizer.js +2 -1
- package/dist/service/iam/authorize/sim-iam-inter-service-auth-z.d.ts +1 -1
- package/dist/service/iam/authorize/sim-iam-wildcard.js +39 -4
- package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.js +2 -1
- package/dist/service/iam/cfn/name/sim-cfn-iam-generated-name.d.ts +16 -0
- package/dist/service/iam/cfn/name/sim-cfn-iam-generated-name.js +36 -0
- package/dist/service/iam/cfn/role/sim-cfn-iam-role-properties-parser.js +9 -8
- package/dist/service/iam/cfn/sim-cfn-iam-optional-string.d.ts +17 -0
- package/dist/service/iam/cfn/sim-cfn-iam-optional-string.js +17 -0
- package/dist/service/iam/cfn/user/sim-cfn-iam-user-properties-parser.js +4 -8
- package/dist/service/iam/command/policy/create-policy/create-policy-input-resolver.js +2 -0
- package/dist/service/iam/command/policy/put-role-policy/put-role-policy.handler.js +5 -0
- package/dist/service/iam/command/policy/put-user-policy/put-user-policy.handler.js +5 -0
- package/dist/service/iam/command/role/create-role/create-role.handler.js +4 -1
- package/dist/service/iam/error/sim-iam.error.d.ts +11 -0
- package/dist/service/iam/error/sim-iam.error.js +13 -0
- package/dist/service/iam/index.d.ts +1 -0
- package/dist/service/iam/policy/sim-iam-policy-document-of-size.d.ts +18 -0
- package/dist/service/iam/policy/sim-iam-policy-document-of-size.js +41 -0
- package/dist/service/iam/role/sim-iam-deploy-role.d.ts +56 -0
- package/dist/service/iam/role/sim-iam-deploy-role.js +50 -0
- package/dist/service/iam/role/sim-iam-role-with-policy.factory.d.ts +3 -1
- package/dist/service/iam/sim-iam-account-parts.d.ts +8 -0
- package/dist/service/iam/sim-iam-account-parts.js +1 -0
- package/dist/service/iam/sim-iam.d.ts +12 -2
- package/dist/service/iam/sim-iam.js +12 -0
- package/dist/service/iam/validate/size/sim-iam-policy-document-size.d.ts +57 -0
- package/dist/service/iam/validate/size/sim-iam-policy-document-size.js +71 -0
- package/dist/service/kms/command/authorize/sim-kms-authorizer.d.ts +3 -1
- package/dist/service/kms/command/authorize/sim-kms-authorizer.js +4 -1
- package/dist/service/kms/command/sim-kms-request-options.d.ts +15 -0
- package/dist/service/kms/key/sim-kms-key-policy.d.ts +5 -4
- package/dist/service/kms/key/sim-kms-key-policy.js +4 -3
- package/dist/service/lambda/cfn/function/sim-cfn-lambda-function-properties-parser.d.ts +2 -2
- package/dist/service/lambda/cfn/function/sim-cfn-lambda-function-properties-parser.js +4 -3
- package/dist/service/lambda/cfn/function/sim-cfn-lambda-generated-function-name.d.ts +10 -0
- package/dist/service/lambda/cfn/function/sim-cfn-lambda-generated-function-name.js +25 -0
- package/dist/service/lambda/command/authorize/sim-lambda-resource-policies.d.ts +1 -1
- package/dist/service/lambda/command/create-function/create-function-authorizer.d.ts +9 -2
- package/dist/service/lambda/command/create-function/create-function-authorizer.js +16 -2
- package/dist/service/lambda/command/create-function/create-function.handler.js +1 -1
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.d.ts +7 -2
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.js +14 -2
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration.handler.js +1 -1
- package/dist/service/lambda/function/logging/sim-lambda-function-logging.d.ts +10 -1
- package/dist/service/lambda/function/logging/sim-lambda-function-logging.js +25 -1
- package/dist/service/lambda/function/logging/sim-lambda-invoke-error-log.d.ts +13 -0
- package/dist/service/lambda/function/logging/sim-lambda-invoke-error-log.js +18 -0
- package/dist/service/lambda/sim-lambda-service-principal.d.ts +7 -0
- package/dist/service/lambda/sim-lambda-service-principal.js +7 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-authorization.d.ts +46 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-authorization.js +49 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-creator.d.ts +5 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-creator.js +6 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-destination-creator.d.ts +5 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-destination-creator.js +6 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-source-creator.d.ts +5 -0
- package/dist/service/logs/cfn/delivery/sim-cfn-delivery-source-creator.js +6 -0
- package/dist/service/logs/cfn/group/sim-cfn-log-group-creator.d.ts +9 -2
- package/dist/service/logs/cfn/group/sim-cfn-log-group-creator.js +34 -5
- package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.js +1 -1
- package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.d.ts +4 -0
- package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.js +9 -4
- package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.d.ts +6 -4
- package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.js +13 -4
- package/dist/service/logs/delivery/cloudfront/sim-logs-vended-log-delivery.d.ts +23 -0
- package/dist/service/logs/delivery/cloudfront/sim-logs-vended-log-delivery.js +28 -0
- package/dist/service/logs/sim-logs-commands.d.ts +3 -0
- package/dist/service/logs/sim-logs-commands.js +4 -0
- package/dist/service/logs/sim-logs.js +6 -1
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-creator.d.ts +2 -2
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-creator.js +4 -3
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-generated-name.d.ts +12 -0
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-generated-name.js +22 -0
- package/dist/service/s3/command/authorize/sim-s3-bucket-resource-policies.d.ts +1 -1
- package/dist/service/scheduler/command/authorize/sim-scheduler-authorizer.d.ts +10 -1
- package/dist/service/scheduler/command/authorize/sim-scheduler-authorizer.js +19 -1
- 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 +8 -0
- package/dist/service/scheduler/command/schedule/sim-scheduler-schedule-access.js +9 -0
- package/dist/service/scheduler/command/schedule/sim-scheduler-update-schedule.js +1 -0
- package/dist/service/secretsmanager/cfn/secret/sim-cfn-secrets-manager-generated-name.d.ts +15 -0
- package/dist/service/secretsmanager/cfn/secret/sim-cfn-secrets-manager-generated-name.js +22 -0
- package/dist/service/secretsmanager/cfn/secret/sim-cfn-secrets-manager-secret-properties.d.ts +4 -10
- package/dist/service/secretsmanager/cfn/secret/sim-cfn-secrets-manager-secret-properties.js +13 -31
- package/dist/service/secretsmanager/cfn/secret/sim-cfn-secrets-manager-secret-value.d.ts +17 -0
- package/dist/service/secretsmanager/cfn/secret/sim-cfn-secrets-manager-secret-value.js +30 -0
- package/dist/service/secretsmanager/secret/sim-secrets-manager-secret-name.d.ts +6 -0
- package/dist/service/secretsmanager/secret/sim-secrets-manager-secret-name.js +8 -3
- package/dist/service/sns/command/authorize/sim-sns-topic-resource-policies.d.ts +1 -1
- package/dist/service/sqs/command/authorize/sim-sqs-queue-resource-policies.d.ts +1 -1
- package/dist/service/ssm/cfn/parameter/sim-cfn-ssm-generated-parameter-name.d.ts +16 -0
- package/dist/service/ssm/cfn/parameter/sim-cfn-ssm-generated-parameter-name.js +23 -0
- package/dist/service/ssm/cfn/parameter/sim-cfn-ssm-parameter-properties.d.ts +2 -4
- package/dist/service/ssm/cfn/parameter/sim-cfn-ssm-parameter-properties.js +5 -5
- package/dist/service/ssm/parameter/sim-ssm-kms-crypto.d.ts +11 -12
- package/dist/service/ssm/parameter/sim-ssm-kms-crypto.js +4 -4
- package/dist/service/ssm/parameter/sim-ssm-parameter-arn.d.ts +17 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-arn.js +20 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-kms.d.ts +13 -8
- package/dist/service/ssm/parameter/sim-ssm-parameter-kms.js +13 -8
- package/dist/service/ssm/parameter/sim-ssm-parameter-name.js +3 -12
- package/dist/service/stepfunctions/command/authorize/sim-step-functions-authorizer.d.ts +41 -0
- package/dist/service/stepfunctions/command/authorize/sim-step-functions-authorizer.js +64 -0
- package/dist/service/stepfunctions/command/machine/sim-state-machine-create.d.ts +5 -2
- package/dist/service/stepfunctions/command/machine/sim-state-machine-create.js +6 -2
- package/dist/service/stepfunctions/command/machine/sim-state-machine-delete.d.ts +26 -0
- package/dist/service/stepfunctions/command/machine/sim-state-machine-delete.js +29 -0
- package/dist/service/stepfunctions/command/machine/sim-state-machine-lookup.d.ts +7 -0
- package/dist/service/stepfunctions/command/machine/sim-state-machine-lookup.js +12 -3
- package/dist/service/stepfunctions/command/machine/sim-state-machine-update.d.ts +19 -0
- package/dist/service/stepfunctions/command/machine/{sim-state-machine-writes.js → sim-state-machine-update.js} +3 -14
- package/dist/service/stepfunctions/sim-step-functions.d.ts +8 -2
- package/dist/service/stepfunctions/sim-step-functions.js +26 -9
- 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 +1 -0
- package/dist/service/sts/command/get-caller-identity/get-caller-identity.handler.d.ts +5 -0
- package/dist/service/sts/command/get-caller-identity/get-caller-identity.handler.js +1 -0
- package/dist/service/sts/sim-sts.d.ts +9 -0
- package/dist/service/sts/sim-sts.js +4 -0
- package/dist/util/memo/bounded-memo.d.ts +36 -0
- package/dist/util/memo/bounded-memo.js +58 -0
- package/docs/sdk/README.md +3 -1
- package/docs/services/athena/README.md +7 -1
- package/docs/services/cloudformation/README.md +197 -11
- package/docs/services/cloudfront/README.md +1116 -14
- package/docs/services/cloudwatch/README.md +6 -4
- package/docs/services/cognito/README.md +8 -7
- package/docs/services/dynamodb/README.md +6 -5
- package/docs/services/ecs/README.md +23 -9
- package/docs/services/elbv2/README.md +6 -2
- package/docs/services/eventbridge/README.md +9 -1
- package/docs/services/firehose/README.md +9 -3
- package/docs/services/glue/README.md +6 -0
- package/docs/services/iam/README.md +322 -27
- package/docs/services/kinesis/README.md +3 -2
- package/docs/services/kms/README.md +11 -2
- package/docs/services/lambda/README.md +76 -2
- package/docs/services/logs/README.md +22 -2
- package/docs/services/s3/README.md +7 -2
- package/docs/services/scheduler/README.md +12 -4
- package/docs/services/secretsmanager/README.md +6 -3
- package/docs/services/ses/README.md +3 -1
- package/docs/services/sns/README.md +5 -5
- package/docs/services/sqs/README.md +5 -5
- package/docs/services/ssm/README.md +35 -18
- package/docs/services/stepfunctions/README.md +11 -2
- package/docs/services/wafv2/README.md +5 -3
- package/package.json +1 -1
- package/dist/service/stepfunctions/command/machine/sim-state-machine-writes.d.ts +0 -25
|
@@ -7,6 +7,23 @@ import type { SimAwsAccountRegionScope } from "../../aws/sim-aws-account-region-
|
|
|
7
7
|
* rather than `...:parameter//myapp/prod/db-host`.
|
|
8
8
|
*/
|
|
9
9
|
export declare function ssmParameterArnPrefix(accountRegionScope: SimAwsAccountRegionScope): string;
|
|
10
|
+
/**
|
|
11
|
+
* The longest a parameter name may be, counting the ARN that precedes it.
|
|
12
|
+
*
|
|
13
|
+
* Real Parameter Store reserves the rest of the 2048 character ARN for its own
|
|
14
|
+
* use, and counts the ARN prefix towards the 1011 characters left. That is why
|
|
15
|
+
* this limit needs the Account and Region: the same name is legal in one
|
|
16
|
+
* Region and too long in another.
|
|
17
|
+
*/
|
|
18
|
+
export declare const maximumSsmParameterArnLength = 1011;
|
|
19
|
+
/**
|
|
20
|
+
* The longest name a parameter may be given in this Account and Region.
|
|
21
|
+
*
|
|
22
|
+
* The ARN prefix comes out of the same allowance the name does, so the room
|
|
23
|
+
* left for a name depends on how long the Region's name is. A generated name
|
|
24
|
+
* is trimmed to this so that it is never one PutParameter would then refuse.
|
|
25
|
+
*/
|
|
26
|
+
export declare function maximumSimSsmParameterNameLength(accountRegionScope: SimAwsAccountRegionScope): number;
|
|
10
27
|
interface SimSsmParameterArnProperties {
|
|
11
28
|
readonly resource: string;
|
|
12
29
|
readonly accountRegionScope: SimAwsAccountRegionScope;
|
|
@@ -9,6 +9,26 @@ export function ssmParameterArnPrefix(accountRegionScope) {
|
|
|
9
9
|
const { regionName, accountId } = accountRegionScope;
|
|
10
10
|
return `arn:aws:ssm:${regionName}:${accountId}:parameter/`;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* The longest a parameter name may be, counting the ARN that precedes it.
|
|
14
|
+
*
|
|
15
|
+
* Real Parameter Store reserves the rest of the 2048 character ARN for its own
|
|
16
|
+
* use, and counts the ARN prefix towards the 1011 characters left. That is why
|
|
17
|
+
* this limit needs the Account and Region: the same name is legal in one
|
|
18
|
+
* Region and too long in another.
|
|
19
|
+
*/
|
|
20
|
+
export const maximumSsmParameterArnLength = 1011;
|
|
21
|
+
/**
|
|
22
|
+
* The longest name a parameter may be given in this Account and Region.
|
|
23
|
+
*
|
|
24
|
+
* The ARN prefix comes out of the same allowance the name does, so the room
|
|
25
|
+
* left for a name depends on how long the Region's name is. A generated name
|
|
26
|
+
* is trimmed to this so that it is never one PutParameter would then refuse.
|
|
27
|
+
*/
|
|
28
|
+
export function maximumSimSsmParameterNameLength(accountRegionScope) {
|
|
29
|
+
return (maximumSsmParameterArnLength -
|
|
30
|
+
ssmParameterArnPrefix(accountRegionScope).length);
|
|
31
|
+
}
|
|
12
32
|
/**
|
|
13
33
|
* The ARN of one simulated parameter.
|
|
14
34
|
*
|
|
@@ -13,15 +13,20 @@ interface SimSsmParameterKmsProperties {
|
|
|
13
13
|
/**
|
|
14
14
|
* The KMS calls a SecureString parameter makes.
|
|
15
15
|
*
|
|
16
|
-
* The calls are made as the caller rather than as the service
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
16
|
+
* The calls are made as the caller rather than as the service. Under a
|
|
17
|
+
* customer managed key a standard tier write needs `kms:Encrypt` on the key
|
|
18
|
+
* and a decrypting read needs `kms:Decrypt`, each on top of the SSM permission
|
|
19
|
+
* for the parameter itself.
|
|
20
20
|
*
|
|
21
|
-
* They are also made through the service,
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
21
|
+
* They are also made through the service, and passing through it is what
|
|
22
|
+
* reaches the `aws/ssm` managed key at all. That key's policy allows the
|
|
23
|
+
* cryptographic actions to a wildcard principal under `kms:ViaService` and
|
|
24
|
+
* `kms:CallerAccount` conditions, and Parameter Store supplies the first of
|
|
25
|
+
* them. A grant of that shape delegates nothing to IAM, and it admits the
|
|
26
|
+
* request by itself. A Role holding `ssm:GetParameter` and nothing on KMS
|
|
27
|
+
* reads the decrypted value, as it does in an account. A caller in another
|
|
28
|
+
* Account fails the `kms:CallerAccount` condition, and a caller reaching KMS
|
|
29
|
+
* directly carries no `kms:ViaService` for the policy to match.
|
|
25
30
|
*
|
|
26
31
|
* Standard tier Parameter Store encrypts under the key directly rather than
|
|
27
32
|
* through a data key, so this is one Encrypt and one Decrypt and nothing more.
|
|
@@ -13,15 +13,20 @@ const parameterArnContextKey = "PARAMETER_ARN";
|
|
|
13
13
|
/**
|
|
14
14
|
* The KMS calls a SecureString parameter makes.
|
|
15
15
|
*
|
|
16
|
-
* The calls are made as the caller rather than as the service
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
16
|
+
* The calls are made as the caller rather than as the service. Under a
|
|
17
|
+
* customer managed key a standard tier write needs `kms:Encrypt` on the key
|
|
18
|
+
* and a decrypting read needs `kms:Decrypt`, each on top of the SSM permission
|
|
19
|
+
* for the parameter itself.
|
|
20
20
|
*
|
|
21
|
-
* They are also made through the service,
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
21
|
+
* They are also made through the service, and passing through it is what
|
|
22
|
+
* reaches the `aws/ssm` managed key at all. That key's policy allows the
|
|
23
|
+
* cryptographic actions to a wildcard principal under `kms:ViaService` and
|
|
24
|
+
* `kms:CallerAccount` conditions, and Parameter Store supplies the first of
|
|
25
|
+
* them. A grant of that shape delegates nothing to IAM, and it admits the
|
|
26
|
+
* request by itself. A Role holding `ssm:GetParameter` and nothing on KMS
|
|
27
|
+
* reads the decrypted value, as it does in an account. A caller in another
|
|
28
|
+
* Account fails the `kms:CallerAccount` condition, and a caller reaching KMS
|
|
29
|
+
* directly carries no `kms:ViaService` for the policy to match.
|
|
25
30
|
*
|
|
26
31
|
* Standard tier Parameter Store encrypts under the key directly rather than
|
|
27
32
|
* through a data key, so this is one Encrypt and one Decrypt and nothing more.
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { SimSsmHierarchyLevelLimitExceededException, SimSsmParameterPatternMismatchException, SimSsmValidationException, } from "../error/sim-ssm.error.js";
|
|
2
|
-
import { ssmParameterArnPrefix } from "./sim-ssm-parameter-arn.js";
|
|
2
|
+
import { maximumSsmParameterArnLength, ssmParameterArnPrefix, } from "./sim-ssm-parameter-arn.js";
|
|
3
3
|
const allowedCharacters = /^[\w./-]+$/;
|
|
4
4
|
const maxHierarchyLevels = 15;
|
|
5
5
|
const reservedPrefixes = ["aws", "ssm"];
|
|
6
|
-
/**
|
|
7
|
-
* The longest a parameter name may be, counting the ARN that precedes it.
|
|
8
|
-
*
|
|
9
|
-
* Real Parameter Store reserves the rest of the 2048 character ARN for its own
|
|
10
|
-
* use, and counts the ARN prefix towards the 1011 characters left. That is why
|
|
11
|
-
* this limit needs the Account and Region: the same name is legal in one
|
|
12
|
-
* Region and too long in another.
|
|
13
|
-
*/
|
|
14
|
-
const maxArnLength = 1011;
|
|
15
6
|
/**
|
|
16
7
|
* The name of one simulated parameter, validated as real Parameter Store
|
|
17
8
|
* validates it.
|
|
@@ -106,11 +97,11 @@ export class SimSsmParameterName {
|
|
|
106
97
|
}
|
|
107
98
|
requireWithinArnLength(accountRegionScope) {
|
|
108
99
|
const arnLength = ssmParameterArnPrefix(accountRegionScope).length + this.resource.length;
|
|
109
|
-
if (arnLength <=
|
|
100
|
+
if (arnLength <= maximumSsmParameterArnLength) {
|
|
110
101
|
return;
|
|
111
102
|
}
|
|
112
103
|
throw new SimSsmValidationException(`Parameter name '${this.value}' makes an ARN of ${String(arnLength)} ` +
|
|
113
|
-
`characters; Parameter Store allows ${String(
|
|
104
|
+
`characters; Parameter Store allows ${String(maximumSsmParameterArnLength)} ` +
|
|
114
105
|
`including the ARN prefix for this Account and Region`);
|
|
115
106
|
}
|
|
116
107
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
|
|
2
|
+
import type { SimAwsResolvedCaller } from "../../../aws/caller/sim-aws-caller-resolver.js";
|
|
3
|
+
import type { SimAwsAccountRegionScope } from "../../../aws/sim-aws-account-region-scope.js";
|
|
4
|
+
import type { SimIamInterServiceAuthZ } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
5
|
+
interface SimStepFunctionsAuthorizerProperties {
|
|
6
|
+
readonly iam: SimIamInterServiceAuthZ;
|
|
7
|
+
readonly accountRegionScope: SimAwsAccountRegionScope;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Applies simulated IAM authorization to Step Functions requests.
|
|
11
|
+
*
|
|
12
|
+
* A state machine is named by its ARN, and that is the form a Step Functions
|
|
13
|
+
* policy is written in. `CreateStateMachine` has no ARN to be given. It
|
|
14
|
+
* authorizes against the one the state machine is about to have, which a
|
|
15
|
+
* policy naming `stateMachine:orders-*` covers.
|
|
16
|
+
*
|
|
17
|
+
* A state machine's `roleArn` is a second question. Step Functions keeps that
|
|
18
|
+
* Role and runs every execution as it, so the caller creating one needs
|
|
19
|
+
* `iam:PassRole` on it. The resource there is the Role.
|
|
20
|
+
*/
|
|
21
|
+
export declare class SimStepFunctionsAuthorizer {
|
|
22
|
+
#private;
|
|
23
|
+
constructor(properties: SimStepFunctionsAuthorizerProperties);
|
|
24
|
+
/**
|
|
25
|
+
* Ensure the caller may hand Step Functions a state machine's role.
|
|
26
|
+
*/
|
|
27
|
+
authorizePassRole(roleArn: string, caller?: SimAwsCaller): void;
|
|
28
|
+
/**
|
|
29
|
+
* Ensure the caller may perform an action on a state machine of this name.
|
|
30
|
+
*/
|
|
31
|
+
authorizeStateMachineName(action: string, name: string, caller?: SimAwsCaller): SimAwsResolvedCaller;
|
|
32
|
+
/**
|
|
33
|
+
* Ensure the caller may perform an action on a state machine ARN.
|
|
34
|
+
*
|
|
35
|
+
* The state machine need not be there. Real IAM evaluates a request before
|
|
36
|
+
* the service handles it, so a caller with no permission is refused whether
|
|
37
|
+
* or not the ARN names anything.
|
|
38
|
+
*/
|
|
39
|
+
authorizeStateMachineArn(action: string, stateMachineArn: string, caller?: SimAwsCaller): SimAwsResolvedCaller;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { SimIamPassRoleAuthorizer } from "../../../iam/authorize/pass-role/sim-iam-pass-role-authorizer.js";
|
|
2
|
+
import { SimIamAccessDenied } from "../../../iam/error/sim-iam.error.js";
|
|
3
|
+
import { simStateMachineArn } from "../../machine/sim-state-machine-arn.js";
|
|
4
|
+
import { simStatesServicePrincipal } from "../../task/sim-states-execution-role.js";
|
|
5
|
+
/**
|
|
6
|
+
* Applies simulated IAM authorization to Step Functions requests.
|
|
7
|
+
*
|
|
8
|
+
* A state machine is named by its ARN, and that is the form a Step Functions
|
|
9
|
+
* policy is written in. `CreateStateMachine` has no ARN to be given. It
|
|
10
|
+
* authorizes against the one the state machine is about to have, which a
|
|
11
|
+
* policy naming `stateMachine:orders-*` covers.
|
|
12
|
+
*
|
|
13
|
+
* A state machine's `roleArn` is a second question. Step Functions keeps that
|
|
14
|
+
* Role and runs every execution as it, so the caller creating one needs
|
|
15
|
+
* `iam:PassRole` on it. The resource there is the Role.
|
|
16
|
+
*/
|
|
17
|
+
export class SimStepFunctionsAuthorizer {
|
|
18
|
+
#iam;
|
|
19
|
+
#accountRegionScope;
|
|
20
|
+
#passRole;
|
|
21
|
+
constructor(properties) {
|
|
22
|
+
this.#iam = properties.iam;
|
|
23
|
+
this.#accountRegionScope = properties.accountRegionScope;
|
|
24
|
+
this.#passRole = new SimIamPassRoleAuthorizer({
|
|
25
|
+
iam: properties.iam,
|
|
26
|
+
passedToService: simStatesServicePrincipal,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Ensure the caller may hand Step Functions a state machine's role.
|
|
31
|
+
*/
|
|
32
|
+
authorizePassRole(roleArn, caller) {
|
|
33
|
+
this.#passRole.authorize(roleArn, caller);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Ensure the caller may perform an action on a state machine of this name.
|
|
37
|
+
*/
|
|
38
|
+
authorizeStateMachineName(action, name, caller) {
|
|
39
|
+
return this.authorizeStateMachineArn(action, simStateMachineArn(this.#accountRegionScope, name), caller);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Ensure the caller may perform an action on a state machine ARN.
|
|
43
|
+
*
|
|
44
|
+
* The state machine need not be there. Real IAM evaluates a request before
|
|
45
|
+
* the service handles it, so a caller with no permission is refused whether
|
|
46
|
+
* or not the ARN names anything.
|
|
47
|
+
*/
|
|
48
|
+
authorizeStateMachineArn(action, stateMachineArn, caller) {
|
|
49
|
+
const decision = this.#iam.authorize({
|
|
50
|
+
action,
|
|
51
|
+
resource: stateMachineArn,
|
|
52
|
+
caller,
|
|
53
|
+
});
|
|
54
|
+
if (decision.isDenied) {
|
|
55
|
+
throw new SimIamAccessDenied({
|
|
56
|
+
principal: decision.caller.principal,
|
|
57
|
+
reason: decision.denialReason,
|
|
58
|
+
action,
|
|
59
|
+
resource: stateMachineArn,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return decision.caller;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { BackgroundScheduler } from "../../../../util/background/background.js";
|
|
2
2
|
import type { SimAwsAccountRegionScope } from "../../../aws/sim-aws-account-region-scope.js";
|
|
3
3
|
import type { SimStateMachineStore } from "../../machine/sim-state-machine-store.js";
|
|
4
|
+
import type { SimStepFunctionsAuthorizer } from "../authorize/sim-step-functions-authorizer.js";
|
|
5
|
+
import type { SimStepFunctionsRequestOptions } from "../sim-step-functions-request-options.js";
|
|
4
6
|
import type { SimCreateStateMachineCommand, SimCreateStateMachineCommandOutput } from "./machine.command.js";
|
|
5
7
|
interface SimStateMachineCreateProperties {
|
|
6
8
|
readonly stateMachines: SimStateMachineStore;
|
|
9
|
+
readonly authorizer: SimStepFunctionsAuthorizer;
|
|
7
10
|
readonly accountRegionScope: SimAwsAccountRegionScope;
|
|
8
11
|
readonly background: BackgroundScheduler;
|
|
9
12
|
}
|
|
@@ -22,8 +25,8 @@ export declare class SimStateMachineCreate {
|
|
|
22
25
|
*
|
|
23
26
|
* `CreateStateMachine` is idempotent. A second request carrying the same
|
|
24
27
|
* name, definition and type answers with the state machine that is already
|
|
25
|
-
* there.
|
|
28
|
+
* there, and is authorized the same way as the first.
|
|
26
29
|
*/
|
|
27
|
-
handle(command: SimCreateStateMachineCommand): SimCreateStateMachineCommandOutput;
|
|
30
|
+
handle(command: SimCreateStateMachineCommand, options?: SimStepFunctionsRequestOptions): SimCreateStateMachineCommandOutput;
|
|
28
31
|
}
|
|
29
32
|
export {};
|
|
@@ -7,10 +7,12 @@ import { readSimStateMachineCreateInput, } from "./sim-state-machine-input.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export class SimStateMachineCreate {
|
|
9
9
|
#stateMachines;
|
|
10
|
+
#authorizer;
|
|
10
11
|
#accountRegionScope;
|
|
11
12
|
#background;
|
|
12
13
|
constructor(properties) {
|
|
13
14
|
this.#stateMachines = properties.stateMachines;
|
|
15
|
+
this.#authorizer = properties.authorizer;
|
|
14
16
|
this.#accountRegionScope = properties.accountRegionScope;
|
|
15
17
|
this.#background = properties.background;
|
|
16
18
|
}
|
|
@@ -23,10 +25,12 @@ export class SimStateMachineCreate {
|
|
|
23
25
|
*
|
|
24
26
|
* `CreateStateMachine` is idempotent. A second request carrying the same
|
|
25
27
|
* name, definition and type answers with the state machine that is already
|
|
26
|
-
* there.
|
|
28
|
+
* there, and is authorized the same way as the first.
|
|
27
29
|
*/
|
|
28
|
-
handle(command) {
|
|
30
|
+
handle(command, options) {
|
|
29
31
|
const read = readSimStateMachineCreateInput(command.input);
|
|
32
|
+
this.#authorizer.authorizeStateMachineName("states:CreateStateMachine", read.name, options?.caller);
|
|
33
|
+
this.#authorizer.authorizePassRole(read.roleArn, options?.caller);
|
|
30
34
|
const existing = this.#stateMachines.findByName(read.name);
|
|
31
35
|
if (existing !== undefined) {
|
|
32
36
|
return answerForExisting(existing, read);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SimStatesExecutionStore } from "../../execution/sim-states-execution-store.js";
|
|
2
|
+
import type { SimStateMachineStore } from "../../machine/sim-state-machine-store.js";
|
|
3
|
+
import type { SimStepFunctionsAuthorizer } from "../authorize/sim-step-functions-authorizer.js";
|
|
4
|
+
import type { SimStepFunctionsRequestOptions } from "../sim-step-functions-request-options.js";
|
|
5
|
+
import type { SimDeleteStateMachineCommand, SimDeleteStateMachineCommandOutput } from "./machine.command.js";
|
|
6
|
+
interface SimStateMachineDeleteProperties {
|
|
7
|
+
readonly stateMachines: SimStateMachineStore;
|
|
8
|
+
readonly authorizer: SimStepFunctionsAuthorizer;
|
|
9
|
+
readonly executions: SimStatesExecutionStore;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The command that deletes a state machine.
|
|
13
|
+
*/
|
|
14
|
+
export declare class SimStateMachineDelete {
|
|
15
|
+
#private;
|
|
16
|
+
constructor(properties: SimStateMachineDeleteProperties);
|
|
17
|
+
/**
|
|
18
|
+
* Delete a state machine and forget its executions.
|
|
19
|
+
*
|
|
20
|
+
* The caller is authorized against the ARN the request carries, before
|
|
21
|
+
* anything is looked up. A caller with no permission is refused whether or
|
|
22
|
+
* not the ARN names a state machine.
|
|
23
|
+
*/
|
|
24
|
+
handle(command: SimDeleteStateMachineCommand, options?: SimStepFunctionsRequestOptions): SimDeleteStateMachineCommandOutput;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { requireSimStateMachine, requiredSimStateMachineArn, } from "./sim-state-machine-lookup.js";
|
|
2
|
+
/**
|
|
3
|
+
* The command that deletes a state machine.
|
|
4
|
+
*/
|
|
5
|
+
export class SimStateMachineDelete {
|
|
6
|
+
#stateMachines;
|
|
7
|
+
#authorizer;
|
|
8
|
+
#executions;
|
|
9
|
+
constructor(properties) {
|
|
10
|
+
this.#stateMachines = properties.stateMachines;
|
|
11
|
+
this.#authorizer = properties.authorizer;
|
|
12
|
+
this.#executions = properties.executions;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Delete a state machine and forget its executions.
|
|
16
|
+
*
|
|
17
|
+
* The caller is authorized against the ARN the request carries, before
|
|
18
|
+
* anything is looked up. A caller with no permission is refused whether or
|
|
19
|
+
* not the ARN names a state machine.
|
|
20
|
+
*/
|
|
21
|
+
handle(command, options) {
|
|
22
|
+
const { stateMachineArn } = command.input;
|
|
23
|
+
this.#authorizer.authorizeStateMachineArn("states:DeleteStateMachine", requiredSimStateMachineArn(stateMachineArn, "DeleteStateMachine"), options?.caller);
|
|
24
|
+
const { arn } = requireSimStateMachine(this.#stateMachines, stateMachineArn, "DeleteStateMachine");
|
|
25
|
+
this.#stateMachines.remove(arn);
|
|
26
|
+
this.#executions.removeForStateMachine(arn);
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { SimStateMachine } from "../../machine/sim-state-machine.js";
|
|
2
2
|
import type { SimStateMachineStore } from "../../machine/sim-state-machine-store.js";
|
|
3
|
+
/**
|
|
4
|
+
* The state machine ARN a request names, or a refusal saying it needs one.
|
|
5
|
+
*
|
|
6
|
+
* A command authorizes against this before looking anything up, the way real
|
|
7
|
+
* IAM decides a request before the service handles it.
|
|
8
|
+
*/
|
|
9
|
+
export declare function requiredSimStateMachineArn(arn: string | undefined, commandName: string): string;
|
|
3
10
|
/**
|
|
4
11
|
* Find the state machine a request's ARN names, or say why it could not be.
|
|
5
12
|
*/
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { SimStatesInvalidRequest, SimStatesResourceNotFound, } from "../../error/sim-step-functions.error.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* The state machine ARN a request names, or a refusal saying it needs one.
|
|
4
|
+
*
|
|
5
|
+
* A command authorizes against this before looking anything up, the way real
|
|
6
|
+
* IAM decides a request before the service handles it.
|
|
4
7
|
*/
|
|
5
|
-
export function
|
|
8
|
+
export function requiredSimStateMachineArn(arn, commandName) {
|
|
6
9
|
if (arn === undefined) {
|
|
7
10
|
throw new SimStatesInvalidRequest(`${commandName} needs a stateMachineArn.`);
|
|
8
11
|
}
|
|
9
|
-
|
|
12
|
+
return arn;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Find the state machine a request's ARN names, or say why it could not be.
|
|
16
|
+
*/
|
|
17
|
+
export function requireSimStateMachine(stateMachines, arn, commandName) {
|
|
18
|
+
const stateMachine = stateMachines.find(requiredSimStateMachineArn(arn, commandName));
|
|
10
19
|
if (stateMachine === undefined) {
|
|
11
20
|
throw new SimStatesResourceNotFound(`${arn} is not a simulated state machine in this Account and Region.`);
|
|
12
21
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BackgroundScheduler } from "../../../../util/background/background.js";
|
|
2
|
+
import type { SimStateMachineStore } from "../../machine/sim-state-machine-store.js";
|
|
3
|
+
import type { SimUpdateStateMachineCommand, SimUpdateStateMachineCommandOutput } from "./machine.command.js";
|
|
4
|
+
interface SimStateMachineUpdateProperties {
|
|
5
|
+
readonly stateMachines: SimStateMachineStore;
|
|
6
|
+
readonly background: BackgroundScheduler;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The command that changes a state machine's definition or role.
|
|
10
|
+
*/
|
|
11
|
+
export declare class SimStateMachineUpdate {
|
|
12
|
+
#private;
|
|
13
|
+
constructor(properties: SimStateMachineUpdateProperties);
|
|
14
|
+
/**
|
|
15
|
+
* Change a state machine's definition or role.
|
|
16
|
+
*/
|
|
17
|
+
handle(command: SimUpdateStateMachineCommand): SimUpdateStateMachineCommandOutput;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -2,21 +2,19 @@ import { parseSimStatesDefinition } from "../../definition/sim-states-definition
|
|
|
2
2
|
import { SimStatesInvalidRequest } from "../../error/sim-step-functions.error.js";
|
|
3
3
|
import { requireSimStateMachine } from "./sim-state-machine-lookup.js";
|
|
4
4
|
/**
|
|
5
|
-
* The
|
|
5
|
+
* The command that changes a state machine's definition or role.
|
|
6
6
|
*/
|
|
7
|
-
export class
|
|
7
|
+
export class SimStateMachineUpdate {
|
|
8
8
|
#stateMachines;
|
|
9
|
-
#executions;
|
|
10
9
|
#background;
|
|
11
10
|
constructor(properties) {
|
|
12
11
|
this.#stateMachines = properties.stateMachines;
|
|
13
|
-
this.#executions = properties.executions;
|
|
14
12
|
this.#background = properties.background;
|
|
15
13
|
}
|
|
16
14
|
/**
|
|
17
15
|
* Change a state machine's definition or role.
|
|
18
16
|
*/
|
|
19
|
-
|
|
17
|
+
handle(command) {
|
|
20
18
|
const { stateMachineArn, definition, roleArn } = command.input;
|
|
21
19
|
if (definition === undefined && roleArn === undefined) {
|
|
22
20
|
throw new SimStatesInvalidRequest("UpdateStateMachine needs a definition or a roleArn to change.");
|
|
@@ -31,13 +29,4 @@ export class SimStateMachineWrites {
|
|
|
31
29
|
});
|
|
32
30
|
return { updateDate: this.#background.now() };
|
|
33
31
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Delete a state machine and forget its executions.
|
|
36
|
-
*/
|
|
37
|
-
delete(command) {
|
|
38
|
-
const found = requireSimStateMachine(this.#stateMachines, command.input.stateMachineArn, "DeleteStateMachine");
|
|
39
|
-
this.#stateMachines.remove(found.arn);
|
|
40
|
-
this.#executions.removeForStateMachine(found.arn);
|
|
41
|
-
return {};
|
|
42
|
-
}
|
|
43
32
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SimSdkCommandRouter } from "../../sdk/router/sim-sdk-command-router.type.js";
|
|
2
2
|
import { type BackgroundScheduler } from "../../util/background/background.js";
|
|
3
3
|
import type { SimAwsAccountRegionScope } from "../aws/sim-aws-account-region-scope.js";
|
|
4
|
+
import type { SimIamInterServiceAuthZ } from "../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
4
5
|
import type * as simStatesCommands from "./command/sim-step-functions-command.types.js";
|
|
5
6
|
import type { SimStepFunctionsRequestOptions } from "./command/sim-step-functions-request-options.js";
|
|
6
7
|
import { type SimStatesDefinitionStore } from "./definition/store/sim-states-definition-store.js";
|
|
@@ -10,6 +11,7 @@ import type { SimStatesTaskTargets } from "./task/sim-states-task-invocation.js"
|
|
|
10
11
|
import { SimStepFunctionsInspection } from "./sim-step-functions-inspection.js";
|
|
11
12
|
interface SimStepFunctionsProperties {
|
|
12
13
|
readonly accountRegionScope?: SimAwsAccountRegionScope;
|
|
14
|
+
readonly iam?: SimIamInterServiceAuthZ;
|
|
13
15
|
readonly background?: BackgroundScheduler;
|
|
14
16
|
/**
|
|
15
17
|
* Where a `Task` state does its work. A simulated Step Functions built on
|
|
@@ -31,6 +33,10 @@ interface SimStepFunctionsProperties {
|
|
|
31
33
|
* `Task`, `Choice`, `Wait`, `Succeed` and `Fail`, and a definition using any
|
|
32
34
|
* other is refused by name.
|
|
33
35
|
*
|
|
36
|
+
* Creating and deleting a state machine are decided by simulated IAM. The
|
|
37
|
+
* other operations here are not. A caller an account would refuse still
|
|
38
|
+
* reaches those.
|
|
39
|
+
*
|
|
34
40
|
* An execution runs on the simulation's background scheduler rather than in
|
|
35
41
|
* the `StartExecution` call. An execution with nothing to wait for settles
|
|
36
42
|
* before the caller sees it. A failing execution records the failure and never
|
|
@@ -52,13 +58,13 @@ export declare class SimStepFunctions {
|
|
|
52
58
|
*/
|
|
53
59
|
inspection(): SimStepFunctionsInspection;
|
|
54
60
|
/** Handle a CreateStateMachine Command from the SDK. */
|
|
55
|
-
createStateMachine(command: simStatesCommands.SimCreateStateMachineCommand,
|
|
61
|
+
createStateMachine(command: simStatesCommands.SimCreateStateMachineCommand, options?: SimStepFunctionsRequestOptions): Promise<simStatesCommands.SimCreateStateMachineCommandOutput>;
|
|
56
62
|
/** Handle a DescribeStateMachine Command from the SDK. */
|
|
57
63
|
describeStateMachine(command: simStatesCommands.SimDescribeStateMachineCommand, _options?: SimStepFunctionsRequestOptions): Promise<simStatesCommands.SimDescribeStateMachineCommandOutput>;
|
|
58
64
|
/** Handle an UpdateStateMachine Command from the SDK. */
|
|
59
65
|
updateStateMachine(command: simStatesCommands.SimUpdateStateMachineCommand, _options?: SimStepFunctionsRequestOptions): Promise<simStatesCommands.SimUpdateStateMachineCommandOutput>;
|
|
60
66
|
/** Handle a DeleteStateMachine Command from the SDK. */
|
|
61
|
-
deleteStateMachine(command: simStatesCommands.SimDeleteStateMachineCommand,
|
|
67
|
+
deleteStateMachine(command: simStatesCommands.SimDeleteStateMachineCommand, options?: SimStepFunctionsRequestOptions): Promise<simStatesCommands.SimDeleteStateMachineCommandOutput>;
|
|
62
68
|
/** Handle a ListStateMachines Command from the SDK. */
|
|
63
69
|
listStateMachines(command: simStatesCommands.SimListStateMachinesCommand, _options?: SimStepFunctionsRequestOptions): Promise<simStatesCommands.SimListStateMachinesCommandOutput>;
|
|
64
70
|
/** Handle a TagResource Command from the SDK. */
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { BackgroundTasks, } from "../../util/background/background.js";
|
|
2
2
|
import { simAwsAccountRegionScopeFactory } from "../aws/sim-aws-account-region-scope.factory.js";
|
|
3
|
+
import { simIamInRegion } from "../iam/authorize/sim-iam-region-auth-z.js";
|
|
4
|
+
import { SimStepFunctionsAuthorizer } from "./command/authorize/sim-step-functions-authorizer.js";
|
|
3
5
|
import { SimStatesExecutionDescribe } from "./command/execution/sim-states-execution-describe.js";
|
|
4
6
|
import { SimStatesExecutionStart } from "./command/execution/sim-states-execution-start.js";
|
|
5
7
|
import { SimStateMachineCreate } from "./command/machine/sim-state-machine-create.js";
|
|
6
8
|
import { SimStateMachineReads } from "./command/machine/sim-state-machine-reads.js";
|
|
7
|
-
import {
|
|
9
|
+
import { SimStateMachineDelete } from "./command/machine/sim-state-machine-delete.js";
|
|
10
|
+
import { SimStateMachineUpdate } from "./command/machine/sim-state-machine-update.js";
|
|
8
11
|
import { SimStateMachineTagCommands } from "./command/tag/sim-state-machine-tag-commands.js";
|
|
9
12
|
import { SimStatesNoDefinitionStore, } from "./definition/store/sim-states-definition-store.js";
|
|
10
13
|
import { SimStatesExecutionStore } from "./execution/sim-states-execution-store.js";
|
|
@@ -22,6 +25,10 @@ import { SimStepFunctionsInspection } from "./sim-step-functions-inspection.js";
|
|
|
22
25
|
* `Task`, `Choice`, `Wait`, `Succeed` and `Fail`, and a definition using any
|
|
23
26
|
* other is refused by name.
|
|
24
27
|
*
|
|
28
|
+
* Creating and deleting a state machine are decided by simulated IAM. The
|
|
29
|
+
* other operations here are not. A caller an account would refuse still
|
|
30
|
+
* reaches those.
|
|
31
|
+
*
|
|
25
32
|
* An execution runs on the simulation's background scheduler rather than in
|
|
26
33
|
* the `StartExecution` call. An execution with nothing to wait for settles
|
|
27
34
|
* before the caller sees it. A failing execution records the failure and never
|
|
@@ -32,7 +39,8 @@ export class SimStepFunctions {
|
|
|
32
39
|
#stateMachines = new SimStateMachineStore();
|
|
33
40
|
#executions = new SimStatesExecutionStore();
|
|
34
41
|
#machineReads;
|
|
35
|
-
#
|
|
42
|
+
#machineUpdate;
|
|
43
|
+
#machineDelete;
|
|
36
44
|
#machineCreate;
|
|
37
45
|
#executionStart;
|
|
38
46
|
#executionDescribe;
|
|
@@ -43,19 +51,28 @@ export class SimStepFunctions {
|
|
|
43
51
|
#inspection = new SimStepFunctionsInspection(this.#executions);
|
|
44
52
|
constructor(properties = {}) {
|
|
45
53
|
const { accountRegionScope = simAwsAccountRegionScopeFactory.make(), background = new BackgroundTasks(), taskTargets = new SimStatesNoTaskTargets(), definitions = new SimStatesNoDefinitionStore(), } = properties;
|
|
54
|
+
const authorizer = new SimStepFunctionsAuthorizer({
|
|
55
|
+
iam: simIamInRegion(properties.iam, accountRegionScope.regionName),
|
|
56
|
+
accountRegionScope,
|
|
57
|
+
});
|
|
46
58
|
this.#background = background;
|
|
47
59
|
this.#cfnFactory = new SimStepFunctionsCfnResourceFactory({
|
|
48
60
|
stepFunctions: this,
|
|
49
61
|
definitions,
|
|
50
62
|
});
|
|
51
63
|
this.#machineReads = new SimStateMachineReads(this.#stateMachines);
|
|
52
|
-
this.#
|
|
64
|
+
this.#machineUpdate = new SimStateMachineUpdate({
|
|
53
65
|
stateMachines: this.#stateMachines,
|
|
54
|
-
executions: this.#executions,
|
|
55
66
|
background,
|
|
56
67
|
});
|
|
68
|
+
this.#machineDelete = new SimStateMachineDelete({
|
|
69
|
+
stateMachines: this.#stateMachines,
|
|
70
|
+
authorizer,
|
|
71
|
+
executions: this.#executions,
|
|
72
|
+
});
|
|
57
73
|
this.#machineCreate = new SimStateMachineCreate({
|
|
58
74
|
stateMachines: this.#stateMachines,
|
|
75
|
+
authorizer,
|
|
59
76
|
accountRegionScope,
|
|
60
77
|
background,
|
|
61
78
|
});
|
|
@@ -84,9 +101,9 @@ export class SimStepFunctions {
|
|
|
84
101
|
return this.#inspection;
|
|
85
102
|
}
|
|
86
103
|
/** Handle a CreateStateMachine Command from the SDK. */
|
|
87
|
-
async createStateMachine(command,
|
|
104
|
+
async createStateMachine(command, options) {
|
|
88
105
|
await this.#background.sequence();
|
|
89
|
-
return this.#machineCreate.handle(command);
|
|
106
|
+
return this.#machineCreate.handle(command, options);
|
|
90
107
|
}
|
|
91
108
|
/** Handle a DescribeStateMachine Command from the SDK. */
|
|
92
109
|
async describeStateMachine(command, _options) {
|
|
@@ -96,12 +113,12 @@ export class SimStepFunctions {
|
|
|
96
113
|
/** Handle an UpdateStateMachine Command from the SDK. */
|
|
97
114
|
async updateStateMachine(command, _options) {
|
|
98
115
|
await this.#background.sequence();
|
|
99
|
-
return this.#
|
|
116
|
+
return this.#machineUpdate.handle(command);
|
|
100
117
|
}
|
|
101
118
|
/** Handle a DeleteStateMachine Command from the SDK. */
|
|
102
|
-
async deleteStateMachine(command,
|
|
119
|
+
async deleteStateMachine(command, options) {
|
|
103
120
|
await this.#background.sequence();
|
|
104
|
-
return this.#
|
|
121
|
+
return this.#machineDelete.handle(command, options);
|
|
105
122
|
}
|
|
106
123
|
/** Handle a ListStateMachines Command from the SDK. */
|
|
107
124
|
async listStateMachines(command, _options) {
|
|
@@ -5,6 +5,7 @@ import { type BackgroundScheduler } from "../../../../util/background/background
|
|
|
5
5
|
import type { SimAwsAccountId } from "../../../aws/sim-aws-account.js";
|
|
6
6
|
import type { AwsRegionName } from "../../../aws/sim-aws-region.js";
|
|
7
7
|
import type { SimAwsCaller, SimAwsDefaultCaller } from "../../../aws/caller/sim-aws-caller.js";
|
|
8
|
+
import type { SimAwsAmbientCaller } from "../../../aws/caller/sim-aws-ambient-caller.js";
|
|
8
9
|
interface AssumeRoleCommandHandlerProperties {
|
|
9
10
|
readonly sourceAccountId: SimAwsAccountId;
|
|
10
11
|
/**
|
|
@@ -17,6 +18,10 @@ interface AssumeRoleCommandHandlerProperties {
|
|
|
17
18
|
* The caller this simulation attributes a request naming none to.
|
|
18
19
|
*/
|
|
19
20
|
readonly defaultCaller?: SimAwsDefaultCaller | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Where a request naming no caller looks before the default.
|
|
23
|
+
*/
|
|
24
|
+
readonly ambientCaller?: SimAwsAmbientCaller | undefined;
|
|
20
25
|
}
|
|
21
26
|
/**
|
|
22
27
|
* STS AssumeRoleCommand handler.
|
|
@@ -27,6 +27,7 @@ export class AssumeRoleCommandHandler {
|
|
|
27
27
|
this.background = background;
|
|
28
28
|
this.callerResolver = new SimAwsCallerResolver({
|
|
29
29
|
defaultCaller: properties.defaultCaller,
|
|
30
|
+
ambientCaller: properties.ambientCaller,
|
|
30
31
|
});
|
|
31
32
|
this.authorizationCoordinator = new AssumeRoleAuthorizationCoordinator({
|
|
32
33
|
sourceAccountId,
|