@kensio/yulin 1.20.4 → 1.20.5

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 (203) hide show
  1. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-cfn-value-adapter.d.ts.map +1 -1
  2. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-cfn-value-adapter.js +22 -3
  3. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-cfn-value-adapter.js.map +1 -1
  4. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-cfn.d.ts +31 -0
  5. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-cfn.d.ts.map +1 -0
  6. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-cfn.js +43 -0
  7. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-cfn.js.map +1 -0
  8. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-destination-cfn.d.ts +32 -0
  9. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-destination-cfn.d.ts.map +1 -0
  10. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-destination-cfn.js +34 -0
  11. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-destination-cfn.js.map +1 -0
  12. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-source-cfn.d.ts +27 -0
  13. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-source-cfn.d.ts.map +1 -0
  14. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-source-cfn.js +39 -0
  15. package/dist/service/cloudformation/resource/cfn/logs/sim-logs-delivery-source-cfn.js.map +1 -0
  16. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.d.ts +6 -5
  17. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.d.ts.map +1 -1
  18. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.js +10 -8
  19. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-creator.js.map +1 -1
  20. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-response-headers-policy.d.ts +24 -0
  21. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-response-headers-policy.d.ts.map +1 -0
  22. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-response-headers-policy.js +94 -0
  23. package/dist/service/cloudfront/cfn/distro/sim-cfn-cf-distro-response-headers-policy.js.map +1 -0
  24. package/dist/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.d.ts.map +1 -1
  25. package/dist/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.js +4 -4
  26. package/dist/service/cloudfront/controller/response-headers/sim-cf-response-headers-applicator.js.map +1 -1
  27. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.d.ts.map +1 -1
  28. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.js +3 -4
  29. package/dist/service/cloudfront/distribution/configurator/sim-cf-behavior-response-headers-policy.js.map +1 -1
  30. package/dist/service/cloudfront/response-headers-policy/sim-cf-managed-response-headers-policies.d.ts +27 -0
  31. package/dist/service/cloudfront/response-headers-policy/sim-cf-managed-response-headers-policies.d.ts.map +1 -0
  32. package/dist/service/cloudfront/response-headers-policy/sim-cf-managed-response-headers-policies.js +119 -0
  33. package/dist/service/cloudfront/response-headers-policy/sim-cf-managed-response-headers-policies.js.map +1 -0
  34. package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-cors.d.ts +18 -3
  35. package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-cors.d.ts.map +1 -1
  36. package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-cors.js +28 -5
  37. package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-cors.js.map +1 -1
  38. package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-registry.d.ts +14 -4
  39. package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-registry.d.ts.map +1 -1
  40. package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-registry.js +17 -5
  41. package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy-registry.js.map +1 -1
  42. package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy.d.ts +6 -2
  43. package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy.d.ts.map +1 -1
  44. package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy.js +7 -3
  45. package/dist/service/cloudfront/response-headers-policy/sim-cf-response-headers-policy.js.map +1 -1
  46. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-creator.d.ts +28 -0
  47. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-creator.d.ts.map +1 -0
  48. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-creator.js +52 -0
  49. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-creator.js.map +1 -0
  50. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-destination-creator.d.ts +30 -0
  51. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-destination-creator.d.ts.map +1 -0
  52. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-destination-creator.js +59 -0
  53. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-destination-creator.js.map +1 -0
  54. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-input.d.ts +12 -0
  55. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-input.d.ts.map +1 -0
  56. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-input.js +23 -0
  57. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-input.js.map +1 -0
  58. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-properties.d.ts +50 -0
  59. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-properties.d.ts.map +1 -0
  60. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-properties.js +107 -0
  61. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-properties.js.map +1 -0
  62. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-source-creator.d.ts +29 -0
  63. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-source-creator.d.ts.map +1 -0
  64. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-source-creator.js +50 -0
  65. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-source-creator.js.map +1 -0
  66. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-unsimulated-properties.d.ts +16 -0
  67. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-unsimulated-properties.d.ts.map +1 -0
  68. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-unsimulated-properties.js +39 -0
  69. package/dist/service/logs/cfn/delivery/sim-cfn-delivery-unsimulated-properties.js.map +1 -0
  70. package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.d.ts +27 -0
  71. package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.d.ts.map +1 -0
  72. package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.js +49 -0
  73. package/dist/service/logs/cfn/sim-logs-cfn-resource-deleter.js.map +1 -0
  74. package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.d.ts +8 -3
  75. package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.d.ts.map +1 -1
  76. package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.js +48 -23
  77. package/dist/service/logs/cfn/sim-logs-cfn-resource-factory.js.map +1 -1
  78. package/dist/service/logs/cfn/sim-logs-cfn-unsupported-resource.d.ts +10 -0
  79. package/dist/service/logs/cfn/sim-logs-cfn-unsupported-resource.d.ts.map +1 -0
  80. package/dist/service/logs/cfn/sim-logs-cfn-unsupported-resource.js +13 -0
  81. package/dist/service/logs/cfn/sim-logs-cfn-unsupported-resource.js.map +1 -0
  82. package/dist/service/logs/command/authorize/sim-logs-authorizer.d.ts +9 -1
  83. package/dist/service/logs/command/authorize/sim-logs-authorizer.d.ts.map +1 -1
  84. package/dist/service/logs/command/authorize/sim-logs-authorizer.js +8 -0
  85. package/dist/service/logs/command/authorize/sim-logs-authorizer.js.map +1 -1
  86. package/dist/service/logs/command/delivery/delivery-destination.command.d.ts +67 -0
  87. package/dist/service/logs/command/delivery/delivery-destination.command.d.ts.map +1 -0
  88. package/dist/service/logs/command/delivery/delivery-destination.command.js +2 -0
  89. package/dist/service/logs/command/delivery/delivery-destination.command.js.map +1 -0
  90. package/dist/service/logs/command/delivery/delivery-source.command.d.ts +61 -0
  91. package/dist/service/logs/command/delivery/delivery-source.command.d.ts.map +1 -0
  92. package/dist/service/logs/command/delivery/delivery-source.command.js +2 -0
  93. package/dist/service/logs/command/delivery/delivery-source.command.js.map +1 -0
  94. package/dist/service/logs/command/delivery/delivery.command.d.ts +73 -0
  95. package/dist/service/logs/command/delivery/delivery.command.d.ts.map +1 -0
  96. package/dist/service/logs/command/delivery/delivery.command.js +2 -0
  97. package/dist/service/logs/command/delivery/delivery.command.js.map +1 -0
  98. package/dist/service/logs/command/delivery/sim-logs-created-delivery.d.ts +21 -0
  99. package/dist/service/logs/command/delivery/sim-logs-created-delivery.d.ts.map +1 -0
  100. package/dist/service/logs/command/delivery/sim-logs-created-delivery.js +41 -0
  101. package/dist/service/logs/command/delivery/sim-logs-created-delivery.js.map +1 -0
  102. package/dist/service/logs/command/delivery/sim-logs-delivery-commands.d.ts +38 -0
  103. package/dist/service/logs/command/delivery/sim-logs-delivery-commands.d.ts.map +1 -0
  104. package/dist/service/logs/command/delivery/sim-logs-delivery-commands.js +77 -0
  105. package/dist/service/logs/command/delivery/sim-logs-delivery-commands.js.map +1 -0
  106. package/dist/service/logs/command/delivery/sim-logs-delivery-destination-commands.d.ts +38 -0
  107. package/dist/service/logs/command/delivery/sim-logs-delivery-destination-commands.d.ts.map +1 -0
  108. package/dist/service/logs/command/delivery/sim-logs-delivery-destination-commands.js +82 -0
  109. package/dist/service/logs/command/delivery/sim-logs-delivery-destination-commands.js.map +1 -0
  110. package/dist/service/logs/command/delivery/sim-logs-delivery-detail.d.ts +19 -0
  111. package/dist/service/logs/command/delivery/sim-logs-delivery-detail.d.ts.map +1 -0
  112. package/dist/service/logs/command/delivery/sim-logs-delivery-detail.js +57 -0
  113. package/dist/service/logs/command/delivery/sim-logs-delivery-detail.js.map +1 -0
  114. package/dist/service/logs/command/delivery/sim-logs-delivery-in-use.d.ts +15 -0
  115. package/dist/service/logs/command/delivery/sim-logs-delivery-in-use.d.ts.map +1 -0
  116. package/dist/service/logs/command/delivery/sim-logs-delivery-in-use.js +26 -0
  117. package/dist/service/logs/command/delivery/sim-logs-delivery-in-use.js.map +1 -0
  118. package/dist/service/logs/command/delivery/sim-logs-delivery-input.d.ts +16 -0
  119. package/dist/service/logs/command/delivery/sim-logs-delivery-input.d.ts.map +1 -0
  120. package/dist/service/logs/command/delivery/sim-logs-delivery-input.js +28 -0
  121. package/dist/service/logs/command/delivery/sim-logs-delivery-input.js.map +1 -0
  122. package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.d.ts +37 -0
  123. package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.d.ts.map +1 -0
  124. package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.js +86 -0
  125. package/dist/service/logs/command/delivery/sim-logs-delivery-source-commands.js.map +1 -0
  126. package/dist/service/logs/command/sim-logs-command.types.d.ts +3 -0
  127. package/dist/service/logs/command/sim-logs-command.types.d.ts.map +1 -1
  128. package/dist/service/logs/delivery/sim-logs-delivery-arn.d.ts +30 -0
  129. package/dist/service/logs/delivery/sim-logs-delivery-arn.d.ts.map +1 -0
  130. package/dist/service/logs/delivery/sim-logs-delivery-arn.js +42 -0
  131. package/dist/service/logs/delivery/sim-logs-delivery-arn.js.map +1 -0
  132. package/dist/service/logs/delivery/sim-logs-delivery-destination-store.d.ts +41 -0
  133. package/dist/service/logs/delivery/sim-logs-delivery-destination-store.d.ts.map +1 -0
  134. package/dist/service/logs/delivery/sim-logs-delivery-destination-store.js +69 -0
  135. package/dist/service/logs/delivery/sim-logs-delivery-destination-store.js.map +1 -0
  136. package/dist/service/logs/delivery/sim-logs-delivery-destination-type.d.ts +16 -0
  137. package/dist/service/logs/delivery/sim-logs-delivery-destination-type.d.ts.map +1 -0
  138. package/dist/service/logs/delivery/sim-logs-delivery-destination-type.js +48 -0
  139. package/dist/service/logs/delivery/sim-logs-delivery-destination-type.js.map +1 -0
  140. package/dist/service/logs/delivery/sim-logs-delivery-destination.d.ts +27 -0
  141. package/dist/service/logs/delivery/sim-logs-delivery-destination.d.ts.map +1 -0
  142. package/dist/service/logs/delivery/sim-logs-delivery-destination.js +23 -0
  143. package/dist/service/logs/delivery/sim-logs-delivery-destination.js.map +1 -0
  144. package/dist/service/logs/delivery/sim-logs-delivery-ids.d.ts +16 -0
  145. package/dist/service/logs/delivery/sim-logs-delivery-ids.d.ts.map +1 -0
  146. package/dist/service/logs/delivery/sim-logs-delivery-ids.js +20 -0
  147. package/dist/service/logs/delivery/sim-logs-delivery-ids.js.map +1 -0
  148. package/dist/service/logs/delivery/sim-logs-delivery-output-format.d.ts +24 -0
  149. package/dist/service/logs/delivery/sim-logs-delivery-output-format.d.ts.map +1 -0
  150. package/dist/service/logs/delivery/sim-logs-delivery-output-format.js +36 -0
  151. package/dist/service/logs/delivery/sim-logs-delivery-output-format.js.map +1 -0
  152. package/dist/service/logs/delivery/sim-logs-delivery-s3-configuration.d.ts +35 -0
  153. package/dist/service/logs/delivery/sim-logs-delivery-s3-configuration.d.ts.map +1 -0
  154. package/dist/service/logs/delivery/sim-logs-delivery-s3-configuration.js +66 -0
  155. package/dist/service/logs/delivery/sim-logs-delivery-s3-configuration.js.map +1 -0
  156. package/dist/service/logs/delivery/sim-logs-delivery-source-service.d.ts +48 -0
  157. package/dist/service/logs/delivery/sim-logs-delivery-source-service.d.ts.map +1 -0
  158. package/dist/service/logs/delivery/sim-logs-delivery-source-service.js +71 -0
  159. package/dist/service/logs/delivery/sim-logs-delivery-source-service.js.map +1 -0
  160. package/dist/service/logs/delivery/sim-logs-delivery-source-store.d.ts +42 -0
  161. package/dist/service/logs/delivery/sim-logs-delivery-source-store.d.ts.map +1 -0
  162. package/dist/service/logs/delivery/sim-logs-delivery-source-store.js +64 -0
  163. package/dist/service/logs/delivery/sim-logs-delivery-source-store.js.map +1 -0
  164. package/dist/service/logs/delivery/sim-logs-delivery-source.d.ts +29 -0
  165. package/dist/service/logs/delivery/sim-logs-delivery-source.d.ts.map +1 -0
  166. package/dist/service/logs/delivery/sim-logs-delivery-source.js +29 -0
  167. package/dist/service/logs/delivery/sim-logs-delivery-source.js.map +1 -0
  168. package/dist/service/logs/delivery/sim-logs-delivery-store.d.ts +32 -0
  169. package/dist/service/logs/delivery/sim-logs-delivery-store.d.ts.map +1 -0
  170. package/dist/service/logs/delivery/sim-logs-delivery-store.js +53 -0
  171. package/dist/service/logs/delivery/sim-logs-delivery-store.js.map +1 -0
  172. package/dist/service/logs/delivery/sim-logs-delivery.d.ts +33 -0
  173. package/dist/service/logs/delivery/sim-logs-delivery.d.ts.map +1 -0
  174. package/dist/service/logs/delivery/sim-logs-delivery.js +34 -0
  175. package/dist/service/logs/delivery/sim-logs-delivery.js.map +1 -0
  176. package/dist/service/logs/error/sim-logs.error.d.ts +23 -0
  177. package/dist/service/logs/error/sim-logs.error.d.ts.map +1 -1
  178. package/dist/service/logs/error/sim-logs.error.js +27 -0
  179. package/dist/service/logs/error/sim-logs.error.js.map +1 -1
  180. package/dist/service/logs/index.d.ts +10 -1
  181. package/dist/service/logs/index.d.ts.map +1 -1
  182. package/dist/service/logs/index.js +9 -1
  183. package/dist/service/logs/index.js.map +1 -1
  184. package/dist/service/logs/sdk/sim-logs-sdk-command-router.d.ts.map +1 -1
  185. package/dist/service/logs/sdk/sim-logs-sdk-command-router.js +36 -0
  186. package/dist/service/logs/sdk/sim-logs-sdk-command-router.js.map +1 -1
  187. package/dist/service/logs/sim-logs-commands.d.ts +12 -0
  188. package/dist/service/logs/sim-logs-commands.d.ts.map +1 -1
  189. package/dist/service/logs/sim-logs-commands.js +37 -0
  190. package/dist/service/logs/sim-logs-commands.js.map +1 -1
  191. package/dist/service/logs/sim-logs-delivery-inspection.d.ts +28 -0
  192. package/dist/service/logs/sim-logs-delivery-inspection.d.ts.map +1 -0
  193. package/dist/service/logs/sim-logs-delivery-inspection.js +35 -0
  194. package/dist/service/logs/sim-logs-delivery-inspection.js.map +1 -0
  195. package/dist/service/logs/sim-logs-delivery-operations.d.ts +35 -0
  196. package/dist/service/logs/sim-logs-delivery-operations.d.ts.map +1 -0
  197. package/dist/service/logs/sim-logs-delivery-operations.js +58 -0
  198. package/dist/service/logs/sim-logs-delivery-operations.js.map +1 -0
  199. package/dist/service/logs/sim-logs.d.ts +8 -2
  200. package/dist/service/logs/sim-logs.d.ts.map +1 -1
  201. package/dist/service/logs/sim-logs.js +39 -33
  202. package/dist/service/logs/sim-logs.js.map +1 -1
  203. package/package.json +1 -1
