@kensio/yulin 1.15.1 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/sdk/error/sim-sdk.error.d.ts +10 -0
- package/dist/sdk/error/sim-sdk.error.d.ts.map +1 -1
- package/dist/sdk/error/sim-sdk.error.js +10 -0
- package/dist/sdk/error/sim-sdk.error.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/router/resolve-sim-sdk-command-router.d.ts.map +1 -1
- package/dist/sdk/router/resolve-sim-sdk-command-router.js +5 -0
- package/dist/sdk/router/resolve-sim-sdk-command-router.js.map +1 -1
- package/dist/sdk/wire/sim-sdk-wire-command.d.ts +20 -0
- package/dist/sdk/wire/sim-sdk-wire-command.d.ts.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-command.js +31 -0
- package/dist/sdk/wire/sim-sdk-wire-command.js.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-dispatcher.d.ts +42 -0
- package/dist/sdk/wire/sim-sdk-wire-dispatcher.d.ts.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-dispatcher.js +63 -0
- package/dist/sdk/wire/sim-sdk-wire-dispatcher.js.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-json.d.ts +26 -0
- package/dist/sdk/wire/sim-sdk-wire-json.d.ts.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-json.js +59 -0
- package/dist/sdk/wire/sim-sdk-wire-json.js.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-operation.d.ts +37 -0
- package/dist/sdk/wire/sim-sdk-wire-operation.d.ts.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-operation.js +79 -0
- package/dist/sdk/wire/sim-sdk-wire-operation.js.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-response.d.ts +17 -0
- package/dist/sdk/wire/sim-sdk-wire-response.d.ts.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-response.js +67 -0
- package/dist/sdk/wire/sim-sdk-wire-response.js.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-unbridged.d.ts +17 -0
- package/dist/sdk/wire/sim-sdk-wire-unbridged.d.ts.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-unbridged.js +25 -0
- package/dist/sdk/wire/sim-sdk-wire-unbridged.js.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire.types.d.ts +32 -0
- package/dist/sdk/wire/sim-sdk-wire.types.d.ts.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire.types.js +2 -0
- package/dist/sdk/wire/sim-sdk-wire.types.js.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-endpoint-style.d.ts +33 -0
- package/dist/serve/payload-2/sim-payload-2-endpoint-style.d.ts.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-endpoint-style.js +2 -0
- package/dist/serve/payload-2/sim-payload-2-endpoint-style.js.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-event-builder.d.ts.map +1 -1
- package/dist/serve/payload-2/sim-payload-2-event-builder.js +2 -2
- package/dist/serve/payload-2/sim-payload-2-event-builder.js.map +1 -1
- package/dist/serve/payload-2/sim-payload-2-event-query.d.ts +12 -0
- package/dist/serve/payload-2/sim-payload-2-event-query.d.ts.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-event-query.js +15 -0
- package/dist/serve/payload-2/sim-payload-2-event-query.js.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-event-request.d.ts +32 -0
- package/dist/serve/payload-2/sim-payload-2-event-request.d.ts.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-event-request.js +42 -0
- package/dist/serve/payload-2/sim-payload-2-event-request.js.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-event.factory.d.ts +15 -0
- package/dist/serve/payload-2/sim-payload-2-event.factory.d.ts.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-event.factory.js +71 -0
- package/dist/serve/payload-2/sim-payload-2-event.factory.js.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-request-parts.d.ts +23 -12
- package/dist/serve/payload-2/sim-payload-2-request-parts.d.ts.map +1 -1
- package/dist/serve/payload-2/sim-payload-2-request-parts.js +38 -26
- package/dist/serve/payload-2/sim-payload-2-request-parts.js.map +1 -1
- package/dist/service/apigatewayv2/factory/http-api-proxy-event.factory.d.ts +35 -0
- package/dist/service/apigatewayv2/factory/http-api-proxy-event.factory.d.ts.map +1 -0
- package/dist/service/apigatewayv2/factory/http-api-proxy-event.factory.js +65 -0
- package/dist/service/apigatewayv2/factory/http-api-proxy-event.factory.js.map +1 -0
- package/dist/service/apigatewayv2/index.d.ts +1 -0
- package/dist/service/apigatewayv2/index.d.ts.map +1 -1
- package/dist/service/apigatewayv2/index.js +1 -0
- package/dist/service/apigatewayv2/index.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts +10 -36
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +16 -63
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-cloudwatch-collaborators.d.ts +22 -0
- package/dist/service/aws/factory/sim-aws-cloudwatch-collaborators.d.ts.map +1 -0
- package/dist/service/aws/factory/sim-aws-cloudwatch-collaborators.js +20 -0
- package/dist/service/aws/factory/sim-aws-cloudwatch-collaborators.js.map +1 -0
- package/dist/service/aws/factory/sim-aws-registered-service-builder.d.ts +71 -0
- package/dist/service/aws/factory/sim-aws-registered-service-builder.d.ts.map +1 -0
- package/dist/service/aws/factory/sim-aws-registered-service-builder.js +96 -0
- package/dist/service/aws/factory/sim-aws-registered-service-builder.js.map +1 -0
- package/dist/service/aws/factory/sim-aws-self-contained-service-builder.d.ts +9 -0
- package/dist/service/aws/factory/sim-aws-self-contained-service-builder.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-self-contained-service-builder.js +11 -0
- package/dist/service/aws/factory/sim-aws-self-contained-service-builder.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-service-factory.d.ts +7 -0
- package/dist/service/aws/factory/sim-aws-service-factory.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-service-factory.js +19 -5
- package/dist/service/aws/factory/sim-aws-service-factory.js.map +1 -1
- package/dist/service/aws/sim-aws-account-region-scope.d.ts +6 -0
- package/dist/service/aws/sim-aws-account-region-scope.d.ts.map +1 -1
- package/dist/service/aws/sim-aws-account-region-scope.js +8 -0
- package/dist/service/aws/sim-aws-account-region-scope.js.map +1 -1
- package/dist/service/aws/sim-aws-service-accessors.d.ts +6 -0
- package/dist/service/aws/sim-aws-service-accessors.d.ts.map +1 -1
- package/dist/service/aws/sim-aws-service-accessors.js +8 -0
- package/dist/service/aws/sim-aws-service-accessors.js.map +1 -1
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-alarm-cfn.d.ts +26 -0
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-alarm-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-alarm-cfn.js +28 -0
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-alarm-cfn.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-cfn-value-adapter.d.ts +6 -0
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-cfn-value-adapter.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-cfn-value-adapter.js +13 -0
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-cfn-value-adapter.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-cfn-value-adapter.d.ts +6 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-cfn-value-adapter.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-cfn-value-adapter.js +19 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-cfn-value-adapter.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-dkim-tokens.d.ts +27 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-dkim-tokens.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-dkim-tokens.js +46 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-dkim-tokens.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-identity-cfn.d.ts +33 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-identity-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-identity-cfn.js +48 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-identity-cfn.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-template-cfn.d.ts +27 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-template-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-template-cfn.js +29 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-template-cfn.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/sim-cfn-service-value-adapters.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/cfn/sim-cfn-service-value-adapters.js +4 -0
- package/dist/service/cloudformation/resource/cfn/sim-cfn-service-value-adapters.js.map +1 -1
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-factories.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-factories.js +8 -0
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-factories.js.map +1 -1
- package/dist/service/cloudwatch/alarm/action/sim-aws-cloudwatch-alarm-topics.d.ts +34 -0
- package/dist/service/cloudwatch/alarm/action/sim-aws-cloudwatch-alarm-topics.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-aws-cloudwatch-alarm-topics.js +51 -0
- package/dist/service/cloudwatch/alarm/action/sim-aws-cloudwatch-alarm-topics.js.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-action-failures.d.ts +54 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-action-failures.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-action-failures.js +70 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-action-failures.js.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-actions.d.ts +30 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-actions.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-actions.js +58 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-actions.js.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-notification.d.ts +26 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-notification.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-notification.js +56 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-notification.js.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-targets.d.ts +37 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-targets.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-targets.js +19 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-targets.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-arn.d.ts +10 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-arn.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-arn.js +11 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-arn.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-definition.d.ts +33 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-definition.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-definition.js +2 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-definition.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-evaluation.d.ts +32 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-evaluation.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-evaluation.js +75 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-evaluation.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-history.d.ts +26 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-history.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-history.js +16 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-history.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-periods.d.ts +23 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-periods.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-periods.js +37 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-periods.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-schedule.d.ts +55 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-schedule.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-schedule.js +84 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-schedule.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-state.d.ts +18 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-state.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-state.js +29 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-state.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-store.d.ts +24 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-store.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-store.js +33 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-store.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm.d.ts +57 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm.js +84 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-comparison.d.ts +19 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-comparison.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-comparison.js +48 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-comparison.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-missing-data.d.ts +16 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-missing-data.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-missing-data.js +31 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-missing-data.js.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-creator.d.ts +33 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-creator.d.ts.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-creator.js +41 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-creator.js.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-properties.d.ts +39 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-properties.d.ts.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-properties.js +80 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-properties.js.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-property-rules.d.ts +20 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-property-rules.d.ts.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-property-rules.js +80 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-property-rules.js.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-values.d.ts +56 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-values.d.ts.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-values.js +107 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-values.js.map +1 -0
- package/dist/service/cloudwatch/cfn/sim-cloudwatch-cfn-resource-factory.d.ts +29 -0
- package/dist/service/cloudwatch/cfn/sim-cloudwatch-cfn-resource-factory.d.ts.map +1 -0
- package/dist/service/cloudwatch/cfn/sim-cloudwatch-cfn-resource-factory.js +43 -0
- package/dist/service/cloudwatch/cfn/sim-cloudwatch-cfn-resource-factory.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/alarm.command.d.ts +155 -0
- package/dist/service/cloudwatch/command/alarm/alarm.command.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/alarm.command.js +2 -0
- package/dist/service/cloudwatch/command/alarm/alarm.command.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-action-input.d.ts +19 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-action-input.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-action-input.js +56 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-action-input.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-context.d.ts +22 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-context.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-context.js +2 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-context.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-detail.d.ts +15 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-detail.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-detail.js +61 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-detail.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-input.d.ts +7 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-input.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-input.js +39 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-input.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-numbers.d.ts +20 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-numbers.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-numbers.js +52 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-numbers.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-reads.d.ts +25 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-reads.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-reads.js +60 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-reads.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-selection.d.ts +12 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-selection.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-selection.js +59 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-selection.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-writes.d.ts +23 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-writes.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-writes.js +63 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-writes.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-set-alarm-state.d.ts +19 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-set-alarm-state.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-set-alarm-state.js +47 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-set-alarm-state.js.map +1 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-authorizer.d.ts +41 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-authorizer.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-authorizer.js +65 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-authorizer.js.map +1 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-decide.d.ts +23 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-decide.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-decide.js +30 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-decide.js.map +1 -0
- package/dist/service/cloudwatch/command/data/data.command.d.ts +42 -0
- package/dist/service/cloudwatch/command/data/data.command.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/data/data.command.js +2 -0
- package/dist/service/cloudwatch/command/data/data.command.js.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-datum.d.ts +11 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-datum.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-datum.js +66 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-datum.js.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-value.d.ts +14 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-value.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-value.js +58 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-value.js.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-observation.d.ts +15 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-observation.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-observation.js +34 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-observation.js.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-put-metric-data.d.ts +28 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-put-metric-data.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-put-metric-data.js +66 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-put-metric-data.js.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-weighted-values.d.ts +9 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-weighted-values.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-weighted-values.js +22 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-weighted-values.js.map +1 -0
- package/dist/service/cloudwatch/command/query/query.command.d.ts +133 -0
- package/dist/service/cloudwatch/command/query/query.command.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/query.command.js +2 -0
- package/dist/service/cloudwatch/command/query/query.command.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-data.d.ts +25 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-data.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-data.js +46 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-data.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-statistics.d.ts +25 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-statistics.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-statistics.js +55 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-statistics.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-list-metrics.d.ts +23 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-list-metrics.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-list-metrics.js +46 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-list-metrics.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-query.d.ts +25 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-query.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-query.js +63 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-query.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-request.d.ts +26 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-request.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-request.js +61 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-request.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-result.d.ts +20 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-result.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-result.js +36 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-result.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-filter.d.ts +12 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-filter.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-filter.js +27 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-filter.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-listing.d.ts +20 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-listing.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-listing.js +52 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-listing.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-requested-statistics.d.ts +10 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-requested-statistics.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-requested-statistics.js +20 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-requested-statistics.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-statistic-datapoints.d.ts +17 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-statistic-datapoints.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-statistic-datapoints.js +45 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-statistic-datapoints.js.map +1 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-command.types.d.ts +7 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-command.types.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-command.types.js +2 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-command.types.js.map +1 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-page.d.ts +24 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-page.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-page.js +36 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-page.js.map +1 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-request-options.d.ts +21 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-request-options.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-request-options.js +10 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-request-options.js.map +1 -0
- package/dist/service/cloudwatch/error/sim-cloudwatch.error.d.ts +48 -0
- package/dist/service/cloudwatch/error/sim-cloudwatch.error.d.ts.map +1 -0
- package/dist/service/cloudwatch/error/sim-cloudwatch.error.js +51 -0
- package/dist/service/cloudwatch/error/sim-cloudwatch.error.js.map +1 -0
- package/dist/service/cloudwatch/index.d.ts +26 -0
- package/dist/service/cloudwatch/index.d.ts.map +1 -0
- package/dist/service/cloudwatch/index.js +25 -0
- package/dist/service/cloudwatch/index.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-datapoint.d.ts +54 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-datapoint.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-datapoint.js +29 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-datapoint.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-dimension.d.ts +37 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-dimension.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-dimension.js +42 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-dimension.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric-store.d.ts +46 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric-store.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric-store.js +61 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric-store.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric.d.ts +53 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric.js +45 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-name.d.ts +22 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-name.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-name.js +54 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-name.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-namespace.d.ts +22 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-namespace.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-namespace.js +34 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-namespace.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-period.d.ts +32 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-period.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-period.js +70 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-period.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-statistic.d.ts +20 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-statistic.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-statistic.js +51 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-statistic.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-time-range.d.ts +16 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-time-range.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-time-range.js +25 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-time-range.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-unit.d.ts +18 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-unit.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-unit.js +56 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-unit.js.map +1 -0
- package/dist/service/cloudwatch/sdk/sim-cloudwatch-sdk-command-router.d.ts +18 -0
- package/dist/service/cloudwatch/sdk/sim-cloudwatch-sdk-command-router.d.ts.map +1 -0
- package/dist/service/cloudwatch/sdk/sim-cloudwatch-sdk-command-router.js +60 -0
- package/dist/service/cloudwatch/sdk/sim-cloudwatch-sdk-command-router.js.map +1 -0
- package/dist/service/cloudwatch/sim-cloudwatch-commands.d.ts +47 -0
- package/dist/service/cloudwatch/sim-cloudwatch-commands.d.ts.map +1 -0
- package/dist/service/cloudwatch/sim-cloudwatch-commands.js +86 -0
- package/dist/service/cloudwatch/sim-cloudwatch-commands.js.map +1 -0
- package/dist/service/cloudwatch/sim-cloudwatch.d.ts +98 -0
- package/dist/service/cloudwatch/sim-cloudwatch.d.ts.map +1 -0
- package/dist/service/cloudwatch/sim-cloudwatch.js +138 -0
- package/dist/service/cloudwatch/sim-cloudwatch.js.map +1 -0
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-user-pool-properties.d.ts.map +1 -1
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-user-pool-properties.js +7 -0
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-user-pool-properties.js.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-sign-in-value-check.d.ts +30 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-in-value-check.d.ts.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-in-value-check.js +47 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-in-value-check.js.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js +8 -4
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-user-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-user-commands.js +7 -3
- package/dist/service/cognito/command/user/sim-cognito-user-commands.js.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-user-update-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-user-update-commands.js +3 -1
- package/dist/service/cognito/command/user/sim-cognito-user-update-commands.js.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-identity.d.ts +9 -16
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-identity.d.ts.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-identity.js +9 -26
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-identity.js.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-updates.d.ts +12 -3
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-updates.d.ts.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-updates.js +19 -3
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-updates.js.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-commands.js +5 -4
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-commands.js.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-view.d.ts +3 -0
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-view.d.ts.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-view.js +4 -0
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-view.js.map +1 -1
- package/dist/service/cognito/command/user-pool/user-pool.command.d.ts +7 -6
- package/dist/service/cognito/command/user-pool/user-pool.command.d.ts.map +1 -1
- package/dist/service/cognito/error/sim-cognito.error.d.ts +10 -0
- package/dist/service/cognito/error/sim-cognito.error.d.ts.map +1 -1
- package/dist/service/cognito/error/sim-cognito.error.js +12 -0
- package/dist/service/cognito/error/sim-cognito.error.js.map +1 -1
- package/dist/service/cognito/index.d.ts +1 -1
- package/dist/service/cognito/index.d.ts.map +1 -1
- package/dist/service/cognito/index.js +1 -1
- package/dist/service/cognito/index.js.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-sign-in-attribute.d.ts +22 -0
- package/dist/service/cognito/user-pool/sim-cognito-sign-in-attribute.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-sign-in-attribute.js +52 -0
- package/dist/service/cognito/user-pool/sim-cognito-sign-in-attribute.js.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-settings.d.ts +26 -9
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-settings.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-settings.js +23 -9
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-settings.js.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool.js +2 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool.js.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-username-attributes.d.ts +87 -0
- package/dist/service/cognito/user-pool/sim-cognito-username-attributes.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-username-attributes.js +137 -0
- package/dist/service/cognito/user-pool/sim-cognito-username-attributes.js.map +1 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-store.d.ts +25 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-store.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-store.js +39 -2
- package/dist/service/cognito/user-pool/user/sim-cognito-user-store.js.map +1 -1
- package/dist/service/lambda/factory/lambda-dynamodb-stream-event.factory.d.ts +47 -0
- package/dist/service/lambda/factory/lambda-dynamodb-stream-event.factory.d.ts.map +1 -0
- package/dist/service/lambda/factory/lambda-dynamodb-stream-event.factory.js +96 -0
- package/dist/service/lambda/factory/lambda-dynamodb-stream-event.factory.js.map +1 -0
- package/dist/service/lambda/factory/lambda-dynamodb-stream-record-change.d.ts +36 -0
- package/dist/service/lambda/factory/lambda-dynamodb-stream-record-change.d.ts.map +1 -0
- package/dist/service/lambda/factory/lambda-dynamodb-stream-record-change.js +64 -0
- package/dist/service/lambda/factory/lambda-dynamodb-stream-record-change.js.map +1 -0
- package/dist/service/lambda/factory/lambda-function-url-event.factory.d.ts +37 -0
- package/dist/service/lambda/factory/lambda-function-url-event.factory.d.ts.map +1 -0
- package/dist/service/lambda/factory/lambda-function-url-event.factory.js +55 -0
- package/dist/service/lambda/factory/lambda-function-url-event.factory.js.map +1 -0
- package/dist/service/lambda/factory/lambda-sqs-event.factory.d.ts +37 -0
- package/dist/service/lambda/factory/lambda-sqs-event.factory.d.ts.map +1 -0
- package/dist/service/lambda/factory/lambda-sqs-event.factory.js +78 -0
- package/dist/service/lambda/factory/lambda-sqs-event.factory.js.map +1 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts +27 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts.map +1 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js +78 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js.map +1 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.d.ts +23 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.d.ts.map +1 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.js +111 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.js.map +1 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.d.ts +37 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.d.ts.map +1 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.js +78 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.js.map +1 -0
- package/dist/service/lambda/function/code/vm/sdk/sim-lambda-vm-sdk-module-provider.d.ts +5 -3
- package/dist/service/lambda/function/code/vm/sdk/sim-lambda-vm-sdk-module-provider.d.ts.map +1 -1
- package/dist/service/lambda/function/code/vm/sdk/sim-lambda-vm-sdk-module-provider.js.map +1 -1
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts +10 -2
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts.map +1 -1
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js +21 -6
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js.map +1 -1
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-module.types.d.ts +12 -0
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-module.types.d.ts.map +1 -0
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-module.types.js +2 -0
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-module.types.js.map +1 -0
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-modules.d.ts.map +1 -1
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-modules.js +5 -1
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-modules.js.map +1 -1
- package/dist/service/lambda/function/environment/sim-lambda-environment.d.ts.map +1 -1
- package/dist/service/lambda/function/environment/sim-lambda-environment.js +2 -0
- package/dist/service/lambda/function/environment/sim-lambda-environment.js.map +1 -1
- package/dist/service/lambda/function/environment/sim-lambda-execution-credentials.d.ts +19 -0
- package/dist/service/lambda/function/environment/sim-lambda-execution-credentials.d.ts.map +1 -0
- package/dist/service/lambda/function/environment/sim-lambda-execution-credentials.js +20 -0
- package/dist/service/lambda/function/environment/sim-lambda-execution-credentials.js.map +1 -0
- package/dist/service/lambda/index.d.ts +3 -0
- package/dist/service/lambda/index.d.ts.map +1 -1
- package/dist/service/lambda/index.js +3 -0
- package/dist/service/lambda/index.js.map +1 -1
- package/dist/service/s3/factory/s3-notification-event-object.d.ts +10 -0
- package/dist/service/s3/factory/s3-notification-event-object.d.ts.map +1 -0
- package/dist/service/s3/factory/s3-notification-event-object.js +12 -0
- package/dist/service/s3/factory/s3-notification-event-object.js.map +1 -0
- package/dist/service/s3/factory/s3-notification-event.factory.d.ts +45 -0
- package/dist/service/s3/factory/s3-notification-event.factory.d.ts.map +1 -0
- package/dist/service/s3/factory/s3-notification-event.factory.js +102 -0
- package/dist/service/s3/factory/s3-notification-event.factory.js.map +1 -0
- package/dist/service/s3/index.d.ts +2 -0
- package/dist/service/s3/index.d.ts.map +1 -1
- package/dist/service/s3/index.js +1 -0
- package/dist/service/s3/index.js.map +1 -1
- package/dist/service/s3/notification/event/sim-s3-event-records.d.ts +32 -1
- package/dist/service/s3/notification/event/sim-s3-event-records.d.ts.map +1 -1
- package/dist/service/s3/notification/event/sim-s3-event-records.js +5 -5
- package/dist/service/s3/notification/event/sim-s3-event-records.js.map +1 -1
- package/dist/service/s3/notification/event/sim-s3-event.type.d.ts +83 -0
- package/dist/service/s3/notification/event/sim-s3-event.type.d.ts.map +1 -0
- package/dist/service/s3/notification/event/sim-s3-event.type.js +2 -0
- package/dist/service/s3/notification/event/sim-s3-event.type.js.map +1 -0
- package/dist/service/ses/account/sim-ses-account.d.ts +59 -0
- package/dist/service/ses/account/sim-ses-account.d.ts.map +1 -0
- package/dist/service/ses/account/sim-ses-account.js +66 -0
- package/dist/service/ses/account/sim-ses-account.js.map +1 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-creator.d.ts +35 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-creator.d.ts.map +1 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-creator.js +52 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-creator.js.map +1 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-properties.d.ts +37 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-properties.d.ts.map +1 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-properties.js +61 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-properties.js.map +1 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-unsimulated-properties.d.ts +17 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-unsimulated-properties.d.ts.map +1 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-unsimulated-properties.js +48 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-unsimulated-properties.js.map +1 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-error.d.ts +24 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-error.d.ts.map +1 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-error.js +39 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-error.js.map +1 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-types.d.ts +13 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-types.d.ts.map +1 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-types.js +13 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-types.js.map +1 -0
- package/dist/service/ses/cfn/sim-ses-cfn-resource-factory.d.ts +28 -0
- package/dist/service/ses/cfn/sim-ses-cfn-resource-factory.d.ts.map +1 -0
- package/dist/service/ses/cfn/sim-ses-cfn-resource-factory.js +69 -0
- package/dist/service/ses/cfn/sim-ses-cfn-resource-factory.js.map +1 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-creator.d.ts +30 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-creator.d.ts.map +1 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-creator.js +48 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-creator.js.map +1 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-properties.d.ts +58 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-properties.d.ts.map +1 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-properties.js +121 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-properties.js.map +1 -0
- package/dist/service/ses/command/account/account.command.d.ts +59 -0
- package/dist/service/ses/command/account/account.command.d.ts.map +1 -0
- package/dist/service/ses/command/account/account.command.js +2 -0
- package/dist/service/ses/command/account/account.command.js.map +1 -0
- package/dist/service/ses/command/account/sim-ses-account-commands.d.ts +34 -0
- package/dist/service/ses/command/account/sim-ses-account-commands.d.ts.map +1 -0
- package/dist/service/ses/command/account/sim-ses-account-commands.js +41 -0
- package/dist/service/ses/command/account/sim-ses-account-commands.js.map +1 -0
- package/dist/service/ses/command/account/sim-ses-account-details-input.d.ts +11 -0
- package/dist/service/ses/command/account/sim-ses-account-details-input.d.ts.map +1 -0
- package/dist/service/ses/command/account/sim-ses-account-details-input.js +50 -0
- package/dist/service/ses/command/account/sim-ses-account-details-input.js.map +1 -0
- package/dist/service/ses/command/account/sim-ses-account-report.d.ts +21 -0
- package/dist/service/ses/command/account/sim-ses-account-report.d.ts.map +1 -0
- package/dist/service/ses/command/account/sim-ses-account-report.js +45 -0
- package/dist/service/ses/command/account/sim-ses-account-report.js.map +1 -0
- package/dist/service/ses/command/authorize/sim-ses-authorizer.d.ts +55 -0
- package/dist/service/ses/command/authorize/sim-ses-authorizer.d.ts.map +1 -0
- package/dist/service/ses/command/authorize/sim-ses-authorizer.js +78 -0
- package/dist/service/ses/command/authorize/sim-ses-authorizer.js.map +1 -0
- package/dist/service/ses/command/identity/identity.command.d.ts +84 -0
- package/dist/service/ses/command/identity/identity.command.d.ts.map +1 -0
- package/dist/service/ses/command/identity/identity.command.js +2 -0
- package/dist/service/ses/command/identity/identity.command.js.map +1 -0
- package/dist/service/ses/command/identity/sim-ses-identity-commands.d.ts +44 -0
- package/dist/service/ses/command/identity/sim-ses-identity-commands.d.ts.map +1 -0
- package/dist/service/ses/command/identity/sim-ses-identity-commands.js +92 -0
- package/dist/service/ses/command/identity/sim-ses-identity-commands.js.map +1 -0
- package/dist/service/ses/command/identity/sim-ses-unsimulated-identity-input.d.ts +12 -0
- package/dist/service/ses/command/identity/sim-ses-unsimulated-identity-input.d.ts.map +1 -0
- package/dist/service/ses/command/identity/sim-ses-unsimulated-identity-input.js +26 -0
- package/dist/service/ses/command/identity/sim-ses-unsimulated-identity-input.js.map +1 -0
- package/dist/service/ses/command/send/send.command.d.ts +71 -0
- package/dist/service/ses/command/send/send.command.d.ts.map +1 -0
- package/dist/service/ses/command/send/send.command.js +2 -0
- package/dist/service/ses/command/send/send.command.js.map +1 -0
- package/dist/service/ses/command/send/sim-ses-content.d.ts +24 -0
- package/dist/service/ses/command/send/sim-ses-content.d.ts.map +1 -0
- package/dist/service/ses/command/send/sim-ses-content.js +40 -0
- package/dist/service/ses/command/send/sim-ses-content.js.map +1 -0
- package/dist/service/ses/command/send/sim-ses-read-content.d.ts +19 -0
- package/dist/service/ses/command/send/sim-ses-read-content.d.ts.map +1 -0
- package/dist/service/ses/command/send/sim-ses-read-content.js +2 -0
- package/dist/service/ses/command/send/sim-ses-read-content.js.map +1 -0
- package/dist/service/ses/command/send/sim-ses-send-email.d.ts +36 -0
- package/dist/service/ses/command/send/sim-ses-send-email.d.ts.map +1 -0
- package/dist/service/ses/command/send/sim-ses-send-email.js +80 -0
- package/dist/service/ses/command/send/sim-ses-send-email.js.map +1 -0
- package/dist/service/ses/command/send/sim-ses-simple-content.d.ts +12 -0
- package/dist/service/ses/command/send/sim-ses-simple-content.d.ts.map +1 -0
- package/dist/service/ses/command/send/sim-ses-simple-content.js +33 -0
- package/dist/service/ses/command/send/sim-ses-simple-content.js.map +1 -0
- package/dist/service/ses/command/send/sim-ses-template-send.d.ts +34 -0
- package/dist/service/ses/command/send/sim-ses-template-send.d.ts.map +1 -0
- package/dist/service/ses/command/send/sim-ses-template-send.js +101 -0
- package/dist/service/ses/command/send/sim-ses-template-send.js.map +1 -0
- package/dist/service/ses/command/send/sim-ses-unsimulated-send-input.d.ts +12 -0
- package/dist/service/ses/command/send/sim-ses-unsimulated-send-input.d.ts.map +1 -0
- package/dist/service/ses/command/send/sim-ses-unsimulated-send-input.js +26 -0
- package/dist/service/ses/command/send/sim-ses-unsimulated-send-input.js.map +1 -0
- package/dist/service/ses/command/send/sim-ses-verified-identities.d.ts +36 -0
- package/dist/service/ses/command/send/sim-ses-verified-identities.d.ts.map +1 -0
- package/dist/service/ses/command/send/sim-ses-verified-identities.js +50 -0
- package/dist/service/ses/command/send/sim-ses-verified-identities.js.map +1 -0
- package/dist/service/ses/command/sim-ses-command.types.d.ts +8 -0
- package/dist/service/ses/command/sim-ses-command.types.d.ts.map +1 -0
- package/dist/service/ses/command/sim-ses-command.types.js +2 -0
- package/dist/service/ses/command/sim-ses-command.types.js.map +1 -0
- package/dist/service/ses/command/sim-ses-page.d.ts +20 -0
- package/dist/service/ses/command/sim-ses-page.d.ts.map +1 -0
- package/dist/service/ses/command/sim-ses-page.js +49 -0
- package/dist/service/ses/command/sim-ses-page.js.map +1 -0
- package/dist/service/ses/command/sim-ses-request-options.d.ts +12 -0
- package/dist/service/ses/command/sim-ses-request-options.d.ts.map +1 -0
- package/dist/service/ses/command/sim-ses-request-options.js +2 -0
- package/dist/service/ses/command/sim-ses-request-options.js.map +1 -0
- package/dist/service/ses/command/template/sim-ses-template-commands.d.ts +56 -0
- package/dist/service/ses/command/template/sim-ses-template-commands.d.ts.map +1 -0
- package/dist/service/ses/command/template/sim-ses-template-commands.js +96 -0
- package/dist/service/ses/command/template/sim-ses-template-commands.js.map +1 -0
- package/dist/service/ses/command/template/sim-ses-template-reporting.d.ts +14 -0
- package/dist/service/ses/command/template/sim-ses-template-reporting.d.ts.map +1 -0
- package/dist/service/ses/command/template/sim-ses-template-reporting.js +23 -0
- package/dist/service/ses/command/template/sim-ses-template-reporting.js.map +1 -0
- package/dist/service/ses/command/template/template.command.d.ts +98 -0
- package/dist/service/ses/command/template/template.command.d.ts.map +1 -0
- package/dist/service/ses/command/template/template.command.js +2 -0
- package/dist/service/ses/command/template/template.command.js.map +1 -0
- package/dist/service/ses/email/sim-ses-address.d.ts +15 -0
- package/dist/service/ses/email/sim-ses-address.d.ts.map +1 -0
- package/dist/service/ses/email/sim-ses-address.js +29 -0
- package/dist/service/ses/email/sim-ses-address.js.map +1 -0
- package/dist/service/ses/email/sim-ses-sent-email-store.d.ts +33 -0
- package/dist/service/ses/email/sim-ses-sent-email-store.d.ts.map +1 -0
- package/dist/service/ses/email/sim-ses-sent-email-store.js +42 -0
- package/dist/service/ses/email/sim-ses-sent-email-store.js.map +1 -0
- package/dist/service/ses/email/sim-ses-sent-email.d.ts +78 -0
- package/dist/service/ses/email/sim-ses-sent-email.d.ts.map +1 -0
- package/dist/service/ses/email/sim-ses-sent-email.js +61 -0
- package/dist/service/ses/email/sim-ses-sent-email.js.map +1 -0
- package/dist/service/ses/error/sim-ses.error.d.ts +70 -0
- package/dist/service/ses/error/sim-ses.error.d.ts.map +1 -0
- package/dist/service/ses/error/sim-ses.error.js +77 -0
- package/dist/service/ses/error/sim-ses.error.js.map +1 -0
- package/dist/service/ses/identity/sim-ses-identity-name.d.ts +34 -0
- package/dist/service/ses/identity/sim-ses-identity-name.d.ts.map +1 -0
- package/dist/service/ses/identity/sim-ses-identity-name.js +90 -0
- package/dist/service/ses/identity/sim-ses-identity-name.js.map +1 -0
- package/dist/service/ses/identity/sim-ses-identity-store.d.ts +62 -0
- package/dist/service/ses/identity/sim-ses-identity-store.d.ts.map +1 -0
- package/dist/service/ses/identity/sim-ses-identity-store.js +93 -0
- package/dist/service/ses/identity/sim-ses-identity-store.js.map +1 -0
- package/dist/service/ses/identity/sim-ses-identity.d.ts +63 -0
- package/dist/service/ses/identity/sim-ses-identity.d.ts.map +1 -0
- package/dist/service/ses/identity/sim-ses-identity.js +62 -0
- package/dist/service/ses/identity/sim-ses-identity.js.map +1 -0
- package/dist/service/ses/index.d.ts +13 -0
- package/dist/service/ses/index.d.ts.map +1 -0
- package/dist/service/ses/index.js +11 -0
- package/dist/service/ses/index.js.map +1 -0
- package/dist/service/ses/sdk/sim-ses-sdk-command-router.d.ts +18 -0
- package/dist/service/ses/sdk/sim-ses-sdk-command-router.d.ts.map +1 -0
- package/dist/service/ses/sdk/sim-ses-sdk-command-router.js +72 -0
- package/dist/service/ses/sdk/sim-ses-sdk-command-router.js.map +1 -0
- package/dist/service/ses/sim-ses-arn.d.ts +20 -0
- package/dist/service/ses/sim-ses-arn.d.ts.map +1 -0
- package/dist/service/ses/sim-ses-arn.js +25 -0
- package/dist/service/ses/sim-ses-arn.js.map +1 -0
- package/dist/service/ses/sim-ses-commands.d.ts +37 -0
- package/dist/service/ses/sim-ses-commands.d.ts.map +1 -0
- package/dist/service/ses/sim-ses-commands.js +75 -0
- package/dist/service/ses/sim-ses-commands.js.map +1 -0
- package/dist/service/ses/sim-ses-v2.d.ts +139 -0
- package/dist/service/ses/sim-ses-v2.d.ts.map +1 -0
- package/dist/service/ses/sim-ses-v2.js +195 -0
- package/dist/service/ses/sim-ses-v2.js.map +1 -0
- package/dist/service/ses/template/sim-ses-render.d.ts +16 -0
- package/dist/service/ses/template/sim-ses-render.d.ts.map +1 -0
- package/dist/service/ses/template/sim-ses-render.js +88 -0
- package/dist/service/ses/template/sim-ses-render.js.map +1 -0
- package/dist/service/ses/template/sim-ses-template-content.d.ts +28 -0
- package/dist/service/ses/template/sim-ses-template-content.d.ts.map +1 -0
- package/dist/service/ses/template/sim-ses-template-content.js +67 -0
- package/dist/service/ses/template/sim-ses-template-content.js.map +1 -0
- package/dist/service/ses/template/sim-ses-template-store.d.ts +47 -0
- package/dist/service/ses/template/sim-ses-template-store.d.ts.map +1 -0
- package/dist/service/ses/template/sim-ses-template-store.js +81 -0
- package/dist/service/ses/template/sim-ses-template-store.js.map +1 -0
- package/dist/service/ses/template/sim-ses-template.d.ts +38 -0
- package/dist/service/ses/template/sim-ses-template.d.ts.map +1 -0
- package/dist/service/ses/template/sim-ses-template.js +39 -0
- package/dist/service/ses/template/sim-ses-template.js.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-body.d.ts +10 -5
- package/dist/service/sqs/message/sim-sqs-message-body.d.ts.map +1 -1
- package/dist/service/sqs/message/sim-sqs-message-body.js +13 -6
- package/dist/service/sqs/message/sim-sqs-message-body.js.map +1 -1
- package/dist/util/factory/sim-records-event.factory.d.ts +60 -0
- package/dist/util/factory/sim-records-event.factory.d.ts.map +1 -0
- package/dist/util/factory/sim-records-event.factory.js +47 -0
- package/dist/util/factory/sim-records-event.factory.js.map +1 -0
- package/package.json +12 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SimAwsAccountRegionScope } from "../../../aws/sim-aws-account-region-scope.js";
|
|
2
|
+
import type { SimCloudWatchAlarm } from "../sim-cloudwatch-alarm.js";
|
|
3
|
+
import type { SimCloudWatchAlarmTransition } from "../sim-cloudwatch-alarm.js";
|
|
4
|
+
interface SimCloudWatchAlarmMessageProperties {
|
|
5
|
+
readonly alarm: SimCloudWatchAlarm;
|
|
6
|
+
readonly transition: SimCloudWatchAlarmTransition;
|
|
7
|
+
readonly accountRegionScope: SimAwsAccountRegionScope;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The subject line real CloudWatch puts on an alarm notification.
|
|
11
|
+
*/
|
|
12
|
+
export declare function simCloudWatchAlarmSubject(properties: SimCloudWatchAlarmMessageProperties): string;
|
|
13
|
+
/**
|
|
14
|
+
* The JSON body real CloudWatch publishes when an alarm changes state.
|
|
15
|
+
*
|
|
16
|
+
* The shape is what a subscriber parses, so it is worth matching: a Lambda
|
|
17
|
+
* function reading `NewStateValue` out of an SNS message is the code a test
|
|
18
|
+
* here is most likely to be exercising.
|
|
19
|
+
*
|
|
20
|
+
* `Region` carries the region code rather than the human name real CloudWatch
|
|
21
|
+
* uses ("eu-west-2" rather than "EU (London)"), because the simulation knows
|
|
22
|
+
* the code and nothing here maps one to the other.
|
|
23
|
+
*/
|
|
24
|
+
export declare function simCloudWatchAlarmMessage(properties: SimCloudWatchAlarmMessageProperties): string;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-notification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-notification.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-notification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAE/E,UAAU,mCAAmC;IAC3C,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,4BAA4B,CAAC;IAClD,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;CACvD;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,mCAAmC,GAC9C,MAAM,CAKR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,mCAAmC,GAC9C,MAAM,CAqCR"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The subject line real CloudWatch puts on an alarm notification.
|
|
3
|
+
*/
|
|
4
|
+
export function simCloudWatchAlarmSubject(properties) {
|
|
5
|
+
const { transition, accountRegionScope } = properties;
|
|
6
|
+
const name = properties.alarm.name;
|
|
7
|
+
return `${transition.state}: "${name}" in ${accountRegionScope.regionName}`;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The JSON body real CloudWatch publishes when an alarm changes state.
|
|
11
|
+
*
|
|
12
|
+
* The shape is what a subscriber parses, so it is worth matching: a Lambda
|
|
13
|
+
* function reading `NewStateValue` out of an SNS message is the code a test
|
|
14
|
+
* here is most likely to be exercising.
|
|
15
|
+
*
|
|
16
|
+
* `Region` carries the region code rather than the human name real CloudWatch
|
|
17
|
+
* uses ("eu-west-2" rather than "EU (London)"), because the simulation knows
|
|
18
|
+
* the code and nothing here maps one to the other.
|
|
19
|
+
*/
|
|
20
|
+
export function simCloudWatchAlarmMessage(properties) {
|
|
21
|
+
const { alarm, transition, accountRegionScope } = properties;
|
|
22
|
+
const definition = alarm.definition;
|
|
23
|
+
return JSON.stringify({
|
|
24
|
+
AlarmName: alarm.name,
|
|
25
|
+
AlarmDescription: definition.alarmDescription ?? null,
|
|
26
|
+
AWSAccountId: accountRegionScope.accountId,
|
|
27
|
+
AlarmConfigurationUpdatedTimestamp: alarm.configurationUpdatedAt.toISOString(),
|
|
28
|
+
NewStateValue: transition.state,
|
|
29
|
+
NewStateReason: transition.reason,
|
|
30
|
+
StateChangeTime: transition.at.toISOString(),
|
|
31
|
+
Region: accountRegionScope.regionName,
|
|
32
|
+
AlarmArn: alarm.arn,
|
|
33
|
+
OldStateValue: transition.previousState,
|
|
34
|
+
OKActions: definition.okActions,
|
|
35
|
+
AlarmActions: definition.alarmActions,
|
|
36
|
+
InsufficientDataActions: definition.insufficientDataActions,
|
|
37
|
+
Trigger: {
|
|
38
|
+
MetricName: definition.metric.metricName,
|
|
39
|
+
Namespace: definition.metric.namespace,
|
|
40
|
+
StatisticType: "Statistic",
|
|
41
|
+
Statistic: definition.statistic.toUpperCase(),
|
|
42
|
+
Unit: definition.unit ?? null,
|
|
43
|
+
Dimensions: definition.metric.dimensions.map((dimension) => ({
|
|
44
|
+
value: dimension.value,
|
|
45
|
+
name: dimension.name,
|
|
46
|
+
})),
|
|
47
|
+
Period: definition.period,
|
|
48
|
+
EvaluationPeriods: definition.evaluationPeriods,
|
|
49
|
+
DatapointsToAlarm: definition.datapointsToAlarm,
|
|
50
|
+
ComparisonOperator: definition.comparisonOperator,
|
|
51
|
+
Threshold: definition.threshold,
|
|
52
|
+
TreatMissingData: definition.treatMissingData,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-notification.js","sourceRoot":"","sources":["../../../../../src/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-notification.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,UAAU,yBAAyB,CACvC,UAA+C;IAE/C,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,GAAG,UAAU,CAAC;IACtD,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC;IAEnC,OAAO,GAAG,UAAU,CAAC,KAAK,MAAM,IAAI,QAAQ,kBAAkB,CAAC,UAAU,EAAE,CAAC;AAC9E,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,yBAAyB,CACvC,UAA+C;IAE/C,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,GAAG,UAAU,CAAC;IAC7D,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;IAEpC,OAAO,IAAI,CAAC,SAAS,CAAC;QACpB,SAAS,EAAE,KAAK,CAAC,IAAI;QACrB,gBAAgB,EAAE,UAAU,CAAC,gBAAgB,IAAI,IAAI;QACrD,YAAY,EAAE,kBAAkB,CAAC,SAAS;QAC1C,kCAAkC,EAChC,KAAK,CAAC,sBAAsB,CAAC,WAAW,EAAE;QAC5C,aAAa,EAAE,UAAU,CAAC,KAAK;QAC/B,cAAc,EAAE,UAAU,CAAC,MAAM;QACjC,eAAe,EAAE,UAAU,CAAC,EAAE,CAAC,WAAW,EAAE;QAC5C,MAAM,EAAE,kBAAkB,CAAC,UAAU;QACrC,QAAQ,EAAE,KAAK,CAAC,GAAG;QACnB,aAAa,EAAE,UAAU,CAAC,aAAa;QACvC,SAAS,EAAE,UAAU,CAAC,SAAS;QAC/B,YAAY,EAAE,UAAU,CAAC,YAAY;QACrC,uBAAuB,EAAE,UAAU,CAAC,uBAAuB;QAC3D,OAAO,EAAE;YACP,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,UAAU;YACxC,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,SAAS;YACtC,aAAa,EAAE,WAAW;YAC1B,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,WAAW,EAAE;YAC7C,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,IAAI;YAC7B,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;gBAC3D,KAAK,EAAE,SAAS,CAAC,KAAK;gBACtB,IAAI,EAAE,SAAS,CAAC,IAAI;aACrB,CAAC,CAAC;YACH,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,iBAAiB,EAAE,UAAU,CAAC,iBAAiB;YAC/C,iBAAiB,EAAE,UAAU,CAAC,iBAAiB;YAC/C,kBAAkB,EAAE,UAAU,CAAC,kBAAkB;YACjD,SAAS,EAAE,UAAU,CAAC,SAAS;YAC/B,gBAAgB,EAAE,UAAU,CAAC,gBAAgB;SAC9C;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One notification an alarm action sends.
|
|
3
|
+
*/
|
|
4
|
+
export interface SimCloudWatchAlarmNotification {
|
|
5
|
+
readonly topicArn: string;
|
|
6
|
+
readonly subject: string;
|
|
7
|
+
readonly message: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Where an alarm's actions reach.
|
|
11
|
+
*
|
|
12
|
+
* An alarm holds a topic ARN and nothing else, so what that ARN names is
|
|
13
|
+
* resolved when the alarm fires rather than when it is created: a topic made
|
|
14
|
+
* after the alarm is a topic the alarm can still reach, as it would be in an
|
|
15
|
+
* account.
|
|
16
|
+
*/
|
|
17
|
+
export interface SimCloudWatchAlarmTargets {
|
|
18
|
+
/**
|
|
19
|
+
* Send one notification, or throw saying why it could not be sent.
|
|
20
|
+
*/
|
|
21
|
+
notify(notification: SimCloudWatchAlarmNotification): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The targets a simulated CloudWatch built on its own has, which are none.
|
|
25
|
+
*
|
|
26
|
+
* Alarms still evaluate and change state without anything to notify. Firing at
|
|
27
|
+
* nothing is reported as a failure rather than passing quietly, because an
|
|
28
|
+
* alarm whose action reaches nowhere is exactly what a test setting one up is
|
|
29
|
+
* checking against.
|
|
30
|
+
*/
|
|
31
|
+
export declare class SimCloudWatchNoAlarmTargets implements SimCloudWatchAlarmTargets {
|
|
32
|
+
/**
|
|
33
|
+
* Refuse every notification, since there is nothing here to notify.
|
|
34
|
+
*/
|
|
35
|
+
notify(notification: SimCloudWatchAlarmNotification): Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-targets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-targets.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-targets.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,MAAM,CAAC,YAAY,EAAE,8BAA8B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrE;AAED;;;;;;;GAOG;AACH,qBAAa,2BAA4B,YAAW,yBAAyB;IAC3E;;OAEG;IACH,MAAM,CAAC,YAAY,EAAE,8BAA8B,GAAG,OAAO,CAAC,IAAI,CAAC,CAQlE;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The targets a simulated CloudWatch built on its own has, which are none.
|
|
3
|
+
*
|
|
4
|
+
* Alarms still evaluate and change state without anything to notify. Firing at
|
|
5
|
+
* nothing is reported as a failure rather than passing quietly, because an
|
|
6
|
+
* alarm whose action reaches nowhere is exactly what a test setting one up is
|
|
7
|
+
* checking against.
|
|
8
|
+
*/
|
|
9
|
+
export class SimCloudWatchNoAlarmTargets {
|
|
10
|
+
/**
|
|
11
|
+
* Refuse every notification, since there is nothing here to notify.
|
|
12
|
+
*/
|
|
13
|
+
notify(notification) {
|
|
14
|
+
return Promise.reject(new Error(`${notification.topicArn} is not reachable: this simulated CloudWatch ` +
|
|
15
|
+
`was built without the rest of the simulation, so it has no SNS to ` +
|
|
16
|
+
`publish to.`));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-targets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-targets.js","sourceRoot":"","sources":["../../../../../src/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-targets.ts"],"names":[],"mappings":"AAwBA;;;;;;;GAOG;AACH,MAAM,OAAO,2BAA2B;IACtC;;OAEG;IACH,MAAM,CAAC,YAA4C;QACjD,OAAO,OAAO,CAAC,MAAM,CACnB,IAAI,KAAK,CACP,GAAG,YAAY,CAAC,QAAQ,+CAA+C;YACrE,oEAAoE;YACpE,aAAa,CAChB,CACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SimAwsAccountRegionScope } from "../../aws/sim-aws-account-region-scope.js";
|
|
2
|
+
/**
|
|
3
|
+
* The ARN of an alarm.
|
|
4
|
+
*
|
|
5
|
+
* Alarms are the one thing in CloudWatch that has an ARN: a metric has none,
|
|
6
|
+
* which is why every metric action authorizes against `*`, while an alarm can
|
|
7
|
+
* be named by a policy and is what `DescribeAlarms` reports.
|
|
8
|
+
*/
|
|
9
|
+
export declare function simCloudWatchAlarmArn(scope: SimAwsAccountRegionScope, alarmName: string): string;
|
|
10
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-arn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-arn.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudwatch/alarm/sim-cloudwatch-alarm-arn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAE1F;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,wBAAwB,EAC/B,SAAS,EAAE,MAAM,GAChB,MAAM,CAER"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ARN of an alarm.
|
|
3
|
+
*
|
|
4
|
+
* Alarms are the one thing in CloudWatch that has an ARN: a metric has none,
|
|
5
|
+
* which is why every metric action authorizes against `*`, while an alarm can
|
|
6
|
+
* be named by a policy and is what `DescribeAlarms` reports.
|
|
7
|
+
*/
|
|
8
|
+
export function simCloudWatchAlarmArn(scope, alarmName) {
|
|
9
|
+
return `arn:aws:cloudwatch:${scope.regionName}:${scope.accountId}:alarm:${alarmName}`;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-arn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-arn.js","sourceRoot":"","sources":["../../../../src/service/cloudwatch/alarm/sim-cloudwatch-alarm-arn.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAA+B,EAC/B,SAAiB;IAEjB,OAAO,sBAAsB,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,SAAS,UAAU,SAAS,EAAE,CAAC;AACxF,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { SimCloudWatchMetricIdentity } from "../metric/sim-cloudwatch-metric.js";
|
|
2
|
+
import type { SimCloudWatchStatistic } from "../metric/sim-cloudwatch-statistic.js";
|
|
3
|
+
import type { SimCloudWatchUnit } from "../metric/sim-cloudwatch-unit.js";
|
|
4
|
+
import type { SimCloudWatchComparisonOperator } from "./sim-cloudwatch-comparison.js";
|
|
5
|
+
import type { SimCloudWatchMissingDataTreatment } from "./sim-cloudwatch-missing-data.js";
|
|
6
|
+
/**
|
|
7
|
+
* What one alarm watches for, as PutMetricAlarm stated it.
|
|
8
|
+
*
|
|
9
|
+
* Held apart from the alarm itself because it is replaced wholesale: real
|
|
10
|
+
* PutMetricAlarm on a name that exists updates every one of these rather than
|
|
11
|
+
* merging, and the alarm keeps its state and history across the change.
|
|
12
|
+
*/
|
|
13
|
+
export interface SimCloudWatchAlarmDefinition {
|
|
14
|
+
readonly alarmName: string;
|
|
15
|
+
readonly alarmDescription: string | undefined;
|
|
16
|
+
readonly metric: SimCloudWatchMetricIdentity;
|
|
17
|
+
readonly statistic: SimCloudWatchStatistic;
|
|
18
|
+
readonly unit: SimCloudWatchUnit | undefined;
|
|
19
|
+
/** How long each evaluated period is, in seconds. */
|
|
20
|
+
readonly period: number;
|
|
21
|
+
/** How many periods back the alarm looks each time it evaluates. */
|
|
22
|
+
readonly evaluationPeriods: number;
|
|
23
|
+
/** How many of those must breach for the alarm to fire. */
|
|
24
|
+
readonly datapointsToAlarm: number;
|
|
25
|
+
readonly threshold: number;
|
|
26
|
+
readonly comparisonOperator: SimCloudWatchComparisonOperator;
|
|
27
|
+
readonly treatMissingData: SimCloudWatchMissingDataTreatment;
|
|
28
|
+
readonly actionsEnabled: boolean;
|
|
29
|
+
readonly alarmActions: readonly string[];
|
|
30
|
+
readonly okActions: readonly string[];
|
|
31
|
+
readonly insufficientDataActions: readonly string[];
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-definition.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudwatch/alarm/sim-cloudwatch-alarm-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AAE1F;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9C,QAAQ,CAAC,MAAM,EAAE,2BAA2B,CAAC;IAC7C,QAAQ,CAAC,SAAS,EAAE,sBAAsB,CAAC;IAC3C,QAAQ,CAAC,IAAI,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAE7C,qDAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,oEAAoE;IACpE,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAEnC,2DAA2D;IAC3D,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAEnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,kBAAkB,EAAE,+BAA+B,CAAC;IAC7D,QAAQ,CAAC,gBAAgB,EAAE,iCAAiC,CAAC;IAE7D,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,uBAAuB,EAAE,SAAS,MAAM,EAAE,CAAC;CACrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-definition.js","sourceRoot":"","sources":["../../../../src/service/cloudwatch/alarm/sim-cloudwatch-alarm-definition.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SimCloudWatchAlarmDefinition } from "./sim-cloudwatch-alarm-definition.js";
|
|
2
|
+
import type { SimCloudWatchAlarmState } from "./sim-cloudwatch-alarm-state.js";
|
|
3
|
+
/**
|
|
4
|
+
* What one evaluated period was worth to the alarm.
|
|
5
|
+
*
|
|
6
|
+
* A period is missing when nothing was published into it, which is a different
|
|
7
|
+
* thing from a period whose values happened to sum to zero.
|
|
8
|
+
*/
|
|
9
|
+
export type SimCloudWatchPeriodVerdict = "breaching" | "notBreaching" | "absent";
|
|
10
|
+
/**
|
|
11
|
+
* What an evaluation decided, and why.
|
|
12
|
+
*
|
|
13
|
+
* `state` being undefined means the alarm keeps the state it has, which is
|
|
14
|
+
* what `TreatMissingData: ignore` asks for.
|
|
15
|
+
*/
|
|
16
|
+
export interface SimCloudWatchEvaluation {
|
|
17
|
+
readonly state: SimCloudWatchAlarmState | undefined;
|
|
18
|
+
readonly reason: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Decide what the periods an alarm just looked at make its state.
|
|
22
|
+
*
|
|
23
|
+
* The periods arrive oldest first and are as many as `evaluationPeriods`, with
|
|
24
|
+
* `undefined` for a period nothing was published into.
|
|
25
|
+
*
|
|
26
|
+
* This is CloudWatch's M-of-N rule: the alarm fires when at least
|
|
27
|
+
* `datapointsToAlarm` of the periods breach, whether or not they are
|
|
28
|
+
* consecutive. Everything else is OK, except that an alarm with nothing to go
|
|
29
|
+
* on reports INSUFFICIENT_DATA rather than guessing.
|
|
30
|
+
*/
|
|
31
|
+
export declare function evaluateSimCloudWatchAlarm(values: readonly (number | undefined)[], definition: SimCloudWatchAlarmDefinition): SimCloudWatchEvaluation;
|
|
32
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-evaluation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-evaluation.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudwatch/alarm/sim-cloudwatch-alarm-evaluation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAG/E;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAClC,WAAW,GACX,cAAc,GACd,QAAQ,CAAC;AAEb;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,uBAAuB,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,EACvC,UAAU,EAAE,4BAA4B,GACvC,uBAAuB,CA4BzB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { simCloudWatchBreaches } from "./sim-cloudwatch-comparison.js";
|
|
2
|
+
/**
|
|
3
|
+
* Decide what the periods an alarm just looked at make its state.
|
|
4
|
+
*
|
|
5
|
+
* The periods arrive oldest first and are as many as `evaluationPeriods`, with
|
|
6
|
+
* `undefined` for a period nothing was published into.
|
|
7
|
+
*
|
|
8
|
+
* This is CloudWatch's M-of-N rule: the alarm fires when at least
|
|
9
|
+
* `datapointsToAlarm` of the periods breach, whether or not they are
|
|
10
|
+
* consecutive. Everything else is OK, except that an alarm with nothing to go
|
|
11
|
+
* on reports INSUFFICIENT_DATA rather than guessing.
|
|
12
|
+
*/
|
|
13
|
+
export function evaluateSimCloudWatchAlarm(values, definition) {
|
|
14
|
+
const verdicts = values.map((value) => verdictFor(value, definition));
|
|
15
|
+
if (keepsItsState(verdicts, definition)) {
|
|
16
|
+
return {
|
|
17
|
+
state: undefined,
|
|
18
|
+
reason: "Insufficient Data: the alarm is configured to ignore missing data, " +
|
|
19
|
+
"so its state is unchanged",
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
const breaching = verdicts.filter((verdict) => verdict === "breaching").length;
|
|
23
|
+
if (breaching >= definition.datapointsToAlarm) {
|
|
24
|
+
return { state: "ALARM", reason: reason(breaching, definition, "") };
|
|
25
|
+
}
|
|
26
|
+
if (verdicts.every((verdict) => verdict === "absent")) {
|
|
27
|
+
return {
|
|
28
|
+
state: "INSUFFICIENT_DATA",
|
|
29
|
+
reason: `Insufficient Data: ${String(values.length)} datapoints were unknown`,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return { state: "OK", reason: reason(breaching, definition, "only ") };
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Whether the alarm was told to leave its state alone when data is missing.
|
|
36
|
+
*/
|
|
37
|
+
function keepsItsState(verdicts, definition) {
|
|
38
|
+
return (definition.treatMissingData === "ignore" && verdicts.includes("absent"));
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* What one period is worth, once missing data has been treated.
|
|
42
|
+
*
|
|
43
|
+
* `missing` leaves an absent period absent, so it counts towards neither side
|
|
44
|
+
* and only matters if every period is absent. The other two treatments turn it
|
|
45
|
+
* into a period with an opinion.
|
|
46
|
+
*/
|
|
47
|
+
function verdictFor(value, definition) {
|
|
48
|
+
if (value !== undefined) {
|
|
49
|
+
return simCloudWatchBreaches(value, definition.threshold, definition.comparisonOperator)
|
|
50
|
+
? "breaching"
|
|
51
|
+
: "notBreaching";
|
|
52
|
+
}
|
|
53
|
+
switch (definition.treatMissingData) {
|
|
54
|
+
case "breaching": {
|
|
55
|
+
return "breaching";
|
|
56
|
+
}
|
|
57
|
+
case "notBreaching": {
|
|
58
|
+
return "notBreaching";
|
|
59
|
+
}
|
|
60
|
+
// `missing` leaves the period absent so it counts towards neither side,
|
|
61
|
+
// and `ignore` never reaches here: an absent period under it stops the
|
|
62
|
+
// evaluation before any verdict is read.
|
|
63
|
+
case "missing":
|
|
64
|
+
case "ignore": {
|
|
65
|
+
return "absent";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Why the alarm decided what it did, in the shape real CloudWatch words it.
|
|
71
|
+
*/
|
|
72
|
+
function reason(breaching, definition, qualifier) {
|
|
73
|
+
return `Threshold Crossed: ${qualifier}${String(breaching)} out of the last ${String(definition.evaluationPeriods)} datapoints were ${definition.comparisonOperator} the threshold (${String(definition.threshold)})`;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-evaluation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-evaluation.js","sourceRoot":"","sources":["../../../../src/service/cloudwatch/alarm/sim-cloudwatch-alarm-evaluation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAwBvE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,0BAA0B,CACxC,MAAuC,EACvC,UAAwC;IAExC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;IAEtE,IAAI,aAAa,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,CAAC;QACxC,OAAO;YACL,KAAK,EAAE,SAAS;YAChB,MAAM,EACJ,qEAAqE;gBACrE,2BAA2B;SAC9B,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,CAC/B,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,WAAW,CACrC,CAAC,MAAM,CAAC;IAET,IAAI,SAAS,IAAI,UAAU,CAAC,iBAAiB,EAAE,CAAC;QAC9C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC;IACvE,CAAC;IAED,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,QAAQ,CAAC,EAAE,CAAC;QACtD,OAAO;YACL,KAAK,EAAE,mBAAmB;YAC1B,MAAM,EAAE,sBAAsB,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,0BAA0B;SAC9E,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,CAAC;AACzE,CAAC;AAED;;GAEG;AACH,SAAS,aAAa,CACpB,QAA+C,EAC/C,UAAwC;IAExC,OAAO,CACL,UAAU,CAAC,gBAAgB,KAAK,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CACxE,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,SAAS,UAAU,CACjB,KAAyB,EACzB,UAAwC;IAExC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,qBAAqB,CAC1B,KAAK,EACL,UAAU,CAAC,SAAS,EACpB,UAAU,CAAC,kBAAkB,CAC9B;YACC,CAAC,CAAC,WAAW;YACb,CAAC,CAAC,cAAc,CAAC;IACrB,CAAC;IAED,QAAQ,UAAU,CAAC,gBAAgB,EAAE,CAAC;QACpC,KAAK,WAAW,EAAE,CAAC;YACjB,OAAO,WAAW,CAAC;QACrB,CAAC;QACD,KAAK,cAAc,EAAE,CAAC;YACpB,OAAO,cAAc,CAAC;QACxB,CAAC;QACD,wEAAwE;QACxE,uEAAuE;QACvE,yCAAyC;QACzC,KAAK,SAAS,CAAC;QACf,KAAK,QAAQ,EAAE,CAAC;YACd,OAAO,QAAQ,CAAC;QAClB,CAAC;IACH,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,MAAM,CACb,SAAiB,EACjB,UAAwC,EACxC,SAAiB;IAEjB,OAAO,sBAAsB,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,MAAM,CAAC,UAAU,CAAC,iBAAiB,CAAC,oBAAoB,UAAU,CAAC,kBAAkB,mBAAmB,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC;AACxN,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SimCloudWatchAlarmState } from "./sim-cloudwatch-alarm-state.js";
|
|
2
|
+
/**
|
|
3
|
+
* One thing that happened to an alarm.
|
|
4
|
+
*
|
|
5
|
+
* Only state changes are recorded. Real CloudWatch also records configuration
|
|
6
|
+
* updates and action invocations, and those say nothing a test could not read
|
|
7
|
+
* off the alarm itself, so the history here is the transitions.
|
|
8
|
+
*/
|
|
9
|
+
export interface SimCloudWatchAlarmHistoryItem {
|
|
10
|
+
readonly timestamp: Date;
|
|
11
|
+
readonly previousState: SimCloudWatchAlarmState;
|
|
12
|
+
readonly state: SimCloudWatchAlarmState;
|
|
13
|
+
readonly reason: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The state changes of one alarm, newest first.
|
|
17
|
+
*
|
|
18
|
+
* Newest first is how real DescribeAlarmHistory answers, and it is what a test
|
|
19
|
+
* asserting on the last transition wants to read.
|
|
20
|
+
*/
|
|
21
|
+
export declare class SimCloudWatchAlarmHistory {
|
|
22
|
+
#private;
|
|
23
|
+
get all(): readonly SimCloudWatchAlarmHistoryItem[];
|
|
24
|
+
record(item: SimCloudWatchAlarmHistoryItem): void;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-history.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudwatch/alarm/sim-cloudwatch-alarm-history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE/E;;;;;;GAMG;AACH,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,uBAAuB,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,uBAAuB,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,qBAAa,yBAAyB;;IAGpC,IAAI,GAAG,IAAI,SAAS,6BAA6B,EAAE,CAElD;IAED,MAAM,CAAC,IAAI,EAAE,6BAA6B,GAAG,IAAI,CAEhD;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The state changes of one alarm, newest first.
|
|
3
|
+
*
|
|
4
|
+
* Newest first is how real DescribeAlarmHistory answers, and it is what a test
|
|
5
|
+
* asserting on the last transition wants to read.
|
|
6
|
+
*/
|
|
7
|
+
export class SimCloudWatchAlarmHistory {
|
|
8
|
+
#items = [];
|
|
9
|
+
get all() {
|
|
10
|
+
return this.#items;
|
|
11
|
+
}
|
|
12
|
+
record(item) {
|
|
13
|
+
this.#items.unshift(item);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-history.js","sourceRoot":"","sources":["../../../../src/service/cloudwatch/alarm/sim-cloudwatch-alarm-history.ts"],"names":[],"mappings":"AAgBA;;;;;GAKG;AACH,MAAM,OAAO,yBAAyB;IAC3B,MAAM,GAAoC,EAAE,CAAC;IAEtD,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,IAAmC;QACxC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SimCloudWatchMetricStore } from "../metric/sim-cloudwatch-metric-store.js";
|
|
2
|
+
import type { SimCloudWatchAlarmDefinition } from "./sim-cloudwatch-alarm-definition.js";
|
|
3
|
+
/**
|
|
4
|
+
* The instant the period after the one holding an instant begins.
|
|
5
|
+
*
|
|
6
|
+
* An alarm evaluates on period boundaries, so this is when it next has a
|
|
7
|
+
* complete period to look at.
|
|
8
|
+
*/
|
|
9
|
+
export declare function simCloudWatchNextPeriodBoundary(now: Date, periodSeconds: number): Date;
|
|
10
|
+
/**
|
|
11
|
+
* Read the periods an alarm looks at when it evaluates at an instant, oldest
|
|
12
|
+
* first.
|
|
13
|
+
*
|
|
14
|
+
* The window is the `evaluationPeriods` complete periods before the boundary,
|
|
15
|
+
* so an alarm evaluating at 09:03 with three one-minute periods reads 09:00,
|
|
16
|
+
* 09:01 and 09:02 and not the minute it is standing on, which has not finished.
|
|
17
|
+
*
|
|
18
|
+
* A period nothing was published into comes back as `undefined` rather than
|
|
19
|
+
* being left out, because which period is missing is what `TreatMissingData`
|
|
20
|
+
* decides on.
|
|
21
|
+
*/
|
|
22
|
+
export declare function simCloudWatchAlarmPeriods(metrics: SimCloudWatchMetricStore, definition: SimCloudWatchAlarmDefinition, boundary: Date): readonly (number | undefined)[];
|
|
23
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-periods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-periods.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudwatch/alarm/sim-cloudwatch-alarm-periods.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAGzF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAIzF;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,GAAG,EAAE,IAAI,EACT,aAAa,EAAE,MAAM,GACpB,IAAI,CAKN;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,wBAAwB,EACjC,UAAU,EAAE,4BAA4B,EACxC,QAAQ,EAAE,IAAI,GACb,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAiBjC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { simCloudWatchPeriodAggregates } from "../metric/sim-cloudwatch-period.js";
|
|
2
|
+
import { simCloudWatchStatisticValue } from "../metric/sim-cloudwatch-statistic.js";
|
|
3
|
+
const millisecondsPerSecond = 1000;
|
|
4
|
+
/**
|
|
5
|
+
* The instant the period after the one holding an instant begins.
|
|
6
|
+
*
|
|
7
|
+
* An alarm evaluates on period boundaries, so this is when it next has a
|
|
8
|
+
* complete period to look at.
|
|
9
|
+
*/
|
|
10
|
+
export function simCloudWatchNextPeriodBoundary(now, periodSeconds) {
|
|
11
|
+
const periodMilliseconds = periodSeconds * millisecondsPerSecond;
|
|
12
|
+
const elapsed = Math.floor(now.getTime() / periodMilliseconds);
|
|
13
|
+
return new Date((elapsed + 1) * periodMilliseconds);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Read the periods an alarm looks at when it evaluates at an instant, oldest
|
|
17
|
+
* first.
|
|
18
|
+
*
|
|
19
|
+
* The window is the `evaluationPeriods` complete periods before the boundary,
|
|
20
|
+
* so an alarm evaluating at 09:03 with three one-minute periods reads 09:00,
|
|
21
|
+
* 09:01 and 09:02 and not the minute it is standing on, which has not finished.
|
|
22
|
+
*
|
|
23
|
+
* A period nothing was published into comes back as `undefined` rather than
|
|
24
|
+
* being left out, because which period is missing is what `TreatMissingData`
|
|
25
|
+
* decides on.
|
|
26
|
+
*/
|
|
27
|
+
export function simCloudWatchAlarmPeriods(metrics, definition, boundary) {
|
|
28
|
+
const periodMilliseconds = definition.period * millisecondsPerSecond;
|
|
29
|
+
const endTime = boundary.getTime();
|
|
30
|
+
const startTime = endTime - definition.evaluationPeriods * periodMilliseconds;
|
|
31
|
+
const found = metrics.find(definition.metric);
|
|
32
|
+
const aggregates = simCloudWatchPeriodAggregates(found?.within({ startTime, endTime, unit: definition.unit }) ?? [], definition.period);
|
|
33
|
+
return Array.from({ length: definition.evaluationPeriods }, (_, index) => aggregates.get(startTime + index * periodMilliseconds)).map((aggregate) => aggregate === undefined
|
|
34
|
+
? undefined
|
|
35
|
+
: simCloudWatchStatisticValue(aggregate, definition.statistic));
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-periods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-periods.js","sourceRoot":"","sources":["../../../../src/service/cloudwatch/alarm/sim-cloudwatch-alarm-periods.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AAGpF,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,UAAU,+BAA+B,CAC7C,GAAS,EACT,aAAqB;IAErB,MAAM,kBAAkB,GAAG,aAAa,GAAG,qBAAqB,CAAC;IACjE,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,kBAAkB,CAAC,CAAC;IAE/D,OAAO,IAAI,IAAI,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC;AACtD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,yBAAyB,CACvC,OAAiC,EACjC,UAAwC,EACxC,QAAc;IAEd,MAAM,kBAAkB,GAAG,UAAU,CAAC,MAAM,GAAG,qBAAqB,CAAC;IACrE,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC;IACnC,MAAM,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC,iBAAiB,GAAG,kBAAkB,CAAC;IAC9E,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC9C,MAAM,UAAU,GAAG,6BAA6B,CAC9C,KAAK,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,EAClE,UAAU,CAAC,MAAM,CAClB,CAAC;IAEF,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CACvE,UAAU,CAAC,GAAG,CAAC,SAAS,GAAG,KAAK,GAAG,kBAAkB,CAAC,CACvD,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAClB,SAAS,KAAK,SAAS;QACrB,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,2BAA2B,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,CACjE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { BackgroundScheduler } from "../../../util/background/background.js";
|
|
2
|
+
import type { SimCloudWatchMetricStore } from "../metric/sim-cloudwatch-metric-store.js";
|
|
3
|
+
import type { SimCloudWatchAlarmActions } from "./action/sim-cloudwatch-alarm-actions.js";
|
|
4
|
+
import type { SimCloudWatchAlarm } from "./sim-cloudwatch-alarm.js";
|
|
5
|
+
interface SimCloudWatchAlarmScheduleProperties {
|
|
6
|
+
readonly metrics: SimCloudWatchMetricStore;
|
|
7
|
+
readonly actions: SimCloudWatchAlarmActions;
|
|
8
|
+
readonly background: BackgroundScheduler;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Runs each alarm's evaluation on the simulation's clock.
|
|
12
|
+
*
|
|
13
|
+
* Nothing here uses a real timer. An alarm's next evaluation is scheduled on
|
|
14
|
+
* the background scheduler at the next period boundary, and every evaluation
|
|
15
|
+
* schedules the one after it, so a frozen clock evaluates nothing and
|
|
16
|
+
* `advanceBy({ minutes: 20 })` walks twenty one-minute evaluations and settles
|
|
17
|
+
* before the call returns.
|
|
18
|
+
*
|
|
19
|
+
* Each alarm keeps one task for its whole life, because taking a scheduled
|
|
20
|
+
* turn back off the clock is done by task identity: a fresh closure per
|
|
21
|
+
* evaluation could be scheduled but never cancelled.
|
|
22
|
+
*/
|
|
23
|
+
export declare class SimCloudWatchAlarmSchedule {
|
|
24
|
+
#private;
|
|
25
|
+
constructor(properties: SimCloudWatchAlarmScheduleProperties);
|
|
26
|
+
/**
|
|
27
|
+
* Start evaluating an alarm, from the next period boundary.
|
|
28
|
+
*
|
|
29
|
+
* An alarm already being evaluated has its existing turn taken back off the
|
|
30
|
+
* clock first, so it never gains a second one and never keeps a turn due at
|
|
31
|
+
* the boundary of a period it no longer has: an alarm moved from an hourly
|
|
32
|
+
* to a one-minute period would otherwise sit unevaluated until the hour it
|
|
33
|
+
* was first scheduled for came round.
|
|
34
|
+
*/
|
|
35
|
+
start(alarm: SimCloudWatchAlarm): void;
|
|
36
|
+
/**
|
|
37
|
+
* Stop evaluating an alarm and take its scheduled turn back off the clock.
|
|
38
|
+
*
|
|
39
|
+
* Without this a deleted alarm would keep waking up, keep reading a metric
|
|
40
|
+
* nothing watches, and keep the simulation from settling.
|
|
41
|
+
*/
|
|
42
|
+
stop(alarmName: string): void;
|
|
43
|
+
/**
|
|
44
|
+
* Evaluate an alarm against the periods behind it, then schedule the next
|
|
45
|
+
* turn.
|
|
46
|
+
*
|
|
47
|
+
* The clock reads the boundary this turn was due at while this runs, so a
|
|
48
|
+
* transition is stamped with when it happened rather than with wherever time
|
|
49
|
+
* was eventually advanced to.
|
|
50
|
+
*/
|
|
51
|
+
private evaluate;
|
|
52
|
+
private scheduleNext;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-schedule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-schedule.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudwatch/alarm/sim-cloudwatch-alarm-schedule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAOpE,UAAU,oCAAoC;IAC5C,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,yBAAyB,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;CAC1C;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,0BAA0B;;IAMrC,YAAY,UAAU,EAAE,oCAAoC,EAI3D;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CASrC;IAED;;;;;OAKG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAS5B;IAED;;;;;;;OAOG;YACW,QAAQ;IAwBtB,OAAO,CAAC,YAAY;CASrB"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { evaluateSimCloudWatchAlarm } from "./sim-cloudwatch-alarm-evaluation.js";
|
|
2
|
+
import { simCloudWatchAlarmPeriods, simCloudWatchNextPeriodBoundary, } from "./sim-cloudwatch-alarm-periods.js";
|
|
3
|
+
/**
|
|
4
|
+
* Runs each alarm's evaluation on the simulation's clock.
|
|
5
|
+
*
|
|
6
|
+
* Nothing here uses a real timer. An alarm's next evaluation is scheduled on
|
|
7
|
+
* the background scheduler at the next period boundary, and every evaluation
|
|
8
|
+
* schedules the one after it, so a frozen clock evaluates nothing and
|
|
9
|
+
* `advanceBy({ minutes: 20 })` walks twenty one-minute evaluations and settles
|
|
10
|
+
* before the call returns.
|
|
11
|
+
*
|
|
12
|
+
* Each alarm keeps one task for its whole life, because taking a scheduled
|
|
13
|
+
* turn back off the clock is done by task identity: a fresh closure per
|
|
14
|
+
* evaluation could be scheduled but never cancelled.
|
|
15
|
+
*/
|
|
16
|
+
export class SimCloudWatchAlarmSchedule {
|
|
17
|
+
#metrics;
|
|
18
|
+
#actions;
|
|
19
|
+
#background;
|
|
20
|
+
#tasks = new Map();
|
|
21
|
+
constructor(properties) {
|
|
22
|
+
this.#metrics = properties.metrics;
|
|
23
|
+
this.#actions = properties.actions;
|
|
24
|
+
this.#background = properties.background;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Start evaluating an alarm, from the next period boundary.
|
|
28
|
+
*
|
|
29
|
+
* An alarm already being evaluated has its existing turn taken back off the
|
|
30
|
+
* clock first, so it never gains a second one and never keeps a turn due at
|
|
31
|
+
* the boundary of a period it no longer has: an alarm moved from an hourly
|
|
32
|
+
* to a one-minute period would otherwise sit unevaluated until the hour it
|
|
33
|
+
* was first scheduled for came round.
|
|
34
|
+
*/
|
|
35
|
+
start(alarm) {
|
|
36
|
+
this.stop(alarm.name);
|
|
37
|
+
const task = async () => {
|
|
38
|
+
await this.evaluate(alarm);
|
|
39
|
+
};
|
|
40
|
+
this.#tasks.set(alarm.name, task);
|
|
41
|
+
this.scheduleNext(alarm, task);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Stop evaluating an alarm and take its scheduled turn back off the clock.
|
|
45
|
+
*
|
|
46
|
+
* Without this a deleted alarm would keep waking up, keep reading a metric
|
|
47
|
+
* nothing watches, and keep the simulation from settling.
|
|
48
|
+
*/
|
|
49
|
+
stop(alarmName) {
|
|
50
|
+
const task = this.#tasks.get(alarmName);
|
|
51
|
+
if (task === undefined) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this.#tasks.delete(alarmName);
|
|
55
|
+
this.#background.cancelScheduled(task);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Evaluate an alarm against the periods behind it, then schedule the next
|
|
59
|
+
* turn.
|
|
60
|
+
*
|
|
61
|
+
* The clock reads the boundary this turn was due at while this runs, so a
|
|
62
|
+
* transition is stamped with when it happened rather than with wherever time
|
|
63
|
+
* was eventually advanced to.
|
|
64
|
+
*/
|
|
65
|
+
async evaluate(alarm) {
|
|
66
|
+
const task = this.#tasks.get(alarm.name);
|
|
67
|
+
if (task === undefined) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const now = this.#background.now();
|
|
71
|
+
const evaluation = evaluateSimCloudWatchAlarm(simCloudWatchAlarmPeriods(this.#metrics, alarm.definition, now), alarm.definition);
|
|
72
|
+
const transition = evaluation.state === undefined
|
|
73
|
+
? undefined
|
|
74
|
+
: alarm.moveTo(evaluation.state, evaluation.reason, now);
|
|
75
|
+
this.scheduleNext(alarm, task);
|
|
76
|
+
if (transition !== undefined) {
|
|
77
|
+
await this.#actions.fire(alarm, transition);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
scheduleNext(alarm, task) {
|
|
81
|
+
this.#background.scheduleAt(simCloudWatchNextPeriodBoundary(this.#background.now(), alarm.definition.period), task);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=sim-cloudwatch-alarm-schedule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cloudwatch-alarm-schedule.js","sourceRoot":"","sources":["../../../../src/service/cloudwatch/alarm/sim-cloudwatch-alarm-schedule.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EACL,yBAAyB,EACzB,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAQ3C;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,0BAA0B;IAC5B,QAAQ,CAA2B;IACnC,QAAQ,CAA4B;IACpC,WAAW,CAAsB;IACjC,MAAM,GAAG,IAAI,GAAG,EAA0B,CAAC;IAEpD,YAAY,UAAgD;QAC1D,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;IAC3C,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,KAAyB;QAC7B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEtB,MAAM,IAAI,GAAG,KAAK,IAAmB,EAAE;YACrC,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACH,IAAI,CAAC,SAAiB;QACpB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAExC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC9B,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;;OAOG;IACK,KAAK,CAAC,QAAQ,CAAC,KAAyB;QAC9C,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEzC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;QAED,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;QACnC,MAAM,UAAU,GAAG,0BAA0B,CAC3C,yBAAyB,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,EAC/D,KAAK,CAAC,UAAU,CACjB,CAAC;QACF,MAAM,UAAU,GACd,UAAU,CAAC,KAAK,KAAK,SAAS;YAC5B,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE7D,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAE/B,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAEO,YAAY,CAAC,KAAyB,EAAE,IAAoB;QAClE,IAAI,CAAC,WAAW,CAAC,UAAU,CACzB,+BAA+B,CAC7B,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,EACtB,KAAK,CAAC,UAAU,CAAC,MAAM,CACxB,EACD,IAAI,CACL,CAAC;IACJ,CAAC;CACF"}
|