@rio-cloud/cdk-v2-constructs 7.14.0-alpha.2 → 7.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/.jsii +7 -7
  2. package/lib/contributions/team-transport-two/datadog-synthetics/datadog-synthetics-test-custom-resource/handler.cjs +2076 -1226
  3. package/lib/datadogv2/secret-locator-custom-resource/on-create.cjs +2214 -1364
  4. package/lib/datadogv2/service-catalog-custom-resource/on-create.cjs +2085 -1235
  5. package/lib/fargate/codedeploy-custom-resources/create-deployment-is-complete.cjs +2088 -1238
  6. package/lib/fargate/codedeploy-custom-resources/create-deployment-on-create.cjs +2088 -1238
  7. package/lib/fargate/codedeploy-custom-resources/run-monitoring-test-suite-runner.cjs +2093 -1242
  8. package/lib/fargate/datadog.js +3 -1
  9. package/node_modules/@aws-sdk/client-cloudformation/README.md +26 -46
  10. package/node_modules/@aws-sdk/client-cloudformation/node_modules/@smithy/util-retry/package.json +3 -3
  11. package/node_modules/@aws-sdk/client-cloudformation/package.json +39 -39
  12. package/node_modules/@aws-sdk/client-codedeploy/README.md +26 -46
  13. package/node_modules/@aws-sdk/client-codedeploy/node_modules/@smithy/util-retry/package.json +3 -3
  14. package/node_modules/@aws-sdk/client-codedeploy/package.json +39 -39
  15. package/node_modules/@aws-sdk/client-ecs/README.md +26 -46
  16. package/node_modules/@aws-sdk/client-ecs/dist-cjs/schemas/schemas_0.js +5 -4
  17. package/node_modules/@aws-sdk/client-ecs/dist-es/schemas/schemas_0.js +5 -4
  18. package/node_modules/@aws-sdk/client-ecs/dist-types/commands/CreateCapacityProviderCommand.d.ts +2 -0
  19. package/node_modules/@aws-sdk/client-ecs/dist-types/commands/DeleteCapacityProviderCommand.d.ts +1 -0
  20. package/node_modules/@aws-sdk/client-ecs/dist-types/commands/DescribeCapacityProvidersCommand.d.ts +1 -0
  21. package/node_modules/@aws-sdk/client-ecs/dist-types/commands/UpdateCapacityProviderCommand.d.ts +2 -0
  22. package/node_modules/@aws-sdk/client-ecs/dist-types/models/models_0.d.ts +10 -0
  23. package/node_modules/@aws-sdk/client-ecs/dist-types/ts3.4/models/models_0.d.ts +2 -0
  24. package/node_modules/@aws-sdk/client-ecs/node_modules/@smithy/util-retry/package.json +3 -3
  25. package/node_modules/@aws-sdk/client-ecs/package.json +39 -39
  26. package/node_modules/@aws-sdk/client-organizations/README.md +26 -46
  27. package/node_modules/@aws-sdk/client-organizations/node_modules/@smithy/util-retry/package.json +3 -3
  28. package/node_modules/@aws-sdk/client-organizations/package.json +38 -38
  29. package/node_modules/@aws-sdk/client-secrets-manager/README.md +26 -46
  30. package/node_modules/@aws-sdk/client-secrets-manager/node_modules/@smithy/util-retry/package.json +3 -3
  31. package/node_modules/@aws-sdk/client-secrets-manager/package.json +39 -39
  32. package/node_modules/@aws-sdk/client-ssm/README.md +26 -46
  33. package/node_modules/@aws-sdk/client-ssm/node_modules/@smithy/util-retry/package.json +3 -3
  34. package/node_modules/@aws-sdk/client-ssm/package.json +39 -39
  35. package/node_modules/@aws-sdk/core/dist-cjs/index.js +4 -0
  36. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +4 -0
  37. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +2 -0
  38. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js +3 -0
  39. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +2 -0
  40. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +4 -0
  41. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QuerySerializerSettings.d.ts +3 -0
  42. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +2 -0
  43. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +1 -0
  44. package/node_modules/@aws-sdk/core/package.json +14 -14
  45. package/node_modules/@aws-sdk/credential-provider-env/package.json +6 -6
  46. package/node_modules/@aws-sdk/credential-provider-http/package.json +11 -11
  47. package/node_modules/@aws-sdk/credential-provider-ini/package.json +15 -15
  48. package/node_modules/@aws-sdk/credential-provider-login/package.json +9 -9
  49. package/node_modules/@aws-sdk/credential-provider-node/package.json +13 -13
  50. package/node_modules/@aws-sdk/credential-provider-process/package.json +7 -7
  51. package/node_modules/@aws-sdk/credential-provider-sso/package.json +9 -9
  52. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +8 -8
  53. package/node_modules/@aws-sdk/middleware-host-header/package.json +5 -5
  54. package/node_modules/@aws-sdk/middleware-logger/package.json +4 -4
  55. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +5 -5
  56. package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +9 -9
  57. package/node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js +9 -9
  58. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/check-features.d.ts +4 -2
  59. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/check-features.d.ts +3 -3
  60. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/LICENSE +201 -0
  61. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/README.md +78 -0
  62. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-cjs/index.js +278 -0
  63. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js +27 -0
  64. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js +19 -0
  65. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js +109 -0
  66. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js +67 -0
  67. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/config.js +7 -0
  68. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/constants.js +9 -0
  69. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js +14 -0
  70. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js +11 -0
  71. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/index.js +7 -0
  72. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-es/types.js +1 -0
  73. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/AdaptiveRetryStrategy.d.ts +33 -0
  74. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ConfiguredRetryStrategy.d.ts +32 -0
  75. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/DefaultRateLimiter.d.ts +49 -0
  76. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/StandardRetryStrategy.d.ts +26 -0
  77. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/config.d.ts +20 -0
  78. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/constants.d.ts +59 -0
  79. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/defaultRetryBackoffStrategy.d.ts +5 -0
  80. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/defaultRetryToken.d.ts +9 -0
  81. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/index.d.ts +7 -0
  82. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/AdaptiveRetryStrategy.d.ts +33 -0
  83. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/ConfiguredRetryStrategy.d.ts +32 -0
  84. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/DefaultRateLimiter.d.ts +49 -0
  85. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/StandardRetryStrategy.d.ts +26 -0
  86. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/config.d.ts +20 -0
  87. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/constants.d.ts +59 -0
  88. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/defaultRetryBackoffStrategy.d.ts +5 -0
  89. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/defaultRetryToken.d.ts +9 -0
  90. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/index.d.ts +7 -0
  91. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/ts3.4/types.d.ts +19 -0
  92. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/dist-types/types.d.ts +19 -0
  93. package/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/util-retry/package.json +71 -0
  94. package/node_modules/@aws-sdk/middleware-user-agent/package.json +9 -8
  95. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/CognitoIdentity.js +1 -1
  96. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentity.d.ts +2 -2
  97. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-retry/package.json +3 -3
  98. package/node_modules/@aws-sdk/nested-clients/package.json +39 -37
  99. package/node_modules/@aws-sdk/region-config-resolver/package.json +6 -6
  100. package/node_modules/@aws-sdk/token-providers/package.json +8 -8
  101. package/node_modules/@aws-sdk/types/package.json +3 -3
  102. package/node_modules/@aws-sdk/util-endpoints/package.json +6 -6
  103. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +4 -4
  104. package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +75 -19
  105. package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getNodeModulesParentDirs.js +15 -0
  106. package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getSanitizedDevTypeScriptVersion.js +14 -0
  107. package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptUserAgentPair.js +53 -7
  108. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/{getTypeScriptPackageJsonPaths.d.ts → getNodeModulesParentDirs.d.ts} +2 -2
  109. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/getSanitizedDevTypeScriptVersion.d.ts +8 -0
  110. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getNodeModulesParentDirs.d.ts +1 -0
  111. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getSanitizedDevTypeScriptVersion.d.ts +3 -0
  112. package/node_modules/@aws-sdk/util-user-agent-node/package.json +7 -6
  113. package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +21 -11
  114. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +5 -1
  115. package/node_modules/@aws-sdk/xml-builder/dist-es/escape-attribute.js +8 -1
  116. package/node_modules/@aws-sdk/xml-builder/dist-es/escape-element.js +13 -10
  117. package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js +5 -1
  118. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/XmlNode.d.ts +49 -29
  119. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/XmlText.d.ts +11 -6
  120. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/escape-attribute.d.ts +6 -1
  121. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/escape-element.d.ts +6 -1
  122. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/index.d.ts +12 -3
  123. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/stringable.d.ts +6 -3
  124. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/xml-parser.browser.d.ts +9 -1
  125. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/xml-parser.d.ts +4 -1
  126. package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
  127. package/node_modules/@smithy/abort-controller/package.json +2 -2
  128. package/node_modules/@smithy/config-resolver/package.json +5 -5
  129. package/node_modules/@smithy/core/dist-cjs/index.js +1 -2
  130. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +7 -1
  131. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +22 -0
  132. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +1 -1
  133. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +11 -1
  134. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +42 -5
  135. package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +1 -2
  136. package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +7 -1
  137. package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +1 -0
  138. package/node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +17 -0
  139. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +1 -1
  140. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +10 -0
  141. package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +1 -1
  142. package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +3 -2
  143. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +31 -2
  144. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +5 -1
  145. package/node_modules/@smithy/core/dist-types/submodules/endpoints/index.d.ts +1 -0
  146. package/node_modules/@smithy/core/dist-types/submodules/endpoints/toEndpointV1.d.ts +6 -0
  147. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +11 -0
  148. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/translateTraits.d.ts +6 -0
  149. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/index.d.ts +1 -0
  150. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/toEndpointV1.d.ts +6 -0
  151. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +11 -0
  152. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/translateTraits.d.ts +6 -0
  153. package/node_modules/@smithy/core/endpoints.d.ts +7 -0
  154. package/node_modules/@smithy/core/endpoints.js +6 -0
  155. package/node_modules/@smithy/core/package.json +16 -7
  156. package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  157. package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +4 -1
  158. package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +4 -1
  159. package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
  160. package/node_modules/@smithy/hash-node/package.json +2 -2
  161. package/node_modules/@smithy/invalid-dependency/package.json +2 -2
  162. package/node_modules/@smithy/middleware-content-length/package.json +3 -3
  163. package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +17 -1
  164. package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js +9 -0
  165. package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js +8 -1
  166. package/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/toEndpointV1.d.ts +1 -0
  167. package/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/toEndpointV1.d.ts +1 -0
  168. package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
  169. package/node_modules/@smithy/middleware-retry/dist-cjs/index.js +9 -12
  170. package/node_modules/@smithy/middleware-retry/dist-es/configurations.js +9 -12
  171. package/node_modules/@smithy/middleware-retry/node_modules/@smithy/util-retry/package.json +3 -3
  172. package/node_modules/@smithy/middleware-retry/package.json +8 -8
  173. package/node_modules/@smithy/middleware-serde/dist-cjs/index.js +3 -2
  174. package/node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js +3 -2
  175. package/node_modules/@smithy/middleware-serde/package.json +4 -3
  176. package/node_modules/@smithy/middleware-stack/package.json +2 -2
  177. package/node_modules/@smithy/node-config-provider/package.json +4 -4
  178. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +48 -38
  179. package/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +4 -1
  180. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +38 -31
  181. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +1 -1
  182. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +1 -1
  183. package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +1 -1
  184. package/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +6 -6
  185. package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +1 -1
  186. package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +1 -1
  187. package/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +1 -1
  188. package/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +4 -3
  189. package/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +1 -1
  190. package/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +4 -4
  191. package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +1 -1
  192. package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +1 -1
  193. package/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +2 -2
  194. package/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts +3 -3
  195. package/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +1 -1
  196. package/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +1 -1
  197. package/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +1 -1
  198. package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +1 -1
  199. package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +1 -1
  200. package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +2 -2
  201. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +4 -3
  202. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +1 -1
  203. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +4 -4
  204. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +1 -1
  205. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +1 -1
  206. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +2 -2
  207. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts +3 -3
  208. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +1 -1
  209. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +1 -1
  210. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +1 -1
  211. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +1 -1
  212. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +1 -1
  213. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +2 -2
  214. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +2 -2
  215. package/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +2 -2
  216. package/node_modules/@smithy/node-http-handler/package.json +5 -5
  217. package/node_modules/@smithy/property-provider/package.json +2 -2
  218. package/node_modules/@smithy/protocol-http/package.json +2 -2
  219. package/node_modules/@smithy/querystring-builder/package.json +2 -2
  220. package/node_modules/@smithy/querystring-parser/package.json +2 -2
  221. package/node_modules/@smithy/service-error-classification/package.json +2 -2
  222. package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  223. package/node_modules/@smithy/signature-v4/package.json +4 -4
  224. package/node_modules/@smithy/smithy-client/package.json +7 -7
  225. package/node_modules/@smithy/types/dist-types/http.d.ts +1 -0
  226. package/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +1 -0
  227. package/node_modules/@smithy/types/package.json +1 -1
  228. package/node_modules/@smithy/url-parser/package.json +3 -3
  229. package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
  230. package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  231. package/node_modules/@smithy/util-endpoints/package.json +3 -3
  232. package/node_modules/@smithy/util-middleware/package.json +2 -2
  233. package/node_modules/@smithy/util-stream/package.json +4 -4
  234. package/node_modules/@smithy/util-waiter/dist-cjs/index.js +1 -1
  235. package/node_modules/@smithy/util-waiter/dist-es/poller.js +1 -1
  236. package/node_modules/@smithy/util-waiter/package.json +3 -3
  237. package/node_modules/fast-xml-builder/CHANGELOG.md +16 -0
  238. package/node_modules/fast-xml-builder/README.md +1 -1
  239. package/node_modules/fast-xml-builder/lib/fxb.cjs +1 -0
  240. package/node_modules/fast-xml-builder/lib/fxb.d.cts +22 -9
  241. package/node_modules/fast-xml-builder/lib/fxb.min.js +2 -0
  242. package/node_modules/fast-xml-builder/lib/fxb.min.js.map +1 -0
  243. package/node_modules/fast-xml-builder/package.json +7 -5
  244. package/node_modules/fast-xml-builder/src/fxb.d.ts +27 -3
  245. package/node_modules/fast-xml-builder/src/fxb.js +265 -21
  246. package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +165 -18
  247. package/node_modules/fast-xml-parser/CHANGELOG.md +33 -4
  248. package/node_modules/fast-xml-parser/README.md +8 -7
  249. package/node_modules/fast-xml-parser/lib/fxbuilder.min.js +1 -1
  250. package/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -1
  251. package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
  252. package/node_modules/fast-xml-parser/lib/fxp.d.cts +73 -19
  253. package/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
  254. package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
  255. package/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
  256. package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
  257. package/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +1 -1
  258. package/node_modules/fast-xml-parser/package.json +3 -2
  259. package/node_modules/fast-xml-parser/src/fxp.d.ts +73 -19
  260. package/node_modules/fast-xml-parser/src/util.js +18 -0
  261. package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +12 -2
  262. package/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +71 -0
  263. package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +291 -115
  264. package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +1 -1
  265. package/node_modules/fast-xml-parser/src/xmlparser/node2json.js +65 -14
  266. package/node_modules/path-expression-matcher/LICENSE +21 -0
  267. package/node_modules/path-expression-matcher/README.md +635 -0
  268. package/node_modules/path-expression-matcher/lib/pem.cjs +1 -0
  269. package/node_modules/path-expression-matcher/lib/pem.d.cts +335 -0
  270. package/node_modules/path-expression-matcher/lib/pem.min.js +2 -0
  271. package/node_modules/path-expression-matcher/lib/pem.min.js.map +1 -0
  272. package/node_modules/path-expression-matcher/package.json +78 -0
  273. package/node_modules/path-expression-matcher/src/Expression.js +232 -0
  274. package/node_modules/path-expression-matcher/src/Matcher.js +414 -0
  275. package/node_modules/path-expression-matcher/src/index.d.ts +366 -0
  276. package/node_modules/path-expression-matcher/src/index.js +28 -0
  277. package/package.json +7 -7
  278. package/version.json +1 -1
  279. package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptPackageJsonPaths.js +0 -17
  280. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getTypeScriptPackageJsonPaths.d.ts +0 -3
  281. package/node_modules/fast-xml-builder/lib/builder.cjs +0 -1
  282. package/node_modules/fast-xml-builder/lib/builder.min.js +0 -2
  283. package/node_modules/fast-xml-builder/lib/builder.min.js.map +0 -1
