@cdklabs/cdk-ecs-codedeploy 0.0.194 → 0.0.196

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 (129) hide show
  1. package/.jsii +3 -3
  2. package/.jsii.tabl.json +1 -1
  3. package/.projenrc.ts +2 -2
  4. package/lib/api-canary/index.js +1 -1
  5. package/lib/ecs-appspec/index.js +1 -1
  6. package/lib/ecs-deployment/index.js +1 -1
  7. package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
  8. package/node_modules/@smithy/protocol-http/dist-cjs/Field.js +1 -1
  9. package/node_modules/@smithy/protocol-http/dist-cjs/httpRequest.js +3 -0
  10. package/node_modules/@smithy/protocol-http/dist-cjs/httpResponse.js +1 -0
  11. package/node_modules/@smithy/protocol-http/dist-cjs/types.js +0 -6
  12. package/node_modules/@smithy/protocol-http/dist-es/Field.js +1 -1
  13. package/node_modules/@smithy/protocol-http/dist-es/httpRequest.js +3 -0
  14. package/node_modules/@smithy/protocol-http/dist-es/httpResponse.js +1 -0
  15. package/node_modules/@smithy/protocol-http/dist-es/types.js +1 -5
  16. package/node_modules/@smithy/protocol-http/dist-types/Field.d.ts +1 -1
  17. package/node_modules/@smithy/protocol-http/dist-types/Fields.d.ts +1 -1
  18. package/node_modules/@smithy/protocol-http/dist-types/httpHandler.d.ts +1 -2
  19. package/node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts +7 -12
  20. package/node_modules/@smithy/protocol-http/dist-types/httpResponse.d.ts +4 -9
  21. package/node_modules/@smithy/protocol-http/dist-types/types.d.ts +15 -50
  22. package/node_modules/@smithy/protocol-http/package.json +3 -2
  23. package/node_modules/@smithy/types/dist-cjs/auth.js +8 -0
  24. package/node_modules/@smithy/types/dist-cjs/checksum.js +2 -0
  25. package/node_modules/@smithy/types/dist-cjs/client.js +2 -0
  26. package/node_modules/@smithy/types/dist-cjs/command.js +2 -0
  27. package/node_modules/@smithy/types/dist-cjs/connection/config.js +2 -0
  28. package/node_modules/@smithy/types/dist-cjs/connection/index.js +6 -0
  29. package/node_modules/@smithy/types/dist-cjs/connection/manager.js +2 -0
  30. package/node_modules/@smithy/types/dist-cjs/connection/pool.js +2 -0
  31. package/node_modules/@smithy/types/dist-cjs/crypto.js +2 -0
  32. package/node_modules/@smithy/types/dist-cjs/encode.js +2 -0
  33. package/node_modules/@smithy/types/dist-cjs/endpoint.js +8 -0
  34. package/node_modules/@smithy/types/dist-cjs/endpoints/EndpointRuleObject.js +2 -0
  35. package/node_modules/@smithy/types/dist-cjs/endpoints/ErrorRuleObject.js +2 -0
  36. package/node_modules/@smithy/types/dist-cjs/endpoints/RuleSetObject.js +2 -0
  37. package/node_modules/@smithy/types/dist-cjs/endpoints/TreeRuleObject.js +2 -0
  38. package/node_modules/@smithy/types/dist-cjs/endpoints/index.js +8 -0
  39. package/node_modules/@smithy/types/dist-cjs/endpoints/shared.js +2 -0
  40. package/node_modules/@smithy/types/dist-cjs/eventStream.js +2 -0
  41. package/node_modules/@smithy/types/dist-cjs/http.js +6 -0
  42. package/node_modules/@smithy/types/dist-cjs/identity/awsCredentialIdentity.js +2 -0
  43. package/node_modules/@smithy/types/dist-cjs/identity/identity.js +2 -0
  44. package/node_modules/@smithy/types/dist-cjs/identity/index.js +5 -0
  45. package/node_modules/@smithy/types/dist-cjs/index.js +22 -0
  46. package/node_modules/@smithy/types/dist-cjs/logger.js +2 -0
  47. package/node_modules/@smithy/types/dist-cjs/middleware.js +2 -0
  48. package/node_modules/@smithy/types/dist-cjs/pagination.js +2 -0
  49. package/node_modules/@smithy/types/dist-cjs/profile.js +2 -0
  50. package/node_modules/@smithy/types/dist-cjs/response.js +2 -0
  51. package/node_modules/@smithy/types/dist-cjs/retry.js +2 -0
  52. package/node_modules/@smithy/types/dist-cjs/shapes.js +2 -0
  53. package/node_modules/@smithy/types/dist-cjs/signature.js +2 -0
  54. package/node_modules/@smithy/types/dist-cjs/stream.js +2 -0
  55. package/node_modules/@smithy/types/dist-cjs/uri.js +2 -0
  56. package/node_modules/@smithy/types/dist-cjs/waiter.js +2 -0
  57. package/node_modules/@smithy/types/dist-es/auth.js +5 -0
  58. package/node_modules/@smithy/types/dist-es/checksum.js +1 -0
  59. package/node_modules/@smithy/types/dist-es/client.js +1 -0
  60. package/node_modules/@smithy/types/dist-es/command.js +1 -0
  61. package/node_modules/@smithy/types/dist-es/connection/config.js +1 -0
  62. package/node_modules/@smithy/types/dist-es/connection/index.js +3 -0
  63. package/node_modules/@smithy/types/dist-es/connection/manager.js +1 -0
  64. package/node_modules/@smithy/types/dist-es/connection/pool.js +1 -0
  65. package/node_modules/@smithy/types/dist-es/crypto.js +1 -0
  66. package/node_modules/@smithy/types/dist-es/encode.js +1 -0
  67. package/node_modules/@smithy/types/dist-es/endpoint.js +5 -0
  68. package/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +1 -0
  69. package/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +1 -0
  70. package/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +1 -0
  71. package/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +1 -0
  72. package/node_modules/@smithy/types/dist-es/endpoints/index.js +5 -0
  73. package/node_modules/@smithy/types/dist-es/endpoints/shared.js +1 -0
  74. package/node_modules/@smithy/types/dist-es/eventStream.js +1 -0
  75. package/node_modules/@smithy/types/dist-es/http.js +5 -1
  76. package/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +1 -0
  77. package/node_modules/@smithy/types/dist-es/identity/identity.js +1 -0
  78. package/node_modules/@smithy/types/dist-es/identity/index.js +2 -0
  79. package/node_modules/@smithy/types/dist-es/index.js +22 -0
  80. package/node_modules/@smithy/types/dist-es/logger.js +1 -0
  81. package/node_modules/@smithy/types/dist-es/middleware.js +1 -0
  82. package/node_modules/@smithy/types/dist-es/pagination.js +1 -0
  83. package/node_modules/@smithy/types/dist-es/profile.js +1 -0
  84. package/node_modules/@smithy/types/dist-es/response.js +1 -0
  85. package/node_modules/@smithy/types/dist-es/retry.js +1 -0
  86. package/node_modules/@smithy/types/dist-es/shapes.js +1 -0
  87. package/node_modules/@smithy/types/dist-es/signature.js +1 -0
  88. package/node_modules/@smithy/types/dist-es/stream.js +1 -0
  89. package/node_modules/@smithy/types/dist-es/uri.js +1 -0
  90. package/node_modules/@smithy/types/dist-es/waiter.js +1 -0
  91. package/node_modules/@smithy/types/dist-types/auth.d.ts +55 -0
  92. package/node_modules/@smithy/types/dist-types/checksum.d.ts +63 -0
  93. package/node_modules/@smithy/types/dist-types/client.d.ts +25 -0
  94. package/node_modules/@smithy/types/dist-types/command.d.ts +10 -0
  95. package/node_modules/@smithy/types/dist-types/connection/config.d.ts +7 -0
  96. package/node_modules/@smithy/types/dist-types/connection/index.d.ts +3 -0
  97. package/node_modules/@smithy/types/dist-types/connection/manager.d.ts +28 -0
  98. package/node_modules/@smithy/types/dist-types/connection/pool.d.ts +24 -0
  99. package/node_modules/@smithy/types/dist-types/crypto.d.ts +60 -0
  100. package/node_modules/@smithy/types/dist-types/encode.d.ts +19 -0
  101. package/node_modules/@smithy/types/dist-types/endpoint.d.ts +77 -0
  102. package/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts +15 -0
  103. package/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts +7 -0
  104. package/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts +19 -0
  105. package/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts +10 -0
  106. package/node_modules/@smithy/types/dist-types/endpoints/index.d.ts +5 -0
  107. package/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts +25 -0
  108. package/node_modules/@smithy/types/dist-types/eventStream.d.ts +108 -0
  109. package/node_modules/@smithy/types/dist-types/http.d.ts +86 -1
  110. package/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts +23 -0
  111. package/node_modules/@smithy/types/dist-types/identity/identity.d.ts +15 -0
  112. package/node_modules/@smithy/types/dist-types/identity/index.d.ts +2 -0
  113. package/node_modules/@smithy/types/dist-types/index.d.ts +22 -0
  114. package/node_modules/@smithy/types/dist-types/logger.d.ts +13 -0
  115. package/node_modules/@smithy/types/dist-types/middleware.d.ts +475 -0
  116. package/node_modules/@smithy/types/dist-types/pagination.d.ts +26 -0
  117. package/node_modules/@smithy/types/dist-types/profile.d.ts +22 -0
  118. package/node_modules/@smithy/types/dist-types/response.d.ts +40 -0
  119. package/node_modules/@smithy/types/dist-types/retry.d.ts +128 -0
  120. package/node_modules/@smithy/types/dist-types/serde.d.ts +68 -0
  121. package/node_modules/@smithy/types/dist-types/shapes.d.ts +72 -0
  122. package/node_modules/@smithy/types/dist-types/signature.d.ts +150 -0
  123. package/node_modules/@smithy/types/dist-types/stream.d.ts +22 -0
  124. package/node_modules/@smithy/types/dist-types/transfer.d.ts +3 -0
  125. package/node_modules/@smithy/types/dist-types/uri.d.ts +17 -0
  126. package/node_modules/@smithy/types/dist-types/util.d.ts +117 -0
  127. package/node_modules/@smithy/types/dist-types/waiter.d.ts +35 -0
  128. package/node_modules/@smithy/types/package.json +7 -2
  129. package/package.json +6 -6
