@kensio/yulin 1.18.0 → 1.18.2
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/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.d.ts +8 -2
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.d.ts.map +1 -1
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.js +9 -3
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.js.map +1 -1
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-web-acl.d.ts +25 -0
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-web-acl.d.ts.map +1 -0
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-web-acl.js +36 -0
- package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-web-acl.js.map +1 -0
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.d.ts.map +1 -1
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js +6 -5
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js.map +1 -1
- package/dist/service/cognito/cfn/client/sim-cfn-cognito-client-properties.d.ts.map +1 -1
- package/dist/service/cognito/cfn/client/sim-cfn-cognito-client-properties.js +10 -0
- package/dist/service/cognito/cfn/client/sim-cfn-cognito-client-properties.js.map +1 -1
- package/dist/service/cognito/cfn/client/sim-cfn-cognito-refresh-token-rotation.d.ts +27 -0
- package/dist/service/cognito/cfn/client/sim-cfn-cognito-refresh-token-rotation.d.ts.map +1 -0
- package/dist/service/cognito/cfn/client/sim-cfn-cognito-refresh-token-rotation.js +35 -0
- package/dist/service/cognito/cfn/client/sim-cfn-cognito-refresh-token-rotation.js.map +1 -0
- package/dist/service/cognito/command/auth/auth.command.d.ts +31 -0
- package/dist/service/cognito/command/auth/auth.command.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-auth-commands.d.ts +2 -0
- package/dist/service/cognito/command/auth/sim-cognito-auth-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-auth-commands.js +13 -1
- package/dist/service/cognito/command/auth/sim-cognito-auth-commands.js.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-get-tokens-from-refresh-token.d.ts +35 -0
- package/dist/service/cognito/command/auth/sim-cognito-get-tokens-from-refresh-token.d.ts.map +1 -0
- package/dist/service/cognito/command/auth/sim-cognito-get-tokens-from-refresh-token.js +51 -0
- package/dist/service/cognito/command/auth/sim-cognito-get-tokens-from-refresh-token.js.map +1 -0
- package/dist/service/cognito/command/auth/sim-cognito-refresh-sign-in.d.ts +3 -8
- package/dist/service/cognito/command/auth/sim-cognito-refresh-sign-in.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-refresh-sign-in.js +24 -17
- package/dist/service/cognito/command/auth/sim-cognito-refresh-sign-in.js.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-refreshed-tokens.d.ts +56 -0
- package/dist/service/cognito/command/auth/sim-cognito-refreshed-tokens.d.ts.map +1 -0
- package/dist/service/cognito/command/auth/sim-cognito-refreshed-tokens.js +50 -0
- package/dist/service/cognito/command/auth/sim-cognito-refreshed-tokens.js.map +1 -0
- package/dist/service/cognito/command/client/sim-cognito-unsimulated-client-options.d.ts.map +1 -1
- package/dist/service/cognito/command/client/sim-cognito-unsimulated-client-options.js +0 -1
- package/dist/service/cognito/command/client/sim-cognito-unsimulated-client-options.js.map +1 -1
- package/dist/service/cognito/command/client/sim-cognito-user-pool-client-view.d.ts +4 -3
- package/dist/service/cognito/command/client/sim-cognito-user-pool-client-view.d.ts.map +1 -1
- package/dist/service/cognito/command/client/sim-cognito-user-pool-client-view.js +5 -3
- package/dist/service/cognito/command/client/sim-cognito-user-pool-client-view.js.map +1 -1
- package/dist/service/cognito/command/client/user-pool-client.command.d.ts +3 -1
- package/dist/service/cognito/command/client/user-pool-client.command.d.ts.map +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-presented-grant.js +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-presented-grant.js.map +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-token-grants.d.ts +3 -3
- package/dist/service/cognito/command/hosted/sim-cognito-token-grants.d.ts.map +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-token-grants.js +5 -4
- package/dist/service/cognito/command/hosted/sim-cognito-token-grants.js.map +1 -1
- package/dist/service/cognito/command/sim-cognito-command.types.d.ts +1 -1
- package/dist/service/cognito/command/sim-cognito-command.types.d.ts.map +1 -1
- package/dist/service/cognito/index.d.ts +1 -0
- package/dist/service/cognito/index.d.ts.map +1 -1
- package/dist/service/cognito/index.js +1 -0
- package/dist/service/cognito/index.js.map +1 -1
- package/dist/service/cognito/sdk/sim-cognito-sdk-auth-routes.d.ts.map +1 -1
- package/dist/service/cognito/sdk/sim-cognito-sdk-auth-routes.js +4 -0
- package/dist/service/cognito/sdk/sim-cognito-sdk-auth-routes.js.map +1 -1
- package/dist/service/cognito/sim-cognito-authentication.d.ts +8 -0
- package/dist/service/cognito/sim-cognito-authentication.d.ts.map +1 -1
- package/dist/service/cognito/sim-cognito-authentication.js +11 -0
- package/dist/service/cognito/sim-cognito-authentication.js.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token-store.d.ts +11 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token-store.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token-store.js +17 -2
- package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token-store.js.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token.d.ts +41 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token.js +62 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-issued-token.js.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-pool-auth.d.ts +5 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-pool-auth.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-pool-auth.js +7 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-pool-auth.js.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-refresh-token-input.d.ts +11 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-refresh-token-input.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-refresh-token-input.js +17 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-refresh-token-input.js.map +1 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-refreshable-session.factory.d.ts +61 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-refreshable-session.factory.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-refreshable-session.factory.js +80 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-refreshable-session.factory.js.map +1 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-client-secret.d.ts +10 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-client-secret.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/client/sim-cognito-client-secret.js +22 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-client-secret.js.map +1 -1
- package/dist/service/cognito/user-pool/client/sim-cognito-refresh-token-rotation.d.ts +48 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-refresh-token-rotation.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-refresh-token-rotation.js +79 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-refresh-token-rotation.js.map +1 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.d.ts +7 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.js +7 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-settings.js.map +1 -1
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client.d.ts +6 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client.js +7 -0
- package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client.js.map +1 -1
- package/dist/service/cognito/user-pool/token/sim-cognito-token-issuer.d.ts +34 -0
- package/dist/service/cognito/user-pool/token/sim-cognito-token-issuer.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/token/sim-cognito-token-issuer.js +40 -1
- package/dist/service/cognito/user-pool/token/sim-cognito-token-issuer.js.map +1 -1
- package/dist/service/lambda/command/create-function/create-function-input.js +1 -1
- package/dist/service/lambda/command/create-function/create-function-input.js.map +1 -1
- package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts +17 -0
- package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts.map +1 -1
- package/dist/service/lambda/command/function/sim-lambda-function-commands.js +43 -0
- package/dist/service/lambda/command/function/sim-lambda-function-commands.js.map +1 -1
- package/dist/service/lambda/command/list-functions/list-functions-authorizer.d.ts +31 -0
- package/dist/service/lambda/command/list-functions/list-functions-authorizer.d.ts.map +1 -0
- package/dist/service/lambda/command/list-functions/list-functions-authorizer.js +41 -0
- package/dist/service/lambda/command/list-functions/list-functions-authorizer.js.map +1 -0
- package/dist/service/lambda/command/list-functions/list-functions.command.d.ts +34 -0
- package/dist/service/lambda/command/list-functions/list-functions.command.d.ts.map +1 -0
- package/dist/service/lambda/command/list-functions/list-functions.command.js +5 -0
- package/dist/service/lambda/command/list-functions/list-functions.command.js.map +1 -0
- package/dist/service/lambda/command/list-functions/list-functions.handler.d.ts +35 -0
- package/dist/service/lambda/command/list-functions/list-functions.handler.d.ts.map +1 -0
- package/dist/service/lambda/command/list-functions/list-functions.handler.js +46 -0
- package/dist/service/lambda/command/list-functions/list-functions.handler.js.map +1 -0
- package/dist/service/lambda/command/sim-lambda-command.types.d.ts +3 -0
- package/dist/service/lambda/command/sim-lambda-command.types.d.ts.map +1 -1
- package/dist/service/lambda/command/update-function-code/update-function-code-authorizer.d.ts +27 -0
- package/dist/service/lambda/command/update-function-code/update-function-code-authorizer.d.ts.map +1 -0
- package/dist/service/lambda/command/update-function-code/update-function-code-authorizer.js +37 -0
- package/dist/service/lambda/command/update-function-code/update-function-code-authorizer.js.map +1 -0
- package/dist/service/lambda/command/update-function-code/update-function-code-input.d.ts +16 -0
- package/dist/service/lambda/command/update-function-code/update-function-code-input.d.ts.map +1 -0
- package/dist/service/lambda/command/update-function-code/update-function-code-input.js +30 -0
- package/dist/service/lambda/command/update-function-code/update-function-code-input.js.map +1 -0
- package/dist/service/lambda/command/update-function-code/update-function-code.command.d.ts +41 -0
- package/dist/service/lambda/command/update-function-code/update-function-code.command.d.ts.map +1 -0
- package/dist/service/lambda/command/update-function-code/update-function-code.command.js +5 -0
- package/dist/service/lambda/command/update-function-code/update-function-code.command.js.map +1 -0
- package/dist/service/lambda/command/update-function-code/update-function-code.handler.d.ts +52 -0
- package/dist/service/lambda/command/update-function-code/update-function-code.handler.d.ts.map +1 -0
- package/dist/service/lambda/command/update-function-code/update-function-code.handler.js +72 -0
- package/dist/service/lambda/command/update-function-code/update-function-code.handler.js.map +1 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.d.ts +28 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.d.ts.map +1 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.js +38 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.js.map +1 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration-input.d.ts +23 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration-input.d.ts.map +1 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration-input.js +29 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration-input.js.map +1 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration.command.d.ts +42 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration.command.d.ts.map +1 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration.command.js +5 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration.command.js.map +1 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration.handler.d.ts +50 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration.handler.d.ts.map +1 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration.handler.js +61 -0
- package/dist/service/lambda/command/update-function-configuration/update-function-configuration.handler.js.map +1 -0
- package/dist/service/lambda/function/code/lambda-code-source.d.ts +15 -2
- package/dist/service/lambda/function/code/lambda-code-source.d.ts.map +1 -1
- package/dist/service/lambda/function/code/lambda-code-source.js +19 -14
- package/dist/service/lambda/function/code/lambda-code-source.js.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts +6 -0
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.js.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-executable-code.d.ts +28 -0
- package/dist/service/lambda/function/code/sim-lambda-executable-code.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-executable-code.js +10 -0
- package/dist/service/lambda/function/code/sim-lambda-executable-code.js.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js +2 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts +11 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js +16 -0
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js.map +1 -1
- package/dist/service/lambda/{command/create-function/create-function-environment-names.d.ts → function/environment/lambda-environment-variable-names.d.ts} +1 -1
- package/dist/service/lambda/function/environment/lambda-environment-variable-names.d.ts.map +1 -0
- package/dist/service/lambda/{command/create-function/create-function-environment-names.js → function/environment/lambda-environment-variable-names.js} +1 -1
- package/dist/service/lambda/function/environment/lambda-environment-variable-names.js.map +1 -0
- package/dist/service/lambda/{command/create-function/create-function-environment.d.ts → function/environment/lambda-environment-variables.d.ts} +2 -2
- package/dist/service/lambda/function/environment/lambda-environment-variables.d.ts.map +1 -0
- package/dist/service/lambda/{command/create-function/create-function-environment.js → function/environment/lambda-environment-variables.js} +2 -2
- package/dist/service/lambda/function/environment/lambda-environment-variables.js.map +1 -0
- package/dist/service/lambda/function/environment/lambda-reserved-variable-names.d.ts.map +1 -0
- package/dist/service/lambda/function/environment/lambda-reserved-variable-names.js.map +1 -0
- package/dist/service/lambda/function/sim-lambda-function-reconfiguration.d.ts +35 -0
- package/dist/service/lambda/function/sim-lambda-function-reconfiguration.d.ts.map +1 -0
- package/dist/service/lambda/function/sim-lambda-function-reconfiguration.js +54 -0
- package/dist/service/lambda/function/sim-lambda-function-reconfiguration.js.map +1 -0
- package/dist/service/lambda/function/sim-lambda-function.d.ts +34 -56
- package/dist/service/lambda/function/sim-lambda-function.d.ts.map +1 -1
- package/dist/service/lambda/function/sim-lambda-function.js +43 -9
- package/dist/service/lambda/function/sim-lambda-function.js.map +1 -1
- package/dist/service/lambda/function/sim-lambda-function.type.d.ts +53 -0
- package/dist/service/lambda/function/sim-lambda-function.type.d.ts.map +1 -0
- package/dist/service/lambda/function/sim-lambda-function.type.js +2 -0
- package/dist/service/lambda/function/sim-lambda-function.type.js.map +1 -0
- package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.d.ts.map +1 -1
- package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.js +12 -0
- package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.js.map +1 -1
- package/dist/service/lambda/serve/api/sim-lambda-api-function-input.d.ts +27 -0
- package/dist/service/lambda/serve/api/sim-lambda-api-function-input.d.ts.map +1 -0
- package/dist/service/lambda/serve/api/sim-lambda-api-function-input.js +76 -0
- package/dist/service/lambda/serve/api/sim-lambda-api-function-input.js.map +1 -0
- package/dist/service/lambda/serve/api/sim-lambda-api-function-routes.d.ts.map +1 -1
- package/dist/service/lambda/serve/api/sim-lambda-api-function-routes.js +19 -58
- package/dist/service/lambda/serve/api/sim-lambda-api-function-routes.js.map +1 -1
- package/dist/service/lambda/sim-lambda-commands.d.ts.map +1 -1
- package/dist/service/lambda/sim-lambda-commands.js +1 -0
- package/dist/service/lambda/sim-lambda-commands.js.map +1 -1
- package/dist/service/lambda/sim-lambda.d.ts +6 -0
- package/dist/service/lambda/sim-lambda.d.ts.map +1 -1
- package/dist/service/lambda/sim-lambda.js +12 -0
- package/dist/service/lambda/sim-lambda.js.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-event.d.ts +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-event.d.ts.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-event.js +7 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-event.js.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-events.d.ts.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-events.js +0 -1
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-events.js.map +1 -1
- package/dist/service/s3/command/copy-object/copy-object-builder.d.ts +34 -0
- package/dist/service/s3/command/copy-object/copy-object-builder.d.ts.map +1 -0
- package/dist/service/s3/command/copy-object/copy-object-builder.js +40 -0
- package/dist/service/s3/command/copy-object/copy-object-builder.js.map +1 -0
- package/dist/service/s3/command/copy-object/copy-object-source.d.ts +37 -0
- package/dist/service/s3/command/copy-object/copy-object-source.d.ts.map +1 -0
- package/dist/service/s3/command/copy-object/copy-object-source.js +80 -0
- package/dist/service/s3/command/copy-object/copy-object-source.js.map +1 -0
- package/dist/service/s3/command/copy-object/copy-object.command.d.ts +41 -0
- package/dist/service/s3/command/copy-object/copy-object.command.d.ts.map +1 -0
- package/dist/service/s3/command/copy-object/copy-object.command.js +2 -0
- package/dist/service/s3/command/copy-object/copy-object.command.js.map +1 -0
- package/dist/service/s3/command/copy-object/copy-object.handler.d.ts +43 -0
- package/dist/service/s3/command/copy-object/copy-object.handler.d.ts.map +1 -0
- package/dist/service/s3/command/copy-object/copy-object.handler.js +76 -0
- package/dist/service/s3/command/copy-object/copy-object.handler.js.map +1 -0
- package/dist/service/s3/command/list-objects/list-objects-authorizer.d.ts +6 -4
- package/dist/service/s3/command/list-objects/list-objects-authorizer.d.ts.map +1 -1
- package/dist/service/s3/command/list-objects/list-objects-authorizer.js +6 -4
- package/dist/service/s3/command/list-objects/list-objects-authorizer.js.map +1 -1
- package/dist/service/s3/command/list-objects/list-objects-page-builder.d.ts +4 -2
- package/dist/service/s3/command/list-objects/list-objects-page-builder.d.ts.map +1 -1
- package/dist/service/s3/command/list-objects/list-objects-page-builder.js +8 -2
- package/dist/service/s3/command/list-objects/list-objects-page-builder.js.map +1 -1
- package/dist/service/s3/command/list-objects/list-objects.command.d.ts +7 -0
- package/dist/service/s3/command/list-objects/list-objects.command.d.ts.map +1 -1
- package/dist/service/s3/command/list-objects/list-objects.handler.d.ts.map +1 -1
- package/dist/service/s3/command/list-objects/list-objects.handler.js +2 -0
- package/dist/service/s3/command/list-objects/list-objects.handler.js.map +1 -1
- package/dist/service/s3/command/list-objects-v2/list-objects-v2-page-builder.d.ts +1 -0
- package/dist/service/s3/command/list-objects-v2/list-objects-v2-page-builder.d.ts.map +1 -1
- package/dist/service/s3/command/list-objects-v2/list-objects-v2-page-builder.js +6 -1
- package/dist/service/s3/command/list-objects-v2/list-objects-v2-page-builder.js.map +1 -1
- package/dist/service/s3/command/list-objects-v2/list-objects-v2.command.d.ts +8 -2
- package/dist/service/s3/command/list-objects-v2/list-objects-v2.command.d.ts.map +1 -1
- package/dist/service/s3/command/list-objects-v2/list-objects-v2.handler.d.ts.map +1 -1
- package/dist/service/s3/command/list-objects-v2/list-objects-v2.handler.js +2 -0
- package/dist/service/s3/command/list-objects-v2/list-objects-v2.handler.js.map +1 -1
- package/dist/service/s3/command/object/sim-s3-object-commands.d.ts +4 -0
- package/dist/service/s3/command/object/sim-s3-object-commands.d.ts.map +1 -1
- package/dist/service/s3/command/object/sim-s3-object-commands.js +7 -0
- package/dist/service/s3/command/object/sim-s3-object-commands.js.map +1 -1
- package/dist/service/s3/command/sim-s3-command.types.d.ts +1 -0
- package/dist/service/s3/command/sim-s3-command.types.d.ts.map +1 -1
- package/dist/service/s3/error/sim-s3.error.d.ts +11 -0
- package/dist/service/s3/error/sim-s3.error.d.ts.map +1 -1
- package/dist/service/s3/error/sim-s3.error.js +13 -0
- package/dist/service/s3/error/sim-s3.error.js.map +1 -1
- package/dist/service/s3/object/s3-common-prefix.d.ts +22 -0
- package/dist/service/s3/object/s3-common-prefix.d.ts.map +1 -0
- package/dist/service/s3/object/s3-common-prefix.js +16 -0
- package/dist/service/s3/object/s3-common-prefix.js.map +1 -0
- package/dist/service/s3/object/s3-object-listing.d.ts +9 -2
- package/dist/service/s3/object/s3-object-listing.d.ts.map +1 -1
- package/dist/service/s3/object/s3-object-listing.js +70 -13
- package/dist/service/s3/object/s3-object-listing.js.map +1 -1
- package/dist/service/s3/sdk/sim-s3-sdk-command-router.d.ts.map +1 -1
- package/dist/service/s3/sdk/sim-s3-sdk-command-router.js +4 -0
- package/dist/service/s3/sdk/sim-s3-sdk-command-router.js.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-input.d.ts.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-input.js +2 -0
- package/dist/service/s3/serve/api/sim-s3-api-input.js.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-listing.d.ts +5 -0
- package/dist/service/s3/serve/api/sim-s3-api-listing.d.ts.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-listing.js +6 -1
- package/dist/service/s3/serve/api/sim-s3-api-listing.js.map +1 -1
- package/dist/service/s3/sim-s3-operations.d.ts +2 -0
- package/dist/service/s3/sim-s3-operations.d.ts.map +1 -1
- package/dist/service/s3/sim-s3-operations.js +4 -0
- package/dist/service/s3/sim-s3-operations.js.map +1 -1
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-creator.d.ts +4 -0
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-creator.d.ts.map +1 -1
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-creator.js +9 -0
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-creator.js.map +1 -1
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-skip.d.ts +22 -0
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-skip.d.ts.map +1 -0
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-skip.js +28 -0
- package/dist/service/wafv2/cfn/association/sim-cfn-waf-association-skip.js.map +1 -0
- package/dist/service/wafv2/cfn/sim-cfn-waf-resource-error.d.ts +25 -6
- package/dist/service/wafv2/cfn/sim-cfn-waf-resource-error.d.ts.map +1 -1
- package/dist/service/wafv2/cfn/sim-cfn-waf-resource-error.js +32 -7
- package/dist/service/wafv2/cfn/sim-cfn-waf-resource-error.js.map +1 -1
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-evaluatable-rules.d.ts +16 -0
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-evaluatable-rules.d.ts.map +1 -0
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-evaluatable-rules.js +22 -0
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-evaluatable-rules.js.map +1 -0
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-config.d.ts +13 -4
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-config.d.ts.map +1 -1
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-config.js +21 -11
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-config.js.map +1 -1
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-creator.d.ts +11 -1
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-creator.d.ts.map +1 -1
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-creator.js +19 -2
- package/dist/service/wafv2/cfn/web-acl/sim-cfn-waf-web-acl-creator.js.map +1 -1
- package/dist/service/wafv2/command/web-acl/sim-wafv2-unsimulated-web-acl-input.d.ts +9 -0
- package/dist/service/wafv2/command/web-acl/sim-wafv2-unsimulated-web-acl-input.d.ts.map +1 -1
- package/dist/service/wafv2/command/web-acl/sim-wafv2-unsimulated-web-acl-input.js +9 -0
- package/dist/service/wafv2/command/web-acl/sim-wafv2-unsimulated-web-acl-input.js.map +1 -1
- package/dist/service/wafv2/command/web-acl/sim-wafv2-web-acl-commands.d.ts +2 -0
- package/dist/service/wafv2/command/web-acl/sim-wafv2-web-acl-commands.d.ts.map +1 -1
- package/dist/service/wafv2/command/web-acl/sim-wafv2-web-acl-commands.js +3 -0
- package/dist/service/wafv2/command/web-acl/sim-wafv2-web-acl-commands.js.map +1 -1
- package/dist/service/wafv2/index.d.ts +1 -0
- package/dist/service/wafv2/index.d.ts.map +1 -1
- package/dist/service/wafv2/index.js.map +1 -1
- package/dist/service/wafv2/managed/sim-waf-managed-group-statement.d.ts.map +1 -1
- package/dist/service/wafv2/managed/sim-waf-managed-group-statement.js +1 -0
- package/dist/service/wafv2/managed/sim-waf-managed-group-statement.js.map +1 -1
- package/dist/service/wafv2/sim-wafv2-commands.d.ts.map +1 -1
- package/dist/service/wafv2/sim-wafv2-commands.js +3 -0
- package/dist/service/wafv2/sim-wafv2-commands.js.map +1 -1
- package/dist/service/wafv2/sim-wafv2.d.ts +12 -0
- package/dist/service/wafv2/sim-wafv2.d.ts.map +1 -1
- package/dist/service/wafv2/sim-wafv2.js +18 -0
- package/dist/service/wafv2/sim-wafv2.js.map +1 -1
- package/dist/service/wafv2/statement/sim-waf-rate-based-input.d.ts +49 -0
- package/dist/service/wafv2/statement/sim-waf-rate-based-input.d.ts.map +1 -0
- package/dist/service/wafv2/statement/sim-waf-rate-based-input.js +94 -0
- package/dist/service/wafv2/statement/sim-waf-rate-based-input.js.map +1 -0
- package/dist/service/wafv2/statement/sim-waf-rate-based.d.ts +22 -0
- package/dist/service/wafv2/statement/sim-waf-rate-based.d.ts.map +1 -0
- package/dist/service/wafv2/statement/sim-waf-rate-based.js +41 -0
- package/dist/service/wafv2/statement/sim-waf-rate-based.js.map +1 -0
- package/dist/service/wafv2/statement/sim-waf-rate-based.type.d.ts +18 -0
- package/dist/service/wafv2/statement/sim-waf-rate-based.type.d.ts.map +1 -0
- package/dist/service/wafv2/statement/sim-waf-rate-based.type.js +2 -0
- package/dist/service/wafv2/statement/sim-waf-rate-based.type.js.map +1 -0
- package/dist/service/wafv2/statement/sim-waf-rate-counter.d.ts +29 -0
- package/dist/service/wafv2/statement/sim-waf-rate-counter.d.ts.map +1 -0
- package/dist/service/wafv2/statement/sim-waf-rate-counter.js +35 -0
- package/dist/service/wafv2/statement/sim-waf-rate-counter.js.map +1 -0
- package/dist/service/wafv2/statement/sim-waf-statement.d.ts +6 -0
- package/dist/service/wafv2/statement/sim-waf-statement.d.ts.map +1 -1
- package/dist/service/wafv2/statement/sim-waf-statement.js +4 -0
- package/dist/service/wafv2/statement/sim-waf-statement.js.map +1 -1
- package/dist/service/wafv2/statement/sim-waf-statement.type.d.ts +2 -1
- package/dist/service/wafv2/statement/sim-waf-statement.type.d.ts.map +1 -1
- package/dist/service/wafv2/statement/sim-waf-unsimulated-rate-based.d.ts +10 -0
- package/dist/service/wafv2/statement/sim-waf-unsimulated-rate-based.d.ts.map +1 -0
- package/dist/service/wafv2/statement/sim-waf-unsimulated-rate-based.js +40 -0
- package/dist/service/wafv2/statement/sim-waf-unsimulated-rate-based.js.map +1 -0
- package/dist/service/wafv2/statement/sim-waf-unsimulated-statement.d.ts.map +1 -1
- package/dist/service/wafv2/statement/sim-waf-unsimulated-statement.js +0 -5
- package/dist/service/wafv2/statement/sim-waf-unsimulated-statement.js.map +1 -1
- package/dist/service/wafv2/web-acl/sim-waf-rule-evaluator.d.ts.map +1 -1
- package/dist/service/wafv2/web-acl/sim-waf-rule-evaluator.js +25 -2
- package/dist/service/wafv2/web-acl/sim-waf-rule-evaluator.js.map +1 -1
- package/dist/service/wafv2/web-acl/sim-waf-rule.type.d.ts +6 -0
- package/dist/service/wafv2/web-acl/sim-waf-rule.type.d.ts.map +1 -1
- package/dist/service/wafv2/web-acl/sim-waf-unevaluatable-rules.d.ts +26 -0
- package/dist/service/wafv2/web-acl/sim-waf-unevaluatable-rules.d.ts.map +1 -0
- package/dist/service/wafv2/web-acl/sim-waf-unevaluatable-rules.js +34 -0
- package/dist/service/wafv2/web-acl/sim-waf-unevaluatable-rules.js.map +1 -0
- package/dist/service/wafv2/web-acl/sim-waf-web-acl-capacity.d.ts.map +1 -1
- package/dist/service/wafv2/web-acl/sim-waf-web-acl-capacity.js +16 -1
- package/dist/service/wafv2/web-acl/sim-waf-web-acl-capacity.js.map +1 -1
- package/dist/util/clock/sim-clock-control.d.ts +8 -0
- package/dist/util/clock/sim-clock-control.d.ts.map +1 -1
- package/dist/util/clock/sim-clock-control.js +10 -1
- package/dist/util/clock/sim-clock-control.js.map +1 -1
- package/package.json +1 -1
- package/dist/service/lambda/command/create-function/create-function-environment-names.d.ts.map +0 -1
- package/dist/service/lambda/command/create-function/create-function-environment-names.js.map +0 -1
- package/dist/service/lambda/command/create-function/create-function-environment.d.ts.map +0 -1
- package/dist/service/lambda/command/create-function/create-function-environment.js.map +0 -1
- package/dist/service/lambda/command/create-function/lambda-reserved-variable-names.d.ts.map +0 -1
- package/dist/service/lambda/command/create-function/lambda-reserved-variable-names.js.map +0 -1
- /package/dist/service/lambda/{command/create-function → function/environment}/lambda-reserved-variable-names.d.ts +0 -0
- /package/dist/service/lambda/{command/create-function → function/environment}/lambda-reserved-variable-names.js +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SimIamAccessDenied } from "../../../iam/error/sim-iam.error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Applies IAM authorization to a Lambda ListFunctions request.
|
|
4
|
+
*
|
|
5
|
+
* AWS maps the ListFunctions API operation to the lambda:ListFunctions IAM
|
|
6
|
+
* action. The operation reaches every function in the Account and Region, so
|
|
7
|
+
* AWS documents its resource as "*" rather than any one function ARN.
|
|
8
|
+
*
|
|
9
|
+
* Authorization therefore applies to the whole operation. A denied caller
|
|
10
|
+
* receives AccessDenied rather than a filtered listing.
|
|
11
|
+
*/
|
|
12
|
+
export class ListFunctionsAuthorizer {
|
|
13
|
+
static action = "lambda:ListFunctions";
|
|
14
|
+
static resource = "*";
|
|
15
|
+
iam;
|
|
16
|
+
constructor(properties) {
|
|
17
|
+
this.iam = properties.iam;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Ensure the caller may list the simulated Account's Lambda functions.
|
|
21
|
+
*
|
|
22
|
+
* The caller is passed through unchanged so sim IAM can distinguish an
|
|
23
|
+
* omitted caller, which defaults to Account root, from an explicit anonymous
|
|
24
|
+
* caller.
|
|
25
|
+
*/
|
|
26
|
+
authorize(caller) {
|
|
27
|
+
const decision = this.iam.authorize({
|
|
28
|
+
action: ListFunctionsAuthorizer.action,
|
|
29
|
+
resource: ListFunctionsAuthorizer.resource,
|
|
30
|
+
caller,
|
|
31
|
+
});
|
|
32
|
+
if (decision.isDenied) {
|
|
33
|
+
throw new SimIamAccessDenied({
|
|
34
|
+
principal: decision.caller.principal,
|
|
35
|
+
action: ListFunctionsAuthorizer.action,
|
|
36
|
+
resource: ListFunctionsAuthorizer.resource,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=list-functions-authorizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-functions-authorizer.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/list-functions/list-functions-authorizer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAMzE;;;;;;;;;GASG;AACH,MAAM,OAAO,uBAAuB;IAC1B,MAAM,CAAU,MAAM,GAAG,sBAAsB,CAAC;IAChD,MAAM,CAAU,QAAQ,GAAG,GAAG,CAAC;IAEtB,GAAG,CAA0B;IAE9C,YAAY,UAA6C;QACvD,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC;IAC5B,CAAC;IAED;;;;;;OAMG;IACH,SAAS,CAAC,MAAqB;QAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;YAClC,MAAM,EAAE,uBAAuB,CAAC,MAAM;YACtC,QAAQ,EAAE,uBAAuB,CAAC,QAAQ;YAC1C,MAAM;SACP,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACtB,MAAM,IAAI,kBAAkB,CAAC;gBAC3B,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS;gBACpC,MAAM,EAAE,uBAAuB,CAAC,MAAM;gBACtC,QAAQ,EAAE,uBAAuB,CAAC,QAAQ;aAC3C,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/ListFunctionsCommand/
|
|
3
|
+
*/
|
|
4
|
+
import type { SimResponseMetadata } from "../../../aws/metadata/response-metadata.type.js";
|
|
5
|
+
import type { SimLambdaFunctionConfiguration } from "../../function/sim-lambda-function-configuration.js";
|
|
6
|
+
/**
|
|
7
|
+
* Minimal structural sim Lambda ListFunctions command.
|
|
8
|
+
*/
|
|
9
|
+
export interface SimListFunctionsCommand {
|
|
10
|
+
readonly input: SimListFunctionsCommandInput;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Minimal structural sim Lambda ListFunctions input.
|
|
14
|
+
*
|
|
15
|
+
* `FunctionVersion` is the only member simulated Lambda reads. `"ALL"` adds
|
|
16
|
+
* each function's published versions to the listing, and anything else lists
|
|
17
|
+
* the functions themselves.
|
|
18
|
+
*
|
|
19
|
+
* Real Lambda pages the listing with `Marker` and `MaxItems`, and reaches
|
|
20
|
+
* another Region's functions with `MasterRegion`. Neither is simulated, so
|
|
21
|
+
* all three are left out rather than accepted and ignored, matching the other
|
|
22
|
+
* simulated Lambda listings.
|
|
23
|
+
*/
|
|
24
|
+
export interface SimListFunctionsCommandInput {
|
|
25
|
+
readonly FunctionVersion?: string | undefined;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Minimal structural sim Lambda ListFunctions output.
|
|
29
|
+
*/
|
|
30
|
+
export interface SimListFunctionsCommandOutput {
|
|
31
|
+
readonly $metadata: SimResponseMetadata;
|
|
32
|
+
readonly Functions: readonly SimLambdaFunctionConfiguration[];
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=list-functions.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-functions.command.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/command/list-functions/list-functions.command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qDAAqD,CAAC;AAE1G;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,4BAA4B,CAAC;CAC9C;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,SAAS,8BAA8B,EAAE,CAAC;CAC/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-functions.command.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/list-functions/list-functions.command.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { CommandHandler } from "../../../../command/command-handler.js";
|
|
2
|
+
import { type BackgroundScheduler } from "../../../../util/background/background.js";
|
|
3
|
+
import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
|
|
4
|
+
import { type SimIamInterServiceAuthZ } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
5
|
+
import type { SimLambdaFunctionMap } from "../../function/sim-lambda-function.js";
|
|
6
|
+
import type { SimLambdaFunctionVersionStore } from "../../function/version/sim-lambda-function-version-store.js";
|
|
7
|
+
import type { SimListFunctionsCommand, SimListFunctionsCommandOutput } from "./list-functions.command.js";
|
|
8
|
+
interface ListFunctionsCommandHandlerProperties {
|
|
9
|
+
readonly functions: SimLambdaFunctionMap;
|
|
10
|
+
readonly versions: SimLambdaFunctionVersionStore;
|
|
11
|
+
readonly iam?: SimIamInterServiceAuthZ;
|
|
12
|
+
readonly background?: BackgroundScheduler;
|
|
13
|
+
}
|
|
14
|
+
interface ListFunctionsCommandHandlerOptions {
|
|
15
|
+
readonly caller?: SimAwsCaller;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Simulated Lambda ListFunctionsCommand handler.
|
|
19
|
+
*
|
|
20
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/ListFunctionsCommand/
|
|
21
|
+
*/
|
|
22
|
+
export declare class ListFunctionsCommandHandler implements CommandHandler<SimListFunctionsCommand, SimListFunctionsCommandOutput> {
|
|
23
|
+
private readonly functions;
|
|
24
|
+
private readonly versions;
|
|
25
|
+
private readonly authorizer;
|
|
26
|
+
private readonly background;
|
|
27
|
+
constructor(properties: ListFunctionsCommandHandlerProperties);
|
|
28
|
+
/**
|
|
29
|
+
* List the configuration of every sim Lambda function in this Account and
|
|
30
|
+
* Region, as GetFunction reports one.
|
|
31
|
+
*/
|
|
32
|
+
handle(command: SimListFunctionsCommand, options?: ListFunctionsCommandHandlerOptions): Promise<SimListFunctionsCommandOutput>;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=list-functions.handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-functions.handler.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/command/list-functions/list-functions.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,wDAAwD,CAAC;AAEhE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAElF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6DAA6D,CAAC;AAEjH,OAAO,KAAK,EACV,uBAAuB,EACvB,6BAA6B,EAC9B,MAAM,6BAA6B,CAAC;AAQrC,UAAU,qCAAqC;IAC7C,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,6BAA6B,CAAC;IACjD,QAAQ,CAAC,GAAG,CAAC,EAAE,uBAAuB,CAAC;IACvC,QAAQ,CAAC,UAAU,CAAC,EAAE,mBAAmB,CAAC;CAC3C;AAED,UAAU,kCAAkC;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAED;;;;GAIG;AACH,qBAAa,2BAA4B,YAAW,cAAc,CAChE,uBAAuB,EACvB,6BAA6B,CAC9B;IACC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAuB;IACjD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgC;IACzD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA0B;IACrD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IAEjD,YAAY,UAAU,EAAE,qCAAqC,EAW5D;IAED;;;OAGG;IACG,MAAM,CACV,OAAO,EAAE,uBAAuB,EAChC,OAAO,CAAC,EAAE,kCAAkC,GAC3C,OAAO,CAAC,6BAA6B,CAAC,CAsBxC;CACF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BackgroundTasks, } from "../../../../util/background/background.js";
|
|
2
|
+
import { SimIamAllowAllAuth, } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
3
|
+
import { ListFunctionsAuthorizer } from "./list-functions-authorizer.js";
|
|
4
|
+
/**
|
|
5
|
+
* What a caller asks for to have published versions listed alongside the
|
|
6
|
+
* functions themselves.
|
|
7
|
+
*/
|
|
8
|
+
const allVersions = "ALL";
|
|
9
|
+
/**
|
|
10
|
+
* Simulated Lambda ListFunctionsCommand handler.
|
|
11
|
+
*
|
|
12
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/ListFunctionsCommand/
|
|
13
|
+
*/
|
|
14
|
+
export class ListFunctionsCommandHandler {
|
|
15
|
+
functions;
|
|
16
|
+
versions;
|
|
17
|
+
authorizer;
|
|
18
|
+
background;
|
|
19
|
+
constructor(properties) {
|
|
20
|
+
const { functions, versions, iam = new SimIamAllowAllAuth(), background = new BackgroundTasks(), } = properties;
|
|
21
|
+
this.functions = functions;
|
|
22
|
+
this.versions = versions;
|
|
23
|
+
this.authorizer = new ListFunctionsAuthorizer({ iam });
|
|
24
|
+
this.background = background;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* List the configuration of every sim Lambda function in this Account and
|
|
28
|
+
* Region, as GetFunction reports one.
|
|
29
|
+
*/
|
|
30
|
+
async handle(command, options) {
|
|
31
|
+
// Allow for potential non-deterministic sequencing of async events.
|
|
32
|
+
await this.background.sequence();
|
|
33
|
+
this.authorizer.authorize(options?.caller);
|
|
34
|
+
const listed = this.functions
|
|
35
|
+
.values()
|
|
36
|
+
.flatMap((simFunction) => command.input.FunctionVersion === allVersions
|
|
37
|
+
? this.versions.all(simFunction)
|
|
38
|
+
: [simFunction])
|
|
39
|
+
.toArray();
|
|
40
|
+
return {
|
|
41
|
+
$metadata: {},
|
|
42
|
+
Functions: listed.map((simFunction) => simFunction.configuration()),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=list-functions.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-functions.handler.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/list-functions/list-functions.handler.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,GAChB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EACL,kBAAkB,GAEnB,MAAM,wDAAwD,CAAC;AAKhE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAMzE;;;GAGG;AACH,MAAM,WAAW,GAAG,KAAK,CAAC;AAa1B;;;;GAIG;AACH,MAAM,OAAO,2BAA2B;IAIrB,SAAS,CAAuB;IAChC,QAAQ,CAAgC;IACxC,UAAU,CAA0B;IACpC,UAAU,CAAsB;IAEjD,YAAY,UAAiD;QAC3D,MAAM,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,GAAG,IAAI,kBAAkB,EAAE,EAC9B,UAAU,GAAG,IAAI,eAAe,EAAE,GACnC,GAAG,UAAU,CAAC;QACf,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,IAAI,uBAAuB,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QACvD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM,CACV,OAAgC,EAChC,OAA4C;QAE5C,oEAAoE;QACpE,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAEjC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAE3C,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS;aAC1B,MAAM,EAAE;aACR,OAAO,CACN,CAAC,WAA8B,EAAgC,EAAE,CAC/D,OAAO,CAAC,KAAK,CAAC,eAAe,KAAK,WAAW;YAC3C,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC;YAChC,CAAC,CAAC,CAAC,WAAW,CAAC,CACpB;aACA,OAAO,EAAE,CAAC;QAEb,OAAO;YACL,SAAS,EAAE,EAAE;YACb,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,WAAW,EAAkC,EAAE,CACpE,WAAW,CAAC,aAAa,EAAE,CAC5B;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -19,10 +19,13 @@ export type { SimGetFunctionUrlConfigCommand, SimGetFunctionUrlConfigCommandOutp
|
|
|
19
19
|
export type { SimGetPolicyCommand, SimGetPolicyCommandOutput, } from "./get-policy/get-policy.command.js";
|
|
20
20
|
export type { SimInvokeCommand, SimInvokeCommandOutput, } from "./invoke/invoke.command.js";
|
|
21
21
|
export type { SimListAliasesCommand, SimListAliasesCommandOutput, } from "./list-aliases/list-aliases.command.js";
|
|
22
|
+
export type { SimListFunctionsCommand, SimListFunctionsCommandOutput, } from "./list-functions/list-functions.command.js";
|
|
22
23
|
export type { SimListFunctionUrlConfigsCommand, SimListFunctionUrlConfigsCommandOutput, } from "./list-function-url-configs/list-function-url-configs.command.js";
|
|
23
24
|
export type { SimListVersionsByFunctionCommand, SimListVersionsByFunctionCommandOutput, } from "./list-versions-by-function/list-versions-by-function.command.js";
|
|
24
25
|
export type { SimPublishVersionCommand, SimPublishVersionCommandOutput, } from "./publish-version/publish-version.command.js";
|
|
25
26
|
export type { SimRemovePermissionCommand, SimRemovePermissionCommandOutput, } from "./remove-permission/remove-permission.command.js";
|
|
26
27
|
export type { SimUpdateAliasCommand, SimUpdateAliasCommandOutput, } from "./update-alias/update-alias.command.js";
|
|
28
|
+
export type { SimUpdateFunctionCodeCommand, SimUpdateFunctionCodeCommandOutput, } from "./update-function-code/update-function-code.command.js";
|
|
29
|
+
export type { SimUpdateFunctionConfigurationCommand, SimUpdateFunctionConfigurationCommandOutput, } from "./update-function-configuration/update-function-configuration.command.js";
|
|
27
30
|
export type { SimUpdateFunctionUrlConfigCommand, SimUpdateFunctionUrlConfigCommandOutput, } from "./update-function-url-config/update-function-url-config.command.js";
|
|
28
31
|
//# sourceMappingURL=sim-lambda-command.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-lambda-command.types.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/command/sim-lambda-command.types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,4CAA4C,CAAC;AACpD,YAAY,EACV,kCAAkC,EAClC,uCAAuC,EACvC,wCAAwC,EACxC,kCAAkC,EAClC,uCAAuC,EACvC,wCAAwC,EACxC,kCAAkC,EAClC,+BAA+B,EAC/B,oCAAoC,EACpC,qCAAqC,EACrC,iCAAiC,EACjC,sCAAsC,EACtC,uCAAuC,GACxC,MAAM,wDAAwD,CAAC;AAChE,YAAY,EACV,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,oEAAoE,CAAC;AAC5E,YAAY,EACV,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,oEAAoE,CAAC;AAC5E,YAAY,EACV,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EACV,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,8BAA8B,EAC9B,oCAAoC,GACrC,MAAM,8DAA8D,CAAC;AACtE,YAAY,EACV,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,gCAAgC,EAChC,sCAAsC,GACvC,MAAM,kEAAkE,CAAC;AAC1E,YAAY,EACV,gCAAgC,EAChC,sCAAsC,GACvC,MAAM,kEAAkE,CAAC;AAC1E,YAAY,EACV,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,kDAAkD,CAAC;AAC1D,YAAY,EACV,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,oEAAoE,CAAC"}
|
|
1
|
+
{"version":3,"file":"sim-lambda-command.types.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/command/sim-lambda-command.types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,4CAA4C,CAAC;AACpD,YAAY,EACV,kCAAkC,EAClC,uCAAuC,EACvC,wCAAwC,EACxC,kCAAkC,EAClC,uCAAuC,EACvC,wCAAwC,EACxC,kCAAkC,EAClC,+BAA+B,EAC/B,oCAAoC,EACpC,qCAAqC,EACrC,iCAAiC,EACjC,sCAAsC,EACtC,uCAAuC,GACxC,MAAM,wDAAwD,CAAC;AAChE,YAAY,EACV,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,oEAAoE,CAAC;AAC5E,YAAY,EACV,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,oEAAoE,CAAC;AAC5E,YAAY,EACV,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EACV,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,8BAA8B,EAC9B,oCAAoC,GACrC,MAAM,8DAA8D,CAAC;AACtE,YAAY,EACV,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,4CAA4C,CAAC;AACpD,YAAY,EACV,gCAAgC,EAChC,sCAAsC,GACvC,MAAM,kEAAkE,CAAC;AAC1E,YAAY,EACV,gCAAgC,EAChC,sCAAsC,GACvC,MAAM,kEAAkE,CAAC;AAC1E,YAAY,EACV,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,kDAAkD,CAAC;AAC1D,YAAY,EACV,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,4BAA4B,EAC5B,kCAAkC,GACnC,MAAM,wDAAwD,CAAC;AAChE,YAAY,EACV,qCAAqC,EACrC,2CAA2C,GAC5C,MAAM,0EAA0E,CAAC;AAClF,YAAY,EACV,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,oEAAoE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
|
|
2
|
+
import type { SimIamInterServiceAuthZ } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
3
|
+
interface UpdateFunctionCodeAuthorizerProperties {
|
|
4
|
+
readonly iam: SimIamInterServiceAuthZ;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Applies IAM authorization to a Lambda UpdateFunctionCode request.
|
|
8
|
+
*
|
|
9
|
+
* AWS maps the UpdateFunctionCode API operation to the
|
|
10
|
+
* lambda:UpdateFunctionCode IAM action. The resource is the ARN of the
|
|
11
|
+
* function whose code is being replaced.
|
|
12
|
+
*/
|
|
13
|
+
export declare class UpdateFunctionCodeAuthorizer {
|
|
14
|
+
private static readonly action;
|
|
15
|
+
private readonly iam;
|
|
16
|
+
constructor(properties: UpdateFunctionCodeAuthorizerProperties);
|
|
17
|
+
/**
|
|
18
|
+
* Ensure the caller may replace the code of the function with the given ARN.
|
|
19
|
+
*
|
|
20
|
+
* The caller is passed through unchanged so sim IAM can distinguish an
|
|
21
|
+
* omitted caller, which defaults to Account root, from an explicit anonymous
|
|
22
|
+
* caller.
|
|
23
|
+
*/
|
|
24
|
+
authorize(functionArn: string, caller?: SimAwsCaller): void;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=update-function-code-authorizer.d.ts.map
|
package/dist/service/lambda/command/update-function-code/update-function-code-authorizer.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-function-code-authorizer.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/command/update-function-code/update-function-code-authorizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAGtG,UAAU,sCAAsC;IAC9C,QAAQ,CAAC,GAAG,EAAE,uBAAuB,CAAC;CACvC;AAED;;;;;;GAMG;AACH,qBAAa,4BAA4B;IACvC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAA+B;IAE7D,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA0B;IAE9C,YAAY,UAAU,EAAE,sCAAsC,EAE7D;IAED;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAc1D;CACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { SimIamAccessDenied } from "../../../iam/error/sim-iam.error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Applies IAM authorization to a Lambda UpdateFunctionCode request.
|
|
4
|
+
*
|
|
5
|
+
* AWS maps the UpdateFunctionCode API operation to the
|
|
6
|
+
* lambda:UpdateFunctionCode IAM action. The resource is the ARN of the
|
|
7
|
+
* function whose code is being replaced.
|
|
8
|
+
*/
|
|
9
|
+
export class UpdateFunctionCodeAuthorizer {
|
|
10
|
+
static action = "lambda:UpdateFunctionCode";
|
|
11
|
+
iam;
|
|
12
|
+
constructor(properties) {
|
|
13
|
+
this.iam = properties.iam;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Ensure the caller may replace the code of the function with the given ARN.
|
|
17
|
+
*
|
|
18
|
+
* The caller is passed through unchanged so sim IAM can distinguish an
|
|
19
|
+
* omitted caller, which defaults to Account root, from an explicit anonymous
|
|
20
|
+
* caller.
|
|
21
|
+
*/
|
|
22
|
+
authorize(functionArn, caller) {
|
|
23
|
+
const decision = this.iam.authorize({
|
|
24
|
+
action: UpdateFunctionCodeAuthorizer.action,
|
|
25
|
+
resource: functionArn,
|
|
26
|
+
caller,
|
|
27
|
+
});
|
|
28
|
+
if (decision.isDenied) {
|
|
29
|
+
throw new SimIamAccessDenied({
|
|
30
|
+
principal: decision.caller.principal,
|
|
31
|
+
action: UpdateFunctionCodeAuthorizer.action,
|
|
32
|
+
resource: functionArn,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=update-function-code-authorizer.js.map
|
package/dist/service/lambda/command/update-function-code/update-function-code-authorizer.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-function-code-authorizer.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/update-function-code/update-function-code-authorizer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAMzE;;;;;;GAMG;AACH,MAAM,OAAO,4BAA4B;IAC/B,MAAM,CAAU,MAAM,GAAG,2BAA2B,CAAC;IAE5C,GAAG,CAA0B;IAE9C,YAAY,UAAkD;QAC5D,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC;IAC5B,CAAC;IAED;;;;;;OAMG;IACH,SAAS,CAAC,WAAmB,EAAE,MAAqB;QAClD,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;YAClC,MAAM,EAAE,4BAA4B,CAAC,MAAM;YAC3C,QAAQ,EAAE,WAAW;YACrB,MAAM;SACP,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACtB,MAAM,IAAI,kBAAkB,CAAC;gBAC3B,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS;gBACpC,MAAM,EAAE,4BAA4B,CAAC,MAAM;gBAC3C,QAAQ,EAAE,WAAW;aACtB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type SimLambdaCodeSource } from "../../function/code/lambda-code-source.js";
|
|
2
|
+
import type { SimUpdateFunctionCodeCommand } from "./update-function-code.command.js";
|
|
3
|
+
/**
|
|
4
|
+
* Validated UpdateFunctionCode input, in sim Lambda function model terms.
|
|
5
|
+
*/
|
|
6
|
+
export interface UpdateFunctionCodeInput {
|
|
7
|
+
name: string;
|
|
8
|
+
codeSource: SimLambdaCodeSource;
|
|
9
|
+
publish: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Require the AWS-required UpdateFunctionCode input fields, and validate the
|
|
13
|
+
* function code input into a sim Lambda code source.
|
|
14
|
+
*/
|
|
15
|
+
export declare function requireUpdateFunctionCodeInput(command: SimUpdateFunctionCodeCommand): UpdateFunctionCodeInput;
|
|
16
|
+
//# sourceMappingURL=update-function-code-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-function-code-input.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/command/update-function-code/update-function-code-input.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAWtF;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,mBAAmB,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,4BAA4B,GACpC,uBAAuB,CAqBzB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { assertDefined } from "../../../../util/type-guard/defined.js";
|
|
2
|
+
import { requireLambdaCodeSource, } from "../../function/code/lambda-code-source.js";
|
|
3
|
+
/**
|
|
4
|
+
* Where UpdateFunctionCode carries its code members, which is the top level
|
|
5
|
+
* of its input.
|
|
6
|
+
*/
|
|
7
|
+
const updateFunctionCodeNaming = {
|
|
8
|
+
path: "UpdateFunctionCodeCommand.input",
|
|
9
|
+
memberPrefix: "",
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Require the AWS-required UpdateFunctionCode input fields, and validate the
|
|
13
|
+
* function code input into a sim Lambda code source.
|
|
14
|
+
*/
|
|
15
|
+
export function requireUpdateFunctionCodeInput(command) {
|
|
16
|
+
const { input } = command;
|
|
17
|
+
assertDefined(input.FunctionName, "UpdateFunctionCodeCommand.input.FunctionName required");
|
|
18
|
+
return {
|
|
19
|
+
name: input.FunctionName,
|
|
20
|
+
codeSource: requireLambdaCodeSource({
|
|
21
|
+
ZipFile: input.ZipFile,
|
|
22
|
+
S3Bucket: input.S3Bucket,
|
|
23
|
+
S3Key: input.S3Key,
|
|
24
|
+
S3ObjectVersion: input.S3ObjectVersion,
|
|
25
|
+
ImageUri: input.ImageUri,
|
|
26
|
+
}, updateFunctionCodeNaming),
|
|
27
|
+
publish: input.Publish ?? false,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=update-function-code-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-function-code-input.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/update-function-code/update-function-code-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAEL,uBAAuB,GAExB,MAAM,2CAA2C,CAAC;AAGnD;;;GAGG;AACH,MAAM,wBAAwB,GAA6B;IACzD,IAAI,EAAE,iCAAiC;IACvC,YAAY,EAAE,EAAE;CACjB,CAAC;AAWF;;;GAGG;AACH,MAAM,UAAU,8BAA8B,CAC5C,OAAqC;IAErC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAC1B,aAAa,CACX,KAAK,CAAC,YAAY,EAClB,uDAAuD,CACxD,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,YAAY;QACxB,UAAU,EAAE,uBAAuB,CACjC;YACE,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,eAAe,EAAE,KAAK,CAAC,eAAe;YACtC,QAAQ,EAAE,KAAK,CAAC,QAAQ;SACzB,EACD,wBAAwB,CACzB;QACD,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,KAAK;KAChC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/UpdateFunctionCodeCommand/
|
|
3
|
+
*/
|
|
4
|
+
import type { SimResponseMetadata } from "../../../aws/metadata/response-metadata.type.js";
|
|
5
|
+
import type { SimLambdaFunctionConfiguration } from "../../function/sim-lambda-function-configuration.js";
|
|
6
|
+
/**
|
|
7
|
+
* Minimal structural sim Lambda UpdateFunctionCode command.
|
|
8
|
+
*/
|
|
9
|
+
export interface SimUpdateFunctionCodeCommand {
|
|
10
|
+
readonly input: SimUpdateFunctionCodeCommandInput;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Minimal structural sim Lambda UpdateFunctionCode input.
|
|
14
|
+
*
|
|
15
|
+
* The code members sit at the top level here, unlike CreateFunction, which
|
|
16
|
+
* nests the same members under `Code`.
|
|
17
|
+
*
|
|
18
|
+
* Real Lambda takes a `RevisionId` and a `DryRun` to update only code the
|
|
19
|
+
* caller has already seen, and `Architectures` and `SourceKMSKeyArn` to
|
|
20
|
+
* describe how the code was built and encrypted. None of those are simulated,
|
|
21
|
+
* so all four are left out rather than accepted and ignored.
|
|
22
|
+
*/
|
|
23
|
+
export interface SimUpdateFunctionCodeCommandInput {
|
|
24
|
+
readonly FunctionName?: string | undefined;
|
|
25
|
+
readonly ZipFile?: Uint8Array | undefined;
|
|
26
|
+
readonly S3Bucket?: string | undefined;
|
|
27
|
+
readonly S3Key?: string | undefined;
|
|
28
|
+
readonly S3ObjectVersion?: string | undefined;
|
|
29
|
+
readonly ImageUri?: string | undefined;
|
|
30
|
+
readonly Publish?: boolean | undefined;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Minimal structural sim Lambda UpdateFunctionCode output.
|
|
34
|
+
*
|
|
35
|
+
* The configuration is the updated function's, or the published version's
|
|
36
|
+
* where `Publish` asked for one, as real Lambda answers.
|
|
37
|
+
*/
|
|
38
|
+
export interface SimUpdateFunctionCodeCommandOutput extends SimLambdaFunctionConfiguration {
|
|
39
|
+
readonly $metadata: SimResponseMetadata;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=update-function-code.command.d.ts.map
|
package/dist/service/lambda/command/update-function-code/update-function-code.command.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-function-code.command.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/command/update-function-code/update-function-code.command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qDAAqD,CAAC;AAE1G;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE,iCAAiC,CAAC;CACnD;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,QAAQ,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACxC;AAED;;;;;GAKG;AACH,MAAM,WAAW,kCAAmC,SAAQ,8BAA8B;IACxF,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-function-code.command.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/update-function-code/update-function-code.command.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { CommandHandler } from "../../../../command/command-handler.js";
|
|
2
|
+
import { type BackgroundScheduler } from "../../../../util/background/background.js";
|
|
3
|
+
import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
|
|
4
|
+
import { type SimIamInterServiceAuthZ } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
5
|
+
import type { SimLambdaContainerImages } from "../../function/code/image/sim-lambda-container-images.js";
|
|
6
|
+
import type { SimLambdaCodeStore } from "../../function/code/store/sim-lambda-code-store.js";
|
|
7
|
+
import type { SimLambdaVmSdkModuleProvider } from "../../function/code/vm/sdk/sim-lambda-vm-sdk-module-provider.js";
|
|
8
|
+
import type { SimLambdaOutboundHttp } from "../../function/outbound/sim-lambda-outbound-http.js";
|
|
9
|
+
import type { SimLambdaFunctionLookup } from "../../function/url/sim-lambda-function-lookup.js";
|
|
10
|
+
import type { SimLambdaFunctionVersionStore } from "../../function/version/sim-lambda-function-version-store.js";
|
|
11
|
+
import type { SimUpdateFunctionCodeCommand, SimUpdateFunctionCodeCommandOutput } from "./update-function-code.command.js";
|
|
12
|
+
interface UpdateFunctionCodeCommandHandlerProperties {
|
|
13
|
+
readonly functions: SimLambdaFunctionLookup;
|
|
14
|
+
readonly versions: SimLambdaFunctionVersionStore;
|
|
15
|
+
readonly iam?: SimIamInterServiceAuthZ;
|
|
16
|
+
readonly background?: BackgroundScheduler;
|
|
17
|
+
readonly codeStore?: SimLambdaCodeStore | undefined;
|
|
18
|
+
readonly containerImages?: SimLambdaContainerImages | undefined;
|
|
19
|
+
readonly vmSdkModuleProvider?: SimLambdaVmSdkModuleProvider | undefined;
|
|
20
|
+
readonly outboundHttp?: SimLambdaOutboundHttp | undefined;
|
|
21
|
+
}
|
|
22
|
+
interface UpdateFunctionCodeCommandHandlerOptions {
|
|
23
|
+
readonly caller?: SimAwsCaller;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Simulated Lambda UpdateFunctionCodeCommand handler.
|
|
27
|
+
*
|
|
28
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/UpdateFunctionCodeCommand/
|
|
29
|
+
*/
|
|
30
|
+
export declare class UpdateFunctionCodeCommandHandler implements CommandHandler<SimUpdateFunctionCodeCommand, SimUpdateFunctionCodeCommandOutput> {
|
|
31
|
+
private readonly functions;
|
|
32
|
+
private readonly versions;
|
|
33
|
+
private readonly authorizer;
|
|
34
|
+
private readonly background;
|
|
35
|
+
private readonly codeResolver;
|
|
36
|
+
constructor(properties: UpdateFunctionCodeCommandHandlerProperties);
|
|
37
|
+
/**
|
|
38
|
+
* Replace the code a sim Lambda function runs.
|
|
39
|
+
*
|
|
40
|
+
* The function keeps its name, ARN, execution Role, resource-based policy,
|
|
41
|
+
* Function URL, published versions and aliases. A version published before
|
|
42
|
+
* this still runs the code it was published with.
|
|
43
|
+
*/
|
|
44
|
+
handle(command: SimUpdateFunctionCodeCommand, options?: UpdateFunctionCodeCommandHandlerOptions): Promise<SimUpdateFunctionCodeCommandOutput>;
|
|
45
|
+
/**
|
|
46
|
+
* What the caller is answered with, which is a version of the updated code
|
|
47
|
+
* where `Publish` asked for one.
|
|
48
|
+
*/
|
|
49
|
+
private publishedOrUpdated;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=update-function-code.handler.d.ts.map
|
package/dist/service/lambda/command/update-function-code/update-function-code.handler.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-function-code.handler.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/command/update-function-code/update-function-code.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,wDAAwD,CAAC;AAEhE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0DAA0D,CAAC;AACzG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAC7F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iEAAiE,CAAC;AACpH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAGjG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAChG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6DAA6D,CAAC;AAGjH,OAAO,KAAK,EACV,4BAA4B,EAC5B,kCAAkC,EACnC,MAAM,mCAAmC,CAAC;AAE3C,UAAU,0CAA0C;IAClD,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,6BAA6B,CAAC;IACjD,QAAQ,CAAC,GAAG,CAAC,EAAE,uBAAuB,CAAC;IACvC,QAAQ,CAAC,UAAU,CAAC,EAAE,mBAAmB,CAAC;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,eAAe,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAChE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,4BAA4B,GAAG,SAAS,CAAC;IACxE,QAAQ,CAAC,YAAY,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC3D;AAED,UAAU,uCAAuC;IAC/C,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAED;;;;GAIG;AACH,qBAAa,gCAAiC,YAAW,cAAc,CACrE,4BAA4B,EAC5B,kCAAkC,CACnC;IACC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA0B;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgC;IACzD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA+B;IAC1D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAwB;IAErD,YAAY,UAAU,EAAE,0CAA0C,EAwBjE;IAED;;;;;;OAMG;IACG,MAAM,CACV,OAAO,EAAE,4BAA4B,EACrC,OAAO,CAAC,EAAE,uCAAuC,GAChD,OAAO,CAAC,kCAAkC,CAAC,CA+B7C;IAED;;;OAGG;IACH,OAAO,CAAC,kBAAkB;CAM3B"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { BackgroundTasks, } from "../../../../util/background/background.js";
|
|
2
|
+
import { SimIamAllowAllAuth, } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
3
|
+
import { SimLambdaCodeResolver } from "../../function/code/sim-lambda-code-resolver.js";
|
|
4
|
+
import { simLambdaUnqualifiedFunctionOf } from "../../function/sim-lambda-function-reference.js";
|
|
5
|
+
import { UpdateFunctionCodeAuthorizer } from "./update-function-code-authorizer.js";
|
|
6
|
+
import { requireUpdateFunctionCodeInput } from "./update-function-code-input.js";
|
|
7
|
+
/**
|
|
8
|
+
* Simulated Lambda UpdateFunctionCodeCommand handler.
|
|
9
|
+
*
|
|
10
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/UpdateFunctionCodeCommand/
|
|
11
|
+
*/
|
|
12
|
+
export class UpdateFunctionCodeCommandHandler {
|
|
13
|
+
functions;
|
|
14
|
+
versions;
|
|
15
|
+
authorizer;
|
|
16
|
+
background;
|
|
17
|
+
codeResolver;
|
|
18
|
+
constructor(properties) {
|
|
19
|
+
const { functions, versions, iam = new SimIamAllowAllAuth(), background = new BackgroundTasks(), codeStore, containerImages, vmSdkModuleProvider, outboundHttp, } = properties;
|
|
20
|
+
this.functions = functions;
|
|
21
|
+
this.versions = versions;
|
|
22
|
+
this.authorizer = new UpdateFunctionCodeAuthorizer({ iam });
|
|
23
|
+
this.background = background;
|
|
24
|
+
this.codeResolver = new SimLambdaCodeResolver({
|
|
25
|
+
codeStore,
|
|
26
|
+
containerImages,
|
|
27
|
+
vmSdkModuleProvider,
|
|
28
|
+
outboundHttp,
|
|
29
|
+
// The background scheduler is this simulation's clock, and the same one
|
|
30
|
+
// the function being updated was given.
|
|
31
|
+
clock: background,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Replace the code a sim Lambda function runs.
|
|
36
|
+
*
|
|
37
|
+
* The function keeps its name, ARN, execution Role, resource-based policy,
|
|
38
|
+
* Function URL, published versions and aliases. A version published before
|
|
39
|
+
* this still runs the code it was published with.
|
|
40
|
+
*/
|
|
41
|
+
async handle(command, options) {
|
|
42
|
+
const input = requireUpdateFunctionCodeInput(command);
|
|
43
|
+
// Allow for potential non-deterministic sequencing of async events.
|
|
44
|
+
await this.background.sequence();
|
|
45
|
+
const functionName = simLambdaUnqualifiedFunctionOf(input.name);
|
|
46
|
+
this.authorizer.authorize(this.functions.functionArn(functionName), options?.caller);
|
|
47
|
+
const simFunction = this.functions.require(functionName);
|
|
48
|
+
const code = await this.codeResolver.resolve(input.codeSource, {
|
|
49
|
+
// The function's own handler name and environment stand, because
|
|
50
|
+
// UpdateFunctionCode carries neither. UpdateFunctionConfiguration is
|
|
51
|
+
// where those change.
|
|
52
|
+
handlerName: simFunction.handlerName,
|
|
53
|
+
environment: simFunction.environment,
|
|
54
|
+
caller: options?.caller,
|
|
55
|
+
missingHandlerMessage: `Function ${functionName} has no Handler to find zip code's export ` +
|
|
56
|
+
"in. Set one with UpdateFunctionConfiguration first.",
|
|
57
|
+
});
|
|
58
|
+
simFunction.updateCode(code);
|
|
59
|
+
return {
|
|
60
|
+
$metadata: {},
|
|
61
|
+
...this.publishedOrUpdated(simFunction, input.publish).configuration(),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* What the caller is answered with, which is a version of the updated code
|
|
66
|
+
* where `Publish` asked for one.
|
|
67
|
+
*/
|
|
68
|
+
publishedOrUpdated(simFunction, publish) {
|
|
69
|
+
return publish ? this.versions.publish(simFunction) : simFunction;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=update-function-code.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-function-code.handler.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/update-function-code/update-function-code.handler.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,GAChB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EACL,kBAAkB,GAEnB,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AAKxF,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AAIjG,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AAqBjF;;;;GAIG;AACH,MAAM,OAAO,gCAAgC;IAI1B,SAAS,CAA0B;IACnC,QAAQ,CAAgC;IACxC,UAAU,CAA+B;IACzC,UAAU,CAAsB;IAChC,YAAY,CAAwB;IAErD,YAAY,UAAsD;QAChE,MAAM,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,GAAG,IAAI,kBAAkB,EAAE,EAC9B,UAAU,GAAG,IAAI,eAAe,EAAE,EAClC,SAAS,EACT,eAAe,EACf,mBAAmB,EACnB,YAAY,GACb,GAAG,UAAU,CAAC;QACf,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,IAAI,4BAA4B,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,YAAY,GAAG,IAAI,qBAAqB,CAAC;YAC5C,SAAS;YACT,eAAe;YACf,mBAAmB;YACnB,YAAY;YACZ,wEAAwE;YACxE,wCAAwC;YACxC,KAAK,EAAE,UAAU;SAClB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,CACV,OAAqC,EACrC,OAAiD;QAEjD,MAAM,KAAK,GAAG,8BAA8B,CAAC,OAAO,CAAC,CAAC;QAEtD,oEAAoE;QACpE,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAEjC,MAAM,YAAY,GAAG,8BAA8B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChE,IAAI,CAAC,UAAU,CAAC,SAAS,CACvB,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,EACxC,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QACzD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE;YAC7D,iEAAiE;YACjE,qEAAqE;YACrE,sBAAsB;YACtB,WAAW,EAAE,WAAW,CAAC,WAAW;YACpC,WAAW,EAAE,WAAW,CAAC,WAAW;YACpC,MAAM,EAAE,OAAO,EAAE,MAAM;YACvB,qBAAqB,EACnB,YAAY,YAAY,4CAA4C;gBACpE,qDAAqD;SACxD,CAAC,CAAC;QAEH,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAE7B,OAAO;YACL,SAAS,EAAE,EAAE;YACb,GAAG,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE;SACvE,CAAC;IACJ,CAAC;IAED;;;OAGG;IACK,kBAAkB,CACxB,WAA8B,EAC9B,OAAgB;QAEhB,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IACpE,CAAC;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
|
|
2
|
+
import type { SimIamInterServiceAuthZ } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
3
|
+
interface UpdateFunctionConfigurationAuthorizerProperties {
|
|
4
|
+
readonly iam: SimIamInterServiceAuthZ;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Applies IAM authorization to a Lambda UpdateFunctionConfiguration request.
|
|
8
|
+
*
|
|
9
|
+
* AWS maps the UpdateFunctionConfiguration API operation to the
|
|
10
|
+
* lambda:UpdateFunctionConfiguration IAM action. The resource is the ARN of
|
|
11
|
+
* the function whose settings are changing.
|
|
12
|
+
*/
|
|
13
|
+
export declare class UpdateFunctionConfigurationAuthorizer {
|
|
14
|
+
private static readonly action;
|
|
15
|
+
private readonly iam;
|
|
16
|
+
constructor(properties: UpdateFunctionConfigurationAuthorizerProperties);
|
|
17
|
+
/**
|
|
18
|
+
* Ensure the caller may change the settings of the function with the given
|
|
19
|
+
* ARN.
|
|
20
|
+
*
|
|
21
|
+
* The caller is passed through unchanged so sim IAM can distinguish an
|
|
22
|
+
* omitted caller, which defaults to Account root, from an explicit anonymous
|
|
23
|
+
* caller.
|
|
24
|
+
*/
|
|
25
|
+
authorize(functionArn: string, caller?: SimAwsCaller): void;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=update-function-configuration-authorizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-function-configuration-authorizer.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAGtG,UAAU,+CAA+C;IACvD,QAAQ,CAAC,GAAG,EAAE,uBAAuB,CAAC;CACvC;AAED;;;;;;GAMG;AACH,qBAAa,qCAAqC;IAChD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAwC;IAEtE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA0B;IAE9C,YAAY,UAAU,EAAE,+CAA+C,EAEtE;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAc1D;CACF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SimIamAccessDenied } from "../../../iam/error/sim-iam.error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Applies IAM authorization to a Lambda UpdateFunctionConfiguration request.
|
|
4
|
+
*
|
|
5
|
+
* AWS maps the UpdateFunctionConfiguration API operation to the
|
|
6
|
+
* lambda:UpdateFunctionConfiguration IAM action. The resource is the ARN of
|
|
7
|
+
* the function whose settings are changing.
|
|
8
|
+
*/
|
|
9
|
+
export class UpdateFunctionConfigurationAuthorizer {
|
|
10
|
+
static action = "lambda:UpdateFunctionConfiguration";
|
|
11
|
+
iam;
|
|
12
|
+
constructor(properties) {
|
|
13
|
+
this.iam = properties.iam;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Ensure the caller may change the settings of the function with the given
|
|
17
|
+
* ARN.
|
|
18
|
+
*
|
|
19
|
+
* The caller is passed through unchanged so sim IAM can distinguish an
|
|
20
|
+
* omitted caller, which defaults to Account root, from an explicit anonymous
|
|
21
|
+
* caller.
|
|
22
|
+
*/
|
|
23
|
+
authorize(functionArn, caller) {
|
|
24
|
+
const decision = this.iam.authorize({
|
|
25
|
+
action: UpdateFunctionConfigurationAuthorizer.action,
|
|
26
|
+
resource: functionArn,
|
|
27
|
+
caller,
|
|
28
|
+
});
|
|
29
|
+
if (decision.isDenied) {
|
|
30
|
+
throw new SimIamAccessDenied({
|
|
31
|
+
principal: decision.caller.principal,
|
|
32
|
+
action: UpdateFunctionConfigurationAuthorizer.action,
|
|
33
|
+
resource: functionArn,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=update-function-configuration-authorizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-function-configuration-authorizer.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAMzE;;;;;;GAMG;AACH,MAAM,OAAO,qCAAqC;IACxC,MAAM,CAAU,MAAM,GAAG,oCAAoC,CAAC;IAErD,GAAG,CAA0B;IAE9C,YAAY,UAA2D;QACrE,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC;IAC5B,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,WAAmB,EAAE,MAAqB;QAClD,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;YAClC,MAAM,EAAE,qCAAqC,CAAC,MAAM;YACpD,QAAQ,EAAE,WAAW;YACrB,MAAM;SACP,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACtB,MAAM,IAAI,kBAAkB,CAAC;gBAC3B,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS;gBACpC,MAAM,EAAE,qCAAqC,CAAC,MAAM;gBACpD,QAAQ,EAAE,WAAW;aACtB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
|