@@ -0,0 +1,109 @@
1
+ import { isThrottlingError } from "@smithy/service-error-classification";
2
+ export class DefaultRateLimiter {
3
+ static setTimeoutFn = setTimeout;
4
+ beta;
5
+ minCapacity;
6
+ minFillRate;
7
+ scaleConstant;
8
+ smooth;
9
+ currentCapacity = 0;
10
+ enabled = false;
11
+ lastMaxRate = 0;
12
+ measuredTxRate = 0;
13
+ requestCount = 0;
14
+ fillRate;
15
+ lastThrottleTime;
16
+ lastTimestamp = 0;
17
+ lastTxRateBucket;
18
+ maxCapacity;
19
+ timeWindow = 0;
20
+ constructor(options) {
21
+ this.beta = options?.beta ?? 0.7;
22
+ this.minCapacity = options?.minCapacity ?? 1;
23
+ this.minFillRate = options?.minFillRate ?? 0.5;
24
+ this.scaleConstant = options?.scaleConstant ?? 0.4;
25
+ this.smooth = options?.smooth ?? 0.8;
26
+ const currentTimeInSeconds = this.getCurrentTimeInSeconds();
27
+ this.lastThrottleTime = currentTimeInSeconds;
28
+ this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());
29
+ this.fillRate = this.minFillRate;
30
+ this.maxCapacity = this.minCapacity;
31
+ }
32
+ getCurrentTimeInSeconds() {
33
+ return Date.now() / 1000;
34
+ }
35
+ async getSendToken() {
36
+ return this.acquireTokenBucket(1);
37
+ }
38
+ async acquireTokenBucket(amount) {
39
+ if (!this.enabled) {
40
+ return;
41
+ }
42
+ this.refillTokenBucket();
43
+ if (amount > this.currentCapacity) {
44
+ const delay = ((amount - this.currentCapacity) / this.fillRate) * 1000;
45
+ await new Promise((resolve) => DefaultRateLimiter.setTimeoutFn(resolve, delay));
46
+ }
47
+ this.currentCapacity = this.currentCapacity - amount;
48
+ }
49
+ refillTokenBucket() {
50
+ const timestamp = this.getCurrentTimeInSeconds();
51
+ if (!this.lastTimestamp) {
52
+ this.lastTimestamp = timestamp;
53
+ return;
54
+ }
55
+ const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;
56
+ this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount);
57
+ this.lastTimestamp = timestamp;
58
+ }
59
+ updateClientSendingRate(response) {
60
+ let calculatedRate;
61
+ this.updateMeasuredRate();
62
+ if (isThrottlingError(response)) {
63
+ const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);
64
+ this.lastMaxRate = rateToUse;
65
+ this.calculateTimeWindow();
66
+ this.lastThrottleTime = this.getCurrentTimeInSeconds();
67
+ calculatedRate = this.cubicThrottle(rateToUse);
68
+ this.enableTokenBucket();
69
+ }
70
+ else {
71
+ this.calculateTimeWindow();
72
+ calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());
73
+ }
74
+ const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);
75
+ this.updateTokenBucketRate(newRate);
76
+ }
77
+ calculateTimeWindow() {
78
+ this.timeWindow = this.getPrecise(Math.pow((this.lastMaxRate * (1 - this.beta)) / this.scaleConstant, 1 / 3));
79
+ }
80
+ cubicThrottle(rateToUse) {
81
+ return this.getPrecise(rateToUse * this.beta);
82
+ }
83
+ cubicSuccess(timestamp) {
84
+ return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate);
85
+ }
86
+ enableTokenBucket() {
87
+ this.enabled = true;
88
+ }
89
+ updateTokenBucketRate(newRate) {
90
+ this.refillTokenBucket();
91
+ this.fillRate = Math.max(newRate, this.minFillRate);
92
+ this.maxCapacity = Math.max(newRate, this.minCapacity);
93
+ this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity);
94
+ }
95
+ updateMeasuredRate() {
96
+ const t = this.getCurrentTimeInSeconds();
97
+ const timeBucket = Math.floor(t * 2) / 2;
98
+ this.requestCount++;
99
+ if (timeBucket > this.lastTxRateBucket) {
100
+ const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);
101
+ this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));
102
+ this.requestCount = 0;
103
+ this.lastTxRateBucket = timeBucket;
104
+ }
105
+ }
106
+ getPrecise(num) {
107
+ return parseFloat(num.toFixed(8));
108
+ }
109
+ }
@@ -0,0 +1,67 @@
1
+ import { DEFAULT_MAX_ATTEMPTS, RETRY_MODES } from "./config";
2
+ import { DEFAULT_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, NO_RETRY_INCREMENT, RETRY_COST, THROTTLING_RETRY_DELAY_BASE, TIMEOUT_RETRY_COST, } from "./constants";
3
+ import { getDefaultRetryBackoffStrategy } from "./defaultRetryBackoffStrategy";
4
+ import { createDefaultRetryToken } from "./defaultRetryToken";
5
+ export class StandardRetryStrategy {
6
+ maxAttempts;
7
+ mode = RETRY_MODES.STANDARD;
8
+ capacity = INITIAL_RETRY_TOKENS;
9
+ retryBackoffStrategy = getDefaultRetryBackoffStrategy();
10
+ maxAttemptsProvider;
11
+ constructor(maxAttempts) {
12
+ this.maxAttempts = maxAttempts;
13
+ this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts;
14
+ }
15
+ async acquireInitialRetryToken(retryTokenScope) {
16
+ return createDefaultRetryToken({
17
+ retryDelay: DEFAULT_RETRY_DELAY_BASE,
18
+ retryCount: 0,
19
+ });
20
+ }
21
+ async refreshRetryTokenForRetry(token, errorInfo) {
22
+ const maxAttempts = await this.getMaxAttempts();
23
+ if (this.shouldRetry(token, errorInfo, maxAttempts)) {
24
+ const errorType = errorInfo.errorType;
25
+ this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE);
26
+ const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());
27
+ const retryDelay = errorInfo.retryAfterHint
28
+ ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType)
29
+ : delayFromErrorType;
30
+ const capacityCost = this.getCapacityCost(errorType);
31
+ this.capacity -= capacityCost;
32
+ return createDefaultRetryToken({
33
+ retryDelay,
34
+ retryCount: token.getRetryCount() + 1,
35
+ retryCost: capacityCost,
36
+ });
37
+ }
38
+ throw new Error("No retry token available");
39
+ }
40
+ recordSuccess(token) {
41
+ this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));
42
+ }
43
+ getCapacity() {
44
+ return this.capacity;
45
+ }
46
+ async getMaxAttempts() {
47
+ try {
48
+ return await this.maxAttemptsProvider();
49
+ }
50
+ catch (error) {
51
+ console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);
52
+ return DEFAULT_MAX_ATTEMPTS;
53
+ }
54
+ }
55
+ shouldRetry(tokenToRenew, errorInfo, maxAttempts) {
56
+ const attempts = tokenToRenew.getRetryCount() + 1;
57
+ return (attempts < maxAttempts &&
58
+ this.capacity >= this.getCapacityCost(errorInfo.errorType) &&
59
+ this.isRetryableError(errorInfo.errorType));
60
+ }
61
+ getCapacityCost(errorType) {
62
+ return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST;
63
+ }
64
+ isRetryableError(errorType) {
65
+ return errorType === "THROTTLING" || errorType === "TRANSIENT";
66
+ }
67
+ }
@@ -0,0 +1,7 @@
1
+ export var RETRY_MODES;
2
+ (function (RETRY_MODES) {
3
+ RETRY_MODES["STANDARD"] = "standard";
4
+ RETRY_MODES["ADAPTIVE"] = "adaptive";
5
+ })(RETRY_MODES || (RETRY_MODES = {}));
6
+ export const DEFAULT_MAX_ATTEMPTS = 3;
7
+ export const DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD;
@@ -0,0 +1,9 @@
1
+ export const DEFAULT_RETRY_DELAY_BASE = 100;
2
+ export const MAXIMUM_RETRY_DELAY = 20 * 1000;
3
+ export const THROTTLING_RETRY_DELAY_BASE = 500;
4
+ export const INITIAL_RETRY_TOKENS = 500;
5
+ export const RETRY_COST = 5;
6
+ export const TIMEOUT_RETRY_COST = 10;
7
+ export const NO_RETRY_INCREMENT = 1;
8
+ export const INVOCATION_ID_HEADER = "amz-sdk-invocation-id";
9
+ export const REQUEST_HEADER = "amz-sdk-request";
@@ -0,0 +1,14 @@
1
+ import { DEFAULT_RETRY_DELAY_BASE, MAXIMUM_RETRY_DELAY } from "./constants";
2
+ export const getDefaultRetryBackoffStrategy = () => {
3
+ let delayBase = DEFAULT_RETRY_DELAY_BASE;
4
+ const computeNextBackoffDelay = (attempts) => {
5
+ return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));
6
+ };
7
+ const setDelayBase = (delay) => {
8
+ delayBase = delay;
9
+ };
10
+ return {
11
+ computeNextBackoffDelay,
12
+ setDelayBase,
13
+ };
14
+ };
@@ -0,0 +1,11 @@
1
+ import { MAXIMUM_RETRY_DELAY } from "./constants";
2
+ export const createDefaultRetryToken = ({ retryDelay, retryCount, retryCost, }) => {
3
+ const getRetryCount = () => retryCount;
4
+ const getRetryDelay = () => Math.min(MAXIMUM_RETRY_DELAY, retryDelay);
5
+ const getRetryCost = () => retryCost;
6
+ return {
7
+ getRetryCount,
8
+ getRetryDelay,
9
+ getRetryCost,
10
+ };
11
+ };
@@ -0,0 +1,7 @@
1
+ export * from "./AdaptiveRetryStrategy";
2
+ export * from "./ConfiguredRetryStrategy";
3
+ export * from "./DefaultRateLimiter";
4
+ export * from "./StandardRetryStrategy";
5
+ export * from "./config";
6
+ export * from "./constants";
7
+ export * from "./types";
@@ -0,0 +1,33 @@
1
+ import type { Provider, RetryErrorInfo, RetryStrategyV2, RetryToken, StandardRetryToken } from "@smithy/types";
2
+ import type { RateLimiter } from "./types";
3
+ /**
4
+ * @public
5
+ *
6
+ * Strategy options to be passed to AdaptiveRetryStrategy
7
+ */
8
+ export interface AdaptiveRetryStrategyOptions {
9
+ rateLimiter?: RateLimiter;
10
+ }
11
+ /**
12
+ * @public
13
+ *
14
+ * The AdaptiveRetryStrategy is a retry strategy for executing against a very
15
+ * resource constrained set of resources. Care should be taken when using this
16
+ * retry strategy. By default, it uses a dynamic backoff delay based on load
17
+ * currently perceived against the downstream resource and performs circuit
18
+ * breaking to disable retries in the event of high downstream failures using
19
+ * the DefaultRateLimiter.
20
+ *
21
+ * @see {@link StandardRetryStrategy}
22
+ * @see {@link DefaultRateLimiter }
23
+ */
24
+ export declare class AdaptiveRetryStrategy implements RetryStrategyV2 {
25
+ private readonly maxAttemptsProvider;
26
+ private rateLimiter;
27
+ private standardRetryStrategy;
28
+ readonly mode: string;
29
+ constructor(maxAttemptsProvider: Provider<number>, options?: AdaptiveRetryStrategyOptions);
30
+ acquireInitialRetryToken(retryTokenScope: string): Promise<RetryToken>;
31
+ refreshRetryTokenForRetry(tokenToRenew: StandardRetryToken, errorInfo: RetryErrorInfo): Promise<RetryToken>;
32
+ recordSuccess(token: StandardRetryToken): void;
33
+ }
@@ -0,0 +1,32 @@
1
+ import type { Provider, RetryBackoffStrategy, RetryErrorInfo, RetryStrategyV2, StandardRetryToken } from "@smithy/types";
2
+ import { StandardRetryStrategy } from "./StandardRetryStrategy";
3
+ /**
4
+ * @public
5
+ *
6
+ * This extension of the StandardRetryStrategy allows customizing the
7
+ * backoff computation.
8
+ */
9
+ export declare class ConfiguredRetryStrategy extends StandardRetryStrategy implements RetryStrategyV2 {
10
+ private readonly computeNextBackoffDelay;
11
+ /**
12
+ * @param maxAttempts - the maximum number of retry attempts allowed.
13
+ * e.g., if set to 3, then 4 total requests are possible.
14
+ * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt
15
+ * and returns the delay.
16
+ *
17
+ * @example exponential backoff.
18
+ * ```js
19
+ * new Client({
20
+ * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2)
21
+ * });
22
+ * ```
23
+ * @example constant delay.
24
+ * ```js
25
+ * new Client({
26
+ * retryStrategy: new ConfiguredRetryStrategy(3, 2000)
27
+ * });
28
+ * ```
29
+ */
30
+ constructor(maxAttempts: number | Provider<number>, computeNextBackoffDelay?: number | RetryBackoffStrategy["computeNextBackoffDelay"]);
31
+ refreshRetryTokenForRetry(tokenToRenew: StandardRetryToken, errorInfo: RetryErrorInfo): Promise<StandardRetryToken>;
32
+ }
@@ -0,0 +1,49 @@
1
+ import type { RateLimiter } from "./types";
2
+ /**
3
+ * @public
4
+ */
5
+ export interface DefaultRateLimiterOptions {
6
+ beta?: number;
7
+ minCapacity?: number;
8
+ minFillRate?: number;
9
+ scaleConstant?: number;
10
+ smooth?: number;
11
+ }
12
+ /**
13
+ * @public
14
+ */
15
+ export declare class DefaultRateLimiter implements RateLimiter {
16
+ /**
17
+ * Only used in testing.
18
+ */
19
+ private static setTimeoutFn;
20
+ private beta;
21
+ private minCapacity;
22
+ private minFillRate;
23
+ private scaleConstant;
24
+ private smooth;
25
+ private currentCapacity;
26
+ private enabled;
27
+ private lastMaxRate;
28
+ private measuredTxRate;
29
+ private requestCount;
30
+ private fillRate;
31
+ private lastThrottleTime;
32
+ private lastTimestamp;
33
+ private lastTxRateBucket;
34
+ private maxCapacity;
35
+ private timeWindow;
36
+ constructor(options?: DefaultRateLimiterOptions);
37
+ private getCurrentTimeInSeconds;
38
+ getSendToken(): Promise<void>;
39
+ private acquireTokenBucket;
40
+ private refillTokenBucket;
41
+ updateClientSendingRate(response: any): void;
42
+ private calculateTimeWindow;
43
+ private cubicThrottle;
44
+ private cubicSuccess;
45
+ private enableTokenBucket;
46
+ private updateTokenBucketRate;
47
+ private updateMeasuredRate;
48
+ private getPrecise;
49
+ }
@@ -0,0 +1,26 @@
1
+ import type { Provider, RetryErrorInfo, RetryStrategyV2, StandardRetryToken } from "@smithy/types";
2
+ /**
3
+ * @public
4
+ */
5
+ export declare class StandardRetryStrategy implements RetryStrategyV2 {
6
+ private readonly maxAttempts;
7
+ readonly mode: string;
8
+ private capacity;
9
+ private readonly retryBackoffStrategy;
10
+ private readonly maxAttemptsProvider;
11
+ constructor(maxAttempts: number);
12
+ constructor(maxAttemptsProvider: Provider<number>);
13
+ acquireInitialRetryToken(retryTokenScope: string): Promise<StandardRetryToken>;
14
+ refreshRetryTokenForRetry(token: StandardRetryToken, errorInfo: RetryErrorInfo): Promise<StandardRetryToken>;
15
+ recordSuccess(token: StandardRetryToken): void;
16
+ /**
17
+ * @returns the current available retry capacity.
18
+ *
19
+ * This number decreases when retries are executed and refills when requests or retries succeed.
20
+ */
21
+ getCapacity(): number;
22
+ private getMaxAttempts;
23
+ private shouldRetry;
24
+ private getCapacityCost;
25
+ private isRetryableError;
26
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @public
3
+ */
4
+ export declare enum RETRY_MODES {
5
+ STANDARD = "standard",
6
+ ADAPTIVE = "adaptive"
7
+ }
8
+ /**
9
+ * @public
10
+ *
11
+ * The default value for how many HTTP requests an SDK should make for a
12
+ * single SDK operation invocation before giving up
13
+ */
14
+ export declare const DEFAULT_MAX_ATTEMPTS = 3;
15
+ /**
16
+ * @public
17
+ *
18
+ * The default retry algorithm to use.
19
+ */
20
+ export declare const DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD;
@@ -0,0 +1,59 @@
1
+ /**
2
+ * @public
3
+ *
4
+ * The base number of milliseconds to use in calculating a suitable cool-down
5
+ * time when a retryable error is encountered.
6
+ */
7
+ export declare const DEFAULT_RETRY_DELAY_BASE = 100;
8
+ /**
9
+ * @public
10
+ *
11
+ * The maximum amount of time (in milliseconds) that will be used as a delay
12
+ * between retry attempts.
13
+ */
14
+ export declare const MAXIMUM_RETRY_DELAY: number;
15
+ /**
16
+ * @public
17
+ *
18
+ * The retry delay base (in milliseconds) to use when a throttling error is
19
+ * encountered.
20
+ */
21
+ export declare const THROTTLING_RETRY_DELAY_BASE = 500;
22
+ /**
23
+ * @public
24
+ *
25
+ * Initial number of retry tokens in Retry Quota
26
+ */
27
+ export declare const INITIAL_RETRY_TOKENS = 500;
28
+ /**
29
+ * @public
30
+ *
31
+ * The total amount of retry tokens to be decremented from retry token balance.
32
+ */
33
+ export declare const RETRY_COST = 5;
34
+ /**
35
+ * @public
36
+ *
37
+ * The total amount of retry tokens to be decremented from retry token balance
38
+ * when a throttling error is encountered.
39
+ */
40
+ export declare const TIMEOUT_RETRY_COST = 10;
41
+ /**
42
+ * @public
43
+ *
44
+ * The total amount of retry token to be incremented from retry token balance
45
+ * if an SDK operation invocation succeeds without requiring a retry request.
46
+ */
47
+ export declare const NO_RETRY_INCREMENT = 1;
48
+ /**
49
+ * @public
50
+ *
51
+ * Header name for SDK invocation ID
52
+ */
53
+ export declare const INVOCATION_ID_HEADER = "amz-sdk-invocation-id";
54
+ /**
55
+ * @public
56
+ *
57
+ * Header name for request retry information.
58
+ */
59
+ export declare const REQUEST_HEADER = "amz-sdk-request";
@@ -0,0 +1,5 @@
1
+ import type { StandardRetryBackoffStrategy } from "@smithy/types";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare const getDefaultRetryBackoffStrategy: () => StandardRetryBackoffStrategy;
@@ -0,0 +1,9 @@
1
+ import type { StandardRetryToken } from "@smithy/types";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare const createDefaultRetryToken: ({ retryDelay, retryCount, retryCost, }: {
6
+ retryDelay: number;
7
+ retryCount: number;
8
+ retryCost?: number;
9
+ }) => StandardRetryToken;
@@ -0,0 +1,7 @@
1
+ export * from "./AdaptiveRetryStrategy";
2
+ export * from "./ConfiguredRetryStrategy";
3
+ export * from "./DefaultRateLimiter";
4
+ export * from "./StandardRetryStrategy";
5
+ export * from "./config";
6
+ export * from "./constants";
7
+ export * from "./types";
@@ -0,0 +1,33 @@
1
+ import { Provider, RetryErrorInfo, RetryStrategyV2, RetryToken, StandardRetryToken } from "@smithy/types";
2
+ import { RateLimiter } from "./types";
3
+ /**
4
+ * @public
5
+ *
6
+ * Strategy options to be passed to AdaptiveRetryStrategy
7
+ */
8
+ export interface AdaptiveRetryStrategyOptions {
9
+ rateLimiter?: RateLimiter;
10
+ }
11
+ /**
12
+ * @public
13
+ *
14
+ * The AdaptiveRetryStrategy is a retry strategy for executing against a very
15
+ * resource constrained set of resources. Care should be taken when using this
16
+ * retry strategy. By default, it uses a dynamic backoff delay based on load
17
+ * currently perceived against the downstream resource and performs circuit
18
+ * breaking to disable retries in the event of high downstream failures using
19
+ * the DefaultRateLimiter.
20
+ *
21
+ * @see {@link StandardRetryStrategy}
22
+ * @see {@link DefaultRateLimiter }
23
+ */
24
+ export declare class AdaptiveRetryStrategy implements RetryStrategyV2 {
25
+ private readonly maxAttemptsProvider;
26
+ private rateLimiter;
27
+ private standardRetryStrategy;
28
+ readonly mode: string;
29
+ constructor(maxAttemptsProvider: Provider<number>, options?: AdaptiveRetryStrategyOptions);
30
+ acquireInitialRetryToken(retryTokenScope: string): Promise<RetryToken>;
31
+ refreshRetryTokenForRetry(tokenToRenew: StandardRetryToken, errorInfo: RetryErrorInfo): Promise<RetryToken>;
32
+ recordSuccess(token: StandardRetryToken): void;
33
+ }
@@ -0,0 +1,32 @@
1
+ import { Provider, RetryBackoffStrategy, RetryErrorInfo, RetryStrategyV2, StandardRetryToken } from "@smithy/types";
2
+ import { StandardRetryStrategy } from "./StandardRetryStrategy";
3
+ /**
4
+ * @public
5
+ *
6
+ * This extension of the StandardRetryStrategy allows customizing the
7
+ * backoff computation.
8
+ */
9
+ export declare class ConfiguredRetryStrategy extends StandardRetryStrategy implements RetryStrategyV2 {
10
+ private readonly computeNextBackoffDelay;
11
+ /**
12
+ * @param maxAttempts - the maximum number of retry attempts allowed.
13
+ * e.g., if set to 3, then 4 total requests are possible.
14
+ * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt
15
+ * and returns the delay.
16
+ *
17
+ * @example exponential backoff.
18
+ * ```js
19
+ * new Client({
20
+ * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2)
21
+ * });
22
+ * ```
23
+ * @example constant delay.
24
+ * ```js
25
+ * new Client({
26
+ * retryStrategy: new ConfiguredRetryStrategy(3, 2000)
27
+ * });
28
+ * ```
29
+ */
30
+ constructor(maxAttempts: number | Provider<number>, computeNextBackoffDelay?: number | RetryBackoffStrategy["computeNextBackoffDelay"]);
31
+ refreshRetryTokenForRetry(tokenToRenew: StandardRetryToken, errorInfo: RetryErrorInfo): Promise<StandardRetryToken>;
32
+ }
@@ -0,0 +1,49 @@
1
+ import { RateLimiter } from "./types";
2
+ /**
3
+ * @public
4
+ */
5
+ export interface DefaultRateLimiterOptions {
6
+ beta?: number;
7
+ minCapacity?: number;
8
+ minFillRate?: number;
9
+ scaleConstant?: number;
10
+ smooth?: number;
11
+ }
12
+ /**
13
+ * @public
14
+ */
15
+ export declare class DefaultRateLimiter implements RateLimiter {
16
+ /**
17
+ * Only used in testing.
18
+ */
19
+ private static setTimeoutFn;
20
+ private beta;
21
+ private minCapacity;
22
+ private minFillRate;
23
+ private scaleConstant;
24
+ private smooth;
25
+ private currentCapacity;
26
+ private enabled;
27
+ private lastMaxRate;
28
+ private measuredTxRate;
29
+ private requestCount;
30
+ private fillRate;
31
+ private lastThrottleTime;
32
+ private lastTimestamp;
33
+ private lastTxRateBucket;
34
+ private maxCapacity;
35
+ private timeWindow;
36
+ constructor(options?: DefaultRateLimiterOptions);
37
+ private getCurrentTimeInSeconds;
38
+ getSendToken(): Promise<void>;
39
+ private acquireTokenBucket;
40
+ private refillTokenBucket;
41
+ updateClientSendingRate(response: any): void;
42
+ private calculateTimeWindow;
43
+ private cubicThrottle;
44
+ private cubicSuccess;
45
+ private enableTokenBucket;
46
+ private updateTokenBucketRate;
47
+ private updateMeasuredRate;
48
+ private getPrecise;
49
+ }
@@ -0,0 +1,26 @@
1
+ import { Provider, RetryErrorInfo, RetryStrategyV2, StandardRetryToken } from "@smithy/types";
2
+ /**
3
+ * @public
4
+ */
5
+ export declare class StandardRetryStrategy implements RetryStrategyV2 {
6
+ private readonly maxAttempts;
7
+ readonly mode: string;
8
+ private capacity;
9
+ private readonly retryBackoffStrategy;
10
+ private readonly maxAttemptsProvider;
11
+ constructor(maxAttempts: number);
12
+ constructor(maxAttemptsProvider: Provider<number>);
13
+ acquireInitialRetryToken(retryTokenScope: string): Promise<StandardRetryToken>;
14
+ refreshRetryTokenForRetry(token: StandardRetryToken, errorInfo: RetryErrorInfo): Promise<StandardRetryToken>;
15
+ recordSuccess(token: StandardRetryToken): void;
16
+ /**
17
+ * @returns the current available retry capacity.
18
+ *
19
+ * This number decreases when retries are executed and refills when requests or retries succeed.
20
+ */
21
+ getCapacity(): number;
22
+ private getMaxAttempts;
23
+ private shouldRetry;
24
+ private getCapacityCost;
25
+ private isRetryableError;
26
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @public
3
+ */
4
+ export declare enum RETRY_MODES {
5
+ STANDARD = "standard",
6
+ ADAPTIVE = "adaptive"
7
+ }
8
+ /**
9
+ * @public
10
+ *
11
+ * The default value for how many HTTP requests an SDK should make for a
12
+ * single SDK operation invocation before giving up
13
+ */
14
+ export declare const DEFAULT_MAX_ATTEMPTS = 3;
15
+ /**
16
+ * @public
17
+ *
18
+ * The default retry algorithm to use.
19
+ */
20
+ export declare const DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD;