@kensio/yulin 1.20.15 → 1.20.17

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.
Files changed (355) hide show
  1. package/README.md +13 -0
  2. package/dist/sdk/module/sim-sdk-module-client-interceptor.d.ts +5 -0
  3. package/dist/sdk/module/sim-sdk-module-client-interceptor.js +14 -0
  4. package/dist/sdk/module/sim-sdk-static-client-factory.d.ts +26 -0
  5. package/dist/sdk/module/sim-sdk-static-client-factory.js +59 -0
  6. package/dist/sdk/send-patch.d.ts +8 -0
  7. package/dist/sdk/send-patch.js +11 -0
  8. package/dist/service/aws/caller/sim-aws-ambient-caller.d.ts +23 -0
  9. package/dist/service/aws/caller/sim-aws-ambient-caller.js +12 -0
  10. package/dist/service/aws/caller/sim-aws-caller-resolver.d.ts +39 -6
  11. package/dist/service/aws/caller/sim-aws-caller-resolver.js +32 -30
  12. package/dist/service/aws/caller/sim-aws-caller.d.ts +9 -0
  13. package/dist/service/aws/caller/sim-aws-resolved-caller.d.ts +19 -0
  14. package/dist/service/aws/caller/sim-aws-resolved-caller.js +26 -0
  15. package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts +12 -0
  16. package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +6 -0
  17. package/dist/service/aws/factory/sim-aws-account-service-cache.d.ts +12 -0
  18. package/dist/service/aws/factory/sim-aws-account-service-cache.js +9 -0
  19. package/dist/service/aws/factory/sim-aws-registered-service-builder.js +3 -1
  20. package/dist/service/aws/factory/sim-aws-service-factory.d.ts +5 -0
  21. package/dist/service/aws/factory/sim-aws-service-factory.js +14 -0
  22. package/dist/service/aws/sim-aws-properties.d.ts +15 -0
  23. package/dist/service/aws/sim-aws.js +2 -1
  24. package/dist/service/cloudformation/command/create-stack/create-stack.handler.d.ts +4 -0
  25. package/dist/service/cloudformation/command/create-stack/create-stack.handler.js +4 -1
  26. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-deployer.js +2 -1
  27. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-plan.d.ts +11 -2
  28. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-plan.js +2 -1
  29. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-stack-options.d.ts +6 -0
  30. package/dist/service/cloudformation/deploy/sim-cfn-template-deployer.d.ts +11 -0
  31. package/dist/service/cloudformation/deploy/sim-cfn-template-deployer.js +17 -15
  32. package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.d.ts +12 -0
  33. package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.js +2 -1
  34. package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cache-policy-cfn.d.ts +23 -0
  35. package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cache-policy-cfn.js +30 -0
  36. package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cloudfront-cfn-value-adapter.js +8 -0
  37. package/dist/service/cloudformation/resource/name/sim-cfn-generated-resource-name.d.ts +29 -12
  38. package/dist/service/cloudformation/resource/name/sim-cfn-generated-resource-name.js +51 -20
  39. package/dist/service/cloudformation/stack/deploy/sim-cfn-resource-order.d.ts +19 -0
  40. package/dist/service/cloudformation/stack/deploy/sim-cfn-resource-order.js +6 -0
  41. package/dist/service/cloudformation/stack/deploy/sim-cfn-stack-resource-batch-creator.d.ts +7 -0
  42. package/dist/service/cloudformation/stack/deploy/sim-cfn-stack-resource-batch-creator.js +9 -2
  43. package/dist/service/cloudformation/stack/deploy/sim-cfn-stack-resource-creator.d.ts +2 -0
  44. package/dist/service/cloudformation/stack/deploy/sim-cfn-stack-resource-creator.js +2 -1
  45. package/dist/service/cloudformation/stack/sim-cfn-stack-resource-operations.d.ts +6 -0
  46. package/dist/service/cloudformation/stack/sim-cfn-stack-resource-operations.js +4 -1
  47. package/dist/service/cloudformation/stack/sim-cfn-stack.js +2 -1
  48. package/dist/service/cloudformation/stack/sim-cfn-stack.type.d.ts +6 -0
  49. package/dist/service/cloudfront/behaviour/sim-cloud-front-behavior.d.ts +5 -0
  50. package/dist/service/cloudfront/cache-policy/sim-cf-cache-policy-registry.d.ts +37 -0
  51. package/dist/service/cloudfront/cache-policy/sim-cf-cache-policy-registry.js +50 -0
  52. package/dist/service/cloudfront/cache-policy/sim-cf-cache-policy.d.ts +25 -0
  53. package/dist/service/cloudfront/cache-policy/sim-cf-cache-policy.js +21 -0
  54. package/dist/service/cloudfront/cache-policy/sim-cf-managed-cache-policies.d.ts +28 -0
  55. package/dist/service/cloudfront/cache-policy/sim-cf-managed-cache-policies.js +48 -0
  56. package/dist/service/cloudfront/cff/function-code-input/cff-function-code-input.d.ts +8 -0
  57. package/dist/service/cloudfront/cff/function-code-input/cff-function-code-input.js +13 -0
  58. package/dist/service/cloudfront/cff/sim-cf-function-commands.d.ts +52 -0
  59. package/dist/service/cloudfront/cff/sim-cf-function-commands.js +51 -0
  60. package/dist/service/cloudfront/cff/sim-cff-configuration.d.ts +41 -0
  61. package/dist/service/cloudfront/cff/sim-cff-configuration.js +34 -0
  62. package/dist/service/cloudfront/cff/sim-cff-stage.d.ts +23 -0
  63. package/dist/service/cloudfront/cff/sim-cff-stage.js +30 -0
  64. package/dist/service/cloudfront/cff/sim-cloudfront-function.d.ts +6 -1
  65. package/dist/service/cloudfront/cff/sim-cloudfront-function.js +6 -0
  66. package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-config.d.ts +27 -0
  67. package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-config.js +42 -0
  68. package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-creator.d.ts +24 -0
  69. package/dist/service/cloudfront/cfn/cache-policy/sim-cfn-cf-cache-policy-creator.js +32 -0
  70. package/dist/service/cloudfront/cfn/distro/{sim-cfn-cf-distro-response-headers-policy.d.ts → sim-cfn-cf-distro-behavior-policies.d.ts} +8 -7
  71. package/dist/service/cloudfront/cfn/distro/{sim-cfn-cf-distro-response-headers-policy.js → sim-cfn-cf-distro-behavior-policies.js} +11 -37
  72. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.d.ts +6 -5
  73. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.js +8 -7
  74. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-policy-drops.d.ts +23 -0
  75. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-policy-drops.js +50 -0
  76. package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.d.ts +1 -0
  77. package/dist/service/cloudfront/cfn/sim-cfn-cloudfront-resource-factory.js +10 -0
  78. package/dist/service/cloudfront/command/create-distribution/create-distribution.command.d.ts +1 -0
  79. package/dist/service/cloudfront/command/create-distribution/create-distribution.handler.d.ts +2 -0
  80. package/dist/service/cloudfront/command/create-function/create-function.handler.js +7 -1
  81. package/dist/service/cloudfront/command/function/sim-cf-describe-function.d.ts +22 -0
  82. package/dist/service/cloudfront/command/function/sim-cf-describe-function.js +32 -0
  83. package/dist/service/cloudfront/command/function/sim-cf-function-access.d.ts +48 -0
  84. package/dist/service/cloudfront/command/function/sim-cf-function-access.js +48 -0
  85. package/dist/service/cloudfront/command/function/sim-cf-function-command.types.d.ts +97 -0
  86. package/dist/service/cloudfront/command/function/sim-cf-function-command.types.js +10 -0
  87. package/dist/service/cloudfront/command/function/sim-cf-function-lookup.d.ts +12 -0
  88. package/dist/service/cloudfront/command/function/sim-cf-function-lookup.js +21 -0
  89. package/dist/service/cloudfront/command/function/sim-cf-function-summary.d.ts +11 -0
  90. package/dist/service/cloudfront/command/function/sim-cf-function-summary.js +30 -0
  91. package/dist/service/cloudfront/command/function/sim-cf-get-function.d.ts +23 -0
  92. package/dist/service/cloudfront/command/function/sim-cf-get-function.js +33 -0
  93. package/dist/service/cloudfront/command/function/sim-cf-list-functions.d.ts +22 -0
  94. package/dist/service/cloudfront/command/function/sim-cf-list-functions.js +38 -0
  95. package/dist/service/cloudfront/command/update-distribution/update-distribution.handler.d.ts +2 -0
  96. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-cache-policy.d.ts +18 -0
  97. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-cache-policy.js +30 -0
  98. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-policies.d.ts +28 -0
  99. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-policies.js +41 -0
  100. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-properties.d.ts +2 -2
  101. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-properties.js +6 -3
  102. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.d.ts +0 -10
  103. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.js +0 -19
  104. package/dist/service/cloudfront/distribution/configurator/sim-cf-distribution-configurator.factory.d.ts +2 -0
  105. package/dist/service/cloudfront/distribution/configurator/sim-cf-distribution-configurator.factory.js +4 -2
  106. package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-behavior-configurator.d.ts +3 -3
  107. package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-behavior-configurator.js +5 -5
  108. package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-distribution-configurator.d.ts +3 -3
  109. package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-distribution-configurator.js +4 -4
  110. package/dist/service/cloudfront/distribution/sim-cf-distribution-configuration-state.d.ts +3 -1
  111. package/dist/service/cloudfront/distribution/sim-cf-distribution-reconfigurer.d.ts +2 -0
  112. package/dist/service/cloudfront/error/sim-cloudfront.error.d.ts +21 -0
  113. package/dist/service/cloudfront/error/sim-cloudfront.error.js +25 -0
  114. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.js +2 -10
  115. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store.js +2 -1
  116. package/dist/service/cloudfront/sdk/sim-cloudfront-sdk-command-router.js +12 -0
  117. package/dist/service/cloudfront/sim-cf-authorize.d.ts +16 -0
  118. package/dist/service/cloudfront/sim-cf-authorize.js +19 -0
  119. package/dist/service/cloudfront/sim-cf-etag.d.ts +7 -0
  120. package/dist/service/cloudfront/sim-cf-etag.js +10 -0
  121. package/dist/service/cloudfront/sim-cloudfront-commands.d.ts +8 -12
  122. package/dist/service/cloudfront/sim-cloudfront-commands.js +8 -17
  123. package/dist/service/cloudfront/sim-cloudfront-policies.d.ts +43 -0
  124. package/dist/service/cloudfront/sim-cloudfront-policies.js +53 -0
  125. package/dist/service/cloudfront/sim-cloudfront.d.ts +13 -17
  126. package/dist/service/cloudfront/sim-cloudfront.js +22 -25
  127. package/dist/service/ecr/authorize/sim-ecr-authorizer.d.ts +31 -0
  128. package/dist/service/ecr/authorize/sim-ecr-authorizer.js +38 -0
  129. package/dist/service/ecr/cfn/repository/sim-cfn-ecr-repository-creator.d.ts +11 -2
  130. package/dist/service/ecr/cfn/repository/sim-cfn-ecr-repository-creator.js +11 -2
  131. package/dist/service/ecr/cfn/sim-ecr-cfn-resource-factory.d.ts +4 -2
  132. package/dist/service/ecr/cfn/sim-ecr-cfn-resource-factory.js +8 -9
  133. package/dist/service/ecr/cfn/sim-ecr-cfn-unsupported-resource.d.ts +7 -0
  134. package/dist/service/ecr/cfn/sim-ecr-cfn-unsupported-resource.js +9 -0
  135. package/dist/service/ecr/sim-ecr.d.ts +7 -0
  136. package/dist/service/ecr/sim-ecr.js +16 -4
  137. package/dist/service/ecs/command/authorize/sim-ecs-authorizer.d.ts +12 -0
  138. package/dist/service/ecs/command/authorize/sim-ecs-authorizer.js +21 -0
  139. package/dist/service/ecs/command/register-task-definition/register-task-definition.handler.js +1 -0
  140. package/dist/service/ecs/sim-ecs-service-principal.d.ts +8 -0
  141. package/dist/service/ecs/sim-ecs-service-principal.js +8 -0
  142. package/dist/service/eventbridge/command/authorize/sim-event-bridge-authorizer.d.ts +12 -0
  143. package/dist/service/eventbridge/command/authorize/sim-event-bridge-authorizer.js +21 -0
  144. package/dist/service/eventbridge/command/rule/sim-event-bridge-rule-access.d.ts +13 -0
  145. package/dist/service/eventbridge/command/rule/sim-event-bridge-rule-access.js +9 -0
  146. package/dist/service/eventbridge/command/target/sim-event-bridge-put-targets.js +1 -0
  147. package/dist/service/firehose/command/authorize/sim-firehose-authorizer.d.ts +12 -0
  148. package/dist/service/firehose/command/authorize/sim-firehose-authorizer.js +20 -0
  149. package/dist/service/firehose/command/sim-firehose-delivery-stream-access.d.ts +4 -0
  150. package/dist/service/firehose/command/sim-firehose-delivery-stream-access.js +6 -0
  151. package/dist/service/firehose/command/stream/sim-firehose-create-delivery-stream.js +3 -1
  152. package/dist/service/firehose/sim-firehose-service-principal.d.ts +8 -0
  153. package/dist/service/firehose/sim-firehose-service-principal.js +8 -0
  154. package/dist/service/firehose/source/sim-firehose-source.d.ts +5 -0
  155. package/dist/service/firehose/source/sim-firehose-source.js +5 -0
  156. package/dist/service/glue/cfn/database/sim-cfn-glue-database-properties.js +2 -2
  157. package/dist/service/glue/cfn/sim-cfn-glue-generated-name.d.ts +10 -0
  158. package/dist/service/glue/cfn/sim-cfn-glue-generated-name.js +25 -0
  159. package/dist/service/glue/cfn/table/sim-cfn-glue-table-properties.js +2 -3
  160. package/dist/service/iam/authorize/allow/sim-iam-allow-requirement.d.ts +33 -2
  161. package/dist/service/iam/authorize/allow/sim-iam-allow-requirement.js +33 -2
  162. package/dist/service/iam/authorize/allow/sim-iam-allow-statements.d.ts +4 -3
  163. package/dist/service/iam/authorize/allow/sim-iam-allow-statements.js +9 -3
  164. package/dist/service/iam/authorize/context/sim-iam-auth-z-allow-requirement.d.ts +14 -5
  165. package/dist/service/iam/authorize/context/sim-iam-auth-z-allow-requirement.js +16 -12
  166. package/dist/service/iam/authorize/context/sim-iam-auth-z-caller-context-builder.d.ts +36 -7
  167. package/dist/service/iam/authorize/context/sim-iam-auth-z-caller-context-builder.js +22 -11
  168. package/dist/service/iam/authorize/context/sim-iam-auth-z-context-builder.d.ts +10 -71
  169. package/dist/service/iam/authorize/context/sim-iam-auth-z-context-builder.js +7 -2
  170. package/dist/service/iam/authorize/context/sim-iam-auth-z-input.d.ts +87 -0
  171. package/dist/service/iam/authorize/context/sim-iam-auth-z-input.js +1 -0
  172. package/dist/service/iam/authorize/match/sim-iam-policy-principal-matcher.d.ts +21 -3
  173. package/dist/service/iam/authorize/match/sim-iam-policy-principal-matcher.js +34 -10
  174. package/dist/service/iam/authorize/match/sim-iam-principal-match.d.ts +29 -8
  175. package/dist/service/iam/authorize/match/sim-iam-principal-match.js +38 -13
  176. package/dist/service/iam/authorize/pass-role/sim-iam-pass-role-authorizer.d.ts +74 -0
  177. package/dist/service/iam/authorize/pass-role/sim-iam-pass-role-authorizer.js +92 -0
  178. package/dist/service/iam/authorize/sim-iam-account-auth-z.d.ts +21 -5
  179. package/dist/service/iam/authorize/sim-iam-account-auth-z.js +7 -3
  180. package/dist/service/iam/authorize/sim-iam-authorizer.d.ts +5 -2
  181. package/dist/service/iam/authorize/sim-iam-authorizer.js +3 -1
  182. package/dist/service/iam/authorize/sim-iam-inter-service-auth-z.d.ts +1 -1
  183. package/dist/service/iam/authorize/sim-iam-wildcard.js +39 -4
  184. package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.js +2 -1
  185. package/dist/service/iam/cfn/name/sim-cfn-iam-generated-name.d.ts +16 -0
  186. package/dist/service/iam/cfn/name/sim-cfn-iam-generated-name.js +36 -0
  187. package/dist/service/iam/cfn/role/sim-cfn-iam-role-properties-parser.js +9 -8
  188. package/dist/service/iam/cfn/sim-cfn-iam-optional-string.d.ts +17 -0
  189. package/dist/service/iam/cfn/sim-cfn-iam-optional-string.js +17 -0
  190. package/dist/service/iam/cfn/user/sim-cfn-iam-user-properties-parser.js +4 -8
  191. package/dist/service/iam/command/policy/create-policy/create-policy-input-resolver.js +2 -0
  192. package/dist/service/iam/command/policy/put-role-policy/put-role-policy.handler.js +5 -0
  193. package/dist/service/iam/command/policy/put-user-policy/put-user-policy.handler.js +5 -0
  194. package/dist/service/iam/command/role/create-role/create-role.handler.js +4 -1
  195. package/dist/service/iam/error/sim-iam.error.d.ts +11 -0
  196. package/dist/service/iam/error/sim-iam.error.js +13 -0
  197. package/dist/service/iam/index.d.ts +1 -0
  198. package/dist/service/iam/policy/sim-iam-policy-document-of-size.d.ts +18 -0
  199. package/dist/service/iam/policy/sim-iam-policy-document-of-size.js +41 -0
  200. package/dist/service/iam/role/sim-iam-deploy-role.d.ts +56 -0
  201. package/dist/service/iam/role/sim-iam-deploy-role.js +50 -0
  202. package/dist/service/iam/role/sim-iam-role-with-policy.factory.d.ts +11 -0
  203. package/dist/service/iam/role/sim-iam-role-with-policy.factory.js +4 -2
  204. package/dist/service/iam/sim-iam-account-parts.d.ts +16 -0
  205. package/dist/service/iam/sim-iam-account-parts.js +2 -0
  206. package/dist/service/iam/sim-iam.d.ts +12 -2
  207. package/dist/service/iam/sim-iam.js +12 -0
  208. package/dist/service/iam/validate/size/sim-iam-policy-document-size.d.ts +57 -0
  209. package/dist/service/iam/validate/size/sim-iam-policy-document-size.js +71 -0
  210. package/dist/service/kms/command/authorize/sim-kms-authorizer.d.ts +3 -1
  211. package/dist/service/kms/command/authorize/sim-kms-authorizer.js +4 -1
  212. package/dist/service/kms/command/sim-kms-request-options.d.ts +11 -0
  213. package/dist/service/kms/key/sim-kms-key-policy.d.ts +5 -4
  214. package/dist/service/kms/key/sim-kms-key-policy.js +4 -3
  215. package/dist/service/lambda/cfn/function/sim-cfn-lambda-function-properties-parser.d.ts +2 -2
  216. package/dist/service/lambda/cfn/function/sim-cfn-lambda-function-properties-parser.js +4 -3
  217. package/dist/service/lambda/cfn/function/sim-cfn-lambda-generated-function-name.d.ts +10 -0
  218. package/dist/service/lambda/cfn/function/sim-cfn-lambda-generated-function-name.js +25 -0
  219. package/dist/service/lambda/command/authorize/sim-lambda-resource-policies.d.ts +1 -1
  220. package/dist/service/lambda/command/create-function/create-function-authorizer.d.ts +9 -2
  221. package/dist/service/lambda/command/create-function/create-function-authorizer.js +16 -2
  222. package/dist/service/lambda/command/create-function/create-function.handler.js +1 -1
  223. package/dist/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.d.ts +7 -2
  224. package/dist/service/lambda/command/update-function-configuration/update-function-configuration-authorizer.js +14 -2
  225. package/dist/service/lambda/command/update-function-configuration/update-function-configuration.handler.js +1 -1
  226. package/dist/service/lambda/function/logging/sim-lambda-function-logging.d.ts +10 -1
  227. package/dist/service/lambda/function/logging/sim-lambda-function-logging.js +25 -1
  228. package/dist/service/lambda/function/logging/sim-lambda-invoke-error-log.d.ts +13 -0
  229. package/dist/service/lambda/function/logging/sim-lambda-invoke-error-log.js +18 -0
  230. package/dist/service/lambda/sim-lambda-service-principal.d.ts +7 -0
  231. package/dist/service/lambda/sim-lambda-service-principal.js +7 -0
  232. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-authorization.d.ts +46 -0
  233. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-authorization.js +49 -0
  234. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-creator.d.ts +5 -0
  235. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-creator.js +6 -0
  236. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-destination-creator.d.ts +5 -0
  237. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-destination-creator.js +6 -0
  238. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-source-creator.d.ts +5 -0
  239. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-source-creator.js +6 -0
  240. package/dist/service/logs/cfn/group/sim-cfn-log-group-creator.d.ts +9 -2
  241. package/dist/service/logs/cfn/group/sim-cfn-log-group-creator.js +34 -5
  242. package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.js +1 -1
  243. package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.d.ts +4 -0
  244. package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.js +9 -4
  245. package/dist/service/logs/sim-logs-commands.d.ts +3 -0
  246. package/dist/service/logs/sim-logs-commands.js +4 -0
  247. package/dist/service/logs/sim-logs.js +6 -1
  248. package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-creator.d.ts +2 -2
  249. package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-creator.js +4 -3
  250. package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-generated-name.d.ts +12 -0
  251. package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-generated-name.js +22 -0
  252. package/dist/service/s3/command/authorize/sim-s3-bucket-resource-policies.d.ts +1 -1
  253. package/dist/service/scheduler/command/authorize/sim-scheduler-authorizer.d.ts +10 -1
  254. package/dist/service/scheduler/command/authorize/sim-scheduler-authorizer.js +19 -1
  255. package/dist/service/scheduler/command/schedule/sim-scheduler-create-schedule.js +1 -0
  256. package/dist/service/scheduler/command/schedule/sim-scheduler-schedule-access.d.ts +8 -0
  257. package/dist/service/scheduler/command/schedule/sim-scheduler-schedule-access.js +9 -0
  258. package/dist/service/scheduler/command/schedule/sim-scheduler-update-schedule.js +1 -0
  259. package/dist/service/secretsmanager/cfn/secret/sim-cfn-secrets-manager-generated-name.d.ts +15 -0
  260. package/dist/service/secretsmanager/cfn/secret/sim-cfn-secrets-manager-generated-name.js +22 -0
  261. package/dist/service/secretsmanager/cfn/secret/sim-cfn-secrets-manager-secret-properties.d.ts +4 -10
  262. package/dist/service/secretsmanager/cfn/secret/sim-cfn-secrets-manager-secret-properties.js +13 -31
  263. package/dist/service/secretsmanager/cfn/secret/sim-cfn-secrets-manager-secret-value.d.ts +17 -0
  264. package/dist/service/secretsmanager/cfn/secret/sim-cfn-secrets-manager-secret-value.js +30 -0
  265. package/dist/service/secretsmanager/secret/sim-secrets-manager-secret-name.d.ts +6 -0
  266. package/dist/service/secretsmanager/secret/sim-secrets-manager-secret-name.js +8 -3
  267. package/dist/service/sns/command/authorize/sim-sns-topic-resource-policies.d.ts +1 -1
  268. package/dist/service/sqs/command/authorize/sim-sqs-queue-resource-policies.d.ts +1 -1
  269. package/dist/service/ssm/cfn/parameter/sim-cfn-ssm-generated-parameter-name.d.ts +16 -0
  270. package/dist/service/ssm/cfn/parameter/sim-cfn-ssm-generated-parameter-name.js +23 -0
  271. package/dist/service/ssm/cfn/parameter/sim-cfn-ssm-parameter-properties.d.ts +2 -4
  272. package/dist/service/ssm/cfn/parameter/sim-cfn-ssm-parameter-properties.js +5 -5
  273. package/dist/service/ssm/parameter/sim-ssm-kms-crypto.d.ts +6 -4
  274. package/dist/service/ssm/parameter/sim-ssm-kms-crypto.js +4 -4
  275. package/dist/service/ssm/parameter/sim-ssm-parameter-arn.d.ts +17 -0
  276. package/dist/service/ssm/parameter/sim-ssm-parameter-arn.js +20 -0
  277. package/dist/service/ssm/parameter/sim-ssm-parameter-kms.d.ts +15 -9
  278. package/dist/service/ssm/parameter/sim-ssm-parameter-kms.js +20 -10
  279. package/dist/service/ssm/parameter/sim-ssm-parameter-name.js +3 -12
  280. package/dist/service/stepfunctions/command/authorize/sim-step-functions-authorizer.d.ts +41 -0
  281. package/dist/service/stepfunctions/command/authorize/sim-step-functions-authorizer.js +64 -0
  282. package/dist/service/stepfunctions/command/machine/sim-state-machine-create.d.ts +5 -2
  283. package/dist/service/stepfunctions/command/machine/sim-state-machine-create.js +6 -2
  284. package/dist/service/stepfunctions/command/machine/sim-state-machine-delete.d.ts +26 -0
  285. package/dist/service/stepfunctions/command/machine/sim-state-machine-delete.js +29 -0
  286. package/dist/service/stepfunctions/command/machine/sim-state-machine-lookup.d.ts +7 -0
  287. package/dist/service/stepfunctions/command/machine/sim-state-machine-lookup.js +12 -3
  288. package/dist/service/stepfunctions/command/machine/sim-state-machine-update.d.ts +19 -0
  289. package/dist/service/stepfunctions/command/machine/{sim-state-machine-writes.js → sim-state-machine-update.js} +3 -14
  290. package/dist/service/stepfunctions/sim-step-functions.d.ts +8 -2
  291. package/dist/service/stepfunctions/sim-step-functions.js +26 -9
  292. package/dist/service/sts/auth-z/assume-role-auth-z-coordinator.d.ts +9 -2
  293. package/dist/service/sts/auth-z/assume-role-auth-z-coordinator.js +2 -2
  294. package/dist/service/sts/auth-z/assume-role-source-account-auth-z.d.ts +10 -4
  295. package/dist/service/sts/auth-z/assume-role-source-account-auth-z.js +8 -7
  296. package/dist/service/sts/auth-z/assume-role-target-auth-z.d.ts +2 -2
  297. package/dist/service/sts/auth-z/assume-role-trust-policy-authorizer.d.ts +6 -2
  298. package/dist/service/sts/auth-z/assume-role-trust-policy-authorizer.js +14 -11
  299. package/dist/service/sts/command/assume-role/assume-role.handler.d.ts +10 -1
  300. package/dist/service/sts/command/assume-role/assume-role.handler.js +6 -2
  301. package/dist/service/sts/command/get-caller-identity/get-caller-identity.handler.d.ts +10 -1
  302. package/dist/service/sts/command/get-caller-identity/get-caller-identity.handler.js +5 -1
  303. package/dist/service/sts/service-role/sim-service-role.js +5 -1
  304. package/dist/service/sts/sim-sts.d.ts +18 -1
  305. package/dist/service/sts/sim-sts.js +8 -0
  306. package/dist/util/memo/bounded-memo.d.ts +36 -0
  307. package/dist/util/memo/bounded-memo.js +58 -0
  308. package/docs/README.md +54 -0
  309. package/docs/ai-skill/README.md +69 -0
  310. package/docs/cli/README.md +284 -0
  311. package/docs/factories/README.md +140 -0
  312. package/docs/lint/README.md +176 -0
  313. package/docs/non-aws-dependencies/README.md +261 -0
  314. package/docs/sdk/README.md +274 -0
  315. package/docs/serve/README.md +1126 -0
  316. package/docs/services/acm/README.md +823 -0
  317. package/docs/services/apigateway/README.md +1919 -0
  318. package/docs/services/apigatewayv2/README.md +2678 -0
  319. package/docs/services/athena/README.md +1044 -0
  320. package/docs/services/bedrock/README.md +350 -0
  321. package/docs/services/cloudformation/README.md +3625 -0
  322. package/docs/services/cloudfront/README.md +3098 -0
  323. package/docs/services/cloudwatch/README.md +422 -0
  324. package/docs/services/cognito/README.md +4924 -0
  325. package/docs/services/dynamodb/README.md +3785 -0
  326. package/docs/services/ecr/README.md +302 -0
  327. package/docs/services/ecs/README.md +2021 -0
  328. package/docs/services/elbv2/README.md +1901 -0
  329. package/docs/services/eventbridge/README.md +1118 -0
  330. package/docs/services/firehose/README.md +811 -0
  331. package/docs/services/glue/README.md +507 -0
  332. package/docs/services/iam/README.md +1578 -0
  333. package/docs/services/kinesis/README.md +455 -0
  334. package/docs/services/kms/README.md +664 -0
  335. package/docs/services/lambda/README.md +3719 -0
  336. package/docs/services/logs/README.md +882 -0
  337. package/docs/services/organizations/README.md +574 -0
  338. package/docs/services/personalize/README.md +835 -0
  339. package/docs/services/rekognition/README.md +1070 -0
  340. package/docs/services/route53/README.md +1783 -0
  341. package/docs/services/s3/README.md +3029 -0
  342. package/docs/services/scheduler/README.md +814 -0
  343. package/docs/services/secretsmanager/README.md +670 -0
  344. package/docs/services/ses/README.md +1013 -0
  345. package/docs/services/sns/README.md +1904 -0
  346. package/docs/services/sqs/README.md +1185 -0
  347. package/docs/services/ssm/README.md +1096 -0
  348. package/docs/services/stepfunctions/README.md +1341 -0
  349. package/docs/services/sts/README.md +245 -0
  350. package/docs/services/wafv2/README.md +1380 -0
  351. package/docs/terraform/README.md +248 -0
  352. package/docs/time/README.md +284 -0
  353. package/llms.txt +59 -0
  354. package/package.json +7 -4
  355. package/dist/service/stepfunctions/command/machine/sim-state-machine-writes.d.ts +0 -25
