@kensio/yulin 1.21.0 → 1.21.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/README.md +1 -0
- package/dist/sdk/router/resolve-sim-sdk-command-router.js +4 -0
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +3 -0
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.d.ts +2 -0
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.js +3 -0
- package/dist/service/aws/factory/sim-aws-logs-collaborators.d.ts +7 -0
- package/dist/service/aws/factory/sim-aws-logs-collaborators.js +10 -0
- package/dist/service/aws/factory/sim-aws-self-contained-service-builder.d.ts +3 -0
- package/dist/service/aws/factory/sim-aws-self-contained-service-builder.js +5 -0
- package/dist/service/aws/factory/sim-aws-service-factory.d.ts +3 -0
- package/dist/service/aws/factory/sim-aws-service-factory.js +4 -0
- package/dist/service/aws/sim-aws-account-region-scope.d.ts +3 -0
- package/dist/service/aws/sim-aws-account-region-scope.js +4 -0
- package/dist/service/aws/sim-aws-account.d.ts +3 -0
- package/dist/service/aws/sim-aws-account.js +4 -0
- package/dist/service/aws/sim-aws-region.d.ts +3 -0
- package/dist/service/aws/sim-aws-region.js +4 -0
- package/dist/service/aws/sim-aws-service-accessors.d.ts +3 -0
- package/dist/service/aws/sim-aws-service-accessors.js +4 -0
- package/dist/service/backup/cfn/sim-backup-cfn-plan-creator.d.ts +6 -0
- package/dist/service/backup/cfn/sim-backup-cfn-plan-creator.js +12 -0
- package/dist/service/backup/cfn/sim-backup-cfn-resource-deleter.d.ts +12 -0
- package/dist/service/backup/cfn/sim-backup-cfn-resource-deleter.js +31 -0
- package/dist/service/backup/cfn/sim-backup-cfn-resource-factory.d.ts +15 -0
- package/dist/service/backup/cfn/sim-backup-cfn-resource-factory.js +38 -0
- package/dist/service/backup/cfn/sim-backup-cfn-selection-creator.d.ts +6 -0
- package/dist/service/backup/cfn/sim-backup-cfn-selection-creator.js +17 -0
- package/dist/service/backup/cfn/sim-backup-cfn-vault-creator.d.ts +6 -0
- package/dist/service/backup/cfn/sim-backup-cfn-vault-creator.js +29 -0
- package/dist/service/backup/cfn/sim-cfn-backup-plan-properties.d.ts +11 -0
- package/dist/service/backup/cfn/sim-cfn-backup-plan-properties.js +37 -0
- package/dist/service/backup/cfn/sim-cfn-backup-properties.d.ts +12 -0
- package/dist/service/backup/cfn/sim-cfn-backup-properties.js +37 -0
- package/dist/service/backup/cfn/sim-cfn-backup-property-reader.d.ts +17 -0
- package/dist/service/backup/cfn/sim-cfn-backup-property-reader.js +62 -0
- package/dist/service/backup/cfn/sim-cfn-backup-resource-error.d.ts +7 -0
- package/dist/service/backup/cfn/sim-cfn-backup-resource-error.js +22 -0
- package/dist/service/backup/command/sim-backup-authorizer.d.ts +11 -0
- package/dist/service/backup/command/sim-backup-authorizer.js +24 -0
- package/dist/service/backup/command/sim-backup-command.types.d.ts +238 -0
- package/dist/service/backup/command/sim-backup-command.types.js +1 -0
- package/dist/service/backup/command/sim-backup-configuration-commands.d.ts +32 -0
- package/dist/service/backup/command/sim-backup-configuration-commands.js +138 -0
- package/dist/service/backup/command/sim-backup-job-commands.d.ts +23 -0
- package/dist/service/backup/command/sim-backup-job-commands.js +52 -0
- package/dist/service/backup/command/sim-backup-recovery-point-commands.d.ts +18 -0
- package/dist/service/backup/command/sim-backup-recovery-point-commands.js +38 -0
- package/dist/service/backup/command/sim-backup-request-options.d.ts +4 -0
- package/dist/service/backup/command/sim-backup-request-options.js +1 -0
- package/dist/service/backup/command/sim-backup-required-string.d.ts +2 -0
- package/dist/service/backup/command/sim-backup-required-string.js +8 -0
- package/dist/service/backup/error/sim-backup.error.d.ts +38 -0
- package/dist/service/backup/error/sim-backup.error.js +50 -0
- package/dist/service/backup/index.d.ts +9 -0
- package/dist/service/backup/index.js +7 -0
- package/dist/service/backup/job/sim-backup-job-input.d.ts +11 -0
- package/dist/service/backup/job/sim-backup-job-input.js +1 -0
- package/dist/service/backup/job/sim-backup-job-page.d.ts +22 -0
- package/dist/service/backup/job/sim-backup-job-page.js +54 -0
- package/dist/service/backup/job/sim-backup-job.d.ts +25 -0
- package/dist/service/backup/job/sim-backup-job.factory.d.ts +10 -0
- package/dist/service/backup/job/sim-backup-job.factory.js +24 -0
- package/dist/service/backup/job/sim-backup-job.js +54 -0
- package/dist/service/backup/job/sim-backup-jobs.d.ts +18 -0
- package/dist/service/backup/job/sim-backup-jobs.js +33 -0
- package/dist/service/backup/plan/sim-backup-plan-schedules.d.ts +21 -0
- package/dist/service/backup/plan/sim-backup-plan-schedules.js +66 -0
- package/dist/service/backup/plan/sim-backup-plan.d.ts +22 -0
- package/dist/service/backup/plan/sim-backup-plan.js +37 -0
- package/dist/service/backup/plan/sim-backup-rule.d.ts +9 -0
- package/dist/service/backup/plan/sim-backup-rule.js +71 -0
- package/dist/service/backup/recovery-point/sim-backup-recovery-point.d.ts +28 -0
- package/dist/service/backup/recovery-point/sim-backup-recovery-point.factory.d.ts +9 -0
- package/dist/service/backup/recovery-point/sim-backup-recovery-point.factory.js +23 -0
- package/dist/service/backup/recovery-point/sim-backup-recovery-point.js +62 -0
- package/dist/service/backup/sdk/sim-backup-sdk-command-router.d.ts +9 -0
- package/dist/service/backup/sdk/sim-backup-sdk-command-router.js +37 -0
- package/dist/service/backup/selection/sim-backup-selection.d.ts +22 -0
- package/dist/service/backup/selection/sim-backup-selection.js +43 -0
- package/dist/service/backup/sim-backup-arn.d.ts +7 -0
- package/dist/service/backup/sim-backup-arn.js +12 -0
- package/dist/service/backup/sim-backup-properties.d.ts +8 -0
- package/dist/service/backup/sim-backup-properties.js +1 -0
- package/dist/service/backup/sim-backup-resource-resolver.d.ts +24 -0
- package/dist/service/backup/sim-backup-resource-resolver.js +44 -0
- package/dist/service/backup/sim-backup-store.d.ts +29 -0
- package/dist/service/backup/sim-backup-store.js +80 -0
- package/dist/service/backup/sim-backup.d.ts +48 -0
- package/dist/service/backup/sim-backup.js +139 -0
- package/dist/service/backup/vault/sim-backup-vault-description.d.ts +12 -0
- package/dist/service/backup/vault/sim-backup-vault-description.js +15 -0
- package/dist/service/backup/vault/sim-backup-vault-lock-configuration.d.ts +5 -0
- package/dist/service/backup/vault/sim-backup-vault-lock-configuration.js +31 -0
- package/dist/service/backup/vault/sim-backup-vault-lock.d.ts +15 -0
- package/dist/service/backup/vault/sim-backup-vault-lock.js +23 -0
- package/dist/service/backup/vault/sim-backup-vault-recovery-points.d.ts +12 -0
- package/dist/service/backup/vault/sim-backup-vault-recovery-points.js +30 -0
- package/dist/service/backup/vault/sim-backup-vault-retention.d.ts +4 -0
- package/dist/service/backup/vault/sim-backup-vault-retention.js +20 -0
- package/dist/service/backup/vault/sim-backup-vault.d.ts +33 -0
- package/dist/service/backup/vault/sim-backup-vault.js +49 -0
- package/dist/service/cloudformation/resource/cfn/backup/sim-backup-cfn-value-adapter.d.ts +3 -0
- package/dist/service/cloudformation/resource/cfn/backup/sim-backup-cfn-value-adapter.js +66 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-cfn-value-adapter.js +6 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-metric-filter-cfn.d.ts +23 -0
- package/dist/service/cloudformation/resource/cfn/logs/sim-logs-metric-filter-cfn.js +22 -0
- package/dist/service/cloudformation/resource/cfn/sim-cfn-service-value-adapters.js +2 -0
- package/dist/service/cloudformation/resource/ignore/sim-cfn-skipped-properties.d.ts +49 -0
- package/dist/service/cloudformation/resource/ignore/sim-cfn-skipped-properties.js +61 -0
- package/dist/service/cloudformation/resource/ignore/sim-cfn-skipped-property.type.d.ts +51 -0
- package/dist/service/cloudformation/resource/ignore/sim-cfn-skipped-property.type.js +1 -0
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-factories.js +4 -0
- package/dist/service/cloudwatch/index.d.ts +1 -0
- package/dist/service/cloudwatch/index.js +1 -0
- package/dist/service/cloudwatch/sim-cloudwatch-commands.d.ts +2 -0
- package/dist/service/cloudwatch/sim-cloudwatch-commands.js +6 -0
- package/dist/service/cloudwatch/sim-cloudwatch.d.ts +9 -0
- package/dist/service/cloudwatch/sim-cloudwatch.js +10 -0
- package/dist/service/cloudwatch/write/sim-cloudwatch-service-writer.d.ts +58 -0
- package/dist/service/cloudwatch/write/sim-cloudwatch-service-writer.js +53 -0
- package/dist/service/cognito/command/auth/sim-cognito-admin-respond-to-challenge.d.ts +3 -0
- package/dist/service/cognito/command/auth/sim-cognito-admin-respond-to-challenge.js +8 -2
- package/dist/service/cognito/command/auth/sim-cognito-auth-commands.d.ts +3 -0
- package/dist/service/cognito/command/auth/sim-cognito-auth-commands.js +4 -0
- package/dist/service/cognito/command/auth/sim-cognito-auth-flow-runner.d.ts +11 -1
- package/dist/service/cognito/command/auth/sim-cognito-auth-flow-runner.js +13 -1
- package/dist/service/cognito/command/auth/sim-cognito-auth-resolver.d.ts +3 -0
- package/dist/service/cognito/command/auth/sim-cognito-auth-resolver.js +16 -4
- package/dist/service/cognito/command/auth/sim-cognito-get-tokens-from-refresh-token.d.ts +7 -0
- package/dist/service/cognito/command/auth/sim-cognito-get-tokens-from-refresh-token.js +11 -1
- package/dist/service/cognito/command/auth/sim-cognito-respond-to-challenge.d.ts +3 -0
- package/dist/service/cognito/command/auth/sim-cognito-respond-to-challenge.js +8 -2
- package/dist/service/cognito/command/hosted/hosted-auth.command.d.ts +19 -0
- package/dist/service/cognito/command/hosted/sim-cognito-authorize-endpoint.d.ts +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-authorize-endpoint.js +3 -2
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-commands.d.ts +8 -0
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-commands.js +11 -3
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-passkey-sign-in.d.ts +11 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-passkey-sign-in.js +13 -2
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.d.ts +11 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.js +11 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-sign-in.d.ts +7 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-sign-in.js +18 -7
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-signed-in.d.ts +20 -3
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-signed-in.js +19 -3
- package/dist/service/cognito/command/hosted/sim-cognito-token-endpoint.d.ts +2 -0
- package/dist/service/cognito/command/hosted/sim-cognito-token-grants.d.ts +8 -0
- package/dist/service/cognito/command/hosted/sim-cognito-token-grants.js +13 -4
- package/dist/service/cognito/command/sim-cognito-commands.d.ts +5 -0
- package/dist/service/cognito/command/sim-cognito-commands.js +22 -2
- package/dist/service/cognito/command/user/sim-cognito-confirm-sign-up-commands.d.ts +74 -0
- package/dist/service/cognito/command/user/sim-cognito-confirm-sign-up-commands.js +110 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.d.ts +5 -49
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js +7 -87
- package/dist/service/cognito/command/user/sim-cognito-user-commands.d.ts +4 -0
- package/dist/service/cognito/command/user/sim-cognito-user-commands.js +38 -29
- package/dist/service/cognito/error/sim-cognito-managed-login.error.d.ts +23 -0
- package/dist/service/cognito/error/sim-cognito-managed-login.error.js +36 -0
- package/dist/service/cognito/error/sim-cognito-throttle.error.d.ts +13 -0
- package/dist/service/cognito/error/sim-cognito-throttle.error.js +15 -0
- package/dist/service/cognito/index.d.ts +2 -0
- package/dist/service/cognito/index.js +2 -0
- package/dist/service/cognito/metric/sim-cognito-counted-request.d.ts +50 -0
- package/dist/service/cognito/metric/sim-cognito-counted-request.js +51 -0
- package/dist/service/cognito/metric/sim-cognito-metrics.d.ts +22 -0
- package/dist/service/cognito/metric/sim-cognito-metrics.js +26 -0
- package/dist/service/cognito/metric/sim-cognito-pool-metrics.d.ts +40 -0
- package/dist/service/cognito/metric/sim-cognito-pool-metrics.js +51 -0
- package/dist/service/cognito/metric/sim-cognito-throttled-request.d.ts +11 -0
- package/dist/service/cognito/metric/sim-cognito-throttled-request.js +15 -0
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.d.ts +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.js +6 -1
- package/dist/service/cognito/serve/page/sim-cognito-page-markup.d.ts +4 -1
- package/dist/service/cognito/serve/page/sim-cognito-page-markup.js +6 -2
- package/dist/service/cognito/serve/page/sim-cognito-provider-page.d.ts +35 -0
- package/dist/service/cognito/serve/page/sim-cognito-provider-page.js +50 -0
- package/dist/service/cognito/sim-cognito-identity-provider.d.ts +6 -0
- package/dist/service/cognito/sim-cognito-identity-provider.js +1 -0
- package/dist/service/cognito/sim-cognito-user-directory.js +3 -3
- package/dist/service/cognito/user-pool/auth/sim-cognito-authorization-code.d.ts +9 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-authorization-code.js +2 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-pool-auth.d.ts +8 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-pool-auth.js +8 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-request-throttle.d.ts +36 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-request-throttle.js +45 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-sign-in.d.ts +42 -9
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-sign-in.js +56 -27
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-triggers.d.ts +52 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-triggers.js +49 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-presented-external-user.d.ts +48 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-presented-external-user.js +94 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-same-federated-identity.d.ts +13 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-same-federated-identity.js +19 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-user-pool-identity-provider.d.ts +7 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-user-pool-identity-provider.js +9 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-name.d.ts +3 -2
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-name.js +3 -2
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts +18 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js +35 -18
- package/dist/service/lambda/command/create-function/create-function.handler.d.ts +3 -0
- package/dist/service/lambda/command/create-function/create-function.handler.js +4 -1
- package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts +2 -0
- package/dist/service/lambda/event-source/poll/kinesis/sim-lambda-kinesis-stream-delivery.js +7 -11
- package/dist/service/lambda/event-source/poll/sim-lambda-dynamodb-stream-delivery.js +7 -8
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-iterator-age.d.ts +11 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-iterator-age.js +31 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-sequence-numbers.d.ts +10 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-stream-sequence-numbers.js +12 -0
- package/dist/service/lambda/function/sim-lambda-function.d.ts +3 -0
- package/dist/service/lambda/function/sim-lambda-function.js +6 -2
- package/dist/service/lambda/function/sim-lambda-function.type.d.ts +7 -0
- package/dist/service/lambda/metric/sim-lambda-function-metrics.d.ts +47 -0
- package/dist/service/lambda/metric/sim-lambda-function-metrics.js +83 -0
- package/dist/service/lambda/metric/sim-lambda-iterator-age.d.ts +29 -0
- package/dist/service/lambda/metric/sim-lambda-iterator-age.js +41 -0
- package/dist/service/lambda/metric/sim-lambda-metrics.d.ts +12 -0
- package/dist/service/lambda/metric/sim-lambda-metrics.js +13 -0
- package/dist/service/lambda/sim-lambda-commands.d.ts +2 -0
- package/dist/service/lambda/sim-lambda-commands.js +2 -1
- package/dist/service/logs/cfn/metric/sim-cfn-metric-dimension-values.d.ts +9 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-dimension-values.js +25 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-creator.d.ts +30 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-creator.js +52 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-properties.d.ts +40 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-properties.js +66 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-property-rules.d.ts +19 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-property-rules.js +40 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-unsimulated-properties.d.ts +5 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-unsimulated-properties.js +23 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-value.d.ts +25 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-filter-value.js +58 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-transformation-values.d.ts +6 -0
- package/dist/service/logs/cfn/metric/sim-cfn-metric-transformation-values.js +19 -0
- package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.d.ts +2 -0
- package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.js +4 -0
- package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.d.ts +5 -3
- package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.js +12 -3
- package/dist/service/logs/command/event/sim-logs-put-log-events.d.ts +3 -0
- package/dist/service/logs/command/event/sim-logs-put-log-events.js +3 -0
- package/dist/service/logs/command/group/sim-logs-log-group-commands.js +3 -3
- package/dist/service/logs/command/metric/metric-filter.command.d.ts +79 -0
- package/dist/service/logs/command/metric/metric-filter.command.js +1 -0
- package/dist/service/logs/command/metric/sim-logs-metric-filter-commands.d.ts +48 -0
- package/dist/service/logs/command/metric/sim-logs-metric-filter-commands.js +95 -0
- package/dist/service/logs/command/metric/sim-logs-metric-filter-input.d.ts +11 -0
- package/dist/service/logs/command/metric/sim-logs-metric-filter-input.js +79 -0
- package/dist/service/logs/command/sim-logs-command.types.d.ts +1 -0
- package/dist/service/logs/group/sim-logs-log-group.d.ts +6 -0
- package/dist/service/logs/group/sim-logs-log-group.js +6 -0
- package/dist/service/logs/index.d.ts +6 -0
- package/dist/service/logs/index.js +4 -0
- package/dist/service/logs/metric/cloudwatch/sim-aws-logs-metric-filter-metrics.d.ts +40 -0
- package/dist/service/logs/metric/cloudwatch/sim-aws-logs-metric-filter-metrics.js +78 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-datapoints.d.ts +25 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-datapoints.js +81 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-document.d.ts +57 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-document.js +85 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-json.d.ts +24 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-json.js +41 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-values.d.ts +20 -0
- package/dist/service/logs/metric/emf/sim-logs-embedded-metric-values.js +39 -0
- package/dist/service/logs/metric/sim-logs-metric-datapoint.d.ts +25 -0
- package/dist/service/logs/metric/sim-logs-metric-datapoint.js +1 -0
- package/dist/service/logs/metric/sim-logs-metric-fan-out.d.ts +62 -0
- package/dist/service/logs/metric/sim-logs-metric-fan-out.js +116 -0
- package/dist/service/logs/metric/sim-logs-metric-filter-selection.d.ts +17 -0
- package/dist/service/logs/metric/sim-logs-metric-filter-selection.js +17 -0
- package/dist/service/logs/metric/sim-logs-metric-filter-store.d.ts +35 -0
- package/dist/service/logs/metric/sim-logs-metric-filter-store.js +47 -0
- package/dist/service/logs/metric/sim-logs-metric-filter.d.ts +49 -0
- package/dist/service/logs/metric/sim-logs-metric-filter.js +95 -0
- package/dist/service/logs/metric/sim-logs-metric-publication-failure.d.ts +31 -0
- package/dist/service/logs/metric/sim-logs-metric-publication-failure.js +12 -0
- package/dist/service/logs/metric/sim-logs-metric-publications.d.ts +11 -0
- package/dist/service/logs/metric/sim-logs-metric-publications.js +1 -0
- package/dist/service/logs/metric/sim-logs-metric-transformation.d.ts +45 -0
- package/dist/service/logs/metric/sim-logs-metric-transformation.js +127 -0
- package/dist/service/logs/sdk/sim-logs-sdk-command-router.js +12 -0
- package/dist/service/logs/sim-logs-commands.d.ts +12 -0
- package/dist/service/logs/sim-logs-commands.js +17 -0
- package/dist/service/logs/sim-logs-metric-operations.d.ts +31 -0
- package/dist/service/logs/sim-logs-metric-operations.js +37 -0
- package/dist/service/logs/sim-logs.d.ts +4 -3
- package/dist/service/logs/sim-logs.js +4 -3
- package/dist/service/logs/write/sim-logs-service-writer.d.ts +3 -0
- package/dist/service/logs/write/sim-logs-service-writer.js +5 -1
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.d.ts +32 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.js +31 -1
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-expiry.d.ts +13 -2
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-expiry.js +18 -1
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-sweep.d.ts +17 -1
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-sweep.js +27 -3
- package/dist/service/s3/bucket/lifecycle/sim-s3-noncurrent-sweep.d.ts +45 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-noncurrent-sweep.js +90 -0
- package/dist/service/s3/bucket/lock/sim-s3-bucket-object-lock.d.ts +42 -0
- package/dist/service/s3/bucket/lock/sim-s3-bucket-object-lock.js +59 -0
- package/dist/service/s3/bucket/lock/sim-s3-default-retention.d.ts +8 -0
- package/dist/service/s3/bucket/lock/sim-s3-default-retention.js +15 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-lock-configuration.d.ts +49 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-lock-configuration.js +102 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-lock-output.d.ts +14 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-lock-output.js +1 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-lock.d.ts +62 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-lock.js +100 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-retention.d.ts +55 -0
- package/dist/service/s3/bucket/lock/sim-s3-object-retention.js +82 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification-event.d.ts +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-event.js +9 -1
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-events.d.ts +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-events.js +1 -2
- package/dist/service/s3/bucket/sim-s3-bucket-objects.d.ts +114 -0
- package/dist/service/s3/bucket/sim-s3-bucket-objects.js +148 -0
- package/dist/service/s3/bucket/sim-s3-bucket.d.ts +30 -29
- package/dist/service/s3/bucket/sim-s3-bucket.js +42 -45
- package/dist/service/s3/bucket/sim-s3-object-deletion.d.ts +30 -0
- package/dist/service/s3/bucket/sim-s3-object-deletion.js +29 -0
- package/dist/service/s3/bucket/versioning/sim-s3-bucket-versioning.d.ts +61 -0
- package/dist/service/s3/bucket/versioning/sim-s3-bucket-versioning.js +65 -0
- package/dist/service/s3/bucket/versioning/sim-s3-bucket-versions.d.ts +97 -0
- package/dist/service/s3/bucket/versioning/sim-s3-bucket-versions.js +176 -0
- package/dist/service/s3/bucket/versioning/sim-s3-compare-keys.d.ts +10 -0
- package/dist/service/s3/bucket/versioning/sim-s3-compare-keys.js +16 -0
- package/dist/service/s3/bucket/versioning/sim-s3-object-version.d.ts +85 -0
- package/dist/service/s3/bucket/versioning/sim-s3-object-version.js +101 -0
- package/dist/service/s3/bucket/versioning/sim-s3-object-versions.d.ts +52 -0
- package/dist/service/s3/bucket/versioning/sim-s3-object-versions.js +91 -0
- package/dist/service/s3/bucket/versioning/sim-s3-version-page.d.ts +32 -0
- package/dist/service/s3/bucket/versioning/sim-s3-version-page.js +45 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-configuration.d.ts +0 -5
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-configuration.js +3 -14
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-fields.d.ts +18 -1
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-fields.js +34 -1
- package/dist/service/s3/cfn/bucket/lock/sim-cfn-s3-bucket-object-lock-configuration.d.ts +37 -0
- package/dist/service/s3/cfn/bucket/lock/sim-cfn-s3-bucket-object-lock-configuration.js +78 -0
- package/dist/service/s3/cfn/bucket/replication/sim-cfn-s3-bucket-replication-rules.d.ts +20 -0
- package/dist/service/s3/cfn/bucket/replication/sim-cfn-s3-bucket-replication-rules.js +107 -0
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.d.ts +14 -7
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.js +29 -37
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-declared-configurations.d.ts +62 -0
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-declared-configurations.js +89 -0
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-names.d.ts +9 -5
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-names.js +16 -16
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-rules.d.ts +9 -5
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-rules.js +17 -6
- package/dist/service/s3/cfn/bucket/versioning/sim-cfn-s3-bucket-versioning-configuration.d.ts +19 -0
- package/dist/service/s3/cfn/bucket/versioning/sim-cfn-s3-bucket-versioning-configuration.js +28 -0
- package/dist/service/s3/command/authorize/sim-s3-authorize-action.d.ts +24 -0
- package/dist/service/s3/command/authorize/sim-s3-authorize-action.js +30 -0
- package/dist/service/s3/command/complete-multipart-upload/complete-multipart-upload.command.d.ts +2 -0
- package/dist/service/s3/command/complete-multipart-upload/complete-multipart-upload.handler.js +3 -1
- package/dist/service/s3/command/copy-object/copy-object.command.d.ts +3 -1
- package/dist/service/s3/command/copy-object/copy-object.handler.js +3 -1
- package/dist/service/s3/command/delete-object/delete-object-version-removal.d.ts +50 -0
- package/dist/service/s3/command/delete-object/delete-object-version-removal.js +52 -0
- package/dist/service/s3/command/delete-object/delete-object.command.d.ts +19 -2
- package/dist/service/s3/command/delete-object/delete-object.handler.d.ts +7 -1
- package/dist/service/s3/command/delete-object/delete-object.handler.js +28 -16
- package/dist/service/s3/command/delete-object/sim-s3-notify-deleted.d.ts +24 -0
- package/dist/service/s3/command/delete-object/sim-s3-notify-deleted.js +32 -0
- package/dist/service/s3/command/delete-objects/delete-object-attempt.d.ts +6 -2
- package/dist/service/s3/command/delete-objects/delete-object-attempt.js +6 -2
- package/dist/service/s3/command/delete-objects/delete-objects-key-removal.js +10 -9
- package/dist/service/s3/command/delete-objects/delete-objects-outcome.js +9 -1
- package/dist/service/s3/command/delete-objects/delete-objects.command.d.ts +6 -0
- package/dist/service/s3/command/get-bucket-versioning/get-bucket-versioning.command.d.ts +23 -0
- package/dist/service/s3/command/get-bucket-versioning/get-bucket-versioning.command.js +1 -0
- package/dist/service/s3/command/get-bucket-versioning/get-bucket-versioning.handler.d.ts +31 -0
- package/dist/service/s3/command/get-bucket-versioning/get-bucket-versioning.handler.js +40 -0
- package/dist/service/s3/command/get-object/get-object-loader.d.ts +3 -2
- package/dist/service/s3/command/get-object/get-object-loader.js +9 -4
- package/dist/service/s3/command/get-object/get-object.command.d.ts +9 -1
- package/dist/service/s3/command/get-object/get-object.handler.js +1 -1
- package/dist/service/s3/command/get-object-lock-configuration/get-object-lock-configuration.command.d.ts +25 -0
- package/dist/service/s3/command/get-object-lock-configuration/get-object-lock-configuration.command.js +1 -0
- package/dist/service/s3/command/get-object-lock-configuration/get-object-lock-configuration.handler.d.ts +31 -0
- package/dist/service/s3/command/get-object-lock-configuration/get-object-lock-configuration.handler.js +41 -0
- package/dist/service/s3/command/head-object/head-object-loader.d.ts +1 -1
- package/dist/service/s3/command/head-object/head-object-loader.js +7 -3
- package/dist/service/s3/command/head-object/head-object.command.d.ts +9 -1
- package/dist/service/s3/command/head-object/head-object.handler.js +1 -1
- package/dist/service/s3/command/list-object-versions/list-object-versions-listing.d.ts +31 -0
- package/dist/service/s3/command/list-object-versions/list-object-versions-listing.js +55 -0
- package/dist/service/s3/command/list-object-versions/list-object-versions-summaries.d.ts +17 -0
- package/dist/service/s3/command/list-object-versions/list-object-versions-summaries.js +34 -0
- package/dist/service/s3/command/list-object-versions/list-object-versions.command.d.ts +59 -0
- package/dist/service/s3/command/list-object-versions/list-object-versions.command.js +1 -0
- package/dist/service/s3/command/list-object-versions/list-object-versions.handler.d.ts +34 -0
- package/dist/service/s3/command/list-object-versions/list-object-versions.handler.js +62 -0
- package/dist/service/s3/command/object/sim-s3-read-object-version.d.ts +34 -0
- package/dist/service/s3/command/object/sim-s3-read-object-version.js +52 -0
- package/dist/service/s3/command/object-lock/sim-s3-locked-version.d.ts +11 -0
- package/dist/service/s3/command/object-lock/sim-s3-locked-version.js +27 -0
- package/dist/service/s3/command/object-lock/sim-s3-object-lock-authorizer.d.ts +42 -0
- package/dist/service/s3/command/object-lock/sim-s3-object-lock-authorizer.js +66 -0
- package/dist/service/s3/command/object-lock/sim-s3-object-lock-commands.d.ts +30 -0
- package/dist/service/s3/command/object-lock/sim-s3-object-lock-commands.js +41 -0
- package/dist/service/s3/command/put-bucket-versioning/put-bucket-versioning.command.d.ts +21 -0
- package/dist/service/s3/command/put-bucket-versioning/put-bucket-versioning.command.js +1 -0
- package/dist/service/s3/command/put-bucket-versioning/put-bucket-versioning.handler.d.ts +31 -0
- package/dist/service/s3/command/put-bucket-versioning/put-bucket-versioning.handler.js +44 -0
- package/dist/service/s3/command/put-object/put-object.command.d.ts +3 -0
- package/dist/service/s3/command/put-object/put-object.handler.js +10 -10
- package/dist/service/s3/command/put-object-legal-hold/put-object-legal-hold.command.d.ts +24 -0
- package/dist/service/s3/command/put-object-legal-hold/put-object-legal-hold.command.js +1 -0
- package/dist/service/s3/command/put-object-legal-hold/put-object-legal-hold.handler.d.ts +32 -0
- package/dist/service/s3/command/put-object-legal-hold/put-object-legal-hold.handler.js +41 -0
- package/dist/service/s3/command/put-object-lock-configuration/put-object-lock-configuration.command.d.ts +21 -0
- package/dist/service/s3/command/put-object-lock-configuration/put-object-lock-configuration.command.js +1 -0
- package/dist/service/s3/command/put-object-lock-configuration/put-object-lock-configuration.handler.d.ts +32 -0
- package/dist/service/s3/command/put-object-lock-configuration/put-object-lock-configuration.handler.js +47 -0
- package/dist/service/s3/command/put-object-retention/put-object-retention.command.d.ts +29 -0
- package/dist/service/s3/command/put-object-retention/put-object-retention.command.js +1 -0
- package/dist/service/s3/command/put-object-retention/put-object-retention.handler.d.ts +31 -0
- package/dist/service/s3/command/put-object-retention/put-object-retention.handler.js +42 -0
- package/dist/service/s3/command/sim-s3-command.types.d.ts +7 -0
- package/dist/service/s3/command/versioning/sim-s3-versioning-authorizer.d.ts +35 -0
- package/dist/service/s3/command/versioning/sim-s3-versioning-authorizer.js +57 -0
- package/dist/service/s3/command/versioning/sim-s3-versioning-commands.d.ts +26 -0
- package/dist/service/s3/command/versioning/sim-s3-versioning-commands.js +34 -0
- package/dist/service/s3/command/versioning/sim-s3-versioning-configuration-validation.d.ts +13 -0
- package/dist/service/s3/command/versioning/sim-s3-versioning-configuration-validation.js +28 -0
- package/dist/service/s3/error/sim-s3-object-lock.error.d.ts +22 -0
- package/dist/service/s3/error/sim-s3-object-lock.error.js +26 -0
- package/dist/service/s3/error/sim-s3.error.d.ts +22 -0
- package/dist/service/s3/error/sim-s3.error.js +26 -0
- package/dist/service/s3/notification/event/sim-s3-event-records.js +3 -0
- package/dist/service/s3/notification/event/sim-s3-event.type.d.ts +5 -3
- package/dist/service/s3/notification/event/sim-s3-object-event-builder.d.ts +15 -0
- package/dist/service/s3/notification/event/sim-s3-object-event-builder.js +4 -1
- package/dist/service/s3/notification/event/sim-s3-object-event.d.ts +6 -0
- package/dist/service/s3/notification/event/sim-s3-object-event.js +2 -0
- package/dist/service/s3/notification/sim-s3-object-notifier.d.ts +1 -1
- package/dist/service/s3/notification/sim-s3-object-notifier.js +2 -2
- package/dist/service/s3/sdk/sim-s3-sdk-bucket-routes.d.ts +10 -0
- package/dist/service/s3/sdk/sim-s3-sdk-bucket-routes.js +84 -0
- package/dist/service/s3/sdk/sim-s3-sdk-command-router.js +6 -132
- package/dist/service/s3/sdk/sim-s3-sdk-object-lock-routes.d.ts +10 -0
- package/dist/service/s3/sdk/sim-s3-sdk-object-lock-routes.js +28 -0
- package/dist/service/s3/sdk/sim-s3-sdk-object-routes.d.ts +7 -0
- package/dist/service/s3/sdk/sim-s3-sdk-object-routes.js +80 -0
- package/dist/service/s3/sim-s3-commands.d.ts +4 -0
- package/dist/service/s3/sim-s3-commands.js +6 -0
- package/dist/service/s3/sim-s3-operations.d.ts +5 -5
- package/dist/service/s3/sim-s3-operations.js +5 -6
- package/dist/service/s3/sim-s3-version-operations.d.ts +32 -0
- package/dist/service/s3/sim-s3-version-operations.js +45 -0
- package/dist/service/scheduler/command/schedule/schedule.command.d.ts +9 -2
- package/dist/service/scheduler/command/schedule/sim-scheduler-described-schedule.js +2 -0
- package/dist/service/scheduler/command/schedule/sim-scheduler-unsimulated-target.js +0 -6
- package/dist/service/scheduler/command/sim-scheduler-command.types.d.ts +1 -1
- package/dist/service/scheduler/command/sim-scheduler-commands.js +1 -0
- package/dist/service/scheduler/delivery/sim-aws-scheduler-dead-letters.d.ts +17 -0
- package/dist/service/scheduler/delivery/sim-aws-scheduler-dead-letters.js +29 -0
- package/dist/service/scheduler/delivery/sim-aws-scheduler-delivery-targets.d.ts +6 -1
- package/dist/service/scheduler/delivery/sim-aws-scheduler-delivery-targets.js +9 -0
- package/dist/service/scheduler/delivery/sim-scheduler-dead-letter-queue.d.ts +18 -0
- package/dist/service/scheduler/delivery/sim-scheduler-dead-letter-queue.js +62 -0
- package/dist/service/scheduler/delivery/sim-scheduler-delivery-attempt.d.ts +29 -0
- package/dist/service/scheduler/delivery/sim-scheduler-delivery-attempt.js +81 -0
- package/dist/service/scheduler/delivery/sim-scheduler-delivery-function.js +9 -5
- package/dist/service/scheduler/delivery/sim-scheduler-delivery.d.ts +11 -0
- package/dist/service/scheduler/delivery/sim-scheduler-no-delivery-targets.d.ts +5 -1
- package/dist/service/scheduler/delivery/sim-scheduler-no-delivery-targets.js +8 -0
- package/dist/service/scheduler/delivery/sim-scheduler-target-delivery.d.ts +4 -1
- package/dist/service/scheduler/delivery/sim-scheduler-target-delivery.js +20 -15
- package/dist/service/scheduler/index.d.ts +1 -1
- package/dist/service/scheduler/target/sim-scheduler-dead-letter-config.d.ts +15 -0
- package/dist/service/scheduler/target/sim-scheduler-dead-letter-config.js +24 -0
- package/dist/service/scheduler/target/sim-scheduler-retry-policy.d.ts +20 -0
- package/dist/service/scheduler/target/sim-scheduler-retry-policy.js +37 -0
- package/dist/service/scheduler/target/sim-scheduler-target.d.ts +6 -0
- package/dist/service/scheduler/target/sim-scheduler-target.js +12 -0
- package/dist/service/ses/command/configuration-set/sim-ses-configuration-set-commands.js +13 -5
- package/dist/service/ses/command/configuration-set/sim-ses-configuration-set-options.d.ts +1 -1
- package/dist/service/ses/command/configuration-set/sim-ses-configuration-set-options.js +9 -9
- package/dist/service/ses/command/send/send.command.d.ts +10 -1
- package/dist/service/ses/command/send/sim-ses-read-content.d.ts +2 -1
- package/dist/service/ses/command/send/sim-ses-send-email.js +1 -0
- package/dist/service/ses/command/send/sim-ses-service-send.js +1 -0
- package/dist/service/ses/command/send/sim-ses-simple-content.js +26 -5
- package/dist/service/ses/command/send/sim-ses-template-send.js +1 -0
- package/dist/service/ses/command/suppression/suppression.command.d.ts +3 -2
- package/dist/service/ses/configuration-set/sim-ses-configuration-set.d.ts +9 -10
- package/dist/service/ses/configuration-set/sim-ses-configuration-set.js +7 -8
- package/dist/service/ses/email/sim-ses-sent-email-store.d.ts +8 -0
- package/dist/service/ses/email/sim-ses-sent-email-store.js +17 -0
- package/dist/service/ses/email/sim-ses-sent-email.d.ts +18 -0
- package/dist/service/ses/email/sim-ses-sent-email.js +3 -0
- package/dist/service/ses/error/sim-ses.error.d.ts +10 -0
- package/dist/service/ses/error/sim-ses.error.js +10 -0
- package/dist/service/ses/feedback/sim-ses-feedback-recorder.d.ts +34 -0
- package/dist/service/ses/feedback/sim-ses-feedback-recorder.js +55 -0
- package/dist/service/ses/index.d.ts +3 -2
- package/dist/service/ses/index.js +2 -1
- package/dist/service/ses/sim-ses-commands.d.ts +2 -0
- package/dist/service/ses/sim-ses-commands.js +9 -0
- package/dist/service/ses/sim-ses-configuration-sets.d.ts +4 -4
- package/dist/service/ses/sim-ses-configuration-sets.js +4 -4
- package/dist/service/ses/sim-ses-suppression.d.ts +3 -2
- package/dist/service/ses/sim-ses-suppression.js +3 -2
- package/dist/service/ses/sim-ses-v2.d.ts +13 -0
- package/dist/service/ses/sim-ses-v2.js +13 -0
- package/dist/service/ses/suppression/sim-ses-suppressed-destination.d.ts +3 -4
- package/dist/service/ses/suppression/sim-ses-suppressed-destination.js +3 -4
- package/dist/service/ses/suppression/sim-ses-suppression-list.d.ts +4 -4
- package/dist/service/ses/suppression/sim-ses-suppression-list.js +4 -4
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-encryption-rules.d.ts +15 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-encryption-rules.js +33 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.d.ts +16 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.js +33 -1
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-names.d.ts +12 -6
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-names.js +18 -13
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.d.ts +1 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.js +9 -1
- package/dist/terraform/map/sim-tf-map-sqs-redrive.d.ts +4 -3
- package/dist/terraform/map/sim-tf-map-sqs-redrive.js +4 -3
- package/docs/README.md +1 -0
- package/docs/services/backup/README.md +553 -0
- package/docs/services/cloudformation/README.md +16 -6
- package/docs/services/cloudwatch/README.md +159 -3
- package/docs/services/cognito/README.md +370 -7
- package/docs/services/lambda/README.md +28 -0
- package/docs/services/logs/README.md +284 -3
- package/docs/services/s3/README.md +463 -20
- package/docs/services/scheduler/README.md +48 -9
- package/docs/services/ses/README.md +164 -41
- package/docs/services/sqs/README.md +47 -10
- package/llms.txt +1 -0
- package/package.json +7 -2
|
@@ -862,13 +862,340 @@ failures come back.
|
|
|
862
862
|
|
|
863
863
|
### Limitations
|
|
864
864
|
|
|
865
|
-
-
|
|
866
|
-
|
|
865
|
+
- `VersionId` and `MFA` are ignored on a `DeleteObjects` request. A versioned Bucket writes a delete
|
|
866
|
+
marker over each key and reports it per key under `DeleteMarker` and `DeleteMarkerVersionId`, and
|
|
867
|
+
removing a named version needs `DeleteObjectCommand`. See
|
|
868
|
+
[Object versioning](#object-versioning).
|
|
867
869
|
- A request naming no Objects, or more than the thousand S3 accepts, is refused with `MalformedXML`
|
|
868
870
|
before anything is deleted.
|
|
869
871
|
- A Bucket using filesystem-backed storage refuses deletion. See
|
|
870
872
|
[Filesystem-backed Bucket storage](#filesystem-backed-bucket-storage).
|
|
871
873
|
|
|
874
|
+
## Object versioning
|
|
875
|
+
|
|
876
|
+
A versioned Bucket keeps every write of a key instead of overwriting it, and answers a delete with a
|
|
877
|
+
marker rather than removing anything. Turn it on with `PutBucketVersioningCommand`, or with
|
|
878
|
+
`VersioningConfiguration` on an `AWS::S3::Bucket` resource.
|
|
879
|
+
|
|
880
|
+
```typescript sim-s3-object-versioning
|
|
881
|
+
import {
|
|
882
|
+
DeleteObjectCommand,
|
|
883
|
+
GetObjectCommand,
|
|
884
|
+
ListObjectVersionsCommand,
|
|
885
|
+
PutBucketVersioningCommand,
|
|
886
|
+
PutObjectCommand,
|
|
887
|
+
} from "@aws-sdk/client-s3";
|
|
888
|
+
import { SimAws } from "@kensio/yulin";
|
|
889
|
+
|
|
890
|
+
const simAws = new SimAws();
|
|
891
|
+
const simS3 = simAws.s3();
|
|
892
|
+
|
|
893
|
+
await simAws.cloudFormation().deployTemplate({
|
|
894
|
+
stackName: "history-stack",
|
|
895
|
+
template: {
|
|
896
|
+
Resources: {
|
|
897
|
+
HistoryBucket: {
|
|
898
|
+
Type: "AWS::S3::Bucket",
|
|
899
|
+
Properties: { BucketName: "history" },
|
|
900
|
+
},
|
|
901
|
+
},
|
|
902
|
+
},
|
|
903
|
+
});
|
|
904
|
+
|
|
905
|
+
// Written before the Bucket was versioned, so this one takes the null version
|
|
906
|
+
// id, as it does in real S3. A template declaring VersioningConfiguration
|
|
907
|
+
// gives even the first write a version id of its own instead.
|
|
908
|
+
await simS3.putObject(
|
|
909
|
+
new PutObjectCommand({
|
|
910
|
+
Bucket: "history",
|
|
911
|
+
Key: "snapshots/reader-1.json",
|
|
912
|
+
Body: JSON.stringify({ words: ["好"] }),
|
|
913
|
+
}),
|
|
914
|
+
);
|
|
915
|
+
|
|
916
|
+
await simS3.putBucketVersioning(
|
|
917
|
+
new PutBucketVersioningCommand({
|
|
918
|
+
Bucket: "history",
|
|
919
|
+
VersioningConfiguration: { Status: "Enabled" },
|
|
920
|
+
}),
|
|
921
|
+
);
|
|
922
|
+
|
|
923
|
+
await simS3.putObject(
|
|
924
|
+
new PutObjectCommand({
|
|
925
|
+
Bucket: "history",
|
|
926
|
+
Key: "snapshots/reader-1.json",
|
|
927
|
+
Body: JSON.stringify({ words: [] }),
|
|
928
|
+
}),
|
|
929
|
+
);
|
|
930
|
+
|
|
931
|
+
// The write did not overwrite anything. Both versions are listed, newest
|
|
932
|
+
// first, with IsLatest on the one a plain read answers with.
|
|
933
|
+
const listed = await simS3.listObjectVersions(
|
|
934
|
+
new ListObjectVersionsCommand({ Bucket: "history", Prefix: "snapshots/" }),
|
|
935
|
+
);
|
|
936
|
+
|
|
937
|
+
console.log(listed.Versions?.map((version) => version.VersionId));
|
|
938
|
+
// [ "<a version id>", "null" ]
|
|
939
|
+
|
|
940
|
+
// Recovery is a read of the earlier version and a write of it back.
|
|
941
|
+
const earlier = await simS3.getObject(
|
|
942
|
+
new GetObjectCommand({
|
|
943
|
+
Bucket: "history",
|
|
944
|
+
Key: "snapshots/reader-1.json",
|
|
945
|
+
VersionId: "null",
|
|
946
|
+
}),
|
|
947
|
+
);
|
|
948
|
+
|
|
949
|
+
const recovered = await Array.fromAsync(earlier.Body ?? []);
|
|
950
|
+
|
|
951
|
+
await simS3.putObject(
|
|
952
|
+
new PutObjectCommand({
|
|
953
|
+
Bucket: "history",
|
|
954
|
+
Key: "snapshots/reader-1.json",
|
|
955
|
+
Body: Buffer.concat(recovered),
|
|
956
|
+
}),
|
|
957
|
+
);
|
|
958
|
+
|
|
959
|
+
// A delete writes a marker over the key rather than removing anything, and
|
|
960
|
+
// deleting the marker by its own id brings the Object back.
|
|
961
|
+
const deleted = await simS3.deleteObject(
|
|
962
|
+
new DeleteObjectCommand({
|
|
963
|
+
Bucket: "history",
|
|
964
|
+
Key: "snapshots/reader-1.json",
|
|
965
|
+
}),
|
|
966
|
+
);
|
|
967
|
+
|
|
968
|
+
console.log(deleted.DeleteMarker); // true
|
|
969
|
+
|
|
970
|
+
await simS3.deleteObject(
|
|
971
|
+
new DeleteObjectCommand({
|
|
972
|
+
Bucket: "history",
|
|
973
|
+
Key: "snapshots/reader-1.json",
|
|
974
|
+
VersionId: deleted.VersionId,
|
|
975
|
+
}),
|
|
976
|
+
);
|
|
977
|
+
```
|
|
978
|
+
|
|
979
|
+
`PutObjectCommand`, `CopyObjectCommand` and `CompleteMultipartUploadCommand` each report the
|
|
980
|
+
`VersionId` they wrote under. `GetObjectCommand` and `HeadObjectCommand` take one and read that
|
|
981
|
+
version, and report the version they read. `DeleteObjectCommand` takes one and removes that version
|
|
982
|
+
for good.
|
|
983
|
+
|
|
984
|
+
`ListObjectVersionsCommand` reports the Objects under `Versions` and the delete markers under
|
|
985
|
+
`DeleteMarkers`, keys in ascending order and each key's versions newest first. `IsLatest` marks the
|
|
986
|
+
version a read without a `VersionId` answers with. `ListObjectsV2Command` reports the current
|
|
987
|
+
version of each key alone, and a key hidden behind a delete marker is absent from it.
|
|
988
|
+
|
|
989
|
+
Both lists are paged together, so `MaxKeys` counts an Object and a marker alike. A truncated listing
|
|
990
|
+
carries `NextKeyMarker` and `NextVersionIdMarker`, which the next request sends back as `KeyMarker`
|
|
991
|
+
and `VersionIdMarker`. See [Walking a truncated listing](#walking-a-truncated-listing) for the page
|
|
992
|
+
size and how to lower it.
|
|
993
|
+
|
|
994
|
+
### Enabling versioning over a Bucket that already holds Objects
|
|
995
|
+
|
|
996
|
+
Real S3 gives an Object written before the configuration arrived the version id `null`, and
|
|
997
|
+
simulated S3 does the same. That Object is the current version of its key, reads back under the
|
|
998
|
+
literal string `null`, and stays where it is when a later write pushes it out of being current.
|
|
999
|
+
|
|
1000
|
+
A Bucket keeping no versions still answers `ListObjectVersionsCommand`, reporting each Object once
|
|
1001
|
+
under the null version id and marked latest. That is what real S3 answers for an unversioned Bucket,
|
|
1002
|
+
and it means the operation is safe to call before deciding whether the Bucket is versioned.
|
|
1003
|
+
|
|
1004
|
+
### Suspending versioning
|
|
1005
|
+
|
|
1006
|
+
`Status: "Suspended"` stops new versions being made and discards none of the ones already there. An
|
|
1007
|
+
Object written while suspended takes the null version id and replaces whatever else holds it, so a
|
|
1008
|
+
run of writes shares one version between them. Every version written while versioning was enabled
|
|
1009
|
+
stays readable by its own id.
|
|
1010
|
+
|
|
1011
|
+
There is no way back to unversioned. Real S3 has no request for it, and
|
|
1012
|
+
`GetBucketVersioningCommand` reports no status at all for a Bucket nobody has configured, which is
|
|
1013
|
+
what separates one from a Bucket whose versioning was suspended.
|
|
1014
|
+
|
|
1015
|
+
### Event notifications
|
|
1016
|
+
|
|
1017
|
+
A delete on a versioned Bucket raises `s3:ObjectRemoved:DeleteMarkerCreated` rather than
|
|
1018
|
+
`s3:ObjectRemoved:Delete`, carrying the marker's version id. Removing a version by its own id raises
|
|
1019
|
+
`s3:ObjectRemoved:Delete` with that version id. A record from a versioned Bucket carries
|
|
1020
|
+
`s3.object.versionId`, and one from a Bucket without versioning leaves the field out.
|
|
1021
|
+
|
|
1022
|
+
### Limitations
|
|
1023
|
+
|
|
1024
|
+
- MFA delete is refused with `NotImplemented` rather than stored. Nothing here could enforce it, and
|
|
1025
|
+
a Bucket reporting a protection it does not apply is worse than one that says so. `MFADelete:
|
|
1026
|
+
"Disabled"` is taken, and any other value is refused with `InvalidArgument`.
|
|
1027
|
+
- A `versionId` in a `CopySource` is still refused with `NotImplemented`. A copy reads the current
|
|
1028
|
+
version.
|
|
1029
|
+
- `NoncurrentVersionTransitions` is stored and unread, because storage classes are left out. An
|
|
1030
|
+
`Expiration` rule expires the current version behind a delete marker, as real S3 does, and raises
|
|
1031
|
+
nothing. A `NoncurrentVersionExpiration` rule bounds the history, and `ExpiredObjectDeleteMarker`
|
|
1032
|
+
removes a marker left bare. See
|
|
1033
|
+
[Bounding the history a versioned Bucket keeps](#bounding-the-history-a-versioned-bucket-keeps).
|
|
1034
|
+
- The `?versioning` and `?versions` sub-resources are refused over the served S3 REST endpoint.
|
|
1035
|
+
Versioning is reachable through the SDK and through a template.
|
|
1036
|
+
- A Bucket mounted on a filesystem directory refuses the deletion a delete marker asks for, the way
|
|
1037
|
+
it refuses `DeleteObject`. See [Filesystem-backed Bucket storage](#filesystem-backed-bucket-storage).
|
|
1038
|
+
|
|
1039
|
+
## Object Lock
|
|
1040
|
+
|
|
1041
|
+
Object Lock holds a version of an Object against a delete. A version can be held by a retention
|
|
1042
|
+
period, by a legal hold or by both, and a delete naming a held version is answered with
|
|
1043
|
+
`AccessDenied`. One way past exists and it is narrow. A `GOVERNANCE` retention period gives way to a
|
|
1044
|
+
request carrying `BypassGovernanceRetention` from a caller allowed to use it. A `COMPLIANCE` period
|
|
1045
|
+
and a legal hold hold against everyone, the account root included. Turn it on with `PutObjectLockConfigurationCommand`, or with
|
|
1046
|
+
`ObjectLockEnabled` on an `AWS::S3::Bucket` resource.
|
|
1047
|
+
|
|
1048
|
+
Object Lock holds a version, and versioning has to be on underneath it. Turning it on over a Bucket
|
|
1049
|
+
with versioning off is refused with `InvalidBucketState`, as real S3 refuses it, and a template
|
|
1050
|
+
declaring Object Lock without `VersioningConfiguration` fails the stack. See
|
|
1051
|
+
[Object versioning](#object-versioning) for what versioning itself changes.
|
|
1052
|
+
|
|
1053
|
+
```typescript sim-s3-object-lock
|
|
1054
|
+
/**
|
|
1055
|
+
* A reader's history in a Bucket nothing in the account can delete from.
|
|
1056
|
+
*/
|
|
1057
|
+
|
|
1058
|
+
import {
|
|
1059
|
+
DeleteObjectCommand,
|
|
1060
|
+
HeadObjectCommand,
|
|
1061
|
+
PutObjectCommand,
|
|
1062
|
+
} from "@aws-sdk/client-s3";
|
|
1063
|
+
|
|
1064
|
+
import { SimAws } from "@kensio/yulin";
|
|
1065
|
+
|
|
1066
|
+
const simAws = new SimAws();
|
|
1067
|
+
const simS3 = simAws.s3();
|
|
1068
|
+
|
|
1069
|
+
// Versioning goes on underneath Object Lock. Every version written into this
|
|
1070
|
+
// Bucket is then retained for seven days from the write.
|
|
1071
|
+
const stack = await simAws.cloudFormation().deployTemplate({
|
|
1072
|
+
stackName: "history-stack",
|
|
1073
|
+
template: {
|
|
1074
|
+
Resources: {
|
|
1075
|
+
HistoryBucket: {
|
|
1076
|
+
Type: "AWS::S3::Bucket",
|
|
1077
|
+
Properties: {
|
|
1078
|
+
BucketName: "reader-history",
|
|
1079
|
+
VersioningConfiguration: { Status: "Enabled" },
|
|
1080
|
+
ObjectLockEnabled: true,
|
|
1081
|
+
ObjectLockConfiguration: {
|
|
1082
|
+
ObjectLockEnabled: "Enabled",
|
|
1083
|
+
Rule: { DefaultRetention: { Mode: "COMPLIANCE", Days: 7 } },
|
|
1084
|
+
},
|
|
1085
|
+
},
|
|
1086
|
+
},
|
|
1087
|
+
},
|
|
1088
|
+
},
|
|
1089
|
+
});
|
|
1090
|
+
await stack.waitForDeployComplete();
|
|
1091
|
+
|
|
1092
|
+
const written = await simS3.putObject(
|
|
1093
|
+
new PutObjectCommand({
|
|
1094
|
+
Bucket: "reader-history",
|
|
1095
|
+
Key: "events/reader-1.json",
|
|
1096
|
+
Body: JSON.stringify({ words: ["好"] }),
|
|
1097
|
+
}),
|
|
1098
|
+
);
|
|
1099
|
+
|
|
1100
|
+
const held = await simS3.headObject(
|
|
1101
|
+
new HeadObjectCommand({
|
|
1102
|
+
Bucket: "reader-history",
|
|
1103
|
+
Key: "events/reader-1.json",
|
|
1104
|
+
VersionId: written.VersionId,
|
|
1105
|
+
}),
|
|
1106
|
+
);
|
|
1107
|
+
|
|
1108
|
+
console.log(held.ObjectLockMode); // "COMPLIANCE"
|
|
1109
|
+
|
|
1110
|
+
try {
|
|
1111
|
+
await simS3.deleteObject(
|
|
1112
|
+
new DeleteObjectCommand({
|
|
1113
|
+
Bucket: "reader-history",
|
|
1114
|
+
Key: "events/reader-1.json",
|
|
1115
|
+
VersionId: written.VersionId,
|
|
1116
|
+
BypassGovernanceRetention: true,
|
|
1117
|
+
}),
|
|
1118
|
+
);
|
|
1119
|
+
} catch (error) {
|
|
1120
|
+
// AccessDenied. A compliance period gives way to nobody, and naming the
|
|
1121
|
+
// bypass changes nothing.
|
|
1122
|
+
console.log((error as Error).name);
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
// The period lapses because simulated time passed it.
|
|
1126
|
+
await simAws.clock().advanceBy({ days: 8 });
|
|
1127
|
+
|
|
1128
|
+
await simS3.deleteObject(
|
|
1129
|
+
new DeleteObjectCommand({
|
|
1130
|
+
Bucket: "reader-history",
|
|
1131
|
+
Key: "events/reader-1.json",
|
|
1132
|
+
VersionId: written.VersionId,
|
|
1133
|
+
}),
|
|
1134
|
+
);
|
|
1135
|
+
```
|
|
1136
|
+
|
|
1137
|
+
The retention boundary is a pure function of simulated time, read off the clock every time a delete
|
|
1138
|
+
asks. Advancing the clock past `RetainUntilDate` is all a test does to watch a held version become
|
|
1139
|
+
deletable. See [Controlling time](https://yulinsim.dev/time/ "Controlling time").
|
|
1140
|
+
|
|
1141
|
+
`GetObject` and `HeadObject` report `ObjectLockMode` and `ObjectLockRetainUntilDate` for a version
|
|
1142
|
+
under a retention period, and `ObjectLockLegalHoldStatus` for one under a hold. A version free of
|
|
1143
|
+
both leaves all three out.
|
|
1144
|
+
|
|
1145
|
+
### Retention modes
|
|
1146
|
+
|
|
1147
|
+
`GOVERNANCE` and `COMPLIANCE` differ over who can get out of them. A governance period gives way to a
|
|
1148
|
+
delete carrying `BypassGovernanceRetention` from a caller holding `s3:BypassGovernanceRetention`,
|
|
1149
|
+
which sim IAM authorizes as a decision of its own alongside the `s3:DeleteObject` the delete already
|
|
1150
|
+
needed. Holding the permission and using it are separate. A delete that leaves the flag off is
|
|
1151
|
+
refused whatever the caller may do.
|
|
1152
|
+
|
|
1153
|
+
A compliance period gives way to nobody, the account root included. `PutObjectRetentionCommand`
|
|
1154
|
+
follows the same split. A compliance period can be extended in the same mode and that is all, since
|
|
1155
|
+
shortening one would end the guarantee early and turning one into a governance period would hand the
|
|
1156
|
+
version to the first caller holding the bypass permission. A governance period can be shortened, or
|
|
1157
|
+
turned into a compliance one, by a request that bypasses it.
|
|
1158
|
+
|
|
1159
|
+
### Legal holds
|
|
1160
|
+
|
|
1161
|
+
`PutObjectLegalHoldCommand` turns the hold on a version on and off. A hold has no period to wait out.
|
|
1162
|
+
Only a `Status: "OFF"` takes one off, which is what makes a hold the thing to reach for when the end
|
|
1163
|
+
of the retention is unknowable in advance. A version can carry a hold and a retention period at
|
|
1164
|
+
once, and either one on its own refuses the delete.
|
|
1165
|
+
|
|
1166
|
+
### Default retention
|
|
1167
|
+
|
|
1168
|
+
A `DefaultRetention` under `Rule` retains every version written after it, counted from the write, so
|
|
1169
|
+
two versions of one key written a day apart are held until two different instants. It takes `Days` or
|
|
1170
|
+
`Years` and refuses both together, a year is 365 days, and the longest one real S3 takes is a hundred
|
|
1171
|
+
years. A Bucket with Object Lock on and no
|
|
1172
|
+
default leaves each version to whatever requests name it.
|
|
1173
|
+
|
|
1174
|
+
### From a CloudFormation template
|
|
1175
|
+
|
|
1176
|
+
`ObjectLockEnabled` and `ObjectLockConfiguration` are applied through
|
|
1177
|
+
`PutObjectLockConfigurationCommand`, so a template and an SDK caller are validated identically. CDK's
|
|
1178
|
+
`objectLockEnabled` and `objectLockDefaultRetention` synthesise both. `ObjectLockConfiguration`
|
|
1179
|
+
without `ObjectLockEnabled: true` fails the resource, as real CloudFormation refuses it, because a
|
|
1180
|
+
Bucket created around the property would report a default retention it never applied.
|
|
1181
|
+
|
|
1182
|
+
### Limitations
|
|
1183
|
+
|
|
1184
|
+
- `GetObjectRetentionCommand` and `GetObjectLegalHoldCommand` are absent. A version reports both
|
|
1185
|
+
through `GetObject` and `HeadObject`.
|
|
1186
|
+
- `PutObjectCommand` takes no `ObjectLockMode`, `ObjectLockRetainUntilDate` or
|
|
1187
|
+
`ObjectLockLegalHoldStatus`. A version is held by the Bucket's default retention and by
|
|
1188
|
+
`PutObjectRetentionCommand` and `PutObjectLegalHoldCommand` afterwards.
|
|
1189
|
+
- `CreateBucketCommand` takes no `ObjectLockEnabledForBucket`. Turn versioning on, then Object Lock.
|
|
1190
|
+
- `DeleteObjectsCommand` names keys and no versions, so a batch delete writes delete markers and
|
|
1191
|
+
reaches no held version. See [Deleting Objects](#deleting-objects).
|
|
1192
|
+
- The `?object-lock`, `?retention` and `?legal-hold` sub-resources are refused over the served S3
|
|
1193
|
+
REST endpoint. Object Lock is reachable through the SDK and through a template.
|
|
1194
|
+
- A Bucket policy setting minimum and maximum allowable retention periods is left out. The only
|
|
1195
|
+
bound applied is the hundred years real S3 caps a `DefaultRetention` at. A `RetainUntilDate` on a
|
|
1196
|
+
single version is taken as given, however far ahead it names.
|
|
1197
|
+
- `S3 Batch Operations` applying retention across a manifest is left out.
|
|
1198
|
+
|
|
872
1199
|
## Event notifications
|
|
873
1200
|
|
|
874
1201
|
A simulated S3 Bucket can notify a simulated Lambda function, a simulated SQS queue or a simulated
|
|
@@ -1667,8 +1994,8 @@ writes fall outside it. Without that, the simulation stops after a thousand deli
|
|
|
1667
1994
|
- `eventVersion` is the version the S3 event message structure page documents now. AWS increments the
|
|
1668
1995
|
minor version whenever it adds a field, so compare the major for equality and leave the whole
|
|
1669
1996
|
string alone.
|
|
1670
|
-
- `versionId` is absent from
|
|
1671
|
-
|
|
1997
|
+
- `versionId` is absent from a record raised by a Bucket without versioning, as it is on real S3,
|
|
1998
|
+
and carried by one from a versioned Bucket. See [Object versioning](#object-versioning).
|
|
1672
1999
|
- A notification cannot be configured on a standalone `SimS3`. It has no other simulated services to
|
|
1673
2000
|
notify, and no shared background scheduler for `backgroundTasksComplete()` to drain. Reach
|
|
1674
2001
|
simulated S3 through `SimAws` instead.
|
|
@@ -1694,10 +2021,12 @@ writes fall outside it. Without that, the simulation stops after a thousand deli
|
|
|
1694
2021
|
|
|
1695
2022
|
## Buckets from CloudFormation
|
|
1696
2023
|
|
|
1697
|
-
An `AWS::S3::Bucket` resource carries
|
|
1698
|
-
`LifecycleConfiguration`, `NotificationConfiguration`, `
|
|
2024
|
+
An `AWS::S3::Bucket` resource carries eight properties simulated S3 acts on. Those are `BucketName`,
|
|
2025
|
+
`LifecycleConfiguration`, `NotificationConfiguration`, `ObjectLockConfiguration`,
|
|
2026
|
+
`ObjectLockEnabled`, `PublicAccessBlockConfiguration`, `VersioningConfiguration` and
|
|
1699
2027
|
`WebsiteConfiguration`. See [Lifecycle configuration](#lifecycle-configuration) for the parts of a
|
|
1700
|
-
rule that are read
|
|
2028
|
+
rule that are read, [Object versioning](#object-versioning) for what versioning a Bucket changes, and
|
|
2029
|
+
[Object Lock](#object-lock) for what holds a version once it is written.
|
|
1701
2030
|
|
|
1702
2031
|
A Bucket with no `BucketName` is named from the stack name, the logical ID and a tail derived from
|
|
1703
2032
|
both, lower cased as a bucket name has to be. A `SiteBucket` in `orders-stack` becomes
|
|
@@ -1708,15 +2037,27 @@ cover how the stack name and the logical ID share what is left.
|
|
|
1708
2037
|
Any other property is left out and recorded in
|
|
1709
2038
|
[`stack.ignoredProperties`](https://yulinsim.dev/services/cloudformation/#properties-a-resource-was-created-without),
|
|
1710
2039
|
and the Bucket is created and the stack carries on. That matters because a Bucket deployed without
|
|
1711
|
-
the
|
|
2040
|
+
the replication or CORS configuration its template asked for looks configured and
|
|
1712
2041
|
behaves as though it were bare, and the failure that causes turns up somewhere else entirely. The
|
|
1713
2042
|
record is where a test checks which of those it is standing on. A property name `AWS::S3::Bucket`
|
|
1714
2043
|
never had is recorded the same way, and a typo leaves the stack standing.
|
|
1715
2044
|
|
|
1716
|
-
One of the
|
|
2045
|
+
One of the eight given in the wrong shape still fails the stack, and so does a `BucketName` that is
|
|
1717
2046
|
something other than a string. There is no Bucket to create under a name nothing else in the
|
|
1718
2047
|
template refers to.
|
|
1719
2048
|
|
|
2049
|
+
A `ReplicationConfiguration` fails the stack as well, for a different reason. Replication is not
|
|
2050
|
+
simulated and nothing acts on the property, and the value is still read for the constraints real S3
|
|
2051
|
+
enforces on it. Those are a `Metrics.EventThreshold` with no `ReplicationTime` at `Status: Enabled`,
|
|
2052
|
+
a rule stating a `Filter` without the `DeleteMarkerReplication`, `Priority` and `Status` that S3
|
|
2053
|
+
requires alongside one, and a source Bucket whose template never enabled versioning. Real S3 answers
|
|
2054
|
+
each of them with a 400 and CloudFormation rolls the stack back, and the CloudFormation resource
|
|
2055
|
+
schema states none of them, so cfn-lint passes a template carrying any one. A deploy here that
|
|
2056
|
+
reported them as working would be the last check between a repository and that rollback.
|
|
2057
|
+
|
|
2058
|
+
A configuration passing all three is recorded like any other skipped property. One that fails takes
|
|
2059
|
+
the Bucket with it and is never recorded, because the Resource is refused before it is created.
|
|
2060
|
+
|
|
1720
2061
|
`BucketEncryption` and `Tags` are read, ignored and left out of the record, because nothing this
|
|
1721
2062
|
simulator models can tell the difference. There is no simulated KMS, Object bytes are stored as they
|
|
1722
2063
|
arrive, and no simulated service reads a Bucket tag. CDK puts both on almost every Bucket it synthesizes, and
|
|
@@ -1918,8 +2259,9 @@ them disabled in favour of policies.
|
|
|
1918
2259
|
## Lifecycle configuration
|
|
1919
2260
|
|
|
1920
2261
|
Sim S3 stores a Bucket's lifecycle rules and acts on them. An `Expiration` rule removes the Objects
|
|
1921
|
-
it selects once simulated time passes the boundary,
|
|
1922
|
-
|
|
2262
|
+
it selects once simulated time passes the boundary, a `NoncurrentVersionExpiration` rule bounds the
|
|
2263
|
+
history a versioned Bucket keeps, and an `AbortIncompleteMultipartUpload` rule discards uploads that
|
|
2264
|
+
were started and left unfinished.
|
|
1923
2265
|
|
|
1924
2266
|
Retention is otherwise the one property of a log or a backup Bucket a test cannot demonstrate.
|
|
1925
2267
|
Reading the rules back off a deployed Bucket says the rules arrived. Putting an Object, moving the
|
|
@@ -1985,6 +2327,100 @@ what the rules leave at that instant, and a Bucket carrying no rules costs one c
|
|
|
1985
2327
|
the clock backwards afterwards leaves an expired Object gone, because the rule deleted it on the way
|
|
1986
2328
|
past.
|
|
1987
2329
|
|
|
2330
|
+
### Bounding the history a versioned Bucket keeps
|
|
2331
|
+
|
|
2332
|
+
A versioned Bucket gains a version on every write and keeps every one of them. A
|
|
2333
|
+
`NoncurrentVersionExpiration` rule bounds that. `NoncurrentDays` removes a version once simulated
|
|
2334
|
+
time passes it, counted from the moment that version stopped being current rather than from its
|
|
2335
|
+
write, which is how real S3 measures it. A version written a year ago and displaced yesterday has
|
|
2336
|
+
been noncurrent for a day.
|
|
2337
|
+
|
|
2338
|
+
```typescript sim-s3-noncurrent-expiry
|
|
2339
|
+
/**
|
|
2340
|
+
* Bounding a reader's history at ninety days of noncurrent versions.
|
|
2341
|
+
*/
|
|
2342
|
+
|
|
2343
|
+
import {
|
|
2344
|
+
ListObjectVersionsCommand,
|
|
2345
|
+
PutBucketLifecycleConfigurationCommand,
|
|
2346
|
+
PutBucketVersioningCommand,
|
|
2347
|
+
PutObjectCommand,
|
|
2348
|
+
} from "@aws-sdk/client-s3";
|
|
2349
|
+
|
|
2350
|
+
import { SimAws } from "@kensio/yulin";
|
|
2351
|
+
|
|
2352
|
+
const simAws = new SimAws();
|
|
2353
|
+
const simS3 = simAws.s3();
|
|
2354
|
+
|
|
2355
|
+
const stack = await simAws.cloudFormation().deployTemplate({
|
|
2356
|
+
stackName: "history-stack",
|
|
2357
|
+
template: {
|
|
2358
|
+
Resources: {
|
|
2359
|
+
HistoryBucket: {
|
|
2360
|
+
Type: "AWS::S3::Bucket",
|
|
2361
|
+
Properties: { BucketName: "reader-history" },
|
|
2362
|
+
},
|
|
2363
|
+
},
|
|
2364
|
+
},
|
|
2365
|
+
});
|
|
2366
|
+
await stack.waitForDeployComplete();
|
|
2367
|
+
|
|
2368
|
+
await simS3.putBucketVersioning(
|
|
2369
|
+
new PutBucketVersioningCommand({
|
|
2370
|
+
Bucket: "reader-history",
|
|
2371
|
+
VersioningConfiguration: { Status: "Enabled" },
|
|
2372
|
+
}),
|
|
2373
|
+
);
|
|
2374
|
+
|
|
2375
|
+
await simS3.putBucketLifecycleConfiguration(
|
|
2376
|
+
new PutBucketLifecycleConfigurationCommand({
|
|
2377
|
+
Bucket: "reader-history",
|
|
2378
|
+
LifecycleConfiguration: {
|
|
2379
|
+
Rules: [
|
|
2380
|
+
{
|
|
2381
|
+
ID: "bound-history",
|
|
2382
|
+
Status: "Enabled",
|
|
2383
|
+
Filter: { Prefix: "snapshots/" },
|
|
2384
|
+
NoncurrentVersionExpiration: { NoncurrentDays: 90 },
|
|
2385
|
+
},
|
|
2386
|
+
],
|
|
2387
|
+
},
|
|
2388
|
+
}),
|
|
2389
|
+
);
|
|
2390
|
+
|
|
2391
|
+
const snapshot = {
|
|
2392
|
+
Bucket: "reader-history",
|
|
2393
|
+
Key: "snapshots/reader-1.json",
|
|
2394
|
+
};
|
|
2395
|
+
|
|
2396
|
+
await simS3.putObject(new PutObjectCommand({ ...snapshot, Body: "before" }));
|
|
2397
|
+
await simS3.putObject(new PutObjectCommand({ ...snapshot, Body: "after" }));
|
|
2398
|
+
|
|
2399
|
+
await simAws.clock().advanceBy({ days: 91 });
|
|
2400
|
+
|
|
2401
|
+
const listed = await simS3.listObjectVersions(
|
|
2402
|
+
new ListObjectVersionsCommand({ Bucket: "reader-history" }),
|
|
2403
|
+
);
|
|
2404
|
+
|
|
2405
|
+
// The version the second write displaced has gone, and the current one stays
|
|
2406
|
+
// however old it is.
|
|
2407
|
+
console.log(listed.Versions?.length); // 1
|
|
2408
|
+
```
|
|
2409
|
+
|
|
2410
|
+
`NewerNoncurrentVersions` holds that many of the most recent noncurrent versions back from the rule,
|
|
2411
|
+
whatever their age, so a rule keeping two reaches the third and everything older. Real S3 requires
|
|
2412
|
+
`NoncurrentDays` alongside it, and a rule stating the count on its own names no period to measure and
|
|
2413
|
+
expires nothing.
|
|
2414
|
+
|
|
2415
|
+
`ExpiredObjectDeleteMarker` under `Expiration` removes a delete marker left with no version under it,
|
|
2416
|
+
which takes the key out of `ListObjectVersions` altogether. A marker still hiding a version stays,
|
|
2417
|
+
since that marker is what a read of the key answers with. The two run in that order in one pass, so a
|
|
2418
|
+
marker whose last version expired in the same pass goes with it.
|
|
2419
|
+
|
|
2420
|
+
A noncurrent version is removed from the Bucket's history, and a `GetObject` naming its `VersionId`
|
|
2421
|
+
answers `NoSuchVersion` afterwards. The current version is beyond every rule of this kind, however
|
|
2422
|
+
old it is.
|
|
2423
|
+
|
|
1988
2424
|
### What a rule selects
|
|
1989
2425
|
|
|
1990
2426
|
A rule selects Objects by its `Filter`, or by the older top-level `Prefix`. A rule with no scope at
|
|
@@ -2075,14 +2511,17 @@ all three, and a rule stored here that real S3 would have rejected reads back lo
|
|
|
2075
2511
|
CloudFormation spells some rule fields differently from the request. `Id` becomes `ID`,
|
|
2076
2512
|
`ExpirationInDays` and `ExpirationDate` are gathered under `Expiration`, and a transition's
|
|
2077
2513
|
`TransitionInDays` becomes `Days`. The singular `Transition` a template may state alongside
|
|
2078
|
-
`Transitions` joins the list.
|
|
2079
|
-
`
|
|
2514
|
+
`Transitions` joins the list. `NoncurrentVersionExpirationInDays` becomes the `NoncurrentDays` of a
|
|
2515
|
+
`NoncurrentVersionExpiration`, which is what CDK's `noncurrentVersionExpiration` synthesises, and a
|
|
2516
|
+
template stating the nested object instead is taken as it stands. Everything else, `Status`,
|
|
2517
|
+
`Prefix`, `AbortIncompleteMultipartUpload`, `TagFilters` and the object size bounds among them, is
|
|
2518
|
+
carried across as the template stated it.
|
|
2080
2519
|
|
|
2081
2520
|
`LifecycleConfiguration` is one of the properties simulated S3 acts on. It stays out of
|
|
2082
2521
|
[`stack.ignoredProperties`](https://yulinsim.dev/services/cloudformation/#properties-a-resource-was-created-without).
|
|
2083
|
-
The
|
|
2084
|
-
not,
|
|
2085
|
-
further. Which Objects an enforced action reaches is decided by the fields listed under
|
|
2522
|
+
The three actions it enforces are `Expiration`, whether the template flattened it onto the rule or
|
|
2523
|
+
not, `NoncurrentVersionExpiration`, in either of its two spellings, and
|
|
2524
|
+
`AbortIncompleteMultipartUpload`. A `Transitions` rule is stored and read back and goes no further. Which Objects an enforced action reaches is decided by the fields listed under
|
|
2086
2525
|
[What a rule selects](#what-a-rule-selects).
|
|
2087
2526
|
|
|
2088
2527
|
### Limitations
|
|
@@ -2093,8 +2532,11 @@ No Object moves between storage classes. Storage classes are left out of the sim
|
|
|
2093
2532
|
Real S3 raises `s3:LifecycleExpiration:Delete` when a rule removes an Object. That event family is
|
|
2094
2533
|
among the ones sim S3 leaves out. An expiry here is silent.
|
|
2095
2534
|
|
|
2096
|
-
`
|
|
2097
|
-
|
|
2535
|
+
`NoncurrentVersionTransitions` is stored and unread, alongside `Transitions`, because storage classes
|
|
2536
|
+
are left out. An `Expiration` rule on a versioned Bucket writes a delete marker over the current
|
|
2537
|
+
version and leaves the version itself where it is, which is what real S3 does, and a
|
|
2538
|
+
`NoncurrentVersionExpiration` rule is what then removes it. See
|
|
2539
|
+
[Object versioning](#object-versioning).
|
|
2098
2540
|
|
|
2099
2541
|
A Bucket mounted on a filesystem directory refuses the deletion an expiry asks for, the way it
|
|
2100
2542
|
refuses `DeleteObject`, and answers `NotImplemented`. Removing a real file off the mounted directory
|
|
@@ -2980,6 +3422,9 @@ Sim S3 currently supports:
|
|
|
2980
3422
|
- `PutBucketNotificationConfigurationCommand` and `GetBucketNotificationConfigurationCommand`, with
|
|
2981
3423
|
Object events delivered to a simulated Lambda function, a simulated SQS queue or a simulated SNS
|
|
2982
3424
|
topic
|
|
3425
|
+
- `PutBucketVersioningCommand`, `GetBucketVersioningCommand` and `ListObjectVersionsCommand`, with
|
|
3426
|
+
every write of a key kept, a delete writing a marker over it, and a named version readable and
|
|
3427
|
+
removable on its own
|
|
2983
3428
|
- `PutBucketWebsiteCommand`, for static website hosting
|
|
2984
3429
|
- `PutBucketLifecycleConfigurationCommand`, `GetBucketLifecycleConfigurationCommand` and
|
|
2985
3430
|
`DeleteBucketLifecycleCommand`, storing a Bucket's lifecycle rules and handing them back without
|
|
@@ -3012,8 +3457,6 @@ needs them to model the requested behaviour.
|
|
|
3012
3457
|
|
|
3013
3458
|
These apply across the page. The sections above each list what is specific to them.
|
|
3014
3459
|
|
|
3015
|
-
- Object versioning is left out. There are no version ids, no delete markers and no `VersionId` on
|
|
3016
|
-
any request or response.
|
|
3017
3460
|
- A listing reports `StorageClass` as `STANDARD` for every Object. Storage classes themselves are
|
|
3018
3461
|
left out, and every Object is in that one.
|
|
3019
3462
|
- `EncodingType` is ignored on a listing, and keys come back unencoded.
|
|
@@ -238,6 +238,39 @@ console.log(failure?.message);
|
|
|
238
238
|
`JSON.stringify` on a failure carries the message alongside the schedule, the target, the role and
|
|
239
239
|
the instant it names.
|
|
240
240
|
|
|
241
|
+
A Lambda target has another boundary. Scheduler records a failure when it cannot assume the role,
|
|
242
|
+
the role cannot invoke the function, the function is missing or Lambda refuses the request. Once
|
|
243
|
+
Lambda accepts the asynchronous invocation, its event invoke config applies. Handler errors follow
|
|
244
|
+
Lambda's retry, destination and function dead-letter queue settings and do not appear in
|
|
245
|
+
`deliveryFailures`.
|
|
246
|
+
|
|
247
|
+
### Retrying and dead-lettering a delivery
|
|
248
|
+
|
|
249
|
+
Set `Target.RetryPolicy` to retry a failure that may clear. `MaximumRetryAttempts` is the number of
|
|
250
|
+
attempts after the first one and accepts 0 through 185. `MaximumEventAgeInSeconds` accepts 60 through
|
|
251
|
+
86,400. If the policy leaves either member out, its effective value is 185 attempts or 86,400
|
|
252
|
+
seconds. `GetSchedule` still reports the policy as it was written.
|
|
253
|
+
|
|
254
|
+
Retries use the simulation's clock. The first retry is due one second after the failed attempt. Each
|
|
255
|
+
following delay doubles to 2, 4, 8 seconds and so on. A retry does not run while the clock stands
|
|
256
|
+
still. `advanceBy(...)` runs every retry that becomes due in the interval and settles their work
|
|
257
|
+
before it returns.
|
|
258
|
+
|
|
259
|
+
Scheduler does not retry a failure that cannot clear by trying the same request. A missing target,
|
|
260
|
+
a missing execution role, an execution role that does not trust Scheduler and an IAM denial are
|
|
261
|
+
permanent failures. They are abandoned after the initial attempt.
|
|
262
|
+
|
|
263
|
+
Set `Target.DeadLetterConfig.Arn` to a standard SQS queue ARN to keep an input that Scheduler abandons.
|
|
264
|
+
The execution role needs `sqs:SendMessage` on this queue as well as permission to invoke the target.
|
|
265
|
+
The message body is the target's original `Input`. Its string message attributes follow Scheduler's
|
|
266
|
+
shape and include the error, schedule ARN, target ARN, scheduled time and retry count.
|
|
267
|
+
`EXHAUSTED_RETRY_CONDITION` is `MaximumRetryAttempts` or `MaximumEventAgeInSeconds` for an exhausted
|
|
268
|
+
retryable failure. A permanent failure leaves that attribute out.
|
|
269
|
+
|
|
270
|
+
A successful DLQ send does not add an entry to `deliveryFailures`, since the configured destination
|
|
271
|
+
received the input. A missing queue or denied `sqs:SendMessage` is recorded there instead. This keeps
|
|
272
|
+
a misconfigured DLQ visible to a test.
|
|
273
|
+
|
|
241
274
|
### One-time schedules and what happens after
|
|
242
275
|
|
|
243
276
|
An `at(...)` schedule fires once and then stops. By default it stays in the Account afterwards, which
|
|
@@ -759,10 +792,12 @@ Resources of the same stack.
|
|
|
759
792
|
- `at(...)`, `rate(...)` and six-field `cron(...)` expressions, fired by advancing the simulation's
|
|
760
793
|
clock.
|
|
761
794
|
- Lambda, SQS and SNS targets, with a target `Input`, invoked as the target's execution role and
|
|
762
|
-
authorized against that role's own policies.
|
|
795
|
+
authorized against that role's own policies. Lambda targets use asynchronous Event invocation.
|
|
763
796
|
- ECS targets, running a simulated task as the execution role, with the task definition and
|
|
764
797
|
`TaskCount` from `EcsParameters` and container overrides from the target's `Input`.
|
|
765
798
|
- `ActionAfterCompletion`, and `deliveryFailures` for invocations that did not happen.
|
|
799
|
+
- Target retry policies driven by simulated time, and standard SQS dead-letter queues carrying the
|
|
800
|
+
original input and Scheduler diagnostic attributes.
|
|
766
801
|
- `CreateScheduleGroup`, `GetScheduleGroup`, `DeleteScheduleGroup` and `ListScheduleGroups`, over
|
|
767
802
|
the `default` group every account and region starts with and any group created beside it.
|
|
768
803
|
- `AWS::Scheduler::Schedule` and `AWS::Scheduler::ScheduleGroup` deployed from a CloudFormation
|
|
@@ -779,9 +814,12 @@ Resources of the same stack.
|
|
|
779
814
|
of it, and a simulation left alone in real time never fires however long it is left.
|
|
780
815
|
- Firing is exact and exactly once. Real Scheduler invokes within a minute of the due time, and its
|
|
781
816
|
promise is at-least-once.
|
|
782
|
-
-
|
|
783
|
-
|
|
784
|
-
|
|
817
|
+
- Retry delays are deterministic powers of two seconds. Real Scheduler uses exponential backoff
|
|
818
|
+
without publishing an exact sequence. The fixed sequence lets a test advance to a known retry
|
|
819
|
+
instant.
|
|
820
|
+
- Delivery retries cover failures before the target accepts the request. A Lambda handler failure
|
|
821
|
+
happens after Lambda accepts its asynchronous invocation and uses Lambda's retry, destination and
|
|
822
|
+
function dead-letter queue settings instead.
|
|
785
823
|
- A schedule group carries no tags. `CreateScheduleGroup` refuses `Tags`, since the simulation
|
|
786
824
|
stores them nowhere. A template's `Tags` are recorded as an ignored property and the group still
|
|
787
825
|
deploys.
|
|
@@ -798,9 +836,10 @@ Resources of the same stack.
|
|
|
798
836
|
- Targets are Lambda, SQS, SNS and ECS. The universal target
|
|
799
837
|
(`arn:aws:scheduler:::aws-sdk:<service>:<action>`) and every other target service are refused when
|
|
800
838
|
the schedule is created, ahead of the first due instant.
|
|
801
|
-
- A target `
|
|
802
|
-
`
|
|
803
|
-
|
|
839
|
+
- A target `EventBridgeParameters`, `KinesisParameters`, `SageMakerPipelineParameters` and
|
|
840
|
+
`SqsParameters` are refused outright, as is `EcsParameters` on a target whose ARN names something
|
|
841
|
+
other than an ECS cluster. A `DeadLetterConfig` must name a standard SQS queue because simulated
|
|
842
|
+
SQS does not support FIFO queues.
|
|
804
843
|
- An ECS target's `EcsParameters` takes `TaskDefinitionArn` and `TaskCount`, and takes and ignores
|
|
805
844
|
`LaunchType`, `PlatformVersion`, `NetworkConfiguration` and `CapacityProviderStrategy`, since
|
|
806
845
|
there is no placement and no network here for them to apply to. Anything else it can carry, such
|
|
@@ -810,5 +849,5 @@ Resources of the same stack.
|
|
|
810
849
|
on an ECS target, where every other target type takes any text.
|
|
811
850
|
- A `TaskCount` above one runs that many simulated tasks, and a bound container handler runs once
|
|
812
851
|
for each of them, in this process and one after another.
|
|
813
|
-
- `KmsKeyArn` is refused, and `ClientToken` is accepted and ignored.
|
|
814
|
-
no request to make idempotent.
|
|
852
|
+
- `KmsKeyArn` is refused, and `ClientToken` is accepted and ignored. Schedule management requests
|
|
853
|
+
are not retried, so the token has no request to make idempotent.
|