@@ -0,0 +1,27 @@
1
+ import type { SimAwsAccountRegionScope } from "../../aws/sim-aws-account-region-scope.js";
2
+ import type { SimLogsDeliveryDestinationType } from "./sim-logs-delivery-destination-type.js";
3
+ import type { SimLogsDeliveryOutputFormat } from "./sim-logs-delivery-output-format.js";
4
+ interface SimLogsDeliveryDestinationProperties {
5
+ readonly name: string;
6
+ readonly destinationResourceArn: string;
7
+ readonly destinationType: SimLogsDeliveryDestinationType;
8
+ readonly outputFormat: SimLogsDeliveryOutputFormat;
9
+ readonly accountRegionScope: SimAwsAccountRegionScope;
10
+ }
11
+ /**
12
+ * One delivery destination: where logs land, and in what form.
13
+ *
14
+ * The destination has its own ARN, which is what a delivery names. The bucket
15
+ * or log group behind it keeps its own, so the two ARNs in play here are easy
16
+ * to confuse and mean different things.
17
+ */
18
+ export declare class SimLogsDeliveryDestination {
19
+ readonly name: string;
20
+ readonly destinationResourceArn: string;
21
+ readonly destinationType: SimLogsDeliveryDestinationType;
22
+ readonly outputFormat: SimLogsDeliveryOutputFormat;
23
+ readonly arn: string;
24
+ constructor(properties: SimLogsDeliveryDestinationProperties);
25
+ }
26
+ export {};
27
+ //# sourceMappingURL=sim-logs-delivery-destination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-destination.d.ts","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-destination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAE1F,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AAC9F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAExF,UAAU,oCAAoC;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,eAAe,EAAE,8BAA8B,CAAC;IACzD,QAAQ,CAAC,YAAY,EAAE,2BAA2B,CAAC;IACnD,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;CACvD;AAED;;;;;;GAMG;AACH,qBAAa,0BAA0B;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,eAAe,EAAE,8BAA8B,CAAC;IACzD,QAAQ,CAAC,YAAY,EAAE,2BAA2B,CAAC;IACnD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB,YAAY,UAAU,EAAE,oCAAoC,EAS3D;CACF"}
@@ -0,0 +1,23 @@
1
+ import { simLogsDeliveryDestinationArn } from "./sim-logs-delivery-arn.js";
2
+ /**
3
+ * One delivery destination: where logs land, and in what form.
4
+ *
5
+ * The destination has its own ARN, which is what a delivery names. The bucket
6
+ * or log group behind it keeps its own, so the two ARNs in play here are easy
7
+ * to confuse and mean different things.
8
+ */
9
+ export class SimLogsDeliveryDestination {
10
+ name;
11
+ destinationResourceArn;
12
+ destinationType;
13
+ outputFormat;
14
+ arn;
15
+ constructor(properties) {
16
+ this.name = properties.name;
17
+ this.destinationResourceArn = properties.destinationResourceArn;
18
+ this.destinationType = properties.destinationType;
19
+ this.outputFormat = properties.outputFormat;
20
+ this.arn = simLogsDeliveryDestinationArn(properties.accountRegionScope, properties.name);
21
+ }
22
+ }
23
+ //# sourceMappingURL=sim-logs-delivery-destination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-destination.js","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-destination.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAY3E;;;;;;GAMG;AACH,MAAM,OAAO,0BAA0B;IAC5B,IAAI,CAAS;IACb,sBAAsB,CAAS;IAC/B,eAAe,CAAiC;IAChD,YAAY,CAA8B;IAC1C,GAAG,CAAS;IAErB,YAAY,UAAgD;QAC1D,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,sBAAsB,GAAG,UAAU,CAAC,sBAAsB,CAAC;QAChE,IAAI,CAAC,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;QAClD,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;QAC5C,IAAI,CAAC,GAAG,GAAG,6BAA6B,CACtC,UAAU,CAAC,kBAAkB,EAC7B,UAAU,CAAC,IAAI,CAChB,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Source of the identifiers deliveries are reported under.
3
+ *
4
+ * Real CloudWatch Logs issues an opaque identifier here rather than taking a
5
+ * name from the caller, so a delivery is the one resource of the three a
6
+ * template cannot predict the physical name of. A counter is enough: unique
7
+ * within the service is all a caller can rely on about the real one.
8
+ */
9
+ export declare class SimLogsDeliveryIds {
10
+ #private;
11
+ /**
12
+ * The next delivery identifier.
13
+ */
14
+ next(): string;
15
+ }
16
+ //# sourceMappingURL=sim-logs-delivery-ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-ids.d.ts","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-ids.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,qBAAa,kBAAkB;;IAG7B;;OAEG;IACH,IAAI,IAAI,MAAM,CAIb;CACF"}
@@ -0,0 +1,20 @@
1
+ const deliveryIdDigits = 16;
2
+ /**
3
+ * Source of the identifiers deliveries are reported under.
4
+ *
5
+ * Real CloudWatch Logs issues an opaque identifier here rather than taking a
6
+ * name from the caller, so a delivery is the one resource of the three a
7
+ * template cannot predict the physical name of. A counter is enough: unique
8
+ * within the service is all a caller can rely on about the real one.
9
+ */
10
+ export class SimLogsDeliveryIds {
11
+ #issued = 0;
12
+ /**
13
+ * The next delivery identifier.
14
+ */
15
+ next() {
16
+ this.#issued += 1;
17
+ return String(this.#issued).padStart(deliveryIdDigits, "0");
18
+ }
19
+ }
20
+ //# sourceMappingURL=sim-logs-delivery-ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-ids.js","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-ids.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAE5B;;;;;;;GAOG;AACH,MAAM,OAAO,kBAAkB;IAC7B,OAAO,GAAG,CAAC,CAAC;IAEZ;;OAEG;IACH,IAAI;QACF,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;QAElB,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;IAC9D,CAAC;CACF"}
@@ -0,0 +1,24 @@
1
+ import type { SimLogsDeliveryDestinationType } from "./sim-logs-delivery-destination-type.js";
2
+ /**
3
+ * How a delivery destination writes what it receives.
4
+ */
5
+ export type SimLogsDeliveryOutputFormat = "json" | "plain" | "w3c" | "raw" | "parquet";
6
+ /**
7
+ * The output formats real CloudWatch Logs accepts, in the lower case the API
8
+ * uses. A template writing `JSON` is refused by an account and is refused
9
+ * here.
10
+ */
11
+ export declare const simLogsDeliveryOutputFormats: readonly SimLogsDeliveryOutputFormat[];
12
+ /**
13
+ * What a delivery destination writes when the caller names no format.
14
+ */
15
+ export declare const simLogsDefaultDeliveryOutputFormat: SimLogsDeliveryOutputFormat;
16
+ /**
17
+ * Read the output format a request named, refusing anything else.
18
+ *
19
+ * Parquet is only written to S3. The other two destination kinds have no
20
+ * columnar form to write it into, and a destination that accepted it would
21
+ * deliver something else.
22
+ */
23
+ export declare function requiredSimLogsDeliveryOutputFormat(outputFormat: string | undefined, destinationType: SimLogsDeliveryDestinationType): SimLogsDeliveryOutputFormat;
24
+ //# sourceMappingURL=sim-logs-delivery-output-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-output-format.d.ts","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-output-format.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AAE9F;;GAEG;AACH,MAAM,MAAM,2BAA2B,GACnC,MAAM,GACN,OAAO,GACP,KAAK,GACL,KAAK,GACL,SAAS,CAAC;AAEd;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,SAAS,2BAA2B,EACnC,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,kCAAkC,EAAE,2BACzC,CAAC;AAET;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CACjD,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,eAAe,EAAE,8BAA8B,GAC9C,2BAA2B,CAoB7B"}
@@ -0,0 +1,36 @@
1
+ import { SimLogsValidationException } from "../error/sim-logs.error.js";
2
+ /**
3
+ * The output formats real CloudWatch Logs accepts, in the lower case the API
4
+ * uses. A template writing `JSON` is refused by an account and is refused
5
+ * here.
6
+ */
7
+ export const simLogsDeliveryOutputFormats = ["json", "plain", "w3c", "raw", "parquet"];
8
+ /**
9
+ * What a delivery destination writes when the caller names no format.
10
+ */
11
+ export const simLogsDefaultDeliveryOutputFormat = "json";
12
+ /**
13
+ * Read the output format a request named, refusing anything else.
14
+ *
15
+ * Parquet is only written to S3. The other two destination kinds have no
16
+ * columnar form to write it into, and a destination that accepted it would
17
+ * deliver something else.
18
+ */
19
+ export function requiredSimLogsDeliveryOutputFormat(outputFormat, destinationType) {
20
+ if (outputFormat === undefined) {
21
+ return simLogsDefaultDeliveryOutputFormat;
22
+ }
23
+ if (!isSimLogsDeliveryOutputFormat(outputFormat)) {
24
+ throw new SimLogsValidationException(`outputFormat '${outputFormat}' is not one CloudWatch Logs delivery ` +
25
+ `accepts: ${simLogsDeliveryOutputFormats.join(", ")}`);
26
+ }
27
+ if (outputFormat === "parquet" && destinationType !== "S3") {
28
+ throw new SimLogsValidationException(`outputFormat 'parquet' is only written to an S3 destination, and ` +
29
+ `this one is ${destinationType}`);
30
+ }
31
+ return outputFormat;
32
+ }
33
+ function isSimLogsDeliveryOutputFormat(outputFormat) {
34
+ return simLogsDeliveryOutputFormats.includes(outputFormat);
35
+ }
36
+ //# sourceMappingURL=sim-logs-delivery-output-format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-output-format.js","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-output-format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAaxE;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GACvC,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAC7C,MAAM,CAAC;AAET;;;;;;GAMG;AACH,MAAM,UAAU,mCAAmC,CACjD,YAAgC,EAChC,eAA+C;IAE/C,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,kCAAkC,CAAC;IAC5C,CAAC;IAED,IAAI,CAAC,6BAA6B,CAAC,YAAY,CAAC,EAAE,CAAC;QACjD,MAAM,IAAI,0BAA0B,CAClC,iBAAiB,YAAY,wCAAwC;YACnE,YAAY,4BAA4B,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACxD,CAAC;IACJ,CAAC;IAED,IAAI,YAAY,KAAK,SAAS,IAAI,eAAe,KAAK,IAAI,EAAE,CAAC;QAC3D,MAAM,IAAI,0BAA0B,CAClC,mEAAmE;YACjE,eAAe,eAAe,EAAE,CACnC,CAAC;IACJ,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,6BAA6B,CACpC,YAAoB;IAEpB,OAAO,4BAA4B,CAAC,QAAQ,CAC1C,YAA2C,CAC5C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The partition variables an S3 suffix path may carry.
3
+ *
4
+ * These are the ones CloudFront standard logging v2 substitutes. A variable
5
+ * outside the set is written out as the literal text it is, so a template with
6
+ * `{DistributionID}` in it would produce a folder of that name and look like
7
+ * it had partitioned nothing.
8
+ */
9
+ export declare const simLogsDeliverySuffixPathVariables: readonly string[];
10
+ interface SimLogsDeliveryS3ConfigurationProperties {
11
+ readonly suffixPath: string | undefined;
12
+ readonly enableHiveCompatiblePath: boolean | undefined;
13
+ }
14
+ /**
15
+ * How a delivery lays out what it writes into an S3 bucket.
16
+ *
17
+ * The suffix path decides the key each log file lands under, and the Hive
18
+ * compatible flag decides whether that key is written in the `name=value` form
19
+ * Athena and Glue partition on.
20
+ */
21
+ export declare class SimLogsDeliveryS3Configuration {
22
+ readonly suffixPath: string | undefined;
23
+ readonly enableHiveCompatiblePath: boolean;
24
+ constructor(properties: SimLogsDeliveryS3ConfigurationProperties);
25
+ }
26
+ /**
27
+ * Refuse a suffix path real CloudWatch Logs would refuse.
28
+ *
29
+ * A variable outside the set delivery substitutes is written out as the
30
+ * literal text it is, so a path with a typo in it looks partitioned and is
31
+ * not.
32
+ */
33
+ export declare function requireSimLogsDeliverySuffixPath(suffixPath: string): void;
34
+ export {};
35
+ //# sourceMappingURL=sim-logs-delivery-s3-configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-s3-configuration.d.ts","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-s3-configuration.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,kCAAkC,EAAE,SAAS,MAAM,EAQ/D,CAAC;AAOF,UAAU,wCAAwC;IAChD,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,wBAAwB,EAAE,OAAO,GAAG,SAAS,CAAC;CACxD;AAED;;;;;;GAMG;AACH,qBAAa,8BAA8B;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,wBAAwB,EAAE,OAAO,CAAC;IAE3C,YAAY,UAAU,EAAE,wCAAwC,EAQ/D;CACF;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CA0BzE"}
@@ -0,0 +1,66 @@
1
+ import { SimLogsValidationException } from "../error/sim-logs.error.js";
2
+ /**
3
+ * The partition variables an S3 suffix path may carry.
4
+ *
5
+ * These are the ones CloudFront standard logging v2 substitutes. A variable
6
+ * outside the set is written out as the literal text it is, so a template with
7
+ * `{DistributionID}` in it would produce a folder of that name and look like
8
+ * it had partitioned nothing.
9
+ */
10
+ export const simLogsDeliverySuffixPathVariables = [
11
+ "DistributionId",
12
+ "distributionid",
13
+ "yyyy",
14
+ "MM",
15
+ "dd",
16
+ "HH",
17
+ "accountid",
18
+ ];
19
+ const suffixPathVariablePattern = /{([^{}]*)}/g;
20
+ /** How long a suffix path real CloudWatch Logs accepts. */
21
+ const maximumSuffixPathLength = 256;
22
+ /**
23
+ * How a delivery lays out what it writes into an S3 bucket.
24
+ *
25
+ * The suffix path decides the key each log file lands under, and the Hive
26
+ * compatible flag decides whether that key is written in the `name=value` form
27
+ * Athena and Glue partition on.
28
+ */
29
+ export class SimLogsDeliveryS3Configuration {
30
+ suffixPath;
31
+ enableHiveCompatiblePath;
32
+ constructor(properties) {
33
+ if (properties.suffixPath !== undefined) {
34
+ requireSimLogsDeliverySuffixPath(properties.suffixPath);
35
+ }
36
+ this.suffixPath = properties.suffixPath;
37
+ this.enableHiveCompatiblePath =
38
+ properties.enableHiveCompatiblePath ?? false;
39
+ }
40
+ }
41
+ /**
42
+ * Refuse a suffix path real CloudWatch Logs would refuse.
43
+ *
44
+ * A variable outside the set delivery substitutes is written out as the
45
+ * literal text it is, so a path with a typo in it looks partitioned and is
46
+ * not.
47
+ */
48
+ export function requireSimLogsDeliverySuffixPath(suffixPath) {
49
+ if (suffixPath.length === 0) {
50
+ throw new SimLogsValidationException("suffixPath is empty, and CloudWatch Logs takes at least one character");
51
+ }
52
+ if (suffixPath.length > maximumSuffixPathLength) {
53
+ throw new SimLogsValidationException(`suffixPath is ${suffixPath.length} characters, and CloudWatch Logs ` +
54
+ `takes at most ${maximumSuffixPathLength}`);
55
+ }
56
+ for (const match of suffixPath.matchAll(suffixPathVariablePattern)) {
57
+ const variable = match[1] ?? "";
58
+ if (!simLogsDeliverySuffixPathVariables.includes(variable)) {
59
+ throw new SimLogsValidationException(`suffixPath '${suffixPath}' names partition variable '{${variable}}', ` +
60
+ `which delivery does not substitute. The ones it does are ${simLogsDeliverySuffixPathVariables
61
+ .map((name) => `{${name}}`)
62
+ .join(", ")}`);
63
+ }
64
+ }
65
+ }
66
+ //# sourceMappingURL=sim-logs-delivery-s3-configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-s3-configuration.js","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-s3-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAExE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAsB;IACnE,gBAAgB;IAChB,gBAAgB;IAChB,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,WAAW;CACZ,CAAC;AAEF,MAAM,yBAAyB,GAAG,aAAa,CAAC;AAEhD,2DAA2D;AAC3D,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAOpC;;;;;;GAMG;AACH,MAAM,OAAO,8BAA8B;IAChC,UAAU,CAAqB;IAC/B,wBAAwB,CAAU;IAE3C,YAAY,UAAoD;QAC9D,IAAI,UAAU,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YACxC,gCAAgC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,wBAAwB;YAC3B,UAAU,CAAC,wBAAwB,IAAI,KAAK,CAAC;IACjD,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gCAAgC,CAAC,UAAkB;IACjE,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,0BAA0B,CAClC,uEAAuE,CACxE,CAAC;IACJ,CAAC;IAED,IAAI,UAAU,CAAC,MAAM,GAAG,uBAAuB,EAAE,CAAC;QAChD,MAAM,IAAI,0BAA0B,CAClC,iBAAiB,UAAU,CAAC,MAAM,mCAAmC;YACnE,iBAAiB,uBAAuB,EAAE,CAC7C,CAAC;IACJ,CAAC;IAED,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,QAAQ,CAAC,yBAAyB,CAAC,EAAE,CAAC;QACnE,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAEhC,IAAI,CAAC,kCAAkC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC3D,MAAM,IAAI,0BAA0B,CAClC,eAAe,UAAU,gCAAgC,QAAQ,MAAM;gBACrE,4DAA4D,kCAAkC;qBAC3F,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,GAAG,CAAC;qBAC1B,IAAI,CAAC,IAAI,CAAC,EAAE,CAClB,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,48 @@
1
+ import type { AwsRegionName } from "../../aws/sim-aws-region.js";
2
+ /**
3
+ * The service name a CloudFront delivery source reports.
4
+ */
5
+ export declare const simLogsCloudFrontDeliveryService = "cloudfront";
6
+ /**
7
+ * The one region CloudFront delivery is set up from.
8
+ *
9
+ * CloudFront is global and its standard logging v2 delivery lives in
10
+ * `us-east-1`, whatever region the bucket the logs land in belongs to. A
11
+ * caller anywhere else has nothing to create the delivery source through, and
12
+ * the mistake is easy to make because the rest of the stack is usually
13
+ * somewhere else.
14
+ */
15
+ export declare const simLogsCloudFrontDeliveryRegion: AwsRegionName;
16
+ /**
17
+ * The one kind of log CloudFront delivers.
18
+ *
19
+ * Standard logging v2 carries access logs and nothing else, so an account
20
+ * refuses a source over a distribution asking for anything else.
21
+ */
22
+ export declare const simLogsCloudFrontLogType = "ACCESS_LOGS";
23
+ /**
24
+ * The AWS service a delivery source's resource belongs to.
25
+ *
26
+ * Real CloudWatch Logs works this out from the ARN and reports it as the
27
+ * source's `service`, so a caller never states it. The whole ARN is checked
28
+ * rather than the service segment alone. `arn:aws:cloudfront` names a service
29
+ * and no resource, and a source over it would deliver nothing and say nothing
30
+ * about why.
31
+ */
32
+ export declare function requiredSimLogsDeliveredService(resourceArn: string): string;
33
+ interface SimLogsDeliverySourceRules {
34
+ readonly service: string;
35
+ readonly regionName: AwsRegionName;
36
+ readonly logType: string;
37
+ }
38
+ /**
39
+ * Refuse a delivery source an account would refuse.
40
+ *
41
+ * Only the CloudFront rules are modelled. CloudFront is the one service whose
42
+ * delivery is pinned to a region other than its own resource's, and the log
43
+ * types the other services take vary by service in a way this simulation does
44
+ * not carry.
45
+ */
46
+ export declare function requireSimLogsDeliverySource(properties: SimLogsDeliverySourceRules): void;
47
+ export {};
48
+ //# sourceMappingURL=sim-logs-delivery-source-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-source-service.d.ts","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-source-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAGjE;;GAEG;AACH,eAAO,MAAM,gCAAgC,eAAe,CAAC;AAE7D;;;;;;;;GAQG;AACH,eAAO,MAAM,+BAA+B,EAAE,aAA2B,CAAC;AAE1E;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,gBAAgB,CAAC;AAKtD;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAqB3E;AAED,UAAU,0BAA0B;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,0BAA0B,GACrC,IAAI,CAmBN"}
@@ -0,0 +1,71 @@
1
+ import { SimLogsValidationException } from "../error/sim-logs.error.js";
2
+ /**
3
+ * The service name a CloudFront delivery source reports.
4
+ */
5
+ export const simLogsCloudFrontDeliveryService = "cloudfront";
6
+ /**
7
+ * The one region CloudFront delivery is set up from.
8
+ *
9
+ * CloudFront is global and its standard logging v2 delivery lives in
10
+ * `us-east-1`, whatever region the bucket the logs land in belongs to. A
11
+ * caller anywhere else has nothing to create the delivery source through, and
12
+ * the mistake is easy to make because the rest of the stack is usually
13
+ * somewhere else.
14
+ */
15
+ export const simLogsCloudFrontDeliveryRegion = "us-east-1";
16
+ /**
17
+ * The one kind of log CloudFront delivers.
18
+ *
19
+ * Standard logging v2 carries access logs and nothing else, so an account
20
+ * refuses a source over a distribution asking for anything else.
21
+ */
22
+ export const simLogsCloudFrontLogType = "ACCESS_LOGS";
23
+ /** How many colon separated segments the shortest ARN has. */
24
+ const arnSegmentCount = 6;
25
+ /**
26
+ * The AWS service a delivery source's resource belongs to.
27
+ *
28
+ * Real CloudWatch Logs works this out from the ARN and reports it as the
29
+ * source's `service`, so a caller never states it. The whole ARN is checked
30
+ * rather than the service segment alone. `arn:aws:cloudfront` names a service
31
+ * and no resource, and a source over it would deliver nothing and say nothing
32
+ * about why.
33
+ */
34
+ export function requiredSimLogsDeliveredService(resourceArn) {
35
+ const segments = resourceArn.split(":");
36
+ const [prefix, , service] = segments;
37
+ const named = segments
38
+ .slice(arnSegmentCount - 1)
39
+ .some((segment) => segment !== "");
40
+ if (service === undefined ||
41
+ service === "" ||
42
+ !named ||
43
+ prefix !== "arn" ||
44
+ segments.length < arnSegmentCount) {
45
+ throw new SimLogsValidationException(`resourceArn '${resourceArn}' is not the ARN of a resource, so the ` +
46
+ `service the delivery source is for cannot be read from it`);
47
+ }
48
+ return service;
49
+ }
50
+ /**
51
+ * Refuse a delivery source an account would refuse.
52
+ *
53
+ * Only the CloudFront rules are modelled. CloudFront is the one service whose
54
+ * delivery is pinned to a region other than its own resource's, and the log
55
+ * types the other services take vary by service in a way this simulation does
56
+ * not carry.
57
+ */
58
+ export function requireSimLogsDeliverySource(properties) {
59
+ const { service, regionName, logType } = properties;
60
+ if (service !== simLogsCloudFrontDeliveryService) {
61
+ return;
62
+ }
63
+ if (regionName !== simLogsCloudFrontDeliveryRegion) {
64
+ throw new SimLogsValidationException(`A CloudFront delivery source can only be created in ${simLogsCloudFrontDeliveryRegion}, and this request was made in ${regionName}`);
65
+ }
66
+ if (logType !== simLogsCloudFrontLogType) {
67
+ throw new SimLogsValidationException(`logType '${logType}' is not one CloudFront delivers. ` +
68
+ `${simLogsCloudFrontLogType} is the only one it has`);
69
+ }
70
+ }
71
+ //# sourceMappingURL=sim-logs-delivery-source-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-source-service.js","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-source-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAExE;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,YAAY,CAAC;AAE7D;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAkB,WAAW,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,aAAa,CAAC;AAEtD,8DAA8D;AAC9D,MAAM,eAAe,GAAG,CAAC,CAAC;AAE1B;;;;;;;;GAQG;AACH,MAAM,UAAU,+BAA+B,CAAC,WAAmB;IACjE,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxC,MAAM,CAAC,MAAM,EAAE,AAAD,EAAG,OAAO,CAAC,GAAG,QAAQ,CAAC;IACrC,MAAM,KAAK,GAAG,QAAQ;SACnB,KAAK,CAAC,eAAe,GAAG,CAAC,CAAC;SAC1B,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC;IAErC,IACE,OAAO,KAAK,SAAS;QACrB,OAAO,KAAK,EAAE;QACd,CAAC,KAAK;QACN,MAAM,KAAK,KAAK;QAChB,QAAQ,CAAC,MAAM,GAAG,eAAe,EACjC,CAAC;QACD,MAAM,IAAI,0BAA0B,CAClC,gBAAgB,WAAW,yCAAyC;YAClE,2DAA2D,CAC9D,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAQD;;;;;;;GAOG;AACH,MAAM,UAAU,4BAA4B,CAC1C,UAAsC;IAEtC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC;IAEpD,IAAI,OAAO,KAAK,gCAAgC,EAAE,CAAC;QACjD,OAAO;IACT,CAAC;IAED,IAAI,UAAU,KAAK,+BAA+B,EAAE,CAAC;QACnD,MAAM,IAAI,0BAA0B,CAClC,uDAAuD,+BAA+B,kCAAkC,UAAU,EAAE,CACrI,CAAC;IACJ,CAAC;IAED,IAAI,OAAO,KAAK,wBAAwB,EAAE,CAAC;QACzC,MAAM,IAAI,0BAA0B,CAClC,YAAY,OAAO,oCAAoC;YACrD,GAAG,wBAAwB,yBAAyB,CACvD,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,42 @@
1
+ import type { SimLogsDeliverySource } from "./sim-logs-delivery-source.js";
2
+ /**
3
+ * The delivery sources of one simulated CloudWatch Logs scope.
4
+ *
5
+ * Sources are keyed by name, and a second key matters just as much: one
6
+ * resource may have only one delivery source in an account. A distribution
7
+ * that already has logging set up therefore refuses a second source, which is
8
+ * the failure anyone adding a second construct to an existing distribution
9
+ * runs into.
10
+ */
11
+ export declare class SimLogsDeliverySourceStore {
12
+ #private;
13
+ /**
14
+ * Every delivery source in this scope, in the order they were put.
15
+ */
16
+ get all(): readonly SimLogsDeliverySource[];
17
+ /**
18
+ * Put a delivery source, replacing one of the same name.
19
+ *
20
+ * Putting an existing name again is an update, as it is on real CloudWatch
21
+ * Logs. Putting a new name for a resource that already has a source is the
22
+ * conflict.
23
+ */
24
+ put(source: SimLogsDeliverySource): void;
25
+ /**
26
+ * The delivery source covering a resource, if it has one.
27
+ */
28
+ withResourceArn(resourceArn: string): SimLogsDeliverySource | undefined;
29
+ /**
30
+ * Find a delivery source by name.
31
+ */
32
+ find(name: string): SimLogsDeliverySource | undefined;
33
+ /**
34
+ * Get a delivery source by name, refusing one that is not there.
35
+ */
36
+ require(name: string): SimLogsDeliverySource;
37
+ /**
38
+ * Remove a delivery source, refusing one that is not there.
39
+ */
40
+ delete(name: string): void;
41
+ }
42
+ //# sourceMappingURL=sim-logs-delivery-source-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-source-store.d.ts","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-source-store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAE3E;;;;;;;;GAQG;AACH,qBAAa,0BAA0B;;IAGrC;;OAEG;IACH,IAAI,GAAG,IAAI,SAAS,qBAAqB,EAAE,CAE1C;IAED;;;;;;OAMG;IACH,GAAG,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAWvC;IAED;;OAEG;IACH,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAEtE;IAED;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAEpD;IAED;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,CAU3C;IAED;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAGzB;CACF"}
@@ -0,0 +1,64 @@
1
+ import { SimLogsConflictException, SimLogsResourceNotFoundException, } from "../error/sim-logs.error.js";
2
+ /**
3
+ * The delivery sources of one simulated CloudWatch Logs scope.
4
+ *
5
+ * Sources are keyed by name, and a second key matters just as much: one
6
+ * resource may have only one delivery source in an account. A distribution
7
+ * that already has logging set up therefore refuses a second source, which is
8
+ * the failure anyone adding a second construct to an existing distribution
9
+ * runs into.
10
+ */
11
+ export class SimLogsDeliverySourceStore {
12
+ #sources = new Map();
13
+ /**
14
+ * Every delivery source in this scope, in the order they were put.
15
+ */
16
+ get all() {
17
+ return this.#sources.values().toArray();
18
+ }
19
+ /**
20
+ * Put a delivery source, replacing one of the same name.
21
+ *
22
+ * Putting an existing name again is an update, as it is on real CloudWatch
23
+ * Logs. Putting a new name for a resource that already has a source is the
24
+ * conflict.
25
+ */
26
+ put(source) {
27
+ const holder = this.withResourceArn(source.resourceArn);
28
+ if (holder !== undefined && holder.name !== source.name) {
29
+ throw new SimLogsConflictException("This ResourceId has already been used in another Delivery Source " +
30
+ "in this account");
31
+ }
32
+ this.#sources.set(source.name, source);
33
+ }
34
+ /**
35
+ * The delivery source covering a resource, if it has one.
36
+ */
37
+ withResourceArn(resourceArn) {
38
+ return this.all.find((source) => source.resourceArn === resourceArn);
39
+ }
40
+ /**
41
+ * Find a delivery source by name.
42
+ */
43
+ find(name) {
44
+ return this.#sources.get(name);
45
+ }
46
+ /**
47
+ * Get a delivery source by name, refusing one that is not there.
48
+ */
49
+ require(name) {
50
+ const source = this.find(name);
51
+ if (source === undefined) {
52
+ throw new SimLogsResourceNotFoundException(`Delivery source '${name}' does not exist`);
53
+ }
54
+ return source;
55
+ }
56
+ /**
57
+ * Remove a delivery source, refusing one that is not there.
58
+ */
59
+ delete(name) {
60
+ this.require(name);
61
+ this.#sources.delete(name);
62
+ }
63
+ }
64
+ //# sourceMappingURL=sim-logs-delivery-source-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-source-store.js","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-source-store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,gCAAgC,GACjC,MAAM,4BAA4B,CAAC;AAGpC;;;;;;;;GAQG;AACH,MAAM,OAAO,0BAA0B;IAC5B,QAAQ,GAAG,IAAI,GAAG,EAAiC,CAAC;IAE7D;;OAEG;IACH,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC;IAC1C,CAAC;IAED;;;;;;OAMG;IACH,GAAG,CAAC,MAA6B;QAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAExD,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC;YACxD,MAAM,IAAI,wBAAwB,CAChC,mEAAmE;gBACjE,iBAAiB,CACpB,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,eAAe,CAAC,WAAmB;QACjC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,KAAK,WAAW,CAAC,CAAC;IACvE,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,IAAY;QACf,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,IAAY;QAClB,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE/B,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,gCAAgC,CACxC,oBAAoB,IAAI,kBAAkB,CAC3C,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAY;QACjB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACnB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF"}
@@ -0,0 +1,29 @@
1
+ import type { SimAwsAccountRegionScope } from "../../aws/sim-aws-account-region-scope.js";
2
+ interface SimLogsDeliverySourceProperties {
3
+ readonly name: string;
4
+ readonly resourceArn: string;
5
+ readonly logType: string;
6
+ readonly service: string;
7
+ readonly accountRegionScope: SimAwsAccountRegionScope;
8
+ }
9
+ /**
10
+ * One delivery source: what is being logged, and which of its logs.
11
+ *
12
+ * A source names one resource. Real CloudWatch Logs lets a source hold several
13
+ * ARNs in `resourceArns` and has never accepted more than one, which is why
14
+ * the field is a list and this holds a single ARN behind it.
15
+ */
16
+ export declare class SimLogsDeliverySource {
17
+ readonly name: string;
18
+ readonly resourceArn: string;
19
+ readonly logType: string;
20
+ readonly service: string;
21
+ readonly arn: string;
22
+ constructor(properties: SimLogsDeliverySourceProperties);
23
+ /**
24
+ * The resources this source covers, as CloudWatch Logs reports them.
25
+ */
26
+ get resourceArns(): readonly string[];
27
+ }
28
+ export {};
29
+ //# sourceMappingURL=sim-logs-delivery-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-source.d.ts","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAG1F,UAAU,+BAA+B;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;CACvD;AAED;;;;;;GAMG;AACH,qBAAa,qBAAqB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB,YAAY,UAAU,EAAE,+BAA+B,EAStD;IAED;;OAEG;IACH,IAAI,YAAY,IAAI,SAAS,MAAM,EAAE,CAEpC;CACF"}
@@ -0,0 +1,29 @@
1
+ import { simLogsDeliverySourceArn } from "./sim-logs-delivery-arn.js";
2
+ /**
3
+ * One delivery source: what is being logged, and which of its logs.
4
+ *
5
+ * A source names one resource. Real CloudWatch Logs lets a source hold several
6
+ * ARNs in `resourceArns` and has never accepted more than one, which is why
7
+ * the field is a list and this holds a single ARN behind it.
8
+ */
9
+ export class SimLogsDeliverySource {
10
+ name;
11
+ resourceArn;
12
+ logType;
13
+ service;
14
+ arn;
15
+ constructor(properties) {
16
+ this.name = properties.name;
17
+ this.resourceArn = properties.resourceArn;
18
+ this.logType = properties.logType;
19
+ this.service = properties.service;
20
+ this.arn = simLogsDeliverySourceArn(properties.accountRegionScope, properties.name);
21
+ }
22
+ /**
23
+ * The resources this source covers, as CloudWatch Logs reports them.
24
+ */
25
+ get resourceArns() {
26
+ return [this.resourceArn];
27
+ }
28
+ }
29
+ //# sourceMappingURL=sim-logs-delivery-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-source.js","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-source.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAUtE;;;;;;GAMG;AACH,MAAM,OAAO,qBAAqB;IACvB,IAAI,CAAS;IACb,WAAW,CAAS;IACpB,OAAO,CAAS;IAChB,OAAO,CAAS;IAChB,GAAG,CAAS;IAErB,YAAY,UAA2C;QACrD,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;QAClC,IAAI,CAAC,GAAG,GAAG,wBAAwB,CACjC,UAAU,CAAC,kBAAkB,EAC7B,UAAU,CAAC,IAAI,CAChB,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,IAAI,YAAY;QACd,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC5B,CAAC;CACF"}
@@ -0,0 +1,32 @@
1
+ import type { SimLogsDelivery } from "./sim-logs-delivery.js";
2
+ /**
3
+ * The deliveries of one simulated CloudWatch Logs scope.
4
+ *
5
+ * Deliveries are keyed by the identifier CloudWatch Logs issued for them. One
6
+ * source and destination pair may be joined only once, so a second delivery
7
+ * for the same pair is refused rather than left duplicating the first.
8
+ */
9
+ export declare class SimLogsDeliveryStore {
10
+ #private;
11
+ /**
12
+ * Every delivery in this scope, in the order they were created.
13
+ */
14
+ get all(): readonly SimLogsDelivery[];
15
+ /**
16
+ * Add a delivery, refusing a source and destination pair already joined.
17
+ */
18
+ add(delivery: SimLogsDelivery): void;
19
+ /**
20
+ * Find a delivery by its identifier.
21
+ */
22
+ find(id: string): SimLogsDelivery | undefined;
23
+ /**
24
+ * Get a delivery by its identifier, refusing one that is not there.
25
+ */
26
+ require(id: string): SimLogsDelivery;
27
+ /**
28
+ * Remove a delivery, refusing one that is not there.
29
+ */
30
+ delete(id: string): void;
31
+ }
32
+ //# sourceMappingURL=sim-logs-delivery-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-logs-delivery-store.d.ts","sourceRoot":"","sources":["../../../../src/service/logs/delivery/sim-logs-delivery-store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;;GAMG;AACH,qBAAa,oBAAoB;;IAG/B;;OAEG;IACH,IAAI,GAAG,IAAI,SAAS,eAAe,EAAE,CAEpC;IAED;;OAEG;IACH,GAAG,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAenC;IAED;;OAEG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAE5C;IAED;;OAEG;IACH,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,CAUnC;IAED;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAGvB;CACF"}