@kensio/yulin 1.21.0 → 1.21.1
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/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/sqs/README.md +47 -10
- package/llms.txt +1 -0
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -23,6 +23,7 @@ npm i -D @kensio/yulin
|
|
|
23
23
|
- [API Gateway HTTP APIs](https://yulinsim.dev/services/apigatewayv2/ "Simulated API Gateway HTTP API docs")
|
|
24
24
|
- [API Gateway REST APIs](https://yulinsim.dev/services/apigateway/ "Simulated API Gateway REST API docs")
|
|
25
25
|
- [Athena](https://yulinsim.dev/services/athena/ "Simulated Amazon Athena docs")
|
|
26
|
+
- [AWS Backup](https://yulinsim.dev/services/backup/ "Simulated AWS Backup docs")
|
|
26
27
|
- [Bedrock](https://yulinsim.dev/services/bedrock/ "Simulated Amazon Bedrock docs")
|
|
27
28
|
- [CloudFormation](https://yulinsim.dev/services/cloudformation/ "Simulated CloudFormation docs")
|
|
28
29
|
- [CloudFront](https://yulinsim.dev/services/cloudfront/ "Simulated CloudFront docs")
|
|
@@ -28,6 +28,10 @@ const scopedRouters = new Map([
|
|
|
28
28
|
"Bedrock Runtime",
|
|
29
29
|
(scoped) => scoped.bedrock().sdkCommandRouter(),
|
|
30
30
|
],
|
|
31
|
+
[
|
|
32
|
+
"Backup",
|
|
33
|
+
(scoped) => scoped.backup().sdkCommandRouter(),
|
|
34
|
+
],
|
|
31
35
|
[
|
|
32
36
|
"CloudFormation",
|
|
33
37
|
(scoped) => scoped.cloudFormation().sdkCommandRouter(),
|
|
@@ -110,6 +110,9 @@ export class SimAwsAccountRegionServiceBuilder {
|
|
|
110
110
|
// A web ACL protecting a pool is in the same Account and Region as the
|
|
111
111
|
// pool, as it is on AWS, so this scope's own WAFv2 is the one to ask.
|
|
112
112
|
webAcls: scope.wafV2().protection(),
|
|
113
|
+
// A pool's AWS/Cognito metrics belong to the Account and Region it is
|
|
114
|
+
// in, the way every metric does.
|
|
115
|
+
metrics: scope.cloudWatch().serviceWriter(),
|
|
113
116
|
});
|
|
114
117
|
}
|
|
115
118
|
/** Create simulated ECS for an Account Region scope. */
|
|
@@ -7,6 +7,7 @@ import { SimS3LambdaCodeStore } from "../../lambda/function/code/store/sim-s3-la
|
|
|
7
7
|
import { SimSdkLambdaVmModuleProvider } from "../../lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js";
|
|
8
8
|
import type { SimLambdaOutboundHttp } from "../../lambda/function/outbound/sim-lambda-outbound-http.js";
|
|
9
9
|
import type { SimLambdaUrlRegistry } from "../../lambda/registry/sim-lambda-url-registry.js";
|
|
10
|
+
import type { SimCloudWatchServiceWriter } from "../../cloudwatch/write/sim-cloudwatch-service-writer.js";
|
|
10
11
|
import type { SimLogsServiceWriter } from "../../logs/write/sim-logs-service-writer.js";
|
|
11
12
|
import type { SimAwsScopedServiceRegistries } from "./sim-aws-scoped-service-registries.js";
|
|
12
13
|
import type { SimAwsAccountRegionContainer } from "../sim-aws-account-region-scope.js";
|
|
@@ -31,6 +32,7 @@ interface SimAwsLambdaCollaborators {
|
|
|
31
32
|
readonly vmSdkModuleProvider: SimSdkLambdaVmModuleProvider;
|
|
32
33
|
readonly outboundHttp: SimLambdaOutboundHttp;
|
|
33
34
|
readonly logs: SimLogsServiceWriter;
|
|
35
|
+
readonly metrics: SimCloudWatchServiceWriter;
|
|
34
36
|
readonly destinations: SimAwsLambdaDestinations;
|
|
35
37
|
}
|
|
36
38
|
/**
|
|
@@ -48,6 +48,9 @@ export function simAwsLambdaCollaborators(properties) {
|
|
|
48
48
|
runAsOwner: simAws,
|
|
49
49
|
destinations: new SimAwsLambdaDestinations({ simAws }),
|
|
50
50
|
logs: scope.logs().serviceWriter(),
|
|
51
|
+
// A function's AWS/Lambda metrics belong to the Account and Region it is
|
|
52
|
+
// in, which real Lambda gives no way to point elsewhere.
|
|
53
|
+
metrics: scope.cloudWatch().serviceWriter(),
|
|
51
54
|
urlRegistry: properties.urlRegistry,
|
|
52
55
|
codeStore: new SimS3LambdaCodeStore({ s3: scope.s3() }),
|
|
53
56
|
containerImages: new SimEcrLambdaContainerImages({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SimLogsDeliverySourceResources } from "../../logs/delivery/sim-logs-delivery-source-resources.js";
|
|
2
|
+
import type { SimLogsMetricPublications } from "../../logs/metric/sim-logs-metric-publications.js";
|
|
2
3
|
import type { SimLogsSubscriptionDestinations } from "../../logs/subscription/sim-logs-subscription-destinations.js";
|
|
3
4
|
import type { SimAwsAccountRegionScope } from "../sim-aws-account-region-scope.js";
|
|
4
5
|
import type { SimAws } from "../sim-aws.js";
|
|
@@ -8,6 +9,7 @@ import type { SimAws } from "../sim-aws.js";
|
|
|
8
9
|
interface SimAwsLogsCollaborators {
|
|
9
10
|
readonly subscriptionDestinations: SimLogsSubscriptionDestinations;
|
|
10
11
|
readonly deliverySourceResources: SimLogsDeliverySourceResources;
|
|
12
|
+
readonly metricPublications: SimLogsMetricPublications;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* Build the collaborators simulated CloudWatch Logs takes beyond the scoped
|
|
@@ -23,6 +25,11 @@ interface SimAwsLogsCollaborators {
|
|
|
23
25
|
* A delivery source names the resource its logs come from by ARN. CloudFront
|
|
24
26
|
* is the one delivered service whose resources are resolved, and its resolver
|
|
25
27
|
* takes the same scope to read the account segment of that ARN against.
|
|
28
|
+
*
|
|
29
|
+
* A metric filter publishes into the CloudWatch of the log group's own Account
|
|
30
|
+
* and Region, which real CloudWatch Logs gives no way to point elsewhere. The
|
|
31
|
+
* CloudWatch is reached when a datapoint is published rather than now, for the
|
|
32
|
+
* reason the destination function is.
|
|
26
33
|
*/
|
|
27
34
|
export declare function simAwsLogsCollaborators(simAws: SimAws, accountRegionScope: SimAwsAccountRegionScope): SimAwsLogsCollaborators;
|
|
28
35
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SimAwsLogsDeliveryDistributions } from "../../logs/delivery/cloudfront/sim-aws-logs-delivery-distributions.js";
|
|
2
|
+
import { SimAwsLogsMetricFilterMetrics } from "../../logs/metric/cloudwatch/sim-aws-logs-metric-filter-metrics.js";
|
|
2
3
|
import { SimAwsLogsSubscriptionFunctions } from "../../logs/subscription/lambda/sim-aws-logs-subscription-functions.js";
|
|
3
4
|
/**
|
|
4
5
|
* Build the collaborators simulated CloudWatch Logs takes beyond the scoped
|
|
@@ -14,6 +15,11 @@ import { SimAwsLogsSubscriptionFunctions } from "../../logs/subscription/lambda/
|
|
|
14
15
|
* A delivery source names the resource its logs come from by ARN. CloudFront
|
|
15
16
|
* is the one delivered service whose resources are resolved, and its resolver
|
|
16
17
|
* takes the same scope to read the account segment of that ARN against.
|
|
18
|
+
*
|
|
19
|
+
* A metric filter publishes into the CloudWatch of the log group's own Account
|
|
20
|
+
* and Region, which real CloudWatch Logs gives no way to point elsewhere. The
|
|
21
|
+
* CloudWatch is reached when a datapoint is published rather than now, for the
|
|
22
|
+
* reason the destination function is.
|
|
17
23
|
*/
|
|
18
24
|
export function simAwsLogsCollaborators(simAws, accountRegionScope) {
|
|
19
25
|
return {
|
|
@@ -25,5 +31,9 @@ export function simAwsLogsCollaborators(simAws, accountRegionScope) {
|
|
|
25
31
|
simAws,
|
|
26
32
|
accountRegionScope,
|
|
27
33
|
}),
|
|
34
|
+
metricPublications: new SimAwsLogsMetricFilterMetrics({
|
|
35
|
+
simAws,
|
|
36
|
+
accountRegionScope,
|
|
37
|
+
}),
|
|
28
38
|
};
|
|
29
39
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SimAwsAccountRegionContainer } from "../sim-aws-account-region-scope.js";
|
|
2
2
|
import { SimAthena } from "../../athena/index.js";
|
|
3
3
|
import { SimBedrock } from "../../bedrock/index.js";
|
|
4
|
+
import { SimBackup } from "../../backup/index.js";
|
|
4
5
|
import { SimDynamoDb as SimDynamoDatabase } from "../../dynamodb/index.js";
|
|
5
6
|
import { SimFirehose } from "../../firehose/index.js";
|
|
6
7
|
import { SimGlue } from "../../glue/index.js";
|
|
@@ -47,6 +48,8 @@ export declare class SimAwsSelfContainedServiceBuilder {
|
|
|
47
48
|
* real Bedrock endpoint answers for the Region it belongs to.
|
|
48
49
|
*/
|
|
49
50
|
createBedrock(scope: SimAwsAccountRegionContainer): SimBedrock;
|
|
51
|
+
/** Create simulated AWS Backup for an Account Region scope. */
|
|
52
|
+
createBackup(scope: SimAwsAccountRegionContainer): SimBackup;
|
|
50
53
|
/** Create simulated DynamoDB for an Account Region scope. */
|
|
51
54
|
createDynamoDb(scope: SimAwsAccountRegionContainer): SimDynamoDatabase;
|
|
52
55
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SimAthena } from "../../athena/index.js";
|
|
2
2
|
import { SimBedrock } from "../../bedrock/index.js";
|
|
3
|
+
import { SimBackup } from "../../backup/index.js";
|
|
3
4
|
import { SimDynamoDb as SimDynamoDatabase } from "../../dynamodb/index.js";
|
|
4
5
|
import { SimFirehose } from "../../firehose/index.js";
|
|
5
6
|
import { SimGlue } from "../../glue/index.js";
|
|
@@ -52,6 +53,10 @@ export class SimAwsSelfContainedServiceBuilder {
|
|
|
52
53
|
createBedrock(scope) {
|
|
53
54
|
return new SimBedrock(this.scoped(scope));
|
|
54
55
|
}
|
|
56
|
+
/** Create simulated AWS Backup for an Account Region scope. */
|
|
57
|
+
createBackup(scope) {
|
|
58
|
+
return new SimBackup(this.scoped(scope));
|
|
59
|
+
}
|
|
55
60
|
/** Create simulated DynamoDB for an Account Region scope. */
|
|
56
61
|
createDynamoDb(scope) {
|
|
57
62
|
return new SimDynamoDatabase(this.scoped(scope));
|
|
@@ -15,6 +15,7 @@ import type { SimEcr } from "../../ecr/index.js";
|
|
|
15
15
|
import type { SimEcs } from "../../ecs/index.js";
|
|
16
16
|
import type { SimAthena } from "../../athena/index.js";
|
|
17
17
|
import type { SimBedrock } from "../../bedrock/index.js";
|
|
18
|
+
import type { SimBackup } from "../../backup/index.js";
|
|
18
19
|
import type { SimPersonalize } from "../../personalize/index.js";
|
|
19
20
|
import type { SimRekognition } from "../../rekognition/index.js";
|
|
20
21
|
import type { SimRoute53 } from "../../route53/index.js";
|
|
@@ -170,6 +171,8 @@ export declare class SimAwsServiceFactory {
|
|
|
170
171
|
createAthena(scope: SimAwsAccountRegionContainer): SimAthena;
|
|
171
172
|
/** Create simulated Bedrock for an Account Region scope. */
|
|
172
173
|
createBedrock(scope: SimAwsAccountRegionContainer): SimBedrock;
|
|
174
|
+
/** Create simulated AWS Backup for an Account Region scope. */
|
|
175
|
+
createBackup(scope: SimAwsAccountRegionContainer): SimBackup;
|
|
173
176
|
/** Create simulated Personalize for an Account Region scope. */
|
|
174
177
|
createPersonalize(scope: SimAwsAccountRegionContainer): SimPersonalize;
|
|
175
178
|
/** Create simulated Rekognition for an Account Region scope. */
|
|
@@ -220,6 +220,10 @@ export class SimAwsServiceFactory {
|
|
|
220
220
|
createBedrock(scope) {
|
|
221
221
|
return this.selfContainedServices.createBedrock(scope);
|
|
222
222
|
}
|
|
223
|
+
/** Create simulated AWS Backup for an Account Region scope. */
|
|
224
|
+
createBackup(scope) {
|
|
225
|
+
return this.selfContainedServices.createBackup(scope);
|
|
226
|
+
}
|
|
223
227
|
/** Create simulated Personalize for an Account Region scope. */
|
|
224
228
|
createPersonalize(scope) {
|
|
225
229
|
return this.accountRegionServices.createPersonalize(scope);
|
|
@@ -3,6 +3,7 @@ import type { AwsRegionName, SimAwsRegion } from "./sim-aws-region.js";
|
|
|
3
3
|
import { SimAws } from "./sim-aws.js";
|
|
4
4
|
import type { SimAthena } from "../athena/index.js";
|
|
5
5
|
import type { SimBedrock } from "../bedrock/index.js";
|
|
6
|
+
import type { SimBackup } from "../backup/index.js";
|
|
6
7
|
import type { SimS3 } from "../s3/sim-s3.js";
|
|
7
8
|
import type { SimScheduler } from "../scheduler/index.js";
|
|
8
9
|
import type { SimCloudFront } from "../cloudfront/sim-cloudfront.js";
|
|
@@ -59,6 +60,8 @@ export declare class SimAwsAccountRegionContainer {
|
|
|
59
60
|
athena(): SimAthena;
|
|
60
61
|
/** Get simulated Bedrock for this account and region. */
|
|
61
62
|
bedrock(): SimBedrock;
|
|
63
|
+
/** Get simulated AWS Backup for this account and region. */
|
|
64
|
+
backup(): SimBackup;
|
|
62
65
|
/** Get simulated API Gateway REST APIs for this account and region. */
|
|
63
66
|
apiGateway(): SimApiGateway;
|
|
64
67
|
/** Get simulated API Gateway v2 for this account and region. */
|
|
@@ -37,6 +37,10 @@ export class SimAwsAccountRegionContainer {
|
|
|
37
37
|
bedrock() {
|
|
38
38
|
return this.memo.getOrCreate("bedrock", () => this.factory.createBedrock(this));
|
|
39
39
|
}
|
|
40
|
+
/** Get simulated AWS Backup for this account and region. */
|
|
41
|
+
backup() {
|
|
42
|
+
return this.memo.getOrCreate("backup", () => this.factory.createBackup(this));
|
|
43
|
+
}
|
|
40
44
|
/** Get simulated API Gateway REST APIs for this account and region. */
|
|
41
45
|
apiGateway() {
|
|
42
46
|
return this.memo.getOrCreate("apiGateway", () => this.factory.createApiGateway(this));
|
|
@@ -16,6 +16,7 @@ import type { SimKms } from "../kms/index.js";
|
|
|
16
16
|
import type { SimLambda } from "../lambda/index.js";
|
|
17
17
|
import type { SimAwsPrincipal } from "./caller/sim-aws-caller.js";
|
|
18
18
|
import type { SimSts } from "../sts/sim-sts.js";
|
|
19
|
+
import type { SimBackup } from "../backup/index.js";
|
|
19
20
|
export { isSimAwsAccountId, makeSimAwsAccountId, type SimAwsAccountId, simAwsAccountId, SimInvalidAwsAccountId, } from "./sim-aws-account-id.js";
|
|
20
21
|
/**
|
|
21
22
|
* The AWS Account a simulated AWS uses when it is not told which one.
|
|
@@ -47,6 +48,8 @@ export declare class SimAwsAccount {
|
|
|
47
48
|
* Get simulated ACM for this Account's default Region.
|
|
48
49
|
*/
|
|
49
50
|
acm(): SimAcm;
|
|
51
|
+
/** Get simulated AWS Backup for this Account's default Region. */
|
|
52
|
+
backup(): SimBackup;
|
|
50
53
|
/**
|
|
51
54
|
* Get simulated CloudFormation for this Account's default Region.
|
|
52
55
|
*/
|
|
@@ -41,6 +41,10 @@ export class SimAwsAccount {
|
|
|
41
41
|
acm() {
|
|
42
42
|
return this.region().acm();
|
|
43
43
|
}
|
|
44
|
+
/** Get simulated AWS Backup for this Account's default Region. */
|
|
45
|
+
backup() {
|
|
46
|
+
return this.region().backup();
|
|
47
|
+
}
|
|
44
48
|
/**
|
|
45
49
|
* Get simulated CloudFormation for this Account's default Region.
|
|
46
50
|
*/
|
|
@@ -12,6 +12,7 @@ import type { SimKinesis } from "../kinesis/index.js";
|
|
|
12
12
|
import type { SimKms } from "../kms/index.js";
|
|
13
13
|
import type { SimLambda } from "../lambda/index.js";
|
|
14
14
|
import type { SimRoute53 } from "../route53/index.js";
|
|
15
|
+
import type { SimBackup } from "../backup/index.js";
|
|
15
16
|
export declare const AWS_REGION_NAMES: readonly ["us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-2", "ap-southeast-3", "ap-southeast-5", "ap-southeast-4", "ap-south-1", "ap-southeast-6", "ap-northeast-3", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-east-2", "ap-southeast-7", "ap-northeast-1", "ca-central-1", "ca-west-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-south-1", "eu-west-3", "eu-south-2", "eu-north-1", "eu-central-2", "il-central-1", "mx-central-1", "me-south-1", "me-central-1", "sa-east-1"];
|
|
16
17
|
export declare const AwsRegion: {
|
|
17
18
|
readonly UsEast1: "us-east-1";
|
|
@@ -73,6 +74,8 @@ export declare class SimAwsRegion {
|
|
|
73
74
|
* Get simulated ACM for this Region's default Account.
|
|
74
75
|
*/
|
|
75
76
|
acm(): SimAcm;
|
|
77
|
+
/** Get simulated AWS Backup for this Region's default Account. */
|
|
78
|
+
backup(): SimBackup;
|
|
76
79
|
/**
|
|
77
80
|
* Get simulated CloudFormation for this Region's default Account.
|
|
78
81
|
*/
|
|
@@ -99,6 +99,10 @@ export class SimAwsRegion {
|
|
|
99
99
|
acm() {
|
|
100
100
|
return this.account().acm();
|
|
101
101
|
}
|
|
102
|
+
/** Get simulated AWS Backup for this Region's default Account. */
|
|
103
|
+
backup() {
|
|
104
|
+
return this.account().backup();
|
|
105
|
+
}
|
|
102
106
|
/**
|
|
103
107
|
* Get simulated CloudFormation for this Region's default Account.
|
|
104
108
|
*/
|
|
@@ -2,6 +2,7 @@ import type { SimAwsAccountRegionContainer } from "./sim-aws-account-region-scop
|
|
|
2
2
|
import type { SimAcm } from "../acm/sim-acm.js";
|
|
3
3
|
import type { SimAthena } from "../athena/index.js";
|
|
4
4
|
import type { SimBedrock } from "../bedrock/index.js";
|
|
5
|
+
import type { SimBackup } from "../backup/index.js";
|
|
5
6
|
import type { SimApiGateway } from "../apigateway/index.js";
|
|
6
7
|
import type { SimApiGatewayV2 } from "../apigatewayv2/index.js";
|
|
7
8
|
import type { SimCloudFormation } from "../cloudformation/index.js";
|
|
@@ -57,6 +58,8 @@ export declare abstract class SimAwsServiceAccessors {
|
|
|
57
58
|
athena(): SimAthena;
|
|
58
59
|
/** Get simulated Bedrock in the default Account Region scope. */
|
|
59
60
|
bedrock(): SimBedrock;
|
|
61
|
+
/** Get simulated AWS Backup in the default Account Region scope. */
|
|
62
|
+
backup(): SimBackup;
|
|
60
63
|
/** Get simulated CloudFormation in the default Account Region scope. */
|
|
61
64
|
cloudFormation(): SimCloudFormation;
|
|
62
65
|
/** Get simulated CloudFront in the default Account scope. */
|
|
@@ -27,6 +27,10 @@ export class SimAwsServiceAccessors {
|
|
|
27
27
|
bedrock() {
|
|
28
28
|
return this.defaultAccountRegionScope().bedrock();
|
|
29
29
|
}
|
|
30
|
+
/** Get simulated AWS Backup in the default Account Region scope. */
|
|
31
|
+
backup() {
|
|
32
|
+
return this.defaultAccountRegionScope().backup();
|
|
33
|
+
}
|
|
30
34
|
/** Get simulated CloudFormation in the default Account Region scope. */
|
|
31
35
|
cloudFormation() {
|
|
32
36
|
return this.defaultAccountRegionScope().cloudFormation();
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SimCfnResource, SimCloudFormationResourceCreateContext } from "../../cloudformation/resource/sim-cfn-resource.js";
|
|
2
|
+
import type { SimBackupPlan } from "../plan/sim-backup-plan.js";
|
|
3
|
+
import type { SimBackup } from "../sim-backup.js";
|
|
4
|
+
import type { SimCfnBackupProperties } from "./sim-cfn-backup-properties.js";
|
|
5
|
+
/** Creates a simulated backup plan for CloudFormation. */
|
|
6
|
+
export declare function createSimBackupPlan(backup: SimBackup, resource: SimCfnResource, properties: SimCfnBackupProperties, context: SimCloudFormationResourceCreateContext): Promise<SimBackupPlan>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { assertDefined } from "../../../util/type-guard/defined.js";
|
|
2
|
+
import { simCfnResourceCallerOptions } from "../../cloudformation/resource/caller/sim-cfn-resource-caller-options.js";
|
|
3
|
+
import { backupPlanResourceType, simCfnBackupResourceCreation, } from "./sim-cfn-backup-resource-error.js";
|
|
4
|
+
/** Creates a simulated backup plan for CloudFormation. */
|
|
5
|
+
export async function createSimBackupPlan(backup, resource, properties, context) {
|
|
6
|
+
return await simCfnBackupResourceCreation(backupPlanResourceType, resource.logicalId, async () => {
|
|
7
|
+
const created = await backup.createBackupPlan({ input: { BackupPlan: properties.backupPlan() } }, simCfnResourceCallerOptions(context.caller));
|
|
8
|
+
const plan = backup.findBackupPlan(String(created.BackupPlanId));
|
|
9
|
+
assertDefined(plan, "sim Backup plan after CloudFormation creation");
|
|
10
|
+
return plan;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SimCfnResource } from "../../cloudformation/resource/sim-cfn-resource.js";
|
|
2
|
+
import type { SimCloudFormationResourceDeleteContext } from "../../cloudformation/resource/sim-cfn-resource.type.js";
|
|
3
|
+
import type { SimBackup } from "../sim-backup.js";
|
|
4
|
+
/** Deletes AWS Backup resources during CloudFormation stack teardown. */
|
|
5
|
+
export declare class SimBackupCfnResourceDeleter {
|
|
6
|
+
private readonly backup;
|
|
7
|
+
constructor(backup: SimBackup);
|
|
8
|
+
delete(resourceTypeName: string, resource: SimCfnResource, context: SimCloudFormationResourceDeleteContext): Promise<void>;
|
|
9
|
+
private isVault;
|
|
10
|
+
private isPlan;
|
|
11
|
+
private isSelection;
|
|
12
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { simCfnResourceCallerOptions } from "../../cloudformation/resource/caller/sim-cfn-resource-caller-options.js";
|
|
2
|
+
/** Deletes AWS Backup resources during CloudFormation stack teardown. */
|
|
3
|
+
export class SimBackupCfnResourceDeleter {
|
|
4
|
+
backup;
|
|
5
|
+
constructor(backup) {
|
|
6
|
+
this.backup = backup;
|
|
7
|
+
}
|
|
8
|
+
async delete(resourceTypeName, resource, context) {
|
|
9
|
+
const simulated = resource.simResource;
|
|
10
|
+
if (resourceTypeName === "BackupVault" && this.isVault(simulated)) {
|
|
11
|
+
await this.backup.deleteBackupVault({ input: { BackupVaultName: simulated.name } }, simCfnResourceCallerOptions(context.caller));
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (resourceTypeName === "BackupPlan" && this.isPlan(simulated)) {
|
|
15
|
+
this.backup.removeBackupPlan(simulated.id);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
if (resourceTypeName === "BackupSelection" && this.isSelection(simulated)) {
|
|
19
|
+
this.backup.removeBackupSelection(simulated.id);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
isVault(value) {
|
|
23
|
+
return value !== undefined && "name" in value && "configureLock" in value;
|
|
24
|
+
}
|
|
25
|
+
isPlan(value) {
|
|
26
|
+
return value !== undefined && "versionId" in value && "rules" in value;
|
|
27
|
+
}
|
|
28
|
+
isSelection(value) {
|
|
29
|
+
return value !== undefined && "planId" in value && "iamRoleArn" in value;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SimCfnServiceResourceFactory } from "../../cloudformation/resource/factory/sim-cfn-resource-factory.type.js";
|
|
2
|
+
import type { SimCfnResource, SimCloudFormationResourceCreateContext } from "../../cloudformation/resource/sim-cfn-resource.js";
|
|
3
|
+
import type { SimCloudFormationResourceDeleteContext } from "../../cloudformation/resource/sim-cfn-resource.type.js";
|
|
4
|
+
import type { SimBackup } from "../sim-backup.js";
|
|
5
|
+
/** Creates and deletes the AWS Backup resource types supported by the simulation. */
|
|
6
|
+
export declare class SimBackupCfnResourceFactory implements SimCfnServiceResourceFactory {
|
|
7
|
+
private readonly properties;
|
|
8
|
+
private readonly deleter;
|
|
9
|
+
constructor(properties: {
|
|
10
|
+
readonly backup: SimBackup;
|
|
11
|
+
});
|
|
12
|
+
create(resourceTypeName: string, resource: SimCfnResource, context: SimCloudFormationResourceCreateContext): Promise<object>;
|
|
13
|
+
delete(resourceTypeName: string, resource: SimCfnResource, context: SimCloudFormationResourceDeleteContext): Promise<void>;
|
|
14
|
+
private read;
|
|
15
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createSimBackupPlan } from "./sim-backup-cfn-plan-creator.js";
|
|
2
|
+
import { SimBackupCfnResourceDeleter } from "./sim-backup-cfn-resource-deleter.js";
|
|
3
|
+
import { createSimBackupSelection } from "./sim-backup-cfn-selection-creator.js";
|
|
4
|
+
import { createSimBackupVault } from "./sim-backup-cfn-vault-creator.js";
|
|
5
|
+
import { SimCfnBackupProperties } from "./sim-cfn-backup-properties.js";
|
|
6
|
+
import { simCfnBackupResourceError } from "./sim-cfn-backup-resource-error.js";
|
|
7
|
+
/** Creates and deletes the AWS Backup resource types supported by the simulation. */
|
|
8
|
+
export class SimBackupCfnResourceFactory {
|
|
9
|
+
properties;
|
|
10
|
+
deleter;
|
|
11
|
+
constructor(properties) {
|
|
12
|
+
this.properties = properties;
|
|
13
|
+
this.deleter = new SimBackupCfnResourceDeleter(properties.backup);
|
|
14
|
+
}
|
|
15
|
+
async create(resourceTypeName, resource, context) {
|
|
16
|
+
const properties = this.read(resource, context.resolvedProperties ?? resource.properties);
|
|
17
|
+
switch (resourceTypeName) {
|
|
18
|
+
case "BackupVault": {
|
|
19
|
+
return await createSimBackupVault(this.properties.backup, resource, properties, context);
|
|
20
|
+
}
|
|
21
|
+
case "BackupPlan": {
|
|
22
|
+
return await createSimBackupPlan(this.properties.backup, resource, properties, context);
|
|
23
|
+
}
|
|
24
|
+
case "BackupSelection": {
|
|
25
|
+
return await createSimBackupSelection(this.properties.backup, resource, properties, context);
|
|
26
|
+
}
|
|
27
|
+
default: {
|
|
28
|
+
throw simCfnBackupResourceError(`AWS::Backup::${resourceTypeName}`, resource.logicalId, "the Resource type is not simulated");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
async delete(resourceTypeName, resource, context) {
|
|
33
|
+
await this.deleter.delete(resourceTypeName, resource, context);
|
|
34
|
+
}
|
|
35
|
+
read(resource, properties) {
|
|
36
|
+
return new SimCfnBackupProperties(resource, properties);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SimCfnResource, SimCloudFormationResourceCreateContext } from "../../cloudformation/resource/sim-cfn-resource.js";
|
|
2
|
+
import type { SimBackupSelection } from "../selection/sim-backup-selection.js";
|
|
3
|
+
import type { SimBackup } from "../sim-backup.js";
|
|
4
|
+
import type { SimCfnBackupProperties } from "./sim-cfn-backup-properties.js";
|
|
5
|
+
/** Creates a simulated backup selection for CloudFormation. */
|
|
6
|
+
export declare function createSimBackupSelection(backup: SimBackup, resource: SimCfnResource, properties: SimCfnBackupProperties, context: SimCloudFormationResourceCreateContext): Promise<SimBackupSelection>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { assertDefined } from "../../../util/type-guard/defined.js";
|
|
2
|
+
import { simCfnResourceCallerOptions } from "../../cloudformation/resource/caller/sim-cfn-resource-caller-options.js";
|
|
3
|
+
import { backupSelectionResourceType, simCfnBackupResourceCreation, } from "./sim-cfn-backup-resource-error.js";
|
|
4
|
+
/** Creates a simulated backup selection for CloudFormation. */
|
|
5
|
+
export async function createSimBackupSelection(backup, resource, properties, context) {
|
|
6
|
+
return await simCfnBackupResourceCreation(backupSelectionResourceType, resource.logicalId, async () => {
|
|
7
|
+
const created = await backup.createBackupSelection({
|
|
8
|
+
input: {
|
|
9
|
+
BackupPlanId: properties.backupPlanId(),
|
|
10
|
+
BackupSelection: properties.backupSelection(),
|
|
11
|
+
},
|
|
12
|
+
}, simCfnResourceCallerOptions(context.caller));
|
|
13
|
+
const selection = backup.findBackupSelection(String(created.SelectionId));
|
|
14
|
+
assertDefined(selection, "sim Backup selection after CloudFormation creation");
|
|
15
|
+
return selection;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SimCfnResource, SimCloudFormationResourceCreateContext } from "../../cloudformation/resource/sim-cfn-resource.js";
|
|
2
|
+
import type { SimBackup } from "../sim-backup.js";
|
|
3
|
+
import type { SimBackupVault } from "../vault/sim-backup-vault.js";
|
|
4
|
+
import type { SimCfnBackupProperties } from "./sim-cfn-backup-properties.js";
|
|
5
|
+
/** Creates a simulated backup vault for CloudFormation. */
|
|
6
|
+
export declare function createSimBackupVault(backup: SimBackup, resource: SimCfnResource, properties: SimCfnBackupProperties, context: SimCloudFormationResourceCreateContext): Promise<SimBackupVault>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { assertDefined } from "../../../util/type-guard/defined.js";
|
|
2
|
+
import { simCfnResourceCallerOptions } from "../../cloudformation/resource/caller/sim-cfn-resource-caller-options.js";
|
|
3
|
+
import { backupVaultResourceType, simCfnBackupResourceCreation, } from "./sim-cfn-backup-resource-error.js";
|
|
4
|
+
/** Creates a simulated backup vault for CloudFormation. */
|
|
5
|
+
export async function createSimBackupVault(backup, resource, properties, context) {
|
|
6
|
+
return await simCfnBackupResourceCreation(backupVaultResourceType, resource.logicalId, async () => {
|
|
7
|
+
const name = properties.vaultName();
|
|
8
|
+
const options = simCfnResourceCallerOptions(context.caller);
|
|
9
|
+
await backup.createBackupVault({
|
|
10
|
+
input: {
|
|
11
|
+
BackupVaultName: name,
|
|
12
|
+
EncryptionKeyArn: properties.encryptionKeyArn(),
|
|
13
|
+
},
|
|
14
|
+
}, options);
|
|
15
|
+
const lock = properties.vaultLockConfiguration();
|
|
16
|
+
if (lock !== undefined) {
|
|
17
|
+
try {
|
|
18
|
+
await backup.putBackupVaultLockConfiguration({ input: { BackupVaultName: name, ...lock } }, options);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
backup.removeBackupVault(name);
|
|
22
|
+
throw error;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const vault = backup.findBackupVault(name);
|
|
26
|
+
assertDefined(vault, `sim Backup vault ${name} after CloudFormation creation`);
|
|
27
|
+
return vault;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SimCfnResource } from "../../cloudformation/resource/sim-cfn-resource.js";
|
|
2
|
+
import type { SimCfnTemplateValueRecord } from "../../cloudformation/template/value/sim-cfn-template-value.js";
|
|
3
|
+
import type { SimBackupPlanInput } from "../command/sim-backup-command.types.js";
|
|
4
|
+
import { SimCfnBackupPropertyReader } from "./sim-cfn-backup-property-reader.js";
|
|
5
|
+
/** Reads a backup plan and its nested rules from CloudFormation properties. */
|
|
6
|
+
export declare class SimCfnBackupPlanProperties extends SimCfnBackupPropertyReader {
|
|
7
|
+
private readonly plan;
|
|
8
|
+
constructor(resource: SimCfnResource, plan: SimCfnTemplateValueRecord);
|
|
9
|
+
read(): SimBackupPlanInput;
|
|
10
|
+
private backupRule;
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { SimCfnBackupPropertyReader } from "./sim-cfn-backup-property-reader.js";
|
|
2
|
+
/** Reads a backup plan and its nested rules from CloudFormation properties. */
|
|
3
|
+
export class SimCfnBackupPlanProperties extends SimCfnBackupPropertyReader {
|
|
4
|
+
plan;
|
|
5
|
+
constructor(resource, plan) {
|
|
6
|
+
super(resource, plan);
|
|
7
|
+
this.plan = plan;
|
|
8
|
+
}
|
|
9
|
+
read() {
|
|
10
|
+
const rules = this.recordValue(this.plan, "BackupPlanRule");
|
|
11
|
+
if (!Array.isArray(rules)) {
|
|
12
|
+
throw this.error("BackupPlan.BackupPlanRule must be an array");
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
BackupPlanName: this.requiredRecordString(this.plan, "BackupPlanName"),
|
|
16
|
+
Rules: rules.map((rule, index) => this.backupRule(rule, index)),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
backupRule(value, index) {
|
|
20
|
+
const rule = this.record(value, `BackupPlanRule[${String(index)}]`);
|
|
21
|
+
const lifecycleValue = this.recordValue(rule, "Lifecycle");
|
|
22
|
+
const lifecycle = lifecycleValue === undefined
|
|
23
|
+
? undefined
|
|
24
|
+
: this.record(lifecycleValue, "Lifecycle");
|
|
25
|
+
return {
|
|
26
|
+
RuleName: this.requiredRecordString(rule, "RuleName"),
|
|
27
|
+
TargetBackupVaultName: this.requiredRecordString(rule, "TargetBackupVault"),
|
|
28
|
+
ScheduleExpression: this.optionalString(this.recordValue(rule, "ScheduleExpression"), "ScheduleExpression"),
|
|
29
|
+
Lifecycle: lifecycle === undefined
|
|
30
|
+
? undefined
|
|
31
|
+
: {
|
|
32
|
+
DeleteAfterDays: this.optionalNumber(this.recordValue(lifecycle, "DeleteAfterDays"), "DeleteAfterDays"),
|
|
33
|
+
MoveToColdStorageAfterDays: this.optionalNumber(this.recordValue(lifecycle, "MoveToColdStorageAfterDays"), "MoveToColdStorageAfterDays"),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SimBackupPlanInput, SimBackupSelectionInput } from "../command/sim-backup-command.types.js";
|
|
2
|
+
import type { SimBackupVaultLockConfiguration } from "../vault/sim-backup-vault.js";
|
|
3
|
+
import { SimCfnBackupPropertyReader } from "./sim-cfn-backup-property-reader.js";
|
|
4
|
+
/** Reads the CloudFormation properties supported by simulated AWS Backup. */
|
|
5
|
+
export declare class SimCfnBackupProperties extends SimCfnBackupPropertyReader {
|
|
6
|
+
vaultName(): string;
|
|
7
|
+
encryptionKeyArn(): string | undefined;
|
|
8
|
+
vaultLockConfiguration(): SimBackupVaultLockConfiguration | undefined;
|
|
9
|
+
backupPlan(): SimBackupPlanInput;
|
|
10
|
+
backupPlanId(): string;
|
|
11
|
+
backupSelection(): SimBackupSelectionInput;
|
|
12
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { SimCfnBackupPlanProperties } from "./sim-cfn-backup-plan-properties.js";
|
|
2
|
+
import { SimCfnBackupPropertyReader } from "./sim-cfn-backup-property-reader.js";
|
|
3
|
+
/** Reads the CloudFormation properties supported by simulated AWS Backup. */
|
|
4
|
+
export class SimCfnBackupProperties extends SimCfnBackupPropertyReader {
|
|
5
|
+
vaultName() {
|
|
6
|
+
return this.requiredString("BackupVaultName");
|
|
7
|
+
}
|
|
8
|
+
encryptionKeyArn() {
|
|
9
|
+
return this.string("EncryptionKeyArn");
|
|
10
|
+
}
|
|
11
|
+
vaultLockConfiguration() {
|
|
12
|
+
const value = this.values.get("LockConfiguration");
|
|
13
|
+
if (value === undefined)
|
|
14
|
+
return undefined;
|
|
15
|
+
const lock = this.record(value, "LockConfiguration");
|
|
16
|
+
return {
|
|
17
|
+
MinRetentionDays: this.optionalNumber(lock["MinRetentionDays"], "MinRetentionDays"),
|
|
18
|
+
MaxRetentionDays: this.optionalNumber(lock["MaxRetentionDays"], "MaxRetentionDays"),
|
|
19
|
+
ChangeableForDays: this.optionalNumber(lock["ChangeableForDays"], "ChangeableForDays"),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
backupPlan() {
|
|
23
|
+
const plan = this.record(this.values.get("BackupPlan"), "BackupPlan");
|
|
24
|
+
return new SimCfnBackupPlanProperties(this.resource, plan).read();
|
|
25
|
+
}
|
|
26
|
+
backupPlanId() {
|
|
27
|
+
return this.requiredString("BackupPlanId");
|
|
28
|
+
}
|
|
29
|
+
backupSelection() {
|
|
30
|
+
const selection = this.record(this.values.get("BackupSelection"), "BackupSelection");
|
|
31
|
+
return {
|
|
32
|
+
SelectionName: this.requiredRecordString(selection, "SelectionName"),
|
|
33
|
+
IamRoleArn: this.requiredRecordString(selection, "IamRoleArn"),
|
|
34
|
+
Resources: this.stringArray(this.recordValue(selection, "Resources"), "Resources"),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SimCfnResource } from "../../cloudformation/resource/sim-cfn-resource.js";
|
|
2
|
+
import type { SimCfnTemplateValue, SimCfnTemplateValueRecord } from "../../cloudformation/template/value/sim-cfn-template-value.js";
|
|
3
|
+
/** Provides typed access to AWS Backup CloudFormation properties. */
|
|
4
|
+
export declare class SimCfnBackupPropertyReader {
|
|
5
|
+
protected readonly resource: SimCfnResource;
|
|
6
|
+
protected readonly values: ReadonlyMap<string, SimCfnTemplateValue>;
|
|
7
|
+
constructor(resource: SimCfnResource, properties: SimCfnTemplateValueRecord);
|
|
8
|
+
protected requiredString(name: string): string;
|
|
9
|
+
protected string(name: string): string | undefined;
|
|
10
|
+
protected optionalString(value: SimCfnTemplateValue | undefined, name: string): string | undefined;
|
|
11
|
+
protected requiredRecordString(record: SimCfnTemplateValueRecord, name: string): string;
|
|
12
|
+
protected optionalNumber(value: SimCfnTemplateValue | undefined, name: string): number | undefined;
|
|
13
|
+
protected stringArray(value: SimCfnTemplateValue | undefined, name: string): readonly string[] | undefined;
|
|
14
|
+
protected record(value: SimCfnTemplateValue | undefined, name: string): SimCfnTemplateValueRecord;
|
|
15
|
+
protected recordValue(record: SimCfnTemplateValueRecord, name: string): SimCfnTemplateValue | undefined;
|
|
16
|
+
protected error(reason: string): Error;
|
|
17
|
+
}
|