@@ -0,0 +1,507 @@
1
+ # Simulated Glue
2
+
3
+ Yulin includes a simulated Glue Data Catalog for tests and local development. It holds databases,
4
+ tables and the partitions registered against them, deploys databases and tables from
5
+ `AWS::Glue::Database` and `AWS::Glue::Table`, and hands them back through `GetDatabase` and
6
+ `GetTable`. A test can assert that a stack declared the table definition it meant to, including the
7
+ Athena partition projection its parameters configure.
8
+
9
+ A table here is a definition. The data it describes stays in S3, unread, and the catalog answers
10
+ with what it was told to hold.
11
+
12
+ Simulated [Athena](https://yulinsim.dev/services/athena/ "Simulated Athena usage docs") reads this
13
+ catalog. A query naming a table no database here holds fails the way real Athena fails it, and a
14
+ table's partition projection is evaluated when a query runs against it. All four projection types
15
+ are covered, `enum`, `integer`, `date` and `injected`. A projection with a mistake in its parameters
16
+ fails the query that reads it.
17
+
18
+ Glue-specific types are imported from the `@kensio/yulin/glue` subpath.
19
+
20
+ ## Deploying a database and a table
21
+
22
+ A stack declares the database, and the table names it through `Ref`. Both read back through the SDK
23
+ once the deploy finishes.
24
+
25
+ ```typescript sim-glue-cloudformation
26
+ /**
27
+ * Deploying a Glue database and a table, then reading the table back.
28
+ */
29
+
30
+ import { GetTableCommand } from "@aws-sdk/client-glue";
31
+
32
+ import { SimAws } from "@kensio/yulin";
33
+
34
+ const simAws = new SimAws();
35
+
36
+ const stack = await simAws.cloudFormation().deployTemplate({
37
+ stackName: "analytics-stack",
38
+ template: {
39
+ Resources: {
40
+ LogDatabase: {
41
+ Type: "AWS::Glue::Database",
42
+ Properties: {
43
+ CatalogId: { Ref: "AWS::AccountId" },
44
+ DatabaseInput: { Name: "site_logs" },
45
+ },
46
+ },
47
+ LogTable: {
48
+ Type: "AWS::Glue::Table",
49
+ Properties: {
50
+ CatalogId: { Ref: "AWS::AccountId" },
51
+ DatabaseName: { Ref: "LogDatabase" },
52
+ TableInput: {
53
+ Name: "access_logs",
54
+ TableType: "EXTERNAL_TABLE",
55
+ PartitionKeys: [{ Name: "year", Type: "string" }],
56
+ StorageDescriptor: {
57
+ Columns: [{ Name: "status", Type: "int" }],
58
+ Location: "s3://site-logs/cloudfront/",
59
+ },
60
+ Parameters: {
61
+ "projection.enabled": "true",
62
+ "projection.year.type": "date",
63
+ "projection.year.format": "yyyy",
64
+ "projection.year.range": "2026,NOW",
65
+ // eslint-disable-next-line no-template-curly-in-string
66
+ "storage.location.template": "s3://site-logs/cloudfront/${year}/",
67
+ },
68
+ },
69
+ },
70
+ },
71
+ },
72
+ },
73
+ });
74
+
75
+ await stack.waitForDeployComplete();
76
+
77
+ const { Table } = simAws
78
+ .glue()
79
+ .getTable(
80
+ new GetTableCommand({ DatabaseName: "site_logs", Name: "access_logs" }),
81
+ );
82
+
83
+ // true
84
+ console.log(Table.Parameters["projection.enabled"]);
85
+ ```
86
+
87
+ Partition projection lives entirely in `TableInput.Parameters`. Those parameters are read into the
88
+ table, and never recorded as ignored. A table whose parameters were dropped on the way in deploys
89
+ green while projecting none of them. Simulated Athena reads those same parameters when a query runs.
90
+ A broken projection fails that query.
91
+
92
+ `Ref` answers with the database name and with the table name.
93
+
94
+ ## Names are folded to lower case
95
+
96
+ A database name and a table name are both folded to lower case when they are stored. Real Glue folds
97
+ them the same way, for compatibility with Apache Hive. A database created as `Rainlytics` is stored,
98
+ reported and queried as `rainlytics`.
99
+
100
+ ```typescript sim-glue-name-folding
101
+ /**
102
+ * A catalog name folded on its way in.
103
+ */
104
+
105
+ import {
106
+ CreateDatabaseCommand,
107
+ GetDatabaseCommand,
108
+ } from "@aws-sdk/client-glue";
109
+
110
+ import { SimAws } from "@kensio/yulin";
111
+
112
+ const glue = new SimAws().glue();
113
+
114
+ glue.createDatabase(
115
+ new CreateDatabaseCommand({ DatabaseInput: { Name: "Rainlytics" } }),
116
+ );
117
+
118
+ const { Database } = glue.getDatabase(
119
+ new GetDatabaseCommand({ Name: "Rainlytics" }),
120
+ );
121
+
122
+ // rainlytics
123
+ console.log(Database.Name);
124
+ ```
125
+
126
+ Two names differing only by case are one name. A second `CreateDatabase` for `Rainlytics` after one
127
+ for `rainlytics` is an `AlreadyExistsException`, and a `GetTable` finds the table under whichever
128
+ spelling it is asked for.
129
+
130
+ Column names keep the case they were given, including partition keys. Real Glue leaves those alone,
131
+ and simulated [Athena](https://yulinsim.dev/services/athena/ "Simulated Athena usage docs") folds a
132
+ column name only when it runs a query.
133
+
134
+ A database or a table the template leaves unnamed is named from the stack name, the logical ID and a
135
+ tail derived from both, folded the same way. A `LogTable` in `analytics-stack` becomes
136
+ `analytics-stack-logtable-` and twelve more characters, where real CloudFormation ends the name in
137
+ twelve random ones. The name is trimmed to the 255 bytes the catalog allows, and [the CloudFormation docs](https://yulinsim.dev/services/cloudformation/#names-cloudformation-generates "Names CloudFormation generates")
138
+ cover how the stack name and the logical ID share what is left.
139
+
140
+ ## Reading the catalog back
141
+
142
+ `GetDatabase`, `GetDatabases`, `GetTable` and `GetTables` answer through the SDK. A `SimGlue` also
143
+ carries `findDatabase`, `findTable`, `allDatabases`, `tablesInDatabase`, `findPartition` and
144
+ `partitionsInTable`. Those read the same state without going through a Command or its
145
+ authorization.
146
+
147
+ The storage descriptor keeps its columns in the order they were declared, and the partition keys
148
+ keep theirs. The two stay apart, the way real Glue keeps them. A partition key repeated among the
149
+ storage descriptor's columns gives a table Athena refuses to query.
150
+
151
+ ## Registering partitions
152
+
153
+ A crawler, `MSCK REPAIR TABLE` or `ALTER TABLE ADD PARTITION` fills a real catalog's partition list.
154
+ Here the six partition commands do it. A partition is keyed by its values in the order the table's
155
+ `PartitionKeys` declares them, and carries a storage descriptor saying where its own data sits.
156
+
157
+ ```typescript sim-glue-partitions
158
+ /**
159
+ * Registering two days of partitions against a table, then listing them.
160
+ */
161
+
162
+ import {
163
+ BatchCreatePartitionCommand,
164
+ CreateDatabaseCommand,
165
+ CreateTableCommand,
166
+ GetPartitionsCommand,
167
+ } from "@aws-sdk/client-glue";
168
+
169
+ import { SimAws } from "@kensio/yulin";
170
+
171
+ const simAws = new SimAws();
172
+ const glue = simAws.glue();
173
+
174
+ glue.createDatabase(
175
+ new CreateDatabaseCommand({ DatabaseInput: { Name: "site_logs" } }),
176
+ );
177
+ glue.createTable(
178
+ new CreateTableCommand({
179
+ DatabaseName: "site_logs",
180
+ TableInput: {
181
+ Name: "access_logs",
182
+ PartitionKeys: [{ Name: "day", Type: "string" }],
183
+ StorageDescriptor: { Location: "s3://site-logs/cloudfront/" },
184
+ },
185
+ }),
186
+ );
187
+
188
+ const { Errors } = glue.batchCreatePartition(
189
+ new BatchCreatePartitionCommand({
190
+ DatabaseName: "site_logs",
191
+ TableName: "access_logs",
192
+ PartitionInputList: [
193
+ {
194
+ Values: ["2026-08-25"],
195
+ StorageDescriptor: {
196
+ Location: "s3://site-logs/cloudfront/day=2026-08-25/",
197
+ },
198
+ },
199
+ {
200
+ Values: ["2026-08-26"],
201
+ StorageDescriptor: {
202
+ Location: "s3://site-logs/cloudfront/day=2026-08-26/",
203
+ },
204
+ },
205
+ ],
206
+ }),
207
+ );
208
+
209
+ const { Partitions } = glue.getPartitions(
210
+ new GetPartitionsCommand({
211
+ DatabaseName: "site_logs",
212
+ TableName: "access_logs",
213
+ }),
214
+ );
215
+
216
+ // 0
217
+ console.log(Errors.length);
218
+ // s3://site-logs/cloudfront/day=2026-08-26/
219
+ console.log(Partitions[1]?.StorageDescriptor?.Location);
220
+ ```
221
+
222
+ `CreatePartition` registers one partition and `BatchCreatePartition` registers a list of them.
223
+ `GetPartition` reads one back by its values, and `GetPartitions` answers with a table's partitions in
224
+ registration order. `DeletePartition` and `BatchDeletePartition` remove them.
225
+
226
+ A batch reports what it could not do in `Errors` and carries on with the rest, the way real Glue
227
+ does. Each entry there carries the values it was given and an `ErrorCode` naming the refusal, so a
228
+ job re-run over a week of days learns which days were already registered and registers the others.
229
+
230
+ Values are positional. A `Values` list of a different length from the table's `PartitionKeys` lines
231
+ up with the wrong keys, and is refused with `InvalidInputException` naming both counts. Registering
232
+ one day twice is an `AlreadyExistsException`, since registration is not idempotent on real Glue.
233
+ Deleting a table removes the partitions registered against it, the way deleting a database removes
234
+ its tables.
235
+
236
+ ## Filtering partitions
237
+
238
+ `GetPartitions` takes an `Expression` and answers with the partitions it matches. A request carrying
239
+ none reads them all.
240
+
241
+ ```typescript sim-glue-partition-expressions
242
+ /**
243
+ * Reading back the partitions an expression matches.
244
+ */
245
+
246
+ import {
247
+ BatchCreatePartitionCommand,
248
+ CreateDatabaseCommand,
249
+ CreateTableCommand,
250
+ GetPartitionsCommand,
251
+ } from "@aws-sdk/client-glue";
252
+
253
+ import { SimAws } from "@kensio/yulin";
254
+
255
+ const simAws = new SimAws();
256
+ const glue = simAws.glue();
257
+
258
+ glue.createDatabase(
259
+ new CreateDatabaseCommand({ DatabaseInput: { Name: "site_logs" } }),
260
+ );
261
+ glue.createTable(
262
+ new CreateTableCommand({
263
+ DatabaseName: "site_logs",
264
+ TableInput: {
265
+ Name: "access_logs",
266
+ PartitionKeys: [
267
+ { Name: "day", Type: "string" },
268
+ { Name: "region", Type: "string" },
269
+ ],
270
+ },
271
+ }),
272
+ );
273
+
274
+ glue.batchCreatePartition(
275
+ new BatchCreatePartitionCommand({
276
+ DatabaseName: "site_logs",
277
+ TableName: "access_logs",
278
+ PartitionInputList: [
279
+ { Values: ["2026-07-31", "eu-west-2"] },
280
+ { Values: ["2026-08-01", "eu-west-2"] },
281
+ { Values: ["2026-08-02", "us-east-1"] },
282
+ ],
283
+ }),
284
+ );
285
+
286
+ const { Partitions } = glue.getPartitions(
287
+ new GetPartitionsCommand({
288
+ DatabaseName: "site_logs",
289
+ TableName: "access_logs",
290
+ Expression: "day >= '2026-08-01' AND region IN ('eu-west-2', 'us-east-1')",
291
+ }),
292
+ );
293
+
294
+ // [["2026-08-01","eu-west-2"],["2026-08-02","us-east-1"]]
295
+ console.log(JSON.stringify(Partitions.map((partition) => partition.Values)));
296
+ ```
297
+
298
+ A term names a partition key, an operator, and whatever the operator takes. The operators are `=`,
299
+ `<>` and `!=`, `>`, `<`, `>=`, `<=`, `LIKE`, `IN` and `BETWEEN`, and `BETWEEN` takes both of its
300
+ ends. `AND`, `OR` and `NOT` combine terms and brackets group them, with the precedence SQL gives
301
+ them (`NOT` binds tightest, then `AND`, then `OR`). `NOT` also sits in front of `LIKE`, `IN` and
302
+ `BETWEEN` to reverse that one term.
303
+
304
+ Comparison follows the type the table declares for the key. `tinyint`, `smallint`, `int`, `integer`,
305
+ `bigint`, `float`, `double` and `decimal` compare as numbers, so `10` sorts above `9` rather than
306
+ below it. Every other declared type compares as text, which is the order a date written the ISO way
307
+ already has. A key declared as a number is held to a numeric literal, and `hour = 'noon'` is refused
308
+ rather than matching nothing.
309
+
310
+ `LIKE` matches the value's text whatever type the key is declared with, since that is what `LIKE`
311
+ does. `%` stands for any run of characters and `_` for exactly one.
312
+
313
+ An expression naming a column the table does not partition by is refused, naming the column and the
314
+ keys the table does have. So is one that cannot be read, and the message says where reading stopped.
315
+
316
+ ## Intercepting a GlueClient
317
+
318
+ An intercepted `GlueClient` reaches the simulated catalog, so code under test builds its own client
319
+ and sends its own Commands.
320
+
321
+ ```typescript sim-glue-sdk-interception
322
+ /**
323
+ * Ordinary Glue SDK code reaching the simulated catalog.
324
+ */
325
+
326
+ import {
327
+ CreateDatabaseCommand,
328
+ CreateTableCommand,
329
+ GetTablesCommand,
330
+ GlueClient,
331
+ } from "@aws-sdk/client-glue";
332
+
333
+ import { SimSdk } from "@kensio/yulin/sdk";
334
+
335
+ using simSdk = new SimSdk();
336
+ simSdk.intercept(GlueClient);
337
+
338
+ const client = new GlueClient({ region: "eu-west-2" });
339
+
340
+ await client.send(
341
+ new CreateDatabaseCommand({ DatabaseInput: { Name: "site_logs" } }),
342
+ );
343
+ await client.send(
344
+ new CreateTableCommand({
345
+ DatabaseName: "site_logs",
346
+ TableInput: { Name: "access_logs" },
347
+ }),
348
+ );
349
+
350
+ const { TableList } = await client.send(
351
+ new GetTablesCommand({ DatabaseName: "site_logs" }),
352
+ );
353
+
354
+ // access_logs
355
+ console.log(TableList?.[0]?.Name);
356
+ ```
357
+
358
+ ## Permissions
359
+
360
+ Every Command authorizes through simulated IAM. Data Catalog resources are a hierarchy with the
361
+ catalog at the root, and an operation on one needs permission on that resource and on every ancestor
362
+ of it. Reading a table needs the table, the database and the catalog, and a policy naming only the
363
+ table ARN is denied. Deleting a database needs permission on every table in it as well, since the
364
+ tables go with it.
365
+
366
+ ```typescript sim-glue-permissions
367
+ /**
368
+ * A Role that may read one table and nothing else in the catalog.
369
+ */
370
+
371
+ import {
372
+ CreateDatabaseCommand,
373
+ CreateTableCommand,
374
+ GetTableCommand,
375
+ } from "@aws-sdk/client-glue";
376
+ import { CreateRoleCommand, PutRolePolicyCommand } from "@aws-sdk/client-iam";
377
+
378
+ import { SimAws } from "@kensio/yulin";
379
+
380
+ const simAws = new SimAws({ defaultAccountId: "111111111111" });
381
+ const glue = simAws.glue();
382
+
383
+ glue.createDatabase(
384
+ new CreateDatabaseCommand({ DatabaseInput: { Name: "site_logs" } }),
385
+ );
386
+ glue.createTable(
387
+ new CreateTableCommand({
388
+ DatabaseName: "site_logs",
389
+ TableInput: { Name: "access_logs" },
390
+ }),
391
+ );
392
+
393
+ await simAws.iam().createRole(
394
+ new CreateRoleCommand({
395
+ RoleName: "ReportingRole",
396
+ AssumeRolePolicyDocument: JSON.stringify({
397
+ Version: "2012-10-17",
398
+ Statement: [
399
+ {
400
+ Effect: "Allow",
401
+ Principal: { Service: "lambda.amazonaws.com" },
402
+ Action: "sts:AssumeRole",
403
+ },
404
+ ],
405
+ }),
406
+ }),
407
+ );
408
+
409
+ await simAws.iam().putRolePolicy(
410
+ new PutRolePolicyCommand({
411
+ RoleName: "ReportingRole",
412
+ PolicyName: "ReadAccessLogs",
413
+ PolicyDocument: JSON.stringify({
414
+ Version: "2012-10-17",
415
+ Statement: [
416
+ {
417
+ Effect: "Allow",
418
+ Action: "glue:GetTable",
419
+ Resource: [
420
+ "arn:aws:glue:us-east-1:111111111111:catalog",
421
+ "arn:aws:glue:us-east-1:111111111111:database/site_logs",
422
+ "arn:aws:glue:us-east-1:111111111111:table/site_logs/access_logs",
423
+ ],
424
+ },
425
+ ],
426
+ }),
427
+ }),
428
+ );
429
+
430
+ const { Table } = glue.getTable(
431
+ new GetTableCommand({ DatabaseName: "site_logs", Name: "access_logs" }),
432
+ {
433
+ caller: {
434
+ kind: "arn",
435
+ arn: "arn:aws:iam::111111111111:role/ReportingRole",
436
+ },
437
+ },
438
+ );
439
+
440
+ // access_logs
441
+ console.log(Table.Name);
442
+ ```
443
+
444
+ A policy listing only the table ARN is refused here, and refused by real Glue for the same reason.
445
+
446
+ ## Available functionality
447
+
448
+ - `CreateDatabase`, `GetDatabase`, `GetDatabases` and `DeleteDatabase`.
449
+ - `CreateTable`, `GetTable`, `GetTables` and `DeleteTable`.
450
+ - `CreatePartition`, `BatchCreatePartition`, `GetPartition`, `GetPartitions`, `DeletePartition` and
451
+ `BatchDeletePartition`.
452
+ - `GetPartitions` `Expression` filtering, over the SQL operators, `AND`, `OR`, `NOT` and brackets.
453
+ - `AWS::Glue::Database` and `AWS::Glue::Table`, deployed and deleted with the stack.
454
+ - `TableInput.Parameters`, `PartitionKeys` and `StorageDescriptor`, held and read back as declared.
455
+ - IAM authorization on every Command, over the resource and its ancestors.
456
+ - Database and table names folded to lower case, as the Data Catalog folds them.
457
+
458
+ ## Limitations
459
+
460
+ - **Partition projection is held here and evaluated by Athena.** The catalog stores the parameters
461
+ as they were declared and materializes no partition from them. Simulated
462
+ [Athena](https://yulinsim.dev/services/athena/ "Simulated Athena usage docs") expands them when a
463
+ query runs, which is where a broken projection is refused.
464
+ - **The catalog reads no query and no object.** SQL reaches Athena rather than the catalog, no S3
465
+ prefix is listed here, and no object is opened.
466
+ - **`AWS::Glue::Crawler` is absent.** A crawler fills a catalog by reading objects, and every object
467
+ stays unread here. A template declaring one deploys, with the crawler recorded on the stack's
468
+ `skippedResources`.
469
+ - **A registered partition is read by Athena, and a projected one wins over it.** Simulated
470
+ [Athena](https://yulinsim.dev/services/athena/ "Simulated Athena usage docs") reads a table's
471
+ registered partitions when a query runs, unless `projection.enabled` is true. Real Athena stops
472
+ reading the catalog's partitions once projection is on.
473
+ - **A `GetPartitions` `Expression` is the whole of the filtering.** `Segment` and parallel listing,
474
+ `ExcludeColumnSchema` and `TransactionId` are absent, and so are partition indexes, which change
475
+ which expressions real Glue will serve rather than what any of them mean.
476
+ - **An expression compares a partition key against a literal.** That is the whole grammar.
477
+ Functions, arithmetic and comparing one column against another sit outside it, and a column name
478
+ is written unquoted.
479
+ - **A partition keeps what it was registered with.** `UpdatePartition` and `BatchUpdatePartition`
480
+ are absent, along with `BatchGetPartition` and partition indexes.
481
+ - **`AWS::Glue::Partition` is absent.** Real CloudFormation has the resource type, and a template
482
+ declaring one deploys here with the partition recorded on the stack's `skippedResources`. A stack
483
+ that needs its partitions registered does it through the SDK once the deploy finishes.
484
+ - **A table keeps the definition it was created with.** `UpdateTable` and `UpdateDatabase` are
485
+ absent, and `GetTable` reports the creation time as the update time.
486
+ - **`Fn::GetAtt Id` on a table answers with a guess.** It resolves to the catalog id, the database
487
+ name and the table name joined with `|`, as in `111111111111|site_logs|access_logs`. This is the
488
+ one piece of behaviour here that nothing has checked against AWS. CloudFormation documents that
489
+ the attribute exists and documents nothing about its value, so a template asserting on it agrees
490
+ with this simulation and may disagree with a real deploy. Confirming it takes one stack deployed
491
+ to an account with `!GetAtt Table.Id` as an output.
492
+ - **A lookup finds a name under any spelling.** Real Glue documents the fold on the way in and asks
493
+ the caller to pass lower case on the way back out. `GetDatabase` and `GetTable` fold the name they
494
+ are given here, so a request naming `Rainlytics` reaches the database stored as `rainlytics`. This
495
+ is the one piece of the fold nothing has checked against AWS. A test relying on it agrees with
496
+ this simulation and may disagree with a real call, and passing the name in lower case avoids the
497
+ question.
498
+ - **Cross-account catalogs are refused.** A `CatalogId` naming another account is refused, in a
499
+ Command and in a template.
500
+ - **Versions, statistics and Lake Formation are absent.** A table has no version history and no
501
+ column statistics, and IAM is the whole of the permission model.
502
+ - **Iceberg and other open table formats are recorded, never built.** `OpenTableFormatInput` is
503
+ reported as ignored and the table is created as an ordinary one.
504
+ - **Listings come back whole.** `GetDatabases`, `GetTables` and `GetPartitions` answer with
505
+ everything in creation order. `MaxResults` and `NextToken` are absent.
506
+ - **Connections, jobs, triggers, workflows and the Schema Registry are absent.** The Data Catalog is
507
+ the whole of the simulated surface.