@kensio/yulin 1.20.15 → 1.20.17
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/README.md +13 -0
- package/dist/sdk/module/sim-sdk-module-client-interceptor.d.ts +5 -0
- package/dist/sdk/module/sim-sdk-module-client-interceptor.js +14 -0
- package/dist/sdk/module/sim-sdk-static-client-factory.d.ts +26 -0
- package/dist/sdk/module/sim-sdk-static-client-factory.js +59 -0
- package/dist/sdk/send-patch.d.ts +8 -0
- package/dist/sdk/send-patch.js +11 -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 +39 -6
- package/dist/service/aws/caller/sim-aws-caller-resolver.js +32 -30
- package/dist/service/aws/caller/sim-aws-caller.d.ts +9 -0
- package/dist/service/aws/caller/sim-aws-resolved-caller.d.ts +19 -0
- package/dist/service/aws/caller/sim-aws-resolved-caller.js +26 -0
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts +12 -0
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +6 -0
- package/dist/service/aws/factory/sim-aws-account-service-cache.d.ts +12 -0
- package/dist/service/aws/factory/sim-aws-account-service-cache.js +9 -0
- package/dist/service/aws/factory/sim-aws-registered-service-builder.js +3 -1
- package/dist/service/aws/factory/sim-aws-service-factory.d.ts +5 -0
- package/dist/service/aws/factory/sim-aws-service-factory.js +14 -0
- package/dist/service/aws/sim-aws-properties.d.ts +15 -0
- package/dist/service/aws/sim-aws.js +2 -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 +8 -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 +5 -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 +25 -0
- package/dist/service/cloudfront/cache-policy/sim-cf-cache-policy.js +21 -0
- package/dist/service/cloudfront/cache-policy/sim-cf-managed-cache-policies.d.ts +28 -0
- package/dist/service/cloudfront/cache-policy/sim-cf-managed-cache-policies.js +48 -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-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 +27 -0
- package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-config.js +42 -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/distro/{sim-cfn-cf-distro-response-headers-policy.d.ts → sim-cfn-cf-distro-behavior-policies.d.ts} +8 -7
- package/dist/service/cloudfront/cfn/distro/{sim-cfn-cf-distro-response-headers-policy.js → sim-cfn-cf-distro-behavior-policies.js} +11 -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 +50 -0
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.d.ts +1 -0
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js +10 -0
- package/dist/service/cloudfront/command/create-distribution/create-distribution.command.d.ts +1 -0
- package/dist/service/cloudfront/command/create-distribution/create-distribution.handler.d.ts +2 -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/update-distribution/update-distribution.handler.d.ts +2 -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-policies.d.ts +28 -0
- package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-policies.js +41 -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 +6 -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 +2 -0
- package/dist/service/cloudfront/distribution/configurator/sim-cf-distribution-configurator.factory.js +4 -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-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/sim-cf-distribution-configuration-state.d.ts +3 -1
- package/dist/service/cloudfront/distribution/sim-cf-distribution-reconfigurer.d.ts +2 -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/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/sdk/sim-cloudfront-sdk-command-router.js +12 -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-commands.d.ts +8 -12
- package/dist/service/cloudfront/sim-cloudfront-commands.js +8 -17
- package/dist/service/cloudfront/sim-cloudfront-policies.d.ts +43 -0
- package/dist/service/cloudfront/sim-cloudfront-policies.js +53 -0
- package/dist/service/cloudfront/sim-cloudfront.d.ts +13 -17
- package/dist/service/cloudfront/sim-cloudfront.js +22 -25
- 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 +33 -2
- package/dist/service/iam/authorize/allow/sim-iam-allow-requirement.js +33 -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 +36 -7
- package/dist/service/iam/authorize/context/sim-iam-auth-z-caller-context-builder.js +22 -11
- package/dist/service/iam/authorize/context/sim-iam-auth-z-context-builder.d.ts +10 -71
- package/dist/service/iam/authorize/context/sim-iam-auth-z-context-builder.js +7 -2
- package/dist/service/iam/authorize/context/sim-iam-auth-z-input.d.ts +87 -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 +21 -3
- package/dist/service/iam/authorize/match/sim-iam-policy-principal-matcher.js +34 -10
- 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 +21 -5
- package/dist/service/iam/authorize/sim-iam-account-auth-z.js +7 -3
- package/dist/service/iam/authorize/sim-iam-authorizer.d.ts +5 -2
- package/dist/service/iam/authorize/sim-iam-authorizer.js +3 -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 +11 -0
- package/dist/service/iam/role/sim-iam-role-with-policy.factory.js +4 -2
- package/dist/service/iam/sim-iam-account-parts.d.ts +16 -0
- package/dist/service/iam/sim-iam-account-parts.js +2 -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 +11 -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/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 +6 -4
- 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 +15 -9
- package/dist/service/ssm/parameter/sim-ssm-parameter-kms.js +20 -10
- 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/auth-z/assume-role-auth-z-coordinator.d.ts +9 -2
- package/dist/service/sts/auth-z/assume-role-auth-z-coordinator.js +2 -2
- package/dist/service/sts/auth-z/assume-role-source-account-auth-z.d.ts +10 -4
- package/dist/service/sts/auth-z/assume-role-source-account-auth-z.js +8 -7
- package/dist/service/sts/auth-z/assume-role-target-auth-z.d.ts +2 -2
- package/dist/service/sts/auth-z/assume-role-trust-policy-authorizer.d.ts +6 -2
- package/dist/service/sts/auth-z/assume-role-trust-policy-authorizer.js +14 -11
- package/dist/service/sts/command/assume-role/assume-role.handler.d.ts +10 -1
- package/dist/service/sts/command/assume-role/assume-role.handler.js +6 -2
- package/dist/service/sts/command/get-caller-identity/get-caller-identity.handler.d.ts +10 -1
- package/dist/service/sts/command/get-caller-identity/get-caller-identity.handler.js +5 -1
- package/dist/service/sts/service-role/sim-service-role.js +5 -1
- package/dist/service/sts/sim-sts.d.ts +18 -1
- package/dist/service/sts/sim-sts.js +8 -0
- package/dist/util/memo/bounded-memo.d.ts +36 -0
- package/dist/util/memo/bounded-memo.js +58 -0
- package/docs/README.md +54 -0
- package/docs/ai-skill/README.md +69 -0
- package/docs/cli/README.md +284 -0
- package/docs/factories/README.md +140 -0
- package/docs/lint/README.md +176 -0
- package/docs/non-aws-dependencies/README.md +261 -0
- package/docs/sdk/README.md +274 -0
- package/docs/serve/README.md +1126 -0
- package/docs/services/acm/README.md +823 -0
- package/docs/services/apigateway/README.md +1919 -0
- package/docs/services/apigatewayv2/README.md +2678 -0
- package/docs/services/athena/README.md +1044 -0
- package/docs/services/bedrock/README.md +350 -0
- package/docs/services/cloudformation/README.md +3625 -0
- package/docs/services/cloudfront/README.md +3098 -0
- package/docs/services/cloudwatch/README.md +422 -0
- package/docs/services/cognito/README.md +4924 -0
- package/docs/services/dynamodb/README.md +3785 -0
- package/docs/services/ecr/README.md +302 -0
- package/docs/services/ecs/README.md +2021 -0
- package/docs/services/elbv2/README.md +1901 -0
- package/docs/services/eventbridge/README.md +1118 -0
- package/docs/services/firehose/README.md +811 -0
- package/docs/services/glue/README.md +507 -0
- package/docs/services/iam/README.md +1578 -0
- package/docs/services/kinesis/README.md +455 -0
- package/docs/services/kms/README.md +664 -0
- package/docs/services/lambda/README.md +3719 -0
- package/docs/services/logs/README.md +882 -0
- package/docs/services/organizations/README.md +574 -0
- package/docs/services/personalize/README.md +835 -0
- package/docs/services/rekognition/README.md +1070 -0
- package/docs/services/route53/README.md +1783 -0
- package/docs/services/s3/README.md +3029 -0
- package/docs/services/scheduler/README.md +814 -0
- package/docs/services/secretsmanager/README.md +670 -0
- package/docs/services/ses/README.md +1013 -0
- package/docs/services/sns/README.md +1904 -0
- package/docs/services/sqs/README.md +1185 -0
- package/docs/services/ssm/README.md +1096 -0
- package/docs/services/stepfunctions/README.md +1341 -0
- package/docs/services/sts/README.md +245 -0
- package/docs/services/wafv2/README.md +1380 -0
- package/docs/terraform/README.md +248 -0
- package/docs/time/README.md +284 -0
- package/llms.txt +59 -0
- package/package.json +7 -4
- package/dist/service/stepfunctions/command/machine/sim-state-machine-writes.d.ts +0 -25
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
# Simulated Bedrock
|
|
2
|
+
|
|
3
|
+
Simulated Bedrock answers model invocations from responses declared against a prompt or a model. A
|
|
4
|
+
test says what the model says, and no model runs.
|
|
5
|
+
|
|
6
|
+
Bedrock-specific types are imported from the `@kensio/yulin/bedrock` subpath.
|
|
7
|
+
|
|
8
|
+
## Answering a conversation
|
|
9
|
+
|
|
10
|
+
`Converse` answers with the response declared for the prompt it carries. The prompt is the text of
|
|
11
|
+
the last user message.
|
|
12
|
+
|
|
13
|
+
```typescript sim-bedrock-converse
|
|
14
|
+
/**
|
|
15
|
+
* Declaring what a model answers one prompt with, and conversing with it.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { ConverseCommand } from "@aws-sdk/client-bedrock-runtime";
|
|
19
|
+
|
|
20
|
+
import { SimAws } from "@kensio/yulin";
|
|
21
|
+
|
|
22
|
+
const simAws = new SimAws();
|
|
23
|
+
|
|
24
|
+
simAws.bedrock().responses().onPrompt("Summarise entry 1042", {
|
|
25
|
+
text: "Entry 1042 covers the tone sandhi rules.",
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const answered = await simAws.bedrock().converse(
|
|
29
|
+
new ConverseCommand({
|
|
30
|
+
modelId: "anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
31
|
+
messages: [{ role: "user", content: [{ text: "Summarise entry 1042" }] }],
|
|
32
|
+
}),
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
console.log(answered.output.message.content.at(0)?.text);
|
|
36
|
+
// "Entry 1042 covers the tone sandhi rules."
|
|
37
|
+
console.log(answered.stopReason); // "end_turn"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
A conversation with several turns matches on its last user message, so a rule keeps matching as the
|
|
41
|
+
conversation grows.
|
|
42
|
+
|
|
43
|
+
## Answering every call to one model
|
|
44
|
+
|
|
45
|
+
`onModel` covers every invocation of a model that no prompt rule matched first. This is the rule for
|
|
46
|
+
a test that cares about the code around the call rather than about one exchange.
|
|
47
|
+
|
|
48
|
+
```typescript sim-bedrock-model-rule
|
|
49
|
+
/**
|
|
50
|
+
* Declaring one answer for every call to a model.
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
import { ConverseCommand } from "@aws-sdk/client-bedrock-runtime";
|
|
54
|
+
|
|
55
|
+
import { SimAws } from "@kensio/yulin";
|
|
56
|
+
|
|
57
|
+
const simAws = new SimAws();
|
|
58
|
+
|
|
59
|
+
simAws
|
|
60
|
+
.bedrock()
|
|
61
|
+
.responses()
|
|
62
|
+
.onModel("amazon.nova-pro-v1:0", { text: "A short summary." });
|
|
63
|
+
|
|
64
|
+
const answered = await simAws.bedrock().converse(
|
|
65
|
+
new ConverseCommand({
|
|
66
|
+
modelId: "amazon.nova-pro-v1:0",
|
|
67
|
+
messages: [{ role: "user", content: [{ text: "Anything at all" }] }],
|
|
68
|
+
}),
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
console.log(answered.output.message.content.at(0)?.text); // "A short summary."
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`byDefault` covers everything else again. An invocation matching no rule at all answers with a
|
|
75
|
+
built-in line of text that says it is simulated.
|
|
76
|
+
|
|
77
|
+
## Answering with a tool call
|
|
78
|
+
|
|
79
|
+
A declared response carries content blocks as they were written, so a tool call reaches the code
|
|
80
|
+
that handles one. The response stops for `tool_use` unless the declaration names another reason.
|
|
81
|
+
|
|
82
|
+
```typescript sim-bedrock-tool-use
|
|
83
|
+
/**
|
|
84
|
+
* Declaring a tool call for the code under test to handle.
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
import { ConverseCommand } from "@aws-sdk/client-bedrock-runtime";
|
|
88
|
+
|
|
89
|
+
import { SimAws } from "@kensio/yulin";
|
|
90
|
+
|
|
91
|
+
const simAws = new SimAws();
|
|
92
|
+
|
|
93
|
+
simAws
|
|
94
|
+
.bedrock()
|
|
95
|
+
.responses()
|
|
96
|
+
.onPrompt("What is in entry 1042?", {
|
|
97
|
+
content: [
|
|
98
|
+
{
|
|
99
|
+
toolUse: {
|
|
100
|
+
toolUseId: "tooluse-1",
|
|
101
|
+
name: "lookUpEntry",
|
|
102
|
+
input: { entryId: "1042" },
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
const answered = await simAws.bedrock().converse(
|
|
109
|
+
new ConverseCommand({
|
|
110
|
+
modelId: "anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
111
|
+
messages: [{ role: "user", content: [{ text: "What is in entry 1042?" }] }],
|
|
112
|
+
}),
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
console.log(answered.stopReason); // "tool_use"
|
|
116
|
+
console.log(answered.output.message.content.at(0)?.toolUse?.name);
|
|
117
|
+
// "lookUpEntry"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Streaming a conversation
|
|
121
|
+
|
|
122
|
+
`ConverseStream` answers from the same rules, and sends the response as the events real Bedrock
|
|
123
|
+
sends. Declaring `chunks` says where the deltas fall.
|
|
124
|
+
|
|
125
|
+
```typescript sim-bedrock-converse-stream
|
|
126
|
+
/**
|
|
127
|
+
* Declaring a response in chunks and accumulating the stream.
|
|
128
|
+
*/
|
|
129
|
+
|
|
130
|
+
import { ConverseStreamCommand } from "@aws-sdk/client-bedrock-runtime";
|
|
131
|
+
|
|
132
|
+
import { SimAws } from "@kensio/yulin";
|
|
133
|
+
|
|
134
|
+
const simAws = new SimAws();
|
|
135
|
+
|
|
136
|
+
simAws
|
|
137
|
+
.bedrock()
|
|
138
|
+
.responses()
|
|
139
|
+
.onPrompt("Summarise entry 1042", {
|
|
140
|
+
chunks: ["Entry 1042 covers ", "the tone sandhi rules."],
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
const answered = await simAws.bedrock().converseStream(
|
|
144
|
+
new ConverseStreamCommand({
|
|
145
|
+
modelId: "anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
146
|
+
messages: [{ role: "user", content: [{ text: "Summarise entry 1042" }] }],
|
|
147
|
+
}),
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
let accumulated = "";
|
|
151
|
+
|
|
152
|
+
for await (const event of answered.stream) {
|
|
153
|
+
accumulated += event.contentBlockDelta?.delta.text ?? "";
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
console.log(accumulated); // "Entry 1042 covers the tone sandhi rules."
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The events arrive in the order real Bedrock sends them. `messageStart`, then one
|
|
160
|
+
`contentBlockDelta` per chunk, then `contentBlockStop`, `messageStop` carrying the stop reason, and
|
|
161
|
+
`metadata` carrying the token counts. A tool call adds a `contentBlockStart` before its delta,
|
|
162
|
+
carrying the tool use id and name.
|
|
163
|
+
|
|
164
|
+
The same declaration serves both APIs. `Converse` answers with the chunks joined, and a response
|
|
165
|
+
declared as `text` streams as a single delta. A stream is readable once, and reading it again
|
|
166
|
+
raises.
|
|
167
|
+
|
|
168
|
+
`InvokeModelWithResponseStream` streams the declared body as a single `chunk`:
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
for await (const event of answered.body) {
|
|
172
|
+
accumulated += new TextDecoder().decode(event.chunk?.bytes);
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Invoking a model directly
|
|
177
|
+
|
|
178
|
+
`InvokeModel` answers with the body declared for the request, serialized as JSON. The body is the
|
|
179
|
+
shape the model behind the id uses, which is why there is no built-in default for it.
|
|
180
|
+
|
|
181
|
+
```typescript sim-bedrock-invoke-model
|
|
182
|
+
/**
|
|
183
|
+
* Declaring a model-specific response body and invoking the model.
|
|
184
|
+
*/
|
|
185
|
+
|
|
186
|
+
import { InvokeModelCommand } from "@aws-sdk/client-bedrock-runtime";
|
|
187
|
+
|
|
188
|
+
import { SimAws } from "@kensio/yulin";
|
|
189
|
+
|
|
190
|
+
const simAws = new SimAws();
|
|
191
|
+
|
|
192
|
+
simAws
|
|
193
|
+
.bedrock()
|
|
194
|
+
.responses()
|
|
195
|
+
.onModel("amazon.titan-text-express-v1", {
|
|
196
|
+
body: { results: [{ outputText: "Entry 1042 covers tone sandhi." }] },
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
const answered = await simAws.bedrock().invokeModel(
|
|
200
|
+
new InvokeModelCommand({
|
|
201
|
+
modelId: "amazon.titan-text-express-v1",
|
|
202
|
+
body: JSON.stringify({ inputText: "Summarise entry 1042" }),
|
|
203
|
+
}),
|
|
204
|
+
);
|
|
205
|
+
|
|
206
|
+
console.log(JSON.parse(new TextDecoder().decode(answered.body)));
|
|
207
|
+
// { results: [ { outputText: "Entry 1042 covers tone sandhi." } ] }
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
An `InvokeModel` request matches a prompt rule on its request body decoded as UTF-8. A model rule is
|
|
211
|
+
usually the one to reach for.
|
|
212
|
+
|
|
213
|
+
## Reporting token counts
|
|
214
|
+
|
|
215
|
+
`usage` comes from the declaration, and a response that declares none reports fixed counts.
|
|
216
|
+
|
|
217
|
+
```typescript sim-bedrock-usage
|
|
218
|
+
/**
|
|
219
|
+
* Declaring what a response cost, for code that meters token spend.
|
|
220
|
+
*/
|
|
221
|
+
|
|
222
|
+
import { ConverseCommand } from "@aws-sdk/client-bedrock-runtime";
|
|
223
|
+
|
|
224
|
+
import { SimAws } from "@kensio/yulin";
|
|
225
|
+
|
|
226
|
+
const simAws = new SimAws();
|
|
227
|
+
|
|
228
|
+
simAws
|
|
229
|
+
.bedrock()
|
|
230
|
+
.responses()
|
|
231
|
+
.byDefault({
|
|
232
|
+
text: "A short summary.",
|
|
233
|
+
usage: { inputTokens: 1400, outputTokens: 220 },
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
const answered = await simAws.bedrock().converse(
|
|
237
|
+
new ConverseCommand({
|
|
238
|
+
modelId: "anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
239
|
+
messages: [{ role: "user", content: [{ text: "Summarise entry 1042" }] }],
|
|
240
|
+
}),
|
|
241
|
+
);
|
|
242
|
+
|
|
243
|
+
console.log(answered.usage.totalTokens); // 1620
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Authorizing an invocation
|
|
247
|
+
|
|
248
|
+
An invocation authorizes `bedrock:InvokeModel` against the model it names. A base model id becomes a
|
|
249
|
+
foundation model ARN for the Region the call was made in, and an inference profile ARN or a
|
|
250
|
+
provisioned model ARN is authorized against as it was written.
|
|
251
|
+
|
|
252
|
+
## SDK interception
|
|
253
|
+
|
|
254
|
+
An intercepted `BedrockRuntimeClient` reaches the simulated Bedrock of the Account and Region the
|
|
255
|
+
client is configured for.
|
|
256
|
+
|
|
257
|
+
```typescript sim-bedrock-sdk-interception
|
|
258
|
+
/**
|
|
259
|
+
* Answering production code that holds its own Bedrock Runtime client.
|
|
260
|
+
*/
|
|
261
|
+
|
|
262
|
+
import {
|
|
263
|
+
BedrockRuntimeClient,
|
|
264
|
+
ConverseCommand,
|
|
265
|
+
} from "@aws-sdk/client-bedrock-runtime";
|
|
266
|
+
|
|
267
|
+
import { SimSdk } from "@kensio/yulin/sdk";
|
|
268
|
+
|
|
269
|
+
const simSdk = new SimSdk();
|
|
270
|
+
simSdk.intercept(BedrockRuntimeClient);
|
|
271
|
+
|
|
272
|
+
simSdk.simAws
|
|
273
|
+
.account()
|
|
274
|
+
.region("eu-west-2")
|
|
275
|
+
.bedrock()
|
|
276
|
+
.responses()
|
|
277
|
+
.byDefault({ text: "Entry 1042 covers the tone sandhi rules." });
|
|
278
|
+
|
|
279
|
+
const client = new BedrockRuntimeClient({ region: "eu-west-2" });
|
|
280
|
+
|
|
281
|
+
const answered = await client.send(
|
|
282
|
+
new ConverseCommand({
|
|
283
|
+
modelId: "anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
284
|
+
messages: [{ role: "user", content: [{ text: "Summarise entry 1042" }] }],
|
|
285
|
+
}),
|
|
286
|
+
);
|
|
287
|
+
|
|
288
|
+
console.log(answered.output?.message?.content?.at(0)?.text);
|
|
289
|
+
// "Entry 1042 covers the tone sandhi rules."
|
|
290
|
+
|
|
291
|
+
client.destroy();
|
|
292
|
+
simSdk.restoreAll();
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## Available functionality
|
|
296
|
+
|
|
297
|
+
- `Converse`, `ConverseStream`, `InvokeModel` and `InvokeModelWithResponseStream`, through
|
|
298
|
+
`simAws.bedrock()` and through an intercepted `BedrockRuntimeClient`.
|
|
299
|
+
- Responses declared with `onPrompt`, `onModel` and `byDefault`. A prompt rule wins, then a model
|
|
300
|
+
rule, then the default.
|
|
301
|
+
- A declared response carries `text`, `chunks` or `content` blocks for `Converse`, a `body` for
|
|
302
|
+
`InvokeModel`, and optionally a `stopReason` and a `usage`.
|
|
303
|
+
- Streamed responses, with `chunks` deciding where the deltas fall and one declaration serving the
|
|
304
|
+
streaming and non-streaming APIs alike.
|
|
305
|
+
- Tool calls, as a declared `toolUse` content block.
|
|
306
|
+
- IAM authorization of `bedrock:InvokeModel` against the foundation model, inference profile or
|
|
307
|
+
provisioned model ARN the request names.
|
|
308
|
+
- Rules held per Account and Region, so two Regions answer the same prompt differently.
|
|
309
|
+
|
|
310
|
+
## Limitations
|
|
311
|
+
|
|
312
|
+
- No model runs. A response is whatever the matching rule declared, and the prompt is read only as
|
|
313
|
+
a key to match on.
|
|
314
|
+
- Every event of a stream is ready as soon as the call returns. Real Bedrock sends them as the model
|
|
315
|
+
generates them. No simulated clock advance separates them here.
|
|
316
|
+
- A response is split into deltas only where the declaration says so. Text declared any other way
|
|
317
|
+
arrives in one delta. The split a real model streams comes from its own tokenizer.
|
|
318
|
+
- A streamed tool call sends its arguments in one delta. Real `ConverseStream` sends them as
|
|
319
|
+
fragments of JSON to be concatenated. A tool call with no declared arguments sends `{}`.
|
|
320
|
+
- `InvokeModelWithResponseStream` sends the declared body as a single chunk. Real Bedrock sends a
|
|
321
|
+
chunk per generated fragment, in the shape the model behind the id uses.
|
|
322
|
+
- A serialized Bedrock request is refused. Bedrock speaks REST-JSON, and the wire path answers only
|
|
323
|
+
the AWS JSON protocol services. A function bundling its own SDK reaches Bedrock through module
|
|
324
|
+
interception. S3 and every other non-JSON-protocol service are reached the same way.
|
|
325
|
+
- The Bedrock control plane is unsimulated. `ListFoundationModels`, guardrail management, inference
|
|
326
|
+
profile management and provisioned throughput all belong to `BedrockClient`.
|
|
327
|
+
- Bedrock Agents and knowledge bases are unsimulated. `InvokeAgent`, `Retrieve` and
|
|
328
|
+
`RetrieveAndGenerate` arrive on a client of their own.
|
|
329
|
+
- `ApplyGuardrail` is unsimulated, and a `guardrailConfig` or a `guardrailIdentifier` on an
|
|
330
|
+
invocation is refused outright. Answering without the guardrail would make one look applied here
|
|
331
|
+
and be applied in production.
|
|
332
|
+
- `system`, `inferenceConfig`, `toolConfig` and `additionalModelRequestFields` are accepted and
|
|
333
|
+
decide nothing. `maxTokens` truncates no declared response, and a `toolConfig` naming no tools
|
|
334
|
+
still gets a declared tool call.
|
|
335
|
+
- Token counts are fixed unless the declaration carries them. Counting them needs the tokenizer of
|
|
336
|
+
the model the request names. Declare a `usage` where the code under test meters spend.
|
|
337
|
+
- `metrics.latencyMs` is always zero. No time passes during an invocation.
|
|
338
|
+
- A `Converse` with no messages is refused. Real Bedrock accepts one where the `modelId` names a
|
|
339
|
+
prompt version from Prompt management, which is unsimulated.
|
|
340
|
+
- The model id goes unchecked. AWS publishes no enumerable table of model ids, so refusing one would
|
|
341
|
+
be failing closed against Yulin's own gaps.
|
|
342
|
+
- `InvokeModel` has no built-in default response body, and an invocation matching a rule that
|
|
343
|
+
declares none is refused. A response body is model-specific, and one family's shape served for
|
|
344
|
+
every other one would parse into something the caller cannot read.
|
|
345
|
+
- An `InvokeModel` body that arrives as a stream or a Blob matches no prompt rule. Reading it would
|
|
346
|
+
consume the caller's own request body, so such a request falls through to a model rule or to the
|
|
347
|
+
default.
|
|
348
|
+
- A `Converse` call matching a response declared only as a body is refused for the same reason. It
|
|
349
|
+
does not fall back to the default.
|
|
350
|
+
- There are no CloudFormation resource types for Bedrock, and Bedrock is absent from `serveSimAws`.
|