@@ -0,0 +1,475 @@
1
+ import { AuthScheme, HttpAuthDefinition } from "./auth";
2
+ import { EndpointV2 } from "./endpoint";
3
+ import { Logger } from "./logger";
4
+ import { UserAgent } from "./util";
5
+ /**
6
+ * @public
7
+ */
8
+ export interface InitializeHandlerArguments<Input extends object> {
9
+ /**
10
+ * User input to a command. Reflects the userland representation of the
11
+ * union of data types the command can effectively handle.
12
+ */
13
+ input: Input;
14
+ }
15
+ /**
16
+ * @public
17
+ */
18
+ export interface InitializeHandlerOutput<Output extends object> extends DeserializeHandlerOutput<Output> {
19
+ output: Output;
20
+ }
21
+ /**
22
+ * @public
23
+ */
24
+ export interface SerializeHandlerArguments<Input extends object> extends InitializeHandlerArguments<Input> {
25
+ /**
26
+ * The user input serialized as a request object. The request object is unknown,
27
+ * so you cannot modify it directly. When work with request, you need to guard its
28
+ * type to e.g. HttpRequest with 'instanceof' operand
29
+ *
30
+ * During the build phase of the execution of a middleware stack, a built
31
+ * request may or may not be available.
32
+ */
33
+ request?: unknown;
34
+ }
35
+ /**
36
+ * @public
37
+ */
38
+ export interface SerializeHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {
39
+ }
40
+ /**
41
+ * @public
42
+ */
43
+ export interface BuildHandlerArguments<Input extends object> extends FinalizeHandlerArguments<Input> {
44
+ }
45
+ /**
46
+ * @public
47
+ */
48
+ export interface BuildHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {
49
+ }
50
+ /**
51
+ * @public
52
+ */
53
+ export interface FinalizeHandlerArguments<Input extends object> extends SerializeHandlerArguments<Input> {
54
+ /**
55
+ * The user input serialized as a request.
56
+ */
57
+ request: unknown;
58
+ }
59
+ /**
60
+ * @public
61
+ */
62
+ export interface FinalizeHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {
63
+ }
64
+ /**
65
+ * @public
66
+ */
67
+ export interface DeserializeHandlerArguments<Input extends object> extends FinalizeHandlerArguments<Input> {
68
+ }
69
+ /**
70
+ * @public
71
+ */
72
+ export interface DeserializeHandlerOutput<Output extends object> {
73
+ /**
74
+ * The raw response object from runtime is deserialized to structured output object.
75
+ * The response object is unknown so you cannot modify it directly. When work with
76
+ * response, you need to guard its type to e.g. HttpResponse with 'instanceof' operand.
77
+ *
78
+ * During the deserialize phase of the execution of a middleware stack, a deserialized
79
+ * response may or may not be available
80
+ */
81
+ response: unknown;
82
+ output?: Output;
83
+ }
84
+ /**
85
+ * @public
86
+ */
87
+ export interface InitializeHandler<Input extends object, Output extends object> {
88
+ /**
89
+ * Asynchronously converts an input object into an output object.
90
+ *
91
+ * @param args - An object containing a input to the command as well as any
92
+ * associated or previously generated execution artifacts.
93
+ */
94
+ (args: InitializeHandlerArguments<Input>): Promise<InitializeHandlerOutput<Output>>;
95
+ }
96
+ /**
97
+ * @public
98
+ */
99
+ export type Handler<Input extends object, Output extends object> = InitializeHandler<Input, Output>;
100
+ /**
101
+ * @public
102
+ */
103
+ export interface SerializeHandler<Input extends object, Output extends object> {
104
+ /**
105
+ * Asynchronously converts an input object into an output object.
106
+ *
107
+ * @param args - An object containing a input to the command as well as any
108
+ * associated or previously generated execution artifacts.
109
+ */
110
+ (args: SerializeHandlerArguments<Input>): Promise<SerializeHandlerOutput<Output>>;
111
+ }
112
+ /**
113
+ * @public
114
+ */
115
+ export interface FinalizeHandler<Input extends object, Output extends object> {
116
+ /**
117
+ * Asynchronously converts an input object into an output object.
118
+ *
119
+ * @param args - An object containing a input to the command as well as any
120
+ * associated or previously generated execution artifacts.
121
+ */
122
+ (args: FinalizeHandlerArguments<Input>): Promise<FinalizeHandlerOutput<Output>>;
123
+ }
124
+ /**
125
+ * @public
126
+ */
127
+ export interface BuildHandler<Input extends object, Output extends object> {
128
+ (args: BuildHandlerArguments<Input>): Promise<BuildHandlerOutput<Output>>;
129
+ }
130
+ /**
131
+ * @public
132
+ */
133
+ export interface DeserializeHandler<Input extends object, Output extends object> {
134
+ (args: DeserializeHandlerArguments<Input>): Promise<DeserializeHandlerOutput<Output>>;
135
+ }
136
+ /**
137
+ * @public
138
+ *
139
+ * A factory function that creates functions implementing the `Handler`
140
+ * interface.
141
+ */
142
+ export interface InitializeMiddleware<Input extends object, Output extends object> {
143
+ /**
144
+ * @param next - The handler to invoke after this middleware has operated on
145
+ * the user input and before this middleware operates on the output.
146
+ *
147
+ * @param context - Invariant data and functions for use by the handler.
148
+ */
149
+ (next: InitializeHandler<Input, Output>, context: HandlerExecutionContext): InitializeHandler<Input, Output>;
150
+ }
151
+ /**
152
+ * @public
153
+ *
154
+ * A factory function that creates functions implementing the `BuildHandler`
155
+ * interface.
156
+ */
157
+ export interface SerializeMiddleware<Input extends object, Output extends object> {
158
+ /**
159
+ * @param next - The handler to invoke after this middleware has operated on
160
+ * the user input and before this middleware operates on the output.
161
+ *
162
+ * @param context - Invariant data and functions for use by the handler.
163
+ */
164
+ (next: SerializeHandler<Input, Output>, context: HandlerExecutionContext): SerializeHandler<Input, Output>;
165
+ }
166
+ /**
167
+ * @public
168
+ *
169
+ * A factory function that creates functions implementing the `FinalizeHandler`
170
+ * interface.
171
+ */
172
+ export interface FinalizeRequestMiddleware<Input extends object, Output extends object> {
173
+ /**
174
+ * @param next - The handler to invoke after this middleware has operated on
175
+ * the user input and before this middleware operates on the output.
176
+ *
177
+ * @param context - Invariant data and functions for use by the handler.
178
+ */
179
+ (next: FinalizeHandler<Input, Output>, context: HandlerExecutionContext): FinalizeHandler<Input, Output>;
180
+ }
181
+ /**
182
+ * @public
183
+ */
184
+ export interface BuildMiddleware<Input extends object, Output extends object> {
185
+ (next: BuildHandler<Input, Output>, context: HandlerExecutionContext): BuildHandler<Input, Output>;
186
+ }
187
+ /**
188
+ * @public
189
+ */
190
+ export interface DeserializeMiddleware<Input extends object, Output extends object> {
191
+ (next: DeserializeHandler<Input, Output>, context: HandlerExecutionContext): DeserializeHandler<Input, Output>;
192
+ }
193
+ /**
194
+ * @public
195
+ */
196
+ export type MiddlewareType<Input extends object, Output extends object> = InitializeMiddleware<Input, Output> | SerializeMiddleware<Input, Output> | BuildMiddleware<Input, Output> | FinalizeRequestMiddleware<Input, Output> | DeserializeMiddleware<Input, Output>;
197
+ /**
198
+ * @public
199
+ *
200
+ * A factory function that creates the terminal handler atop which a middleware
201
+ * stack sits.
202
+ */
203
+ export interface Terminalware {
204
+ <Input extends object, Output extends object>(context: HandlerExecutionContext): DeserializeHandler<Input, Output>;
205
+ }
206
+ /**
207
+ * @public
208
+ */
209
+ export type Step = "initialize" | "serialize" | "build" | "finalizeRequest" | "deserialize";
210
+ /**
211
+ * @public
212
+ */
213
+ export type Priority = "high" | "normal" | "low";
214
+ /**
215
+ * @public
216
+ */
217
+ export interface HandlerOptions {
218
+ /**
219
+ * Handlers are ordered using a "step" that describes the stage of command
220
+ * execution at which the handler will be executed. The available steps are:
221
+ *
222
+ * - initialize: The input is being prepared. Examples of typical
223
+ * initialization tasks include injecting default options computing
224
+ * derived parameters.
225
+ * - serialize: The input is complete and ready to be serialized. Examples
226
+ * of typical serialization tasks include input validation and building
227
+ * an HTTP request from user input.
228
+ * - build: The input has been serialized into an HTTP request, but that
229
+ * request may require further modification. Any request alterations
230
+ * will be applied to all retries. Examples of typical build tasks
231
+ * include injecting HTTP headers that describe a stable aspect of the
232
+ * request, such as `Content-Length` or a body checksum.
233
+ * - finalizeRequest: The request is being prepared to be sent over the wire. The
234
+ * request in this stage should already be semantically complete and
235
+ * should therefore only be altered as match the recipient's
236
+ * expectations. Examples of typical finalization tasks include request
237
+ * signing and injecting hop-by-hop headers.
238
+ * - deserialize: The response has arrived, the middleware here will deserialize
239
+ * the raw response object to structured response
240
+ *
241
+ * Unlike initialization and build handlers, which are executed once
242
+ * per operation execution, finalization and deserialize handlers will be
243
+ * executed foreach HTTP request sent.
244
+ *
245
+ * @defaultValue 'initialize'
246
+ */
247
+ step?: Step;
248
+ /**
249
+ * A list of strings to any that identify the general purpose or important
250
+ * characteristics of a given handler.
251
+ */
252
+ tags?: Array<string>;
253
+ /**
254
+ * A unique name to refer to a middleware
255
+ */
256
+ name?: string;
257
+ /**
258
+ * A flag to override the existing middleware with the same name. Without
259
+ * setting it, adding middleware with duplicated name will throw an exception.
260
+ * @internal
261
+ */
262
+ override?: boolean;
263
+ }
264
+ /**
265
+ * @public
266
+ */
267
+ export interface AbsoluteLocation {
268
+ /**
269
+ * By default middleware will be added to individual step in un-guaranteed order.
270
+ * In the case that
271
+ *
272
+ * @defaultValue 'normal'
273
+ */
274
+ priority?: Priority;
275
+ }
276
+ /**
277
+ * @public
278
+ */
279
+ export type Relation = "before" | "after";
280
+ /**
281
+ * @public
282
+ */
283
+ export interface RelativeLocation {
284
+ /**
285
+ * Specify the relation to be before or after a know middleware.
286
+ */
287
+ relation: Relation;
288
+ /**
289
+ * A known middleware name to indicate inserting middleware's location.
290
+ */
291
+ toMiddleware: string;
292
+ }
293
+ /**
294
+ * @public
295
+ */
296
+ export type RelativeMiddlewareOptions = RelativeLocation & Omit<HandlerOptions, "step">;
297
+ /**
298
+ * @public
299
+ */
300
+ export interface InitializeHandlerOptions extends HandlerOptions {
301
+ step?: "initialize";
302
+ }
303
+ /**
304
+ * @public
305
+ */
306
+ export interface SerializeHandlerOptions extends HandlerOptions {
307
+ step: "serialize";
308
+ }
309
+ /**
310
+ * @public
311
+ */
312
+ export interface BuildHandlerOptions extends HandlerOptions {
313
+ step: "build";
314
+ }
315
+ /**
316
+ * @public
317
+ */
318
+ export interface FinalizeRequestHandlerOptions extends HandlerOptions {
319
+ step: "finalizeRequest";
320
+ }
321
+ /**
322
+ * @public
323
+ */
324
+ export interface DeserializeHandlerOptions extends HandlerOptions {
325
+ step: "deserialize";
326
+ }
327
+ /**
328
+ * @public
329
+ *
330
+ * A stack storing middleware. It can be resolved into a handler. It supports 2
331
+ * approaches for adding middleware:
332
+ * 1. Adding middleware to specific step with `add()`. The order of middleware
333
+ * added into same step is determined by order of adding them. If one middleware
334
+ * needs to be executed at the front of the step or at the end of step, set
335
+ * `priority` options to `high` or `low`.
336
+ * 2. Adding middleware to location relative to known middleware with `addRelativeTo()`.
337
+ * This is useful when given middleware must be executed before or after specific
338
+ * middleware(`toMiddleware`). You can add a middleware relatively to another
339
+ * middleware which also added relatively. But eventually, this relative middleware
340
+ * chain **must** be 'anchored' by a middleware that added using `add()` API
341
+ * with absolute `step` and `priority`. This mothod will throw if specified
342
+ * `toMiddleware` is not found.
343
+ */
344
+ export interface MiddlewareStack<Input extends object, Output extends object> extends Pluggable<Input, Output> {
345
+ /**
346
+ * Add middleware to the stack to be executed during the "initialize" step,
347
+ * optionally specifying a priority, tags and name
348
+ */
349
+ add(middleware: InitializeMiddleware<Input, Output>, options?: InitializeHandlerOptions & AbsoluteLocation): void;
350
+ /**
351
+ * Add middleware to the stack to be executed during the "serialize" step,
352
+ * optionally specifying a priority, tags and name
353
+ */
354
+ add(middleware: SerializeMiddleware<Input, Output>, options: SerializeHandlerOptions & AbsoluteLocation): void;
355
+ /**
356
+ * Add middleware to the stack to be executed during the "build" step,
357
+ * optionally specifying a priority, tags and name
358
+ */
359
+ add(middleware: BuildMiddleware<Input, Output>, options: BuildHandlerOptions & AbsoluteLocation): void;
360
+ /**
361
+ * Add middleware to the stack to be executed during the "finalizeRequest" step,
362
+ * optionally specifying a priority, tags and name
363
+ */
364
+ add(middleware: FinalizeRequestMiddleware<Input, Output>, options: FinalizeRequestHandlerOptions & AbsoluteLocation): void;
365
+ /**
366
+ * Add middleware to the stack to be executed during the "deserialize" step,
367
+ * optionally specifying a priority, tags and name
368
+ */
369
+ add(middleware: DeserializeMiddleware<Input, Output>, options: DeserializeHandlerOptions & AbsoluteLocation): void;
370
+ /**
371
+ * Add middleware to a stack position before or after a known middleware,optionally
372
+ * specifying name and tags.
373
+ */
374
+ addRelativeTo(middleware: MiddlewareType<Input, Output>, options: RelativeMiddlewareOptions): void;
375
+ /**
376
+ * Apply a customization function to mutate the middleware stack, often
377
+ * used for customizations that requires mutating multiple middleware.
378
+ */
379
+ use(pluggable: Pluggable<Input, Output>): void;
380
+ /**
381
+ * Create a shallow clone of this stack. Step bindings and handler priorities
382
+ * and tags are preserved in the copy.
383
+ */
384
+ clone(): MiddlewareStack<Input, Output>;
385
+ /**
386
+ * Removes middleware from the stack.
387
+ *
388
+ * If a string is provided, it will be treated as middleware name. If a middleware
389
+ * is inserted with the given name, it will be removed.
390
+ *
391
+ * If a middleware class is provided, all usages thereof will be removed.
392
+ */
393
+ remove(toRemove: MiddlewareType<Input, Output> | string): boolean;
394
+ /**
395
+ * Removes middleware that contains given tag
396
+ *
397
+ * Multiple middleware will potentially be removed
398
+ */
399
+ removeByTag(toRemove: string): boolean;
400
+ /**
401
+ * Create a stack containing the middlewares in this stack as well as the
402
+ * middlewares in the `from` stack. Neither source is modified, and step
403
+ * bindings and handler priorities and tags are preserved in the copy.
404
+ */
405
+ concat<InputType extends Input, OutputType extends Output>(from: MiddlewareStack<InputType, OutputType>): MiddlewareStack<InputType, OutputType>;
406
+ /**
407
+ * Returns a list of the current order of middleware in the stack.
408
+ * This does not execute the middleware functions, nor does it
409
+ * provide a reference to the stack itself.
410
+ */
411
+ identify(): string[];
412
+ /**
413
+ * Builds a single handler function from zero or more middleware classes and
414
+ * a core handler. The core handler is meant to send command objects to AWS
415
+ * services and return promises that will resolve with the operation result
416
+ * or be rejected with an error.
417
+ *
418
+ * When a composed handler is invoked, the arguments will pass through all
419
+ * middleware in a defined order, and the return from the innermost handler
420
+ * will pass through all middleware in the reverse of that order.
421
+ */
422
+ resolve<InputType extends Input, OutputType extends Output>(handler: DeserializeHandler<InputType, OutputType>, context: HandlerExecutionContext): InitializeHandler<InputType, OutputType>;
423
+ }
424
+ /**
425
+ * @public
426
+ *
427
+ * Data and helper objects that are not expected to change from one execution of
428
+ * a composed handler to another.
429
+ */
430
+ export interface HandlerExecutionContext {
431
+ /**
432
+ * A logger that may be invoked by any handler during execution of an
433
+ * operation.
434
+ */
435
+ logger?: Logger;
436
+ /**
437
+ * Additional user agent that inferred by middleware. It can be used to save
438
+ * the internal user agent sections without overriding the `customUserAgent`
439
+ * config in clients.
440
+ */
441
+ userAgent?: UserAgent;
442
+ /**
443
+ * Resolved by the endpointMiddleware function of `@smithy/middleware-endpoint`
444
+ * in the serialization stage.
445
+ */
446
+ endpointV2?: EndpointV2;
447
+ /**
448
+ * Set at the same time as endpointV2.
449
+ */
450
+ authSchemes?: AuthScheme[];
451
+ /**
452
+ * The current auth configuration that has been set by any auth middleware and
453
+ * that will prevent from being set more than once.
454
+ */
455
+ currentAuthConfig?: HttpAuthDefinition;
456
+ /**
457
+ * Used by DynamoDbDocumentClient.
458
+ */
459
+ dynamoDbDocumentClientOptions?: Partial<{
460
+ overrideInputFilterSensitiveLog(...args: any[]): string | void;
461
+ overrideOutputFilterSensitiveLog(...args: any[]): string | void;
462
+ }>;
463
+ [key: string]: any;
464
+ }
465
+ /**
466
+ * @public
467
+ */
468
+ export interface Pluggable<Input extends object, Output extends object> {
469
+ /**
470
+ * A function that mutate the passed in middleware stack. Functions implementing
471
+ * this interface can add, remove, modify existing middleware stack from clients
472
+ * or commands
473
+ */
474
+ applyToStack: (stack: MiddlewareStack<Input, Output>) => void;
475
+ }
@@ -0,0 +1,26 @@
1
+ import { Client } from "./client";
2
+ /**
3
+ * @public
4
+ *
5
+ * Expected type definition of a paginator.
6
+ */
7
+ export type Paginator<T> = AsyncGenerator<T, T, unknown>;
8
+ /**
9
+ * @public
10
+ *
11
+ * Expected paginator configuration passed to an operation. Services will extend
12
+ * this interface definition and may type client further.
13
+ */
14
+ export interface PaginationConfiguration {
15
+ client: Client<any, any, any>;
16
+ pageSize?: number;
17
+ startingToken?: any;
18
+ /**
19
+ * For some APIs, such as CloudWatchLogs events, the next page token will always
20
+ * be present.
21
+ *
22
+ * When true, this config field will have the paginator stop when the token doesn't change
23
+ * instead of when it is not present.
24
+ */
25
+ stopOnSameToken?: boolean;
26
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @public
3
+ */
4
+ export type IniSection = Record<string, string | undefined>;
5
+ /**
6
+ * @public
7
+ *
8
+ * @deprecated Please use {@link IniSection}
9
+ */
10
+ export interface Profile extends IniSection {
11
+ }
12
+ /**
13
+ * @public
14
+ */
15
+ export type ParsedIniData = Record<string, IniSection>;
16
+ /**
17
+ * @public
18
+ */
19
+ export interface SharedConfigFiles {
20
+ credentialsFile: ParsedIniData;
21
+ configFile: ParsedIniData;
22
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export interface ResponseMetadata {
5
+ /**
6
+ * The status code of the last HTTP response received for this operation.
7
+ */
8
+ httpStatusCode?: number;
9
+ /**
10
+ * A unique identifier for the last request sent for this operation. Often
11
+ * requested by AWS service teams to aid in debugging.
12
+ */
13
+ requestId?: string;
14
+ /**
15
+ * A secondary identifier for the last request sent. Used for debugging.
16
+ */
17
+ extendedRequestId?: string;
18
+ /**
19
+ * A tertiary identifier for the last request sent. Used for debugging.
20
+ */
21
+ cfId?: string;
22
+ /**
23
+ * The number of times this operation was attempted.
24
+ */
25
+ attempts?: number;
26
+ /**
27
+ * The total amount of time (in milliseconds) that was spent waiting between
28
+ * retry attempts.
29
+ */
30
+ totalRetryDelay?: number;
31
+ }
32
+ /**
33
+ * @public
34
+ */
35
+ export interface MetadataBearer {
36
+ /**
37
+ * Metadata pertaining to this request.
38
+ */
39
+ $metadata: ResponseMetadata;
40
+ }
@@ -0,0 +1,128 @@
1
+ /**
2
+ * @public
3
+ */
4
+ export type RetryErrorType =
5
+ /**
6
+ * This is a connection level error such as a socket timeout, socket connect
7
+ * error, tls negotiation timeout etc...
8
+ * Typically these should never be applied for non-idempotent request types
9
+ * since in this scenario, it's impossible to know whether the operation had
10
+ * a side effect on the server.
11
+ */
12
+ "TRANSIENT"
13
+ /**
14
+ * This is an error where the server explicitly told the client to back off,
15
+ * such as a 429 or 503 Http error.
16
+ */
17
+ | "THROTTLING"
18
+ /**
19
+ * This is a server error that isn't explicitly throttling but is considered
20
+ * by the client to be something that should be retried.
21
+ */
22
+ | "SERVER_ERROR"
23
+ /**
24
+ * Doesn't count against any budgets. This could be something like a 401
25
+ * challenge in Http.
26
+ */
27
+ | "CLIENT_ERROR";
28
+ /**
29
+ * @public
30
+ */
31
+ export interface RetryErrorInfo {
32
+ errorType: RetryErrorType;
33
+ /**
34
+ * Protocol hint. This could come from Http's 'retry-after' header or
35
+ * something from MQTT or any other protocol that has the ability to convey
36
+ * retry info from a peer.
37
+ *
38
+ * @returns the Date after which a retry should be attempted.
39
+ */
40
+ retryAfterHint?: Date;
41
+ }
42
+ /**
43
+ * @public
44
+ */
45
+ export interface RetryBackoffStrategy {
46
+ /**
47
+ * @returns the number of milliseconds to wait before retrying an action.
48
+ */
49
+ computeNextBackoffDelay(retryAttempt: number): number;
50
+ }
51
+ /**
52
+ * @public
53
+ */
54
+ export interface StandardRetryBackoffStrategy extends RetryBackoffStrategy {
55
+ /**
56
+ * Sets the delayBase used to compute backoff delays.
57
+ * @param delayBase -
58
+ */
59
+ setDelayBase(delayBase: number): void;
60
+ }
61
+ /**
62
+ * @public
63
+ */
64
+ export interface RetryStrategyOptions {
65
+ backoffStrategy: RetryBackoffStrategy;
66
+ maxRetriesBase: number;
67
+ }
68
+ /**
69
+ * @public
70
+ */
71
+ export interface RetryToken {
72
+ /**
73
+ * @returns the current count of retry.
74
+ */
75
+ getRetryCount(): number;
76
+ /**
77
+ * @returns the number of milliseconds to wait before retrying an action.
78
+ */
79
+ getRetryDelay(): number;
80
+ }
81
+ /**
82
+ * @public
83
+ */
84
+ export interface StandardRetryToken extends RetryToken {
85
+ /**
86
+ * @returns the cost of the last retry attempt.
87
+ */
88
+ getRetryCost(): number | undefined;
89
+ }
90
+ /**
91
+ * @public
92
+ */
93
+ export interface RetryStrategyV2 {
94
+ /**
95
+ * Called before any retries (for the first call to the operation). It either
96
+ * returns a retry token or an error upon the failure to acquire a token prior.
97
+ *
98
+ * tokenScope is arbitrary and out of scope for this component. However,
99
+ * adding it here offers us a lot of future flexibility for outage detection.
100
+ * For example, it could be "us-east-1" on a shared retry strategy, or
101
+ * "us-west-2-c:dynamodb".
102
+ */
103
+ acquireInitialRetryToken(retryTokenScope: string): Promise<RetryToken>;
104
+ /**
105
+ * After a failed operation call, this function is invoked to refresh the
106
+ * retryToken returned by acquireInitialRetryToken(). This function can
107
+ * either choose to allow another retry and send a new or updated token,
108
+ * or reject the retry attempt and report the error either in an exception
109
+ * or returning an error.
110
+ */
111
+ refreshRetryTokenForRetry(tokenToRenew: RetryToken, errorInfo: RetryErrorInfo): Promise<RetryToken>;
112
+ /**
113
+ * Upon successful completion of the operation, this function is called
114
+ * to record that the operation was successful.
115
+ */
116
+ recordSuccess(token: RetryToken): void;
117
+ }
118
+ /**
119
+ * @public
120
+ */
121
+ export type ExponentialBackoffJitterType = "DEFAULT" | "NONE" | "FULL" | "DECORRELATED";
122
+ /**
123
+ * @public
124
+ */
125
+ export interface ExponentialBackoffStrategyOptions {
126
+ jitterType: ExponentialBackoffJitterType;
127
+ backoffScaleValue?: number;
128
+ }