@kensio/yulin 1.8.0 → 1.10.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 +25 -0
- package/dist/sdk/router/resolve-sim-sdk-command-router.d.ts.map +1 -1
- package/dist/sdk/router/resolve-sim-sdk-command-router.js +3 -0
- package/dist/sdk/router/resolve-sim-sdk-command-router.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts +17 -0
- 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 +37 -42
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-s3-notification-destinations.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-s3-notification-destinations.js +5 -0
- package/dist/service/aws/factory/sim-aws-s3-notification-destinations.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-scoped-service-properties.d.ts +18 -0
- package/dist/service/aws/factory/sim-aws-scoped-service-properties.d.ts.map +1 -0
- package/dist/service/aws/factory/sim-aws-scoped-service-properties.js +2 -0
- package/dist/service/aws/factory/sim-aws-scoped-service-properties.js.map +1 -0
- package/dist/service/aws/factory/sim-aws-service-factory.d.ts +3 -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 +4 -0
- package/dist/service/aws/factory/sim-aws-service-factory.js.map +1 -1
- package/dist/service/aws/sim-aws-account-region-scope.d.ts +5 -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 +6 -0
- package/dist/service/aws/sim-aws-account-region-scope.js.map +1 -1
- package/dist/service/aws/sim-aws-service-accessors.d.ts +3 -0
- package/dist/service/aws/sim-aws-service-accessors.d.ts.map +1 -1
- package/dist/service/aws/sim-aws-service-accessors.js +4 -0
- package/dist/service/aws/sim-aws-service-accessors.js.map +1 -1
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-copier.d.ts +36 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-copier.d.ts.map +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-copier.js +64 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-copier.js.map +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-file.d.ts +31 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-file.d.ts.map +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-file.js +42 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-file.js.map +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-files.d.ts +13 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-files.d.ts.map +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-files.js +68 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-files.js.map +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-pruner.d.ts +30 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-pruner.d.ts.map +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-pruner.js +35 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/copy/sim-cdk-bucket-deploy-pruner.js.map +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/filter/sim-cdk-bucket-deploy-filter.d.ts +27 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/filter/sim-cdk-bucket-deploy-filter.d.ts.map +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/filter/sim-cdk-bucket-deploy-filter.js +76 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/filter/sim-cdk-bucket-deploy-filter.js.map +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/property/sim-cdk-bucket-deploy-properties.d.ts +24 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/property/sim-cdk-bucket-deploy-properties.d.ts.map +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/property/sim-cdk-bucket-deploy-properties.js +46 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/property/sim-cdk-bucket-deploy-properties.js.map +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/property/sim-cdk-bucket-deploy-values.d.ts +42 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/property/sim-cdk-bucket-deploy-values.d.ts.map +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/property/sim-cdk-bucket-deploy-values.js +96 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/property/sim-cdk-bucket-deploy-values.js.map +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/sim-cdk-bucket-deployment.d.ts +1 -1
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/sim-cdk-bucket-deployment.d.ts.map +1 -1
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/sim-cdk-bucket-deployment.js +10 -35
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/sim-cdk-bucket-deployment.js.map +1 -1
- package/dist/service/cloudformation/cdk/s3/bucket-notifications/configuration/sim-cdk-bucket-notification-configuration.d.ts +2 -0
- package/dist/service/cloudformation/cdk/s3/bucket-notifications/configuration/sim-cdk-bucket-notification-configuration.d.ts.map +1 -1
- package/dist/service/cloudformation/cdk/s3/bucket-notifications/configuration/sim-cdk-bucket-notification-configuration.js +15 -1
- package/dist/service/cloudformation/cdk/s3/bucket-notifications/configuration/sim-cdk-bucket-notification-configuration.js.map +1 -1
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cfn-value-adapter.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cfn-value-adapter.js +8 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cfn-value-adapter.js.map +1 -1
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-rh-policy-cfn.d.ts +25 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-rh-policy-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-rh-policy-cfn.js +32 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-rh-policy-cfn.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/sim-cfn-resource-value-adapter.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/cfn/sim-cfn-resource-value-adapter.js +2 -0
- package/dist/service/cloudformation/resource/cfn/sim-cfn-resource-value-adapter.js.map +1 -1
- package/dist/service/cloudformation/resource/cfn/sns/sim-sns-cfn-value-adapter.d.ts +11 -0
- package/dist/service/cloudformation/resource/cfn/sns/sim-sns-cfn-value-adapter.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/sns/sim-sns-cfn-value-adapter.js +24 -0
- package/dist/service/cloudformation/resource/cfn/sns/sim-sns-cfn-value-adapter.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/sns/sim-sns-subscription-cfn.d.ts +27 -0
- package/dist/service/cloudformation/resource/cfn/sns/sim-sns-subscription-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/sns/sim-sns-subscription-cfn.js +29 -0
- package/dist/service/cloudformation/resource/cfn/sns/sim-sns-subscription-cfn.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/sns/sim-sns-topic-cfn.d.ts +30 -0
- package/dist/service/cloudformation/resource/cfn/sns/sim-sns-topic-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/sns/sim-sns-topic-cfn.js +39 -0
- package/dist/service/cloudformation/resource/cfn/sns/sim-sns-topic-cfn.js.map +1 -0
- 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 +4 -0
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-factories.js.map +1 -1
- package/dist/service/cloudfront/behaviour/sim-cloud-front-behavior.d.ts +4 -0
- package/dist/service/cloudfront/behaviour/sim-cloud-front-behavior.d.ts.map +1 -1
- package/dist/service/cloudfront/behaviour/sim-cloud-front-behavior.js.map +1 -1
- package/dist/service/cloudfront/cfn/response-headers-policy/sim-cfn-cf-rh-policy-config.d.ts +38 -0
- package/dist/service/cloudfront/cfn/response-headers-policy/sim-cfn-cf-rh-policy-config.d.ts.map +1 -0
- package/dist/service/cloudfront/cfn/response-headers-policy/sim-cfn-cf-rh-policy-config.js +127 -0
- package/dist/service/cloudfront/cfn/response-headers-policy/sim-cfn-cf-rh-policy-config.js.map +1 -0
- package/dist/service/cloudfront/cfn/response-headers-policy/sim-cfn-cf-rh-policy-creator.d.ts +25 -0
- package/dist/service/cloudfront/cfn/response-headers-policy/sim-cfn-cf-rh-policy-creator.d.ts.map +1 -0
- package/dist/service/cloudfront/cfn/response-headers-policy/sim-cfn-cf-rh-policy-creator.js +33 -0
- package/dist/service/cloudfront/cfn/response-headers-policy/sim-cfn-cf-rh-policy-creator.js.map +1 -0
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.d.ts +1 -0
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.d.ts.map +1 -1
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js +11 -0
- package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js.map +1 -1
- package/dist/service/cloudfront/command/create-distribution/create-distribution.command.d.ts +1 -0
- package/dist/service/cloudfront/command/create-distribution/create-distribution.command.d.ts.map +1 -1
- package/dist/service/cloudfront/controller/dependency/sim-cf-controller-dependency.d.ts +3 -0
- package/dist/service/cloudfront/controller/dependency/sim-cf-controller-dependency.d.ts.map +1 -1
- package/dist/service/cloudfront/controller/dependency/sim-cf-controller-dependency.js +3 -0
- package/dist/service/cloudfront/controller/dependency/sim-cf-controller-dependency.js.map +1 -1
- package/dist/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.d.ts +19 -0
- package/dist/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.d.ts.map +1 -0
- package/dist/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.js +31 -0
- package/dist/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.js.map +1 -0
- package/dist/service/cloudfront/controller/sim-cloudfront-request-pipeline.d.ts +4 -8
- package/dist/service/cloudfront/controller/sim-cloudfront-request-pipeline.d.ts.map +1 -1
- package/dist/service/cloudfront/controller/sim-cloudfront-request-pipeline.js +16 -19
- package/dist/service/cloudfront/controller/sim-cloudfront-request-pipeline.js.map +1 -1
- package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-behavior-configurator.js +3 -0
- package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-behavior-configurator.js.map +1 -1
- package/dist/service/cloudfront/error/sim-cloudfront.error.d.ts +19 -0
- package/dist/service/cloudfront/error/sim-cloudfront.error.d.ts.map +1 -1
- package/dist/service/cloudfront/error/sim-cloudfront.error.js +23 -0
- package/dist/service/cloudfront/error/sim-cloudfront.error.js.map +1 -1
- package/dist/service/cloudfront/origin/s3/sim-cloudfront-s3-origin.d.ts.map +1 -1
- package/dist/service/cloudfront/origin/s3/sim-cloudfront-s3-origin.js +2 -5
- package/dist/service/cloudfront/origin/s3/sim-cloudfront-s3-origin.js.map +1 -1
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-header.d.ts +25 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-header.d.ts.map +1 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-header.js +30 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-header.js.map +1 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-registry.d.ts +29 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-registry.d.ts.map +1 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-registry.js +40 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-registry.js.map +1 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy.d.ts +35 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy.d.ts.map +1 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy.js +44 -0
- package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy.js.map +1 -0
- package/dist/service/cloudfront/sim-cloudfront.d.ts +18 -0
- package/dist/service/cloudfront/sim-cloudfront.d.ts.map +1 -1
- package/dist/service/cloudfront/sim-cloudfront.js +24 -0
- package/dist/service/cloudfront/sim-cloudfront.js.map +1 -1
- package/dist/service/route53/cfn/record-set/apply/sim-cfn-r53-record-set-applicator.d.ts.map +1 -1
- package/dist/service/route53/cfn/record-set/apply/sim-cfn-r53-record-set-applicator.js +4 -1
- package/dist/service/route53/cfn/record-set/apply/sim-cfn-r53-record-set-applicator.js.map +1 -1
- package/dist/service/route53/cfn/record-set/resolve/sim-cfn-r53-looked-up-zone.d.ts +39 -0
- package/dist/service/route53/cfn/record-set/resolve/sim-cfn-r53-looked-up-zone.d.ts.map +1 -0
- package/dist/service/route53/cfn/record-set/resolve/sim-cfn-r53-looked-up-zone.js +46 -0
- package/dist/service/route53/cfn/record-set/resolve/sim-cfn-r53-looked-up-zone.js.map +1 -0
- package/dist/service/route53/cfn/record-set/resolve/sim-cfn-r53-rec-set-zone-resolver.d.ts +2 -0
- package/dist/service/route53/cfn/record-set/resolve/sim-cfn-r53-rec-set-zone-resolver.d.ts.map +1 -1
- package/dist/service/route53/cfn/record-set/resolve/sim-cfn-r53-rec-set-zone-resolver.js +17 -1
- package/dist/service/route53/cfn/record-set/resolve/sim-cfn-r53-rec-set-zone-resolver.js.map +1 -1
- package/dist/service/route53/hosted-zone/register-sim-route53-hosted-zone.d.ts +6 -0
- package/dist/service/route53/hosted-zone/register-sim-route53-hosted-zone.d.ts.map +1 -1
- package/dist/service/route53/hosted-zone/register-sim-route53-hosted-zone.js +1 -0
- package/dist/service/route53/hosted-zone/register-sim-route53-hosted-zone.js.map +1 -1
- package/dist/service/route53/hosted-zone/sim-route53-hosted-zone.d.ts +23 -10
- package/dist/service/route53/hosted-zone/sim-route53-hosted-zone.d.ts.map +1 -1
- package/dist/service/route53/hosted-zone/sim-route53-hosted-zone.js +32 -45
- package/dist/service/route53/hosted-zone/sim-route53-hosted-zone.js.map +1 -1
- package/dist/service/route53/hosted-zone/sim-route53-zone-name-widening.d.ts +16 -0
- package/dist/service/route53/hosted-zone/sim-route53-zone-name-widening.d.ts.map +1 -0
- package/dist/service/route53/hosted-zone/sim-route53-zone-name-widening.js +35 -0
- package/dist/service/route53/hosted-zone/sim-route53-zone-name-widening.js.map +1 -0
- package/dist/service/route53/hosted-zone/sim-route53-zone-synchronization.d.ts +23 -0
- package/dist/service/route53/hosted-zone/sim-route53-zone-synchronization.d.ts.map +1 -0
- package/dist/service/route53/hosted-zone/sim-route53-zone-synchronization.js +43 -0
- package/dist/service/route53/hosted-zone/sim-route53-zone-synchronization.js.map +1 -0
- package/dist/service/route53/sim-route53.d.ts +1 -1
- package/dist/service/route53/sim-route53.d.ts.map +1 -1
- package/dist/service/route53/sim-route53.js +1 -1
- package/dist/service/route53/sim-route53.js.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration-reader.d.ts.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration-reader.js +2 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration-reader.js.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration.d.ts +3 -0
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration.d.ts.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration.js +10 -1
- package/dist/service/s3/bucket/notification/sim-s3-notification-configuration.js.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-topic-notification.d.ts +21 -0
- package/dist/service/s3/bucket/notification/sim-s3-topic-notification.d.ts.map +1 -0
- package/dist/service/s3/bucket/notification/sim-s3-topic-notification.js +24 -0
- package/dist/service/s3/bucket/notification/sim-s3-topic-notification.js.map +1 -0
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-destinations.d.ts +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-destinations.d.ts.map +1 -1
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-destinations.js +3 -3
- package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-destinations.js.map +1 -1
- package/dist/service/s3/bucket/sim-s3-bucket-access.d.ts.map +1 -1
- package/dist/service/s3/bucket/sim-s3-bucket-access.js +6 -1
- package/dist/service/s3/bucket/sim-s3-bucket-access.js.map +1 -1
- package/dist/service/s3/cfn/bucket/notification/sim-cfn-s3-bucket-notification-configuration.d.ts +9 -6
- package/dist/service/s3/cfn/bucket/notification/sim-cfn-s3-bucket-notification-configuration.d.ts.map +1 -1
- package/dist/service/s3/cfn/bucket/notification/sim-cfn-s3-bucket-notification-configuration.js +32 -7
- package/dist/service/s3/cfn/bucket/notification/sim-cfn-s3-bucket-notification-configuration.js.map +1 -1
- package/dist/service/s3/command/get-bucket-notification-configuration/get-bucket-notification-configuration.command.d.ts +2 -1
- package/dist/service/s3/command/get-bucket-notification-configuration/get-bucket-notification-configuration.command.d.ts.map +1 -1
- package/dist/service/s3/command/put-bucket-notification-configuration/put-bucket-notification-configuration.command.d.ts +10 -1
- package/dist/service/s3/command/put-bucket-notification-configuration/put-bucket-notification-configuration.command.d.ts.map +1 -1
- package/dist/service/s3/command/put-object/put-object-builder.d.ts +13 -4
- package/dist/service/s3/command/put-object/put-object-builder.d.ts.map +1 -1
- package/dist/service/s3/command/put-object/put-object-builder.js +27 -10
- package/dist/service/s3/command/put-object/put-object-builder.js.map +1 -1
- package/dist/service/s3/command/put-object/put-object.command.d.ts +11 -0
- package/dist/service/s3/command/put-object/put-object.command.d.ts.map +1 -1
- package/dist/service/s3/mount/sim-s3-mount.type.d.ts +12 -0
- package/dist/service/s3/mount/sim-s3-mount.type.d.ts.map +1 -1
- package/dist/service/s3/notification/destination/sim-s3-notification-destination.d.ts +1 -1
- package/dist/service/s3/notification/destination/sim-s3-notification-destination.d.ts.map +1 -1
- package/dist/service/s3/notification/destination/sim-s3-service-notification-destinations.d.ts +2 -0
- package/dist/service/s3/notification/destination/sim-s3-service-notification-destinations.d.ts.map +1 -1
- package/dist/service/s3/notification/destination/sim-s3-service-notification-destinations.js +5 -0
- package/dist/service/s3/notification/destination/sim-s3-service-notification-destinations.js.map +1 -1
- package/dist/service/s3/notification/destination/sns/sim-aws-s3-notification-topics.d.ts +38 -0
- package/dist/service/s3/notification/destination/sns/sim-aws-s3-notification-topics.d.ts.map +1 -0
- package/dist/service/s3/notification/destination/sns/sim-aws-s3-notification-topics.js +50 -0
- package/dist/service/s3/notification/destination/sns/sim-aws-s3-notification-topics.js.map +1 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-notification-topic-arn.d.ts +31 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-notification-topic-arn.d.ts.map +1 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-notification-topic-arn.js +48 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-notification-topic-arn.js.map +1 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-notification-topic.d.ts +43 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-notification-topic.d.ts.map +1 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-notification-topic.js +71 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-notification-topic.js.map +1 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-notification-topics.d.ts +22 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-notification-topics.d.ts.map +1 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-notification-topics.js +2 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-notification-topics.js.map +1 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-sns-notification-destination.d.ts +40 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-sns-notification-destination.d.ts.map +1 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-sns-notification-destination.js +51 -0
- package/dist/service/s3/notification/destination/sns/sim-s3-sns-notification-destination.js.map +1 -0
- package/dist/service/s3/object/s3-object-response-headers.d.ts +17 -0
- package/dist/service/s3/object/s3-object-response-headers.d.ts.map +1 -0
- package/dist/service/s3/object/s3-object-response-headers.js +29 -0
- package/dist/service/s3/object/s3-object-response-headers.js.map +1 -0
- package/dist/service/s3/object/s3-system-metadata.d.ts +32 -0
- package/dist/service/s3/object/s3-system-metadata.d.ts.map +1 -0
- package/dist/service/s3/object/s3-system-metadata.js +35 -0
- package/dist/service/s3/object/s3-system-metadata.js.map +1 -0
- package/dist/service/s3/serve/sim-s3-rest-object-reader.d.ts.map +1 -1
- package/dist/service/s3/serve/sim-s3-rest-object-reader.js +2 -5
- package/dist/service/s3/serve/sim-s3-rest-object-reader.js.map +1 -1
- package/dist/service/s3/serve/website/sim-s3-website-object-loader.js +1 -1
- package/dist/service/s3/serve/website/sim-s3-website-object-loader.js.map +1 -1
- package/dist/service/s3/serve/website/sim-s3-website-object.d.ts +3 -4
- package/dist/service/s3/serve/website/sim-s3-website-object.d.ts.map +1 -1
- package/dist/service/s3/serve/website/sim-s3-website-object.js +6 -11
- package/dist/service/s3/serve/website/sim-s3-website-object.js.map +1 -1
- package/dist/service/s3/storage/filesystem/s3-filesystem-allowed.d.ts +36 -0
- package/dist/service/s3/storage/filesystem/s3-filesystem-allowed.d.ts.map +1 -0
- package/dist/service/s3/storage/filesystem/s3-filesystem-allowed.js +73 -0
- package/dist/service/s3/storage/filesystem/s3-filesystem-allowed.js.map +1 -0
- package/dist/service/s3/storage/filesystem/s3-filesystem-object-metadata.d.ts.map +1 -1
- package/dist/service/s3/storage/filesystem/s3-filesystem-object-metadata.js +5 -6
- package/dist/service/s3/storage/filesystem/s3-filesystem-object-metadata.js.map +1 -1
- package/dist/service/s3/storage/filesystem/s3-filesystem-safety.d.ts +2 -0
- package/dist/service/s3/storage/filesystem/s3-filesystem-safety.d.ts.map +1 -1
- package/dist/service/s3/storage/filesystem/s3-filesystem-safety.js +7 -41
- package/dist/service/s3/storage/filesystem/s3-filesystem-safety.js.map +1 -1
- package/dist/service/s3/storage/filesystem/s3-filesystem-storage.d.ts +1 -0
- package/dist/service/s3/storage/filesystem/s3-filesystem-storage.d.ts.map +1 -1
- package/dist/service/s3/storage/filesystem/s3-filesystem-storage.js +1 -0
- package/dist/service/s3/storage/filesystem/s3-filesystem-storage.js.map +1 -1
- package/dist/service/sns/cfn/sim-cfn-sns-attribute-value.d.ts +15 -0
- package/dist/service/sns/cfn/sim-cfn-sns-attribute-value.d.ts.map +1 -0
- package/dist/service/sns/cfn/sim-cfn-sns-attribute-value.js +23 -0
- package/dist/service/sns/cfn/sim-cfn-sns-attribute-value.js.map +1 -0
- package/dist/service/sns/cfn/sim-cfn-sns-resource-deleter.d.ts +38 -0
- package/dist/service/sns/cfn/sim-cfn-sns-resource-deleter.d.ts.map +1 -0
- package/dist/service/sns/cfn/sim-cfn-sns-resource-deleter.js +73 -0
- package/dist/service/sns/cfn/sim-cfn-sns-resource-deleter.js.map +1 -0
- package/dist/service/sns/cfn/sim-cfn-sns-resource-error.d.ts +24 -0
- package/dist/service/sns/cfn/sim-cfn-sns-resource-error.d.ts.map +1 -0
- package/dist/service/sns/cfn/sim-cfn-sns-resource-error.js +39 -0
- package/dist/service/sns/cfn/sim-cfn-sns-resource-error.js.map +1 -0
- package/dist/service/sns/cfn/sim-cfn-sns-resource-types.d.ts +11 -0
- package/dist/service/sns/cfn/sim-cfn-sns-resource-types.d.ts.map +1 -0
- package/dist/service/sns/cfn/sim-cfn-sns-resource-types.js +11 -0
- package/dist/service/sns/cfn/sim-cfn-sns-resource-types.js.map +1 -0
- package/dist/service/sns/cfn/sim-sns-cfn-resource-factory.d.ts +31 -0
- package/dist/service/sns/cfn/sim-sns-cfn-resource-factory.d.ts.map +1 -0
- package/dist/service/sns/cfn/sim-sns-cfn-resource-factory.js +54 -0
- package/dist/service/sns/cfn/sim-sns-cfn-resource-factory.js.map +1 -0
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-creator.d.ts +26 -0
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-creator.d.ts.map +1 -0
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-creator.js +37 -0
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-creator.js.map +1 -0
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-properties.d.ts +47 -0
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-properties.d.ts.map +1 -0
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-properties.js +88 -0
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-properties.js.map +1 -0
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-property-names.d.ts +36 -0
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-property-names.d.ts.map +1 -0
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-property-names.js +55 -0
- package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-property-names.js.map +1 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-inline-subscriptions.d.ts +23 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-inline-subscriptions.d.ts.map +1 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-inline-subscriptions.js +49 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-inline-subscriptions.js.map +1 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-creator.d.ts +34 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-creator.d.ts.map +1 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-creator.js +60 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-creator.js.map +1 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-name.d.ts +22 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-name.d.ts.map +1 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-name.js +27 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-name.js.map +1 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-properties.d.ts +58 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-properties.d.ts.map +1 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-properties.js +93 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-properties.js.map +1 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-property-names.d.ts +31 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-property-names.d.ts.map +1 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-property-names.js +52 -0
- package/dist/service/sns/cfn/topic/sim-cfn-sns-topic-property-names.js.map +1 -0
- package/dist/service/sns/cfn/topic-policy/sim-cfn-sns-topic-policy-creator.d.ts +34 -0
- package/dist/service/sns/cfn/topic-policy/sim-cfn-sns-topic-policy-creator.d.ts.map +1 -0
- package/dist/service/sns/cfn/topic-policy/sim-cfn-sns-topic-policy-creator.js +58 -0
- package/dist/service/sns/cfn/topic-policy/sim-cfn-sns-topic-policy-creator.js.map +1 -0
- package/dist/service/sns/cfn/topic-policy/sim-cfn-sns-topic-policy-properties.d.ts +20 -0
- package/dist/service/sns/cfn/topic-policy/sim-cfn-sns-topic-policy-properties.d.ts.map +1 -0
- package/dist/service/sns/cfn/topic-policy/sim-cfn-sns-topic-policy-properties.js +44 -0
- package/dist/service/sns/cfn/topic-policy/sim-cfn-sns-topic-policy-properties.js.map +1 -0
- package/dist/service/sns/command/authorize/sim-sns-authorizer.d.ts +58 -0
- package/dist/service/sns/command/authorize/sim-sns-authorizer.d.ts.map +1 -0
- package/dist/service/sns/command/authorize/sim-sns-authorizer.js +83 -0
- package/dist/service/sns/command/authorize/sim-sns-authorizer.js.map +1 -0
- package/dist/service/sns/command/authorize/sim-sns-condition-context.d.ts +13 -0
- package/dist/service/sns/command/authorize/sim-sns-condition-context.d.ts.map +1 -0
- package/dist/service/sns/command/authorize/sim-sns-condition-context.js +21 -0
- package/dist/service/sns/command/authorize/sim-sns-condition-context.js.map +1 -0
- package/dist/service/sns/command/authorize/sim-sns-service-publish-authorizer.d.ts +41 -0
- package/dist/service/sns/command/authorize/sim-sns-service-publish-authorizer.d.ts.map +1 -0
- package/dist/service/sns/command/authorize/sim-sns-service-publish-authorizer.js +40 -0
- package/dist/service/sns/command/authorize/sim-sns-service-publish-authorizer.js.map +1 -0
- package/dist/service/sns/command/authorize/sim-sns-topic-resource-policies.d.ts +12 -0
- package/dist/service/sns/command/authorize/sim-sns-topic-resource-policies.d.ts.map +1 -0
- package/dist/service/sns/command/authorize/sim-sns-topic-resource-policies.js +25 -0
- package/dist/service/sns/command/authorize/sim-sns-topic-resource-policies.js.map +1 -0
- package/dist/service/sns/command/publish/publish.command.d.ts +70 -0
- package/dist/service/sns/command/publish/publish.command.d.ts.map +1 -0
- package/dist/service/sns/command/publish/publish.command.js +2 -0
- package/dist/service/sns/command/publish/publish.command.js.map +1 -0
- package/dist/service/sns/command/publish/sim-sns-batch-entries.d.ts +52 -0
- package/dist/service/sns/command/publish/sim-sns-batch-entries.d.ts.map +1 -0
- package/dist/service/sns/command/publish/sim-sns-batch-entries.js +85 -0
- package/dist/service/sns/command/publish/sim-sns-batch-entries.js.map +1 -0
- package/dist/service/sns/command/publish/sim-sns-publish-commands.d.ts +53 -0
- package/dist/service/sns/command/publish/sim-sns-publish-commands.d.ts.map +1 -0
- package/dist/service/sns/command/publish/sim-sns-publish-commands.js +83 -0
- package/dist/service/sns/command/publish/sim-sns-publish-commands.js.map +1 -0
- package/dist/service/sns/command/publish/sim-sns-publish-input.d.ts +23 -0
- package/dist/service/sns/command/publish/sim-sns-publish-input.d.ts.map +1 -0
- package/dist/service/sns/command/publish/sim-sns-publish-input.js +47 -0
- package/dist/service/sns/command/publish/sim-sns-publish-input.js.map +1 -0
- package/dist/service/sns/command/sim-sns-command.types.d.ts +7 -0
- package/dist/service/sns/command/sim-sns-command.types.d.ts.map +1 -0
- package/dist/service/sns/command/sim-sns-command.types.js +2 -0
- package/dist/service/sns/command/sim-sns-command.types.js.map +1 -0
- package/dist/service/sns/command/sim-sns-commands.d.ts +45 -0
- package/dist/service/sns/command/sim-sns-commands.d.ts.map +1 -0
- package/dist/service/sns/command/sim-sns-commands.js +83 -0
- package/dist/service/sns/command/sim-sns-commands.js.map +1 -0
- package/dist/service/sns/command/sim-sns-page.d.ts +19 -0
- package/dist/service/sns/command/sim-sns-page.d.ts.map +1 -0
- package/dist/service/sns/command/sim-sns-page.js +51 -0
- package/dist/service/sns/command/sim-sns-page.js.map +1 -0
- package/dist/service/sns/command/sim-sns-request-options.d.ts +47 -0
- package/dist/service/sns/command/sim-sns-request-options.d.ts.map +1 -0
- package/dist/service/sns/command/sim-sns-request-options.js +19 -0
- package/dist/service/sns/command/sim-sns-request-options.js.map +1 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-access.d.ts +42 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-access.d.ts.map +1 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-access.js +57 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-access.js.map +1 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-attribute-commands.d.ts +31 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-attribute-commands.d.ts.map +1 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-attribute-commands.js +44 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-attribute-commands.js.map +1 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-commands.d.ts +50 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-commands.d.ts.map +1 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-commands.js +73 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-commands.js.map +1 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-listings.d.ts +34 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-listings.d.ts.map +1 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-listings.js +57 -0
- package/dist/service/sns/command/subscription/sim-sns-subscription-listings.js.map +1 -0
- package/dist/service/sns/command/subscription/subscription.command.d.ts +118 -0
- package/dist/service/sns/command/subscription/subscription.command.d.ts.map +1 -0
- package/dist/service/sns/command/subscription/subscription.command.js +2 -0
- package/dist/service/sns/command/subscription/subscription.command.js.map +1 -0
- package/dist/service/sns/command/topic/sim-sns-create-topic.d.ts +41 -0
- package/dist/service/sns/command/topic/sim-sns-create-topic.d.ts.map +1 -0
- package/dist/service/sns/command/topic/sim-sns-create-topic.js +54 -0
- package/dist/service/sns/command/topic/sim-sns-create-topic.js.map +1 -0
- package/dist/service/sns/command/topic/sim-sns-request-topic-name.d.ts +11 -0
- package/dist/service/sns/command/topic/sim-sns-request-topic-name.d.ts.map +1 -0
- package/dist/service/sns/command/topic/sim-sns-request-topic-name.js +28 -0
- package/dist/service/sns/command/topic/sim-sns-request-topic-name.js.map +1 -0
- package/dist/service/sns/command/topic/sim-sns-topic-access.d.ts +76 -0
- package/dist/service/sns/command/topic/sim-sns-topic-access.d.ts.map +1 -0
- package/dist/service/sns/command/topic/sim-sns-topic-access.js +81 -0
- package/dist/service/sns/command/topic/sim-sns-topic-access.js.map +1 -0
- package/dist/service/sns/command/topic/sim-sns-topic-attribute-commands.d.ts +36 -0
- package/dist/service/sns/command/topic/sim-sns-topic-attribute-commands.d.ts.map +1 -0
- package/dist/service/sns/command/topic/sim-sns-topic-attribute-commands.js +47 -0
- package/dist/service/sns/command/topic/sim-sns-topic-attribute-commands.js.map +1 -0
- package/dist/service/sns/command/topic/sim-sns-topic-commands.d.ts +42 -0
- package/dist/service/sns/command/topic/sim-sns-topic-commands.d.ts.map +1 -0
- package/dist/service/sns/command/topic/sim-sns-topic-commands.js +51 -0
- package/dist/service/sns/command/topic/sim-sns-topic-commands.js.map +1 -0
- package/dist/service/sns/command/topic/sim-sns-unsimulated-topic-input.d.ts +11 -0
- package/dist/service/sns/command/topic/sim-sns-unsimulated-topic-input.d.ts.map +1 -0
- package/dist/service/sns/command/topic/sim-sns-unsimulated-topic-input.js +20 -0
- package/dist/service/sns/command/topic/sim-sns-unsimulated-topic-input.js.map +1 -0
- package/dist/service/sns/command/topic/topic.command.d.ts +95 -0
- package/dist/service/sns/command/topic/topic.command.d.ts.map +1 -0
- package/dist/service/sns/command/topic/topic.command.js +2 -0
- package/dist/service/sns/command/topic/topic.command.js.map +1 -0
- package/dist/service/sns/delivery/lambda/sim-aws-sns-delivery-functions.d.ts +27 -0
- package/dist/service/sns/delivery/lambda/sim-aws-sns-delivery-functions.d.ts.map +1 -0
- package/dist/service/sns/delivery/lambda/sim-aws-sns-delivery-functions.js +31 -0
- package/dist/service/sns/delivery/lambda/sim-aws-sns-delivery-functions.js.map +1 -0
- package/dist/service/sns/delivery/lambda/sim-sns-delivery-function.d.ts +31 -0
- package/dist/service/sns/delivery/lambda/sim-sns-delivery-function.d.ts.map +1 -0
- package/dist/service/sns/delivery/lambda/sim-sns-delivery-function.js +62 -0
- package/dist/service/sns/delivery/lambda/sim-sns-delivery-function.js.map +1 -0
- package/dist/service/sns/delivery/lambda/sim-sns-lambda-event.d.ts +10 -0
- package/dist/service/sns/delivery/lambda/sim-sns-lambda-event.d.ts.map +1 -0
- package/dist/service/sns/delivery/lambda/sim-sns-lambda-event.js +53 -0
- package/dist/service/sns/delivery/lambda/sim-sns-lambda-event.js.map +1 -0
- package/dist/service/sns/delivery/sim-aws-sns-delivery-endpoints.d.ts +17 -0
- package/dist/service/sns/delivery/sim-aws-sns-delivery-endpoints.d.ts.map +1 -0
- package/dist/service/sns/delivery/sim-aws-sns-delivery-endpoints.js +21 -0
- package/dist/service/sns/delivery/sim-aws-sns-delivery-endpoints.js.map +1 -0
- package/dist/service/sns/delivery/sim-sns-canonical-message.d.ts +32 -0
- package/dist/service/sns/delivery/sim-sns-canonical-message.d.ts.map +1 -0
- package/dist/service/sns/delivery/sim-sns-canonical-message.js +24 -0
- package/dist/service/sns/delivery/sim-sns-canonical-message.js.map +1 -0
- package/dist/service/sns/delivery/sim-sns-delivery-failures.d.ts +60 -0
- package/dist/service/sns/delivery/sim-sns-delivery-failures.d.ts.map +1 -0
- package/dist/service/sns/delivery/sim-sns-delivery-failures.js +84 -0
- package/dist/service/sns/delivery/sim-sns-delivery-failures.js.map +1 -0
- package/dist/service/sns/delivery/sim-sns-delivery-request.d.ts +28 -0
- package/dist/service/sns/delivery/sim-sns-delivery-request.d.ts.map +1 -0
- package/dist/service/sns/delivery/sim-sns-delivery-request.js +34 -0
- package/dist/service/sns/delivery/sim-sns-delivery-request.js.map +1 -0
- package/dist/service/sns/delivery/sim-sns-delivery.d.ts +55 -0
- package/dist/service/sns/delivery/sim-sns-delivery.d.ts.map +1 -0
- package/dist/service/sns/delivery/sim-sns-delivery.js +18 -0
- package/dist/service/sns/delivery/sim-sns-delivery.js.map +1 -0
- package/dist/service/sns/delivery/sim-sns-envelope.d.ts +26 -0
- package/dist/service/sns/delivery/sim-sns-envelope.d.ts.map +1 -0
- package/dist/service/sns/delivery/sim-sns-envelope.js +41 -0
- package/dist/service/sns/delivery/sim-sns-envelope.js.map +1 -0
- package/dist/service/sns/delivery/sim-sns-fan-out.d.ts +53 -0
- package/dist/service/sns/delivery/sim-sns-fan-out.d.ts.map +1 -0
- package/dist/service/sns/delivery/sim-sns-fan-out.js +69 -0
- package/dist/service/sns/delivery/sim-sns-fan-out.js.map +1 -0
- package/dist/service/sns/delivery/sim-sns-no-delivery-endpoints.d.ts +17 -0
- package/dist/service/sns/delivery/sim-sns-no-delivery-endpoints.d.ts.map +1 -0
- package/dist/service/sns/delivery/sim-sns-no-delivery-endpoints.js +23 -0
- package/dist/service/sns/delivery/sim-sns-no-delivery-endpoints.js.map +1 -0
- package/dist/service/sns/delivery/sim-sns-notification.d.ts +57 -0
- package/dist/service/sns/delivery/sim-sns-notification.d.ts.map +1 -0
- package/dist/service/sns/delivery/sim-sns-notification.js +64 -0
- package/dist/service/sns/delivery/sim-sns-notification.js.map +1 -0
- package/dist/service/sns/delivery/sim-sns-protocol-delivery-endpoints.d.ts +32 -0
- package/dist/service/sns/delivery/sim-sns-protocol-delivery-endpoints.d.ts.map +1 -0
- package/dist/service/sns/delivery/sim-sns-protocol-delivery-endpoints.js +22 -0
- package/dist/service/sns/delivery/sim-sns-protocol-delivery-endpoints.js.map +1 -0
- package/dist/service/sns/delivery/sqs/sim-aws-sns-delivery-queues.d.ts +29 -0
- package/dist/service/sns/delivery/sqs/sim-aws-sns-delivery-queues.d.ts.map +1 -0
- package/dist/service/sns/delivery/sqs/sim-aws-sns-delivery-queues.js +33 -0
- package/dist/service/sns/delivery/sqs/sim-aws-sns-delivery-queues.js.map +1 -0
- package/dist/service/sns/delivery/sqs/sim-sns-delivery-queue.d.ts +31 -0
- package/dist/service/sns/delivery/sqs/sim-sns-delivery-queue.d.ts.map +1 -0
- package/dist/service/sns/delivery/sqs/sim-sns-delivery-queue.js +63 -0
- package/dist/service/sns/delivery/sqs/sim-sns-delivery-queue.js.map +1 -0
- package/dist/service/sns/delivery/sqs/sim-sns-queue-message.d.ts +24 -0
- package/dist/service/sns/delivery/sqs/sim-sns-queue-message.d.ts.map +1 -0
- package/dist/service/sns/delivery/sqs/sim-sns-queue-message.js +38 -0
- package/dist/service/sns/delivery/sqs/sim-sns-queue-message.js.map +1 -0
- package/dist/service/sns/error/sim-sns-delivery.error.d.ts +13 -0
- package/dist/service/sns/error/sim-sns-delivery.error.d.ts.map +1 -0
- package/dist/service/sns/error/sim-sns-delivery.error.js +13 -0
- package/dist/service/sns/error/sim-sns-delivery.error.js.map +1 -0
- package/dist/service/sns/error/sim-sns.error.d.ts +107 -0
- package/dist/service/sns/error/sim-sns.error.d.ts.map +1 -0
- package/dist/service/sns/error/sim-sns.error.js +124 -0
- package/dist/service/sns/error/sim-sns.error.js.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-anything-but-match.d.ts +30 -0
- package/dist/service/sns/filter/match/sim-sns-anything-but-match.d.ts.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-anything-but-match.js +82 -0
- package/dist/service/sns/filter/match/sim-sns-anything-but-match.js.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-equals-ignore-case-match.d.ts +24 -0
- package/dist/service/sns/filter/match/sim-sns-equals-ignore-case-match.d.ts.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-equals-ignore-case-match.js +30 -0
- package/dist/service/sns/filter/match/sim-sns-equals-ignore-case-match.js.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-exact-match.d.ts +22 -0
- package/dist/service/sns/filter/match/sim-sns-exact-match.d.ts.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-exact-match.js +49 -0
- package/dist/service/sns/filter/match/sim-sns-exact-match.js.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-exists-match.d.ts +27 -0
- package/dist/service/sns/filter/match/sim-sns-exists-match.d.ts.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-exists-match.js +38 -0
- package/dist/service/sns/filter/match/sim-sns-exists-match.js.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-filter-match.d.ts +24 -0
- package/dist/service/sns/filter/match/sim-sns-filter-match.d.ts.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-filter-match.js +19 -0
- package/dist/service/sns/filter/match/sim-sns-filter-match.js.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-numeric-match.d.ts +48 -0
- package/dist/service/sns/filter/match/sim-sns-numeric-match.d.ts.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-numeric-match.js +107 -0
- package/dist/service/sns/filter/match/sim-sns-numeric-match.js.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-prefix-match.d.ts +26 -0
- package/dist/service/sns/filter/match/sim-sns-prefix-match.d.ts.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-prefix-match.js +32 -0
- package/dist/service/sns/filter/match/sim-sns-prefix-match.js.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-suffix-match.d.ts +23 -0
- package/dist/service/sns/filter/match/sim-sns-suffix-match.d.ts.map +1 -0
- package/dist/service/sns/filter/match/sim-sns-suffix-match.js +29 -0
- package/dist/service/sns/filter/match/sim-sns-suffix-match.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-attribute-subject.d.ts +31 -0
- package/dist/service/sns/filter/sim-sns-attribute-subject.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-attribute-subject.js +85 -0
- package/dist/service/sns/filter/sim-sns-attribute-subject.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-body-subject.d.ts +30 -0
- package/dist/service/sns/filter/sim-sns-body-subject.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-body-subject.js +67 -0
- package/dist/service/sns/filter/sim-sns-body-subject.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-any-rule.d.ts +21 -0
- package/dist/service/sns/filter/sim-sns-filter-any-rule.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-any-rule.js +23 -0
- package/dist/service/sns/filter/sim-sns-filter-any-rule.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-key-rule.d.ts +28 -0
- package/dist/service/sns/filter/sim-sns-filter-key-rule.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-key-rule.js +48 -0
- package/dist/service/sns/filter/sim-sns-filter-key-rule.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-matches.d.ts +9 -0
- package/dist/service/sns/filter/sim-sns-filter-matches.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-matches.js +40 -0
- package/dist/service/sns/filter/sim-sns-filter-matches.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-operators.d.ts +22 -0
- package/dist/service/sns/filter/sim-sns-filter-operators.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-operators.js +50 -0
- package/dist/service/sns/filter/sim-sns-filter-operators.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-or-eligibility.d.ts +17 -0
- package/dist/service/sns/filter/sim-sns-filter-or-eligibility.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-or-eligibility.js +47 -0
- package/dist/service/sns/filter/sim-sns-filter-or-eligibility.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-policy-scope.d.ts +36 -0
- package/dist/service/sns/filter/sim-sns-filter-policy-scope.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-policy-scope.js +67 -0
- package/dist/service/sns/filter/sim-sns-filter-policy-scope.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-policy.d.ts +48 -0
- package/dist/service/sns/filter/sim-sns-filter-policy.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-policy.js +84 -0
- package/dist/service/sns/filter/sim-sns-filter-policy.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-refusals.d.ts +38 -0
- package/dist/service/sns/filter/sim-sns-filter-refusals.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-refusals.js +53 -0
- package/dist/service/sns/filter/sim-sns-filter-refusals.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-rule.d.ts +15 -0
- package/dist/service/sns/filter/sim-sns-filter-rule.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-rule.js +2 -0
- package/dist/service/sns/filter/sim-sns-filter-rule.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-rules.d.ts +27 -0
- package/dist/service/sns/filter/sim-sns-filter-rules.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-rules.js +66 -0
- package/dist/service/sns/filter/sim-sns-filter-rules.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-subject.d.ts +31 -0
- package/dist/service/sns/filter/sim-sns-filter-subject.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-subject.js +2 -0
- package/dist/service/sns/filter/sim-sns-filter-subject.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-value.d.ts +45 -0
- package/dist/service/sns/filter/sim-sns-filter-value.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-filter-value.js +83 -0
- package/dist/service/sns/filter/sim-sns-filter-value.js.map +1 -0
- package/dist/service/sns/filter/sim-sns-json-filter-values.d.ts +12 -0
- package/dist/service/sns/filter/sim-sns-json-filter-values.d.ts.map +1 -0
- package/dist/service/sns/filter/sim-sns-json-filter-values.js +25 -0
- package/dist/service/sns/filter/sim-sns-json-filter-values.js.map +1 -0
- package/dist/service/sns/index.d.ts +33 -0
- package/dist/service/sns/index.d.ts.map +1 -0
- package/dist/service/sns/index.js +29 -0
- package/dist/service/sns/index.js.map +1 -0
- package/dist/service/sns/message/sim-sns-message-attribute-rules.d.ts +23 -0
- package/dist/service/sns/message/sim-sns-message-attribute-rules.d.ts.map +1 -0
- package/dist/service/sns/message/sim-sns-message-attribute-rules.js +74 -0
- package/dist/service/sns/message/sim-sns-message-attribute-rules.js.map +1 -0
- package/dist/service/sns/message/sim-sns-message-attribute-value.d.ts +15 -0
- package/dist/service/sns/message/sim-sns-message-attribute-value.d.ts.map +1 -0
- package/dist/service/sns/message/sim-sns-message-attribute-value.js +2 -0
- package/dist/service/sns/message/sim-sns-message-attribute-value.js.map +1 -0
- package/dist/service/sns/message/sim-sns-message-attribute.d.ts +55 -0
- package/dist/service/sns/message/sim-sns-message-attribute.d.ts.map +1 -0
- package/dist/service/sns/message/sim-sns-message-attribute.js +78 -0
- package/dist/service/sns/message/sim-sns-message-attribute.js.map +1 -0
- package/dist/service/sns/message/sim-sns-message-attributes.d.ts +71 -0
- package/dist/service/sns/message/sim-sns-message-attributes.d.ts.map +1 -0
- package/dist/service/sns/message/sim-sns-message-attributes.js +80 -0
- package/dist/service/sns/message/sim-sns-message-attributes.js.map +1 -0
- package/dist/service/sns/message/sim-sns-message-body.d.ts +17 -0
- package/dist/service/sns/message/sim-sns-message-body.d.ts.map +1 -0
- package/dist/service/sns/message/sim-sns-message-body.js +26 -0
- package/dist/service/sns/message/sim-sns-message-body.js.map +1 -0
- package/dist/service/sns/message/sim-sns-message-subject.d.ts +27 -0
- package/dist/service/sns/message/sim-sns-message-subject.d.ts.map +1 -0
- package/dist/service/sns/message/sim-sns-message-subject.js +74 -0
- package/dist/service/sns/message/sim-sns-message-subject.js.map +1 -0
- package/dist/service/sns/message/sim-sns-published-message.d.ts +55 -0
- package/dist/service/sns/message/sim-sns-published-message.d.ts.map +1 -0
- package/dist/service/sns/message/sim-sns-published-message.js +69 -0
- package/dist/service/sns/message/sim-sns-published-message.js.map +1 -0
- package/dist/service/sns/sdk/sim-sns-sdk-command-router.d.ts +18 -0
- package/dist/service/sns/sdk/sim-sns-sdk-command-router.d.ts.map +1 -0
- package/dist/service/sns/sdk/sim-sns-sdk-command-router.js +76 -0
- package/dist/service/sns/sdk/sim-sns-sdk-command-router.js.map +1 -0
- package/dist/service/sns/signature/sim-sns-certificate.d.ts +30 -0
- package/dist/service/sns/signature/sim-sns-certificate.d.ts.map +1 -0
- package/dist/service/sns/signature/sim-sns-certificate.js +110 -0
- package/dist/service/sns/signature/sim-sns-certificate.js.map +1 -0
- package/dist/service/sns/signature/sim-sns-der.d.ts +40 -0
- package/dist/service/sns/signature/sim-sns-der.d.ts.map +1 -0
- package/dist/service/sns/signature/sim-sns-der.js +64 -0
- package/dist/service/sns/signature/sim-sns-der.js.map +1 -0
- package/dist/service/sns/signature/sim-sns-host.d.ts +28 -0
- package/dist/service/sns/signature/sim-sns-host.d.ts.map +1 -0
- package/dist/service/sns/signature/sim-sns-host.js +33 -0
- package/dist/service/sns/signature/sim-sns-host.js.map +1 -0
- package/dist/service/sns/signature/sim-sns-message-signer.d.ts +51 -0
- package/dist/service/sns/signature/sim-sns-message-signer.d.ts.map +1 -0
- package/dist/service/sns/signature/sim-sns-message-signer.js +60 -0
- package/dist/service/sns/signature/sim-sns-message-signer.js.map +1 -0
- package/dist/service/sns/signature/sim-sns-signing-key.d.ts +34 -0
- package/dist/service/sns/signature/sim-sns-signing-key.d.ts.map +1 -0
- package/dist/service/sns/signature/sim-sns-signing-key.js +69 -0
- package/dist/service/sns/signature/sim-sns-signing-key.js.map +1 -0
- package/dist/service/sns/sim-sns.d.ts +139 -0
- package/dist/service/sns/sim-sns.d.ts.map +1 -0
- package/dist/service/sns/sim-sns.js +188 -0
- package/dist/service/sns/sim-sns.js.map +1 -0
- package/dist/service/sns/subscription/sim-sns-function-endpoint-arn.d.ts +31 -0
- package/dist/service/sns/subscription/sim-sns-function-endpoint-arn.d.ts.map +1 -0
- package/dist/service/sns/subscription/sim-sns-function-endpoint-arn.js +54 -0
- package/dist/service/sns/subscription/sim-sns-function-endpoint-arn.js.map +1 -0
- package/dist/service/sns/subscription/sim-sns-queue-endpoint-arn.d.ts +30 -0
- package/dist/service/sns/subscription/sim-sns-queue-endpoint-arn.d.ts.map +1 -0
- package/dist/service/sns/subscription/sim-sns-queue-endpoint-arn.js +78 -0
- package/dist/service/sns/subscription/sim-sns-queue-endpoint-arn.js.map +1 -0
- package/dist/service/sns/subscription/sim-sns-requested-subscription-attributes.d.ts +28 -0
- package/dist/service/sns/subscription/sim-sns-requested-subscription-attributes.d.ts.map +1 -0
- package/dist/service/sns/subscription/sim-sns-requested-subscription-attributes.js +43 -0
- package/dist/service/sns/subscription/sim-sns-requested-subscription-attributes.js.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-arn.d.ts +43 -0
- package/dist/service/sns/subscription/sim-sns-subscription-arn.d.ts.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-arn.js +70 -0
- package/dist/service/sns/subscription/sim-sns-subscription-arn.js.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-attribute-changes.d.ts +20 -0
- package/dist/service/sns/subscription/sim-sns-subscription-attribute-changes.d.ts.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-attribute-changes.js +52 -0
- package/dist/service/sns/subscription/sim-sns-subscription-attribute-changes.js.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-attribute-names.d.ts +26 -0
- package/dist/service/sns/subscription/sim-sns-subscription-attribute-names.d.ts.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-attribute-names.js +64 -0
- package/dist/service/sns/subscription/sim-sns-subscription-attribute-names.js.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-attributes.d.ts +47 -0
- package/dist/service/sns/subscription/sim-sns-subscription-attributes.d.ts.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-attributes.js +67 -0
- package/dist/service/sns/subscription/sim-sns-subscription-attributes.js.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-endpoint.d.ts +26 -0
- package/dist/service/sns/subscription/sim-sns-subscription-endpoint.d.ts.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-endpoint.js +21 -0
- package/dist/service/sns/subscription/sim-sns-subscription-endpoint.js.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-protocol.d.ts +33 -0
- package/dist/service/sns/subscription/sim-sns-subscription-protocol.d.ts.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-protocol.js +63 -0
- package/dist/service/sns/subscription/sim-sns-subscription-protocol.js.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-store.d.ts +71 -0
- package/dist/service/sns/subscription/sim-sns-subscription-store.d.ts.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription-store.js +88 -0
- package/dist/service/sns/subscription/sim-sns-subscription-store.js.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription.d.ts +72 -0
- package/dist/service/sns/subscription/sim-sns-subscription.d.ts.map +1 -0
- package/dist/service/sns/subscription/sim-sns-subscription.js +116 -0
- package/dist/service/sns/subscription/sim-sns-subscription.js.map +1 -0
- package/dist/service/sns/topic/sim-sns-topic-arn.d.ts +52 -0
- package/dist/service/sns/topic/sim-sns-topic-arn.d.ts.map +1 -0
- package/dist/service/sns/topic/sim-sns-topic-arn.js +71 -0
- package/dist/service/sns/topic/sim-sns-topic-arn.js.map +1 -0
- package/dist/service/sns/topic/sim-sns-topic-attribute-names.d.ts +19 -0
- package/dist/service/sns/topic/sim-sns-topic-attribute-names.d.ts.map +1 -0
- package/dist/service/sns/topic/sim-sns-topic-attribute-names.js +79 -0
- package/dist/service/sns/topic/sim-sns-topic-attribute-names.js.map +1 -0
- package/dist/service/sns/topic/sim-sns-topic-attributes.d.ts +56 -0
- package/dist/service/sns/topic/sim-sns-topic-attributes.d.ts.map +1 -0
- package/dist/service/sns/topic/sim-sns-topic-attributes.js +85 -0
- package/dist/service/sns/topic/sim-sns-topic-attributes.js.map +1 -0
- package/dist/service/sns/topic/sim-sns-topic-name.d.ts +21 -0
- package/dist/service/sns/topic/sim-sns-topic-name.d.ts.map +1 -0
- package/dist/service/sns/topic/sim-sns-topic-name.js +48 -0
- package/dist/service/sns/topic/sim-sns-topic-name.js.map +1 -0
- package/dist/service/sns/topic/sim-sns-topic-policy.d.ts +23 -0
- package/dist/service/sns/topic/sim-sns-topic-policy.d.ts.map +1 -0
- package/dist/service/sns/topic/sim-sns-topic-policy.js +59 -0
- package/dist/service/sns/topic/sim-sns-topic-policy.js.map +1 -0
- package/dist/service/sns/topic/sim-sns-topic-store.d.ts +35 -0
- package/dist/service/sns/topic/sim-sns-topic-store.d.ts.map +1 -0
- package/dist/service/sns/topic/sim-sns-topic-store.js +50 -0
- package/dist/service/sns/topic/sim-sns-topic-store.js.map +1 -0
- package/dist/service/sns/topic/sim-sns-topic.d.ts +48 -0
- package/dist/service/sns/topic/sim-sns-topic.d.ts.map +1 -0
- package/dist/service/sns/topic/sim-sns-topic.js +80 -0
- package/dist/service/sns/topic/sim-sns-topic.js.map +1 -0
- package/dist/service/sqs/command/authorize/sim-sqs-authorizer.d.ts +3 -6
- package/dist/service/sqs/command/authorize/sim-sqs-authorizer.d.ts.map +1 -1
- package/dist/service/sqs/command/authorize/sim-sqs-authorizer.js +13 -7
- package/dist/service/sqs/command/authorize/sim-sqs-authorizer.js.map +1 -1
- package/dist/service/sqs/index.d.ts +1 -1
- package/dist/service/sqs/index.d.ts.map +1 -1
- package/dist/service/sqs/index.js +1 -1
- package/dist/service/sqs/index.js.map +1 -1
- package/dist/service/sqs/queue/sim-sqs-queue-arn.d.ts +0 -7
- package/dist/service/sqs/queue/sim-sqs-queue-arn.d.ts.map +1 -1
- package/dist/service/sqs/queue/sim-sqs-queue-arn.js +0 -9
- package/dist/service/sqs/queue/sim-sqs-queue-arn.js.map +1 -1
- package/dist/service/sqs/sim-sqs.js +1 -1
- package/dist/service/sqs/sim-sqs.js.map +1 -1
- package/package.json +7 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { simCfnSnsResourceError } from "../sim-cfn-sns-resource-error.js";
|
|
2
|
+
import { snsTopicPolicyResourceType } from "../sim-cfn-sns-resource-types.js";
|
|
3
|
+
/**
|
|
4
|
+
* The topic ARNs an AWS::SNS::TopicPolicy Resource names.
|
|
5
|
+
*
|
|
6
|
+
* `Ref` on an AWS::SNS::Topic gives its ARN, so a template naming its topics
|
|
7
|
+
* the way CDK does arrives here as the ARNs SetTopicAttributes takes.
|
|
8
|
+
*
|
|
9
|
+
* Creation and deletion both read them, because the Resource points at only the
|
|
10
|
+
* first of the topics it named and taking the policy back off needs all of
|
|
11
|
+
* them.
|
|
12
|
+
*/
|
|
13
|
+
export function simCfnSnsPolicyTopicArns(logicalId, properties) {
|
|
14
|
+
const topics = properties["Topics"];
|
|
15
|
+
if (!Array.isArray(topics) || topics.length === 0) {
|
|
16
|
+
throw topicPolicyError(logicalId, "Topics is required and must be a list of topic ARNs");
|
|
17
|
+
}
|
|
18
|
+
return topics.map((topic) => {
|
|
19
|
+
if (typeof topic !== "string") {
|
|
20
|
+
throw topicPolicyError(logicalId, `each entry of Topics must be a topic ARN string, and one is a ${typeof topic}`);
|
|
21
|
+
}
|
|
22
|
+
return topic;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The policy document an AWS::SNS::TopicPolicy Resource carries.
|
|
27
|
+
*
|
|
28
|
+
* A template writes it as an object where SetTopicAttributes takes a JSON
|
|
29
|
+
* string, so what comes back here is what is serialised on the way in.
|
|
30
|
+
*/
|
|
31
|
+
export function simCfnSnsPolicyDocument(logicalId, properties) {
|
|
32
|
+
const policyDocument = properties["PolicyDocument"];
|
|
33
|
+
if (policyDocument === undefined ||
|
|
34
|
+
policyDocument === null ||
|
|
35
|
+
typeof policyDocument !== "object" ||
|
|
36
|
+
Array.isArray(policyDocument)) {
|
|
37
|
+
throw topicPolicyError(logicalId, "PolicyDocument is required and must be an object");
|
|
38
|
+
}
|
|
39
|
+
return policyDocument;
|
|
40
|
+
}
|
|
41
|
+
function topicPolicyError(logicalId, reason) {
|
|
42
|
+
return simCfnSnsResourceError(snsTopicPolicyResourceType, logicalId, reason);
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=sim-cfn-sns-topic-policy-properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-sns-topic-policy-properties.js","sourceRoot":"","sources":["../../../../../src/service/sns/cfn/topic-policy/sim-cfn-sns-topic-policy-properties.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E;;;;;;;;;GASG;AACH,MAAM,UAAU,wBAAwB,CACtC,SAAiB,EACjB,UAAqC;IAErC,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IAEpC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClD,MAAM,gBAAgB,CACpB,SAAS,EACT,qDAAqD,CACtD,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAC1B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,MAAM,gBAAgB,CACpB,SAAS,EACT,iEAAiE,OAAO,KAAK,EAAE,CAChF,CAAC;QACJ,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CACrC,SAAiB,EACjB,UAAqC;IAErC,MAAM,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAEpD,IACE,cAAc,KAAK,SAAS;QAC5B,cAAc,KAAK,IAAI;QACvB,OAAO,cAAc,KAAK,QAAQ;QAClC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,EAC7B,CAAC;QACD,MAAM,gBAAgB,CACpB,SAAS,EACT,kDAAkD,CACnD,CAAC;IACJ,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,SAAS,gBAAgB,CAAC,SAAiB,EAAE,MAAc;IACzD,OAAO,sBAAsB,CAAC,0BAA0B,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { SimAwsResolvedCaller } from "../../../aws/caller/sim-aws-caller-resolver.js";
|
|
2
|
+
import type { SimIamInterServiceAuthZ } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
3
|
+
import type { SimSnsTopic } from "../../topic/sim-sns-topic.js";
|
|
4
|
+
import type { SimSnsRequestOptions } from "../sim-sns-request-options.js";
|
|
5
|
+
interface SimSnsAuthorizerProperties {
|
|
6
|
+
readonly iam: SimIamInterServiceAuthZ;
|
|
7
|
+
}
|
|
8
|
+
interface SimSnsTopicAuthorizationInput {
|
|
9
|
+
readonly action: string;
|
|
10
|
+
readonly topicArn: string;
|
|
11
|
+
/**
|
|
12
|
+
* The topic itself, when there is one. Its policy is what admits a caller
|
|
13
|
+
* with no identity policy of its own.
|
|
14
|
+
*/
|
|
15
|
+
readonly topic?: SimSnsTopic | undefined;
|
|
16
|
+
readonly options?: SimSnsRequestOptions | undefined;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Applies simulated IAM authorization to SNS requests.
|
|
20
|
+
*
|
|
21
|
+
* A topic ARN has no resource type in it, so the resource an operation
|
|
22
|
+
* authorizes against is `arn:aws:sns:region:account:topic-name`. A policy
|
|
23
|
+
* written with a `topic/` in the resource matches nothing here, as it matches
|
|
24
|
+
* nothing on real AWS.
|
|
25
|
+
*
|
|
26
|
+
* The topic's own policy goes into the decision as its resource policy. That is
|
|
27
|
+
* what admits a caller from another Account or a service principal, since
|
|
28
|
+
* neither is covered by an identity policy in the Account owning the topic.
|
|
29
|
+
*
|
|
30
|
+
* ListTopics is the exception: real SNS gives it no resource type, so it
|
|
31
|
+
* authorizes against `*` rather than against a topic, and no topic policy
|
|
32
|
+
* applies to it.
|
|
33
|
+
*
|
|
34
|
+
* A denial is reported as SNS's own AuthorizationErrorException rather than the
|
|
35
|
+
* shared IAM error, because that is the error a real SNS caller would have to
|
|
36
|
+
* handle.
|
|
37
|
+
*/
|
|
38
|
+
export declare class SimSnsAuthorizer {
|
|
39
|
+
private readonly iam;
|
|
40
|
+
private readonly callerIdentifier;
|
|
41
|
+
constructor(properties: SimSnsAuthorizerProperties);
|
|
42
|
+
/**
|
|
43
|
+
* Ensure the caller may perform an action on a topic, named by its ARN.
|
|
44
|
+
*
|
|
45
|
+
* The topic need not exist. A topic that is not there contributes no policy,
|
|
46
|
+
* so a caller with no permission is refused whether or not the topic is
|
|
47
|
+
* there, and CreateTopic authorizes against the ARN the topic is about to
|
|
48
|
+
* have.
|
|
49
|
+
*/
|
|
50
|
+
authorizeTopic(input: SimSnsTopicAuthorizationInput): SimAwsResolvedCaller;
|
|
51
|
+
/**
|
|
52
|
+
* Ensure the caller may perform an action that names no particular topic.
|
|
53
|
+
*/
|
|
54
|
+
authorizeAnyTopic(action: string, options?: SimSnsRequestOptions): SimAwsResolvedCaller;
|
|
55
|
+
private authorizeResource;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=sim-sns-authorizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sns-authorizer.d.ts","sourceRoot":"","sources":["../../../../../src/service/sns/command/authorize/sim-sns-authorizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAE3F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAGtG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAc1E,UAAU,0BAA0B;IAClC,QAAQ,CAAC,GAAG,EAAE,uBAAuB,CAAC;CACvC;AAED,UAAU,6BAA6B;IACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAEzC,QAAQ,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;CACrD;AASD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA0B;IAC9C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAgC;IAEjE,YAAY,UAAU,EAAE,0BAA0B,EAEjD;IAED;;;;;;;OAOG;IACH,cAAc,CAAC,KAAK,EAAE,6BAA6B,GAAG,oBAAoB,CAOzE;IAED;;OAEG;IACH,iBAAiB,CACf,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,oBAAoB,GAC7B,oBAAoB,CAOtB;IAED,OAAO,CAAC,iBAAiB;CAwB1B"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { SimIamCallerIdentifier } from "../../../iam/error/sim-iam-caller-identifier.js";
|
|
2
|
+
import { SimSnsAuthorizationErrorException } from "../../error/sim-sns.error.js";
|
|
3
|
+
import { simSnsConditionContext } from "./sim-sns-condition-context.js";
|
|
4
|
+
import { simSnsTopicResourcePolicies } from "./sim-sns-topic-resource-policies.js";
|
|
5
|
+
/**
|
|
6
|
+
* The resource an action with no resource type authorizes against.
|
|
7
|
+
*
|
|
8
|
+
* Real SNS gives ListTopics no resource type at all, so IAM evaluates it
|
|
9
|
+
* against `*` and only a policy whose Resource is `*` allows it. A policy
|
|
10
|
+
* naming a topic ARN, or every topic ARN in the Account and Region, allows no
|
|
11
|
+
* listing, here as on AWS.
|
|
12
|
+
*/
|
|
13
|
+
const noResource = "*";
|
|
14
|
+
/**
|
|
15
|
+
* Applies simulated IAM authorization to SNS requests.
|
|
16
|
+
*
|
|
17
|
+
* A topic ARN has no resource type in it, so the resource an operation
|
|
18
|
+
* authorizes against is `arn:aws:sns:region:account:topic-name`. A policy
|
|
19
|
+
* written with a `topic/` in the resource matches nothing here, as it matches
|
|
20
|
+
* nothing on real AWS.
|
|
21
|
+
*
|
|
22
|
+
* The topic's own policy goes into the decision as its resource policy. That is
|
|
23
|
+
* what admits a caller from another Account or a service principal, since
|
|
24
|
+
* neither is covered by an identity policy in the Account owning the topic.
|
|
25
|
+
*
|
|
26
|
+
* ListTopics is the exception: real SNS gives it no resource type, so it
|
|
27
|
+
* authorizes against `*` rather than against a topic, and no topic policy
|
|
28
|
+
* applies to it.
|
|
29
|
+
*
|
|
30
|
+
* A denial is reported as SNS's own AuthorizationErrorException rather than the
|
|
31
|
+
* shared IAM error, because that is the error a real SNS caller would have to
|
|
32
|
+
* handle.
|
|
33
|
+
*/
|
|
34
|
+
export class SimSnsAuthorizer {
|
|
35
|
+
iam;
|
|
36
|
+
callerIdentifier = new SimIamCallerIdentifier();
|
|
37
|
+
constructor(properties) {
|
|
38
|
+
this.iam = properties.iam;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Ensure the caller may perform an action on a topic, named by its ARN.
|
|
42
|
+
*
|
|
43
|
+
* The topic need not exist. A topic that is not there contributes no policy,
|
|
44
|
+
* so a caller with no permission is refused whether or not the topic is
|
|
45
|
+
* there, and CreateTopic authorizes against the ARN the topic is about to
|
|
46
|
+
* have.
|
|
47
|
+
*/
|
|
48
|
+
authorizeTopic(input) {
|
|
49
|
+
return this.authorizeResource({
|
|
50
|
+
action: input.action,
|
|
51
|
+
resource: input.topicArn,
|
|
52
|
+
resourcePolicies: simSnsTopicResourcePolicies(input.topic),
|
|
53
|
+
options: input.options,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Ensure the caller may perform an action that names no particular topic.
|
|
58
|
+
*/
|
|
59
|
+
authorizeAnyTopic(action, options) {
|
|
60
|
+
return this.authorizeResource({
|
|
61
|
+
action,
|
|
62
|
+
resource: noResource,
|
|
63
|
+
resourcePolicies: [],
|
|
64
|
+
options,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
authorizeResource(input) {
|
|
68
|
+
const decision = this.iam.authorize({
|
|
69
|
+
action: input.action,
|
|
70
|
+
resource: input.resource,
|
|
71
|
+
caller: input.options?.caller,
|
|
72
|
+
resourcePolicies: input.resourcePolicies,
|
|
73
|
+
conditionContext: simSnsConditionContext(input.options),
|
|
74
|
+
});
|
|
75
|
+
if (decision.isDenied) {
|
|
76
|
+
const identifier = this.callerIdentifier.format(decision.caller.principal);
|
|
77
|
+
throw new SimSnsAuthorizationErrorException(`User: ${identifier} is not authorized to perform: ${input.action} ` +
|
|
78
|
+
`on resource: ${input.resource}`);
|
|
79
|
+
}
|
|
80
|
+
return decision.caller;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=sim-sns-authorizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sns-authorizer.js","sourceRoot":"","sources":["../../../../../src/service/sns/command/authorize/sim-sns-authorizer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AAGjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAEnF;;;;;;;GAOG;AACH,MAAM,UAAU,GAAG,GAAG,CAAC;AA0BvB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,gBAAgB;IACV,GAAG,CAA0B;IAC7B,gBAAgB,GAAG,IAAI,sBAAsB,EAAE,CAAC;IAEjE,YAAY,UAAsC;QAChD,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC;IAC5B,CAAC;IAED;;;;;;;OAOG;IACH,cAAc,CAAC,KAAoC;QACjD,OAAO,IAAI,CAAC,iBAAiB,CAAC;YAC5B,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,gBAAgB,EAAE,2BAA2B,CAAC,KAAK,CAAC,KAAK,CAAC;YAC1D,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,iBAAiB,CACf,MAAc,EACd,OAA8B;QAE9B,OAAO,IAAI,CAAC,iBAAiB,CAAC;YAC5B,MAAM;YACN,QAAQ,EAAE,UAAU;YACpB,gBAAgB,EAAE,EAAE;YACpB,OAAO;SACR,CAAC,CAAC;IACL,CAAC;IAEO,iBAAiB,CACvB,KAAuC;QAEvC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;YAClC,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,MAAM;YAC7B,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;YACxC,gBAAgB,EAAE,sBAAsB,CAAC,KAAK,CAAC,OAAO,CAAC;SACxD,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACtB,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAC7C,QAAQ,CAAC,MAAM,CAAC,SAAS,CAC1B,CAAC;YAEF,MAAM,IAAI,iCAAiC,CACzC,SAAS,UAAU,kCAAkC,KAAK,CAAC,MAAM,GAAG;gBAClE,gBAAgB,KAAK,CAAC,QAAQ,EAAE,CACnC,CAAC;QACJ,CAAC;QAED,OAAO,QAAQ,CAAC,MAAM,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SimIamConditionValue } from "../../../iam/policy/sim-iam-policy.js";
|
|
2
|
+
import { type SimSnsRequestOptions } from "../sim-sns-request-options.js";
|
|
3
|
+
/**
|
|
4
|
+
* The request-time values a topic policy statement's conditions are matched
|
|
5
|
+
* against.
|
|
6
|
+
*
|
|
7
|
+
* A value the request does not carry is left out rather than supplied empty, so
|
|
8
|
+
* a statement conditioned on it fails to match instead of matching an empty
|
|
9
|
+
* string. That is the safe direction: a grant written for one Bucket should not
|
|
10
|
+
* admit a request that says nothing about where it came from.
|
|
11
|
+
*/
|
|
12
|
+
export declare function simSnsConditionContext(options: SimSnsRequestOptions | undefined): Readonly<Record<string, SimIamConditionValue>>;
|
|
13
|
+
//# sourceMappingURL=sim-sns-condition-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sns-condition-context.d.ts","sourceRoot":"","sources":["../../../../../src/service/sns/command/authorize/sim-sns-condition-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,oBAAoB,GAAG,SAAS,GACxC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAShD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { simSnsSourceAccountConditionKey, simSnsSourceArnConditionKey, } from "../sim-sns-request-options.js";
|
|
2
|
+
/**
|
|
3
|
+
* The request-time values a topic policy statement's conditions are matched
|
|
4
|
+
* against.
|
|
5
|
+
*
|
|
6
|
+
* A value the request does not carry is left out rather than supplied empty, so
|
|
7
|
+
* a statement conditioned on it fails to match instead of matching an empty
|
|
8
|
+
* string. That is the safe direction: a grant written for one Bucket should not
|
|
9
|
+
* admit a request that says nothing about where it came from.
|
|
10
|
+
*/
|
|
11
|
+
export function simSnsConditionContext(options) {
|
|
12
|
+
return {
|
|
13
|
+
...(options?.sourceArn !== undefined && {
|
|
14
|
+
[simSnsSourceArnConditionKey]: options.sourceArn,
|
|
15
|
+
}),
|
|
16
|
+
...(options?.sourceAccount !== undefined && {
|
|
17
|
+
[simSnsSourceAccountConditionKey]: options.sourceAccount,
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=sim-sns-condition-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sns-condition-context.js","sourceRoot":"","sources":["../../../../../src/service/sns/command/authorize/sim-sns-condition-context.ts"],"names":[],"mappings":"AACA,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,GAE5B,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAyC;IAEzC,OAAO;QACL,GAAG,CAAC,OAAO,EAAE,SAAS,KAAK,SAAS,IAAI;YACtC,CAAC,2BAA2B,CAAC,EAAE,OAAO,CAAC,SAAS;SACjD,CAAC;QACF,GAAG,CAAC,OAAO,EAAE,aAAa,KAAK,SAAS,IAAI;YAC1C,CAAC,+BAA+B,CAAC,EAAE,OAAO,CAAC,aAAa;SACzD,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { SimIamAuthorizationDecision, SimIamInterServiceAuthZ } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
2
|
+
import type { SimSnsTopic } from "../../topic/sim-sns-topic.js";
|
|
3
|
+
interface SimSnsServicePublishAuthorizerProperties {
|
|
4
|
+
readonly iam: SimIamInterServiceAuthZ;
|
|
5
|
+
}
|
|
6
|
+
interface SimSnsServicePublishAuthorizationInput {
|
|
7
|
+
readonly topic: SimSnsTopic;
|
|
8
|
+
/** The service principal the publishing service calls SNS as. */
|
|
9
|
+
readonly servicePrincipal: string;
|
|
10
|
+
/**
|
|
11
|
+
* What the service is publishing for, such as the S3 Bucket an event came
|
|
12
|
+
* from.
|
|
13
|
+
*/
|
|
14
|
+
readonly sourceArn?: string | undefined;
|
|
15
|
+
/** The Account the publishing service's own resource belongs to. */
|
|
16
|
+
readonly sourceAccount?: string | undefined;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Decides whether a simulated AWS service may publish a message to a topic.
|
|
20
|
+
*
|
|
21
|
+
* A service principal owns no identity policies anywhere, so the topic's own
|
|
22
|
+
* policy is the whole decision. The answer is a decision rather than a thrown
|
|
23
|
+
* error because a service asks this before it has a message to publish: S3
|
|
24
|
+
* validates the destination when a notification configuration is applied, and
|
|
25
|
+
* has to report the refusal as part of refusing the configuration.
|
|
26
|
+
*
|
|
27
|
+
* A service with a message in hand publishes it through `Publish` as usual,
|
|
28
|
+
* which authorizes the same way. Nothing is remembered from the earlier
|
|
29
|
+
* question, so a topic policy changed in between stops the delivery.
|
|
30
|
+
*/
|
|
31
|
+
export declare class SimSnsServicePublishAuthorizer {
|
|
32
|
+
private static readonly action;
|
|
33
|
+
private readonly iam;
|
|
34
|
+
constructor(properties: SimSnsServicePublishAuthorizerProperties);
|
|
35
|
+
/**
|
|
36
|
+
* Evaluate `sns:Publish` for a service against the topic.
|
|
37
|
+
*/
|
|
38
|
+
authorize(input: SimSnsServicePublishAuthorizationInput): SimIamAuthorizationDecision;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=sim-sns-service-publish-authorizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sns-service-publish-authorizer.d.ts","sourceRoot":"","sources":["../../../../../src/service/sns/command/authorize/sim-sns-service-publish-authorizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAIhE,UAAU,wCAAwC;IAChD,QAAQ,CAAC,GAAG,EAAE,uBAAuB,CAAC;CACvC;AAED,UAAU,sCAAsC;IAC9C,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAE5B,iEAAiE;IACjE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAElC;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAExC,oEAAoE;IACpE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7C;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,8BAA8B;IACzC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAiB;IAE/C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA0B;IAE9C,YAAY,UAAU,EAAE,wCAAwC,EAE/D;IAED;;OAEG;IACH,SAAS,CACP,KAAK,EAAE,sCAAsC,GAC5C,2BAA2B,CAa7B;CACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { simSnsConditionContext } from "./sim-sns-condition-context.js";
|
|
2
|
+
import { simSnsTopicResourcePolicies } from "./sim-sns-topic-resource-policies.js";
|
|
3
|
+
/**
|
|
4
|
+
* Decides whether a simulated AWS service may publish a message to a topic.
|
|
5
|
+
*
|
|
6
|
+
* A service principal owns no identity policies anywhere, so the topic's own
|
|
7
|
+
* policy is the whole decision. The answer is a decision rather than a thrown
|
|
8
|
+
* error because a service asks this before it has a message to publish: S3
|
|
9
|
+
* validates the destination when a notification configuration is applied, and
|
|
10
|
+
* has to report the refusal as part of refusing the configuration.
|
|
11
|
+
*
|
|
12
|
+
* A service with a message in hand publishes it through `Publish` as usual,
|
|
13
|
+
* which authorizes the same way. Nothing is remembered from the earlier
|
|
14
|
+
* question, so a topic policy changed in between stops the delivery.
|
|
15
|
+
*/
|
|
16
|
+
export class SimSnsServicePublishAuthorizer {
|
|
17
|
+
static action = "sns:Publish";
|
|
18
|
+
iam;
|
|
19
|
+
constructor(properties) {
|
|
20
|
+
this.iam = properties.iam;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Evaluate `sns:Publish` for a service against the topic.
|
|
24
|
+
*/
|
|
25
|
+
authorize(input) {
|
|
26
|
+
return this.iam.authorize({
|
|
27
|
+
action: SimSnsServicePublishAuthorizer.action,
|
|
28
|
+
resource: input.topic.arn.value,
|
|
29
|
+
caller: { kind: "service", service: input.servicePrincipal },
|
|
30
|
+
resourcePolicies: simSnsTopicResourcePolicies(input.topic),
|
|
31
|
+
conditionContext: simSnsConditionContext({
|
|
32
|
+
...(input.sourceArn !== undefined && { sourceArn: input.sourceArn }),
|
|
33
|
+
...(input.sourceAccount !== undefined && {
|
|
34
|
+
sourceAccount: input.sourceAccount,
|
|
35
|
+
}),
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=sim-sns-service-publish-authorizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sns-service-publish-authorizer.js","sourceRoot":"","sources":["../../../../../src/service/sns/command/authorize/sim-sns-service-publish-authorizer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAsBnF;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,8BAA8B;IACjC,MAAM,CAAU,MAAM,GAAG,aAAa,CAAC;IAE9B,GAAG,CAA0B;IAE9C,YAAY,UAAoD;QAC9D,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,SAAS,CACP,KAA6C;QAE7C,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;YACxB,MAAM,EAAE,8BAA8B,CAAC,MAAM;YAC7C,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK;YAC/B,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,gBAAgB,EAAE;YAC5D,gBAAgB,EAAE,2BAA2B,CAAC,KAAK,CAAC,KAAK,CAAC;YAC1D,gBAAgB,EAAE,sBAAsB,CAAC;gBACvC,GAAG,CAAC,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;gBACpE,GAAG,CAAC,KAAK,CAAC,aAAa,KAAK,SAAS,IAAI;oBACvC,aAAa,EAAE,KAAK,CAAC,aAAa;iBACnC,CAAC;aACH,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SimIamResourcePolicyInput } from "../../../iam/authorize/context/sim-iam-auth-z-context-builder.js";
|
|
2
|
+
import type { SimSnsTopic } from "../../topic/sim-sns-topic.js";
|
|
3
|
+
/**
|
|
4
|
+
* The resource policies sim IAM should evaluate for a request against a topic.
|
|
5
|
+
*
|
|
6
|
+
* A topic that is not there contributes nothing, which is what keeps a caller
|
|
7
|
+
* with no permission refused for a topic that does not exist: an absent topic
|
|
8
|
+
* cannot admit anyone. A topic with no policy contributes nothing either, and
|
|
9
|
+
* the decision is left to the caller's identity policies.
|
|
10
|
+
*/
|
|
11
|
+
export declare function simSnsTopicResourcePolicies(topic: SimSnsTopic | undefined): readonly SimIamResourcePolicyInput[];
|
|
12
|
+
//# sourceMappingURL=sim-sns-topic-resource-policies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sns-topic-resource-policies.d.ts","sourceRoot":"","sources":["../../../../../src/service/sns/command/authorize/sim-sns-topic-resource-policies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAClH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,WAAW,GAAG,SAAS,GAC7B,SAAS,yBAAyB,EAAE,CAkBtC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The resource policies sim IAM should evaluate for a request against a topic.
|
|
3
|
+
*
|
|
4
|
+
* A topic that is not there contributes nothing, which is what keeps a caller
|
|
5
|
+
* with no permission refused for a topic that does not exist: an absent topic
|
|
6
|
+
* cannot admit anyone. A topic with no policy contributes nothing either, and
|
|
7
|
+
* the decision is left to the caller's identity policies.
|
|
8
|
+
*/
|
|
9
|
+
export function simSnsTopicResourcePolicies(topic) {
|
|
10
|
+
if (topic === undefined) {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
const policy = topic.attributes.policy;
|
|
14
|
+
if (policy === undefined) {
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
document: policy.document,
|
|
20
|
+
policyName: "TopicPolicy",
|
|
21
|
+
resourceArn: topic.arn.value,
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=sim-sns-topic-resource-policies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sns-topic-resource-policies.js","sourceRoot":"","sources":["../../../../../src/service/sns/command/authorize/sim-sns-topic-resource-policies.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,MAAM,UAAU,2BAA2B,CACzC,KAA8B;IAE9B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC;IAEvC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO;QACL;YACE,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,UAAU,EAAE,aAAa;YACzB,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK;SAC7B;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { SimResponseMetadata } from "../../../aws/metadata/response-metadata.type.js";
|
|
2
|
+
import type { SimSnsMessageAttributeInput } from "../../message/sim-sns-message-attribute-value.js";
|
|
3
|
+
/**
|
|
4
|
+
* The message fields shared by Publish and one PublishBatch entry.
|
|
5
|
+
*/
|
|
6
|
+
export interface SimSnsPublishedFields {
|
|
7
|
+
readonly Message?: string | undefined;
|
|
8
|
+
readonly Subject?: string | undefined;
|
|
9
|
+
readonly MessageStructure?: string | undefined;
|
|
10
|
+
readonly MessageAttributes?: SimSnsMessageAttributeInput | undefined;
|
|
11
|
+
readonly MessageDeduplicationId?: string | undefined;
|
|
12
|
+
readonly MessageGroupId?: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Minimal structural sim SNS Publish command.
|
|
16
|
+
*
|
|
17
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sns/command/PublishCommand/
|
|
18
|
+
*/
|
|
19
|
+
export interface SimPublishCommand {
|
|
20
|
+
readonly input: SimPublishCommandInput;
|
|
21
|
+
}
|
|
22
|
+
export interface SimPublishCommandInput extends SimSnsPublishedFields {
|
|
23
|
+
readonly TopicArn?: string | undefined;
|
|
24
|
+
/** The endpoint of a mobile application, which is not simulated. */
|
|
25
|
+
readonly TargetArn?: string | undefined;
|
|
26
|
+
/** An SMS destination, which is not simulated. */
|
|
27
|
+
readonly PhoneNumber?: string | undefined;
|
|
28
|
+
}
|
|
29
|
+
export interface SimPublishCommandOutput {
|
|
30
|
+
readonly MessageId?: string | undefined;
|
|
31
|
+
readonly $metadata: SimResponseMetadata;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* One entry of a PublishBatch request.
|
|
35
|
+
*/
|
|
36
|
+
export interface SimSnsPublishBatchRequestEntry extends SimSnsPublishedFields {
|
|
37
|
+
readonly Id?: string | undefined;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Minimal structural sim SNS PublishBatch command.
|
|
41
|
+
*
|
|
42
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sns/command/PublishBatchCommand/
|
|
43
|
+
*/
|
|
44
|
+
export interface SimPublishBatchCommand {
|
|
45
|
+
readonly input: SimPublishBatchCommandInput;
|
|
46
|
+
}
|
|
47
|
+
export interface SimPublishBatchCommandInput {
|
|
48
|
+
readonly TopicArn?: string | undefined;
|
|
49
|
+
readonly PublishBatchRequestEntries?: readonly SimSnsPublishBatchRequestEntry[] | undefined;
|
|
50
|
+
}
|
|
51
|
+
export interface SimSnsPublishBatchResultEntry {
|
|
52
|
+
readonly Id: string;
|
|
53
|
+
readonly MessageId: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* One entry of a batch request that failed on its own, while the rest of the
|
|
57
|
+
* batch went through.
|
|
58
|
+
*/
|
|
59
|
+
export interface SimSnsBatchResultErrorEntry {
|
|
60
|
+
readonly Id: string;
|
|
61
|
+
readonly SenderFault: boolean;
|
|
62
|
+
readonly Code: string;
|
|
63
|
+
readonly Message?: string | undefined;
|
|
64
|
+
}
|
|
65
|
+
export interface SimPublishBatchCommandOutput {
|
|
66
|
+
readonly Successful?: readonly SimSnsPublishBatchResultEntry[] | undefined;
|
|
67
|
+
readonly Failed?: readonly SimSnsBatchResultErrorEntry[] | undefined;
|
|
68
|
+
readonly $metadata: SimResponseMetadata;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=publish.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.command.d.ts","sourceRoot":"","sources":["../../../../../src/service/sns/command/publish/publish.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAEpG;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;IACrE,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9C;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,sBAAsB,CAAC;CACxC;AAED,MAAM,WAAW,sBAAuB,SAAQ,qBAAqB;IACnE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEvC,oEAAoE;IACpE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAExC,kDAAkD;IAClD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,8BAA+B,SAAQ,qBAAqB;IAC3E,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,EAAE,2BAA2B,CAAC;CAC7C;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,0BAA0B,CAAC,EAClC,SAAS,8BAA8B,EAAE,GAAG,SAAS,CAAC;CACzD;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,6BAA6B,EAAE,GAAG,SAAS,CAAC;IAC3E,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,2BAA2B,EAAE,GAAG,SAAS,CAAC;IACrE,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.command.js","sourceRoot":"","sources":["../../../../../src/service/sns/command/publish/publish.command.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type SimSnsPublishedMessage } from "../../message/sim-sns-published-message.js";
|
|
2
|
+
import type { SimSnsBatchResultErrorEntry } from "./publish.command.js";
|
|
3
|
+
/**
|
|
4
|
+
* What every batch request entry carries: an id the response reports it under.
|
|
5
|
+
*/
|
|
6
|
+
export interface SimSnsIdentifiedEntry {
|
|
7
|
+
readonly Id?: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* One entry of a batch request whose id has been checked.
|
|
11
|
+
*/
|
|
12
|
+
export interface SimSnsBatchEntry<T> {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly entry: T;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The outcome of running a batch: what went through, and what failed on its own.
|
|
18
|
+
*/
|
|
19
|
+
export interface SimSnsBatchOutcome<T> {
|
|
20
|
+
readonly successful: readonly T[];
|
|
21
|
+
readonly failed: readonly SimSnsBatchResultErrorEntry[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Check the entries of a batch request the way real SNS checks them.
|
|
25
|
+
*
|
|
26
|
+
* These are the failures that take the whole request down rather than one
|
|
27
|
+
* entry: an empty batch, more than ten entries, a malformed id, or two entries
|
|
28
|
+
* sharing one. Everything else is a per-entry failure, reported in `Failed`
|
|
29
|
+
* while the rest of the batch goes through.
|
|
30
|
+
*/
|
|
31
|
+
export declare function requireSnsBatchEntries<T extends SimSnsIdentifiedEntry>(entries: readonly T[] | undefined): readonly SimSnsBatchEntry<T>[];
|
|
32
|
+
/**
|
|
33
|
+
* Run every entry of a batch, keeping one entry's failure out of the way of the
|
|
34
|
+
* others.
|
|
35
|
+
*
|
|
36
|
+
* Real SNS answers a batch request with two lists rather than failing it, so a
|
|
37
|
+
* message with an attribute it will not take does not stop the nine beside it
|
|
38
|
+
* being published.
|
|
39
|
+
*/
|
|
40
|
+
export declare function runSnsBatch<T, R>(entries: readonly SimSnsBatchEntry<T>[], run: (entry: T, id: string) => R): SimSnsBatchOutcome<R>;
|
|
41
|
+
/**
|
|
42
|
+
* Refuse a batch weighing more than one publish is allowed to.
|
|
43
|
+
*
|
|
44
|
+
* Real SNS holds the whole batch to the 256 KB a single publish is held to,
|
|
45
|
+
* rather than each entry, so ten entries just inside the limit are one batch
|
|
46
|
+
* far outside it. That is why `SimSnsPublishedMessage` does not check the limit
|
|
47
|
+
* and this does.
|
|
48
|
+
*/
|
|
49
|
+
export declare function assertSnsBatchWithinSizeLimit(published: readonly {
|
|
50
|
+
readonly message: SimSnsPublishedMessage;
|
|
51
|
+
}[]): void;
|
|
52
|
+
//# sourceMappingURL=sim-sns-batch-entries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sns-batch-entries.d.ts","sourceRoot":"","sources":["../../../../../src/service/sns/command/publish/sim-sns-batch-entries.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAMxE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,SAAS,2BAA2B,EAAE,CAAC;CACzD;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,qBAAqB,EACpE,OAAO,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS,GAChC,SAAS,gBAAgB,CAAC,CAAC,CAAC,EAAE,CA2BhC;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAC9B,OAAO,EAAE,SAAS,gBAAgB,CAAC,CAAC,CAAC,EAAE,EACvC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,KAAK,CAAC,GAC/B,kBAAkB,CAAC,CAAC,CAAC,CAwBvB;AAaD;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,SAAS;IAAE,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAA;CAAE,EAAE,GACjE,IAAI,CAaN"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { SimSnsBatchEntryIdsNotDistinctException, SimSnsBatchRequestTooLongException, SimSnsEmptyBatchRequestException, SimSnsError, SimSnsInvalidBatchEntryIdException, SimSnsTooManyEntriesInBatchRequestException, } from "../../error/sim-sns.error.js";
|
|
2
|
+
import { simSnsMaximumPublishBytes, } from "../../message/sim-sns-published-message.js";
|
|
3
|
+
const maximumEntries = 10;
|
|
4
|
+
const entryIdPattern = /^[\w-]{1,80}$/;
|
|
5
|
+
/**
|
|
6
|
+
* Check the entries of a batch request the way real SNS checks them.
|
|
7
|
+
*
|
|
8
|
+
* These are the failures that take the whole request down rather than one
|
|
9
|
+
* entry: an empty batch, more than ten entries, a malformed id, or two entries
|
|
10
|
+
* sharing one. Everything else is a per-entry failure, reported in `Failed`
|
|
11
|
+
* while the rest of the batch goes through.
|
|
12
|
+
*/
|
|
13
|
+
export function requireSnsBatchEntries(entries) {
|
|
14
|
+
if (entries === undefined || entries.length === 0) {
|
|
15
|
+
throw new SimSnsEmptyBatchRequestException("There should be at least one PublishBatchRequestEntry in the request");
|
|
16
|
+
}
|
|
17
|
+
if (entries.length > maximumEntries) {
|
|
18
|
+
throw new SimSnsTooManyEntriesInBatchRequestException(`Maximum number of entries per request is ${String(maximumEntries)}. ` +
|
|
19
|
+
`You have sent ${String(entries.length)}.`);
|
|
20
|
+
}
|
|
21
|
+
const checked = entries.map((entry) => ({
|
|
22
|
+
id: requireEntryId(entry.Id),
|
|
23
|
+
entry,
|
|
24
|
+
}));
|
|
25
|
+
const ids = new Set(checked.map(({ id }) => id));
|
|
26
|
+
if (ids.size !== checked.length) {
|
|
27
|
+
throw new SimSnsBatchEntryIdsNotDistinctException("Two or more batch entries in the request have the same Id");
|
|
28
|
+
}
|
|
29
|
+
return checked;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Run every entry of a batch, keeping one entry's failure out of the way of the
|
|
33
|
+
* others.
|
|
34
|
+
*
|
|
35
|
+
* Real SNS answers a batch request with two lists rather than failing it, so a
|
|
36
|
+
* message with an attribute it will not take does not stop the nine beside it
|
|
37
|
+
* being published.
|
|
38
|
+
*/
|
|
39
|
+
export function runSnsBatch(entries, run) {
|
|
40
|
+
const successful = [];
|
|
41
|
+
const failed = [];
|
|
42
|
+
for (const { id, entry } of entries) {
|
|
43
|
+
try {
|
|
44
|
+
successful.push(run(entry, id));
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
// Only an SNS failure belongs to one entry. Anything else, an IAM denial
|
|
48
|
+
// above all, is about the request as a whole.
|
|
49
|
+
if (!(error instanceof SimSnsError)) {
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
failed.push({
|
|
53
|
+
Id: id,
|
|
54
|
+
SenderFault: true,
|
|
55
|
+
Code: error.name,
|
|
56
|
+
Message: error.message,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return { successful, failed };
|
|
61
|
+
}
|
|
62
|
+
function requireEntryId(id) {
|
|
63
|
+
if (id === undefined || !entryIdPattern.test(id)) {
|
|
64
|
+
throw new SimSnsInvalidBatchEntryIdException(`A batch entry id is required, and may contain up to 80 alphanumeric ` +
|
|
65
|
+
`characters, hyphens and underscores. Got '${String(id)}'.`);
|
|
66
|
+
}
|
|
67
|
+
return id;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Refuse a batch weighing more than one publish is allowed to.
|
|
71
|
+
*
|
|
72
|
+
* Real SNS holds the whole batch to the 256 KB a single publish is held to,
|
|
73
|
+
* rather than each entry, so ten entries just inside the limit are one batch
|
|
74
|
+
* far outside it. That is why `SimSnsPublishedMessage` does not check the limit
|
|
75
|
+
* and this does.
|
|
76
|
+
*/
|
|
77
|
+
export function assertSnsBatchWithinSizeLimit(published) {
|
|
78
|
+
const byteSize = published.reduce((total, { message }) => total + message.byteSize, 0);
|
|
79
|
+
if (byteSize > simSnsMaximumPublishBytes) {
|
|
80
|
+
throw new SimSnsBatchRequestTooLongException(`The batch request is longer than the permitted size. A batch may be ` +
|
|
81
|
+
`up to ${String(simSnsMaximumPublishBytes)} bytes, and this one is ` +
|
|
82
|
+
`${String(byteSize)} bytes.`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=sim-sns-batch-entries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sns-batch-entries.js","sourceRoot":"","sources":["../../../../../src/service/sns/command/publish/sim-sns-batch-entries.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uCAAuC,EACvC,kCAAkC,EAClC,gCAAgC,EAChC,WAAW,EACX,kCAAkC,EAClC,2CAA2C,GAC5C,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,yBAAyB,GAE1B,MAAM,4CAA4C,CAAC;AAGpD,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,MAAM,cAAc,GAAG,eAAe,CAAC;AAyBvC;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAiC;IAEjC,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClD,MAAM,IAAI,gCAAgC,CACxC,sEAAsE,CACvE,CAAC;IACJ,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,cAAc,EAAE,CAAC;QACpC,MAAM,IAAI,2CAA2C,CACnD,4CAA4C,MAAM,CAAC,cAAc,CAAC,IAAI;YACpE,iBAAiB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAC7C,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACtC,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,KAAK;KACN,CAAC,CAAC,CAAC;IACJ,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAEjD,IAAI,GAAG,CAAC,IAAI,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC;QAChC,MAAM,IAAI,uCAAuC,CAC/C,2DAA2D,CAC5D,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CACzB,OAAuC,EACvC,GAAgC;IAEhC,MAAM,UAAU,GAAQ,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAkC,EAAE,CAAC;IAEjD,KAAK,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,OAAO,EAAE,CAAC;QACpC,IAAI,CAAC;YACH,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,yEAAyE;YACzE,8CAA8C;YAC9C,IAAI,CAAC,CAAC,KAAK,YAAY,WAAW,CAAC,EAAE,CAAC;gBACpC,MAAM,KAAK,CAAC;YACd,CAAC;YAED,MAAM,CAAC,IAAI,CAAC;gBACV,EAAE,EAAE,EAAE;gBACN,WAAW,EAAE,IAAI;gBACjB,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,OAAO,EAAE,KAAK,CAAC,OAAO;aACvB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;AAChC,CAAC;AAED,SAAS,cAAc,CAAC,EAAsB;IAC5C,IAAI,EAAE,KAAK,SAAS,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QACjD,MAAM,IAAI,kCAAkC,CAC1C,sEAAsE;YACpE,6CAA6C,MAAM,CAAC,EAAE,CAAC,IAAI,CAC9D,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,6BAA6B,CAC3C,SAAkE;IAElE,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAC/B,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,KAAK,GAAG,OAAO,CAAC,QAAQ,EAChD,CAAC,CACF,CAAC;IAEF,IAAI,QAAQ,GAAG,yBAAyB,EAAE,CAAC;QACzC,MAAM,IAAI,kCAAkC,CAC1C,sEAAsE;YACpE,SAAS,MAAM,CAAC,yBAAyB,CAAC,0BAA0B;YACpE,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAC/B,CAAC;IACJ,CAAC;AACH,CAAC"}
|