@cdklabs/cdk-ecs-codedeploy 0.0.195 → 0.0.197
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +56 -4
- package/.projenrc.ts +4 -4
- package/lib/api-canary/index.js +1 -1
- package/lib/ecs-appspec/index.js +1 -1
- package/lib/ecs-deployment/index.js +1 -1
- package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
- package/node_modules/@smithy/protocol-http/dist-cjs/Field.js +1 -1
- package/node_modules/@smithy/protocol-http/dist-cjs/httpRequest.js +3 -0
- package/node_modules/@smithy/protocol-http/dist-cjs/httpResponse.js +1 -0
- package/node_modules/@smithy/protocol-http/dist-cjs/types.js +0 -6
- package/node_modules/@smithy/protocol-http/dist-es/Field.js +1 -1
- package/node_modules/@smithy/protocol-http/dist-es/httpRequest.js +3 -0
- package/node_modules/@smithy/protocol-http/dist-es/httpResponse.js +1 -0
- package/node_modules/@smithy/protocol-http/dist-es/types.js +1 -5
- package/node_modules/@smithy/protocol-http/dist-types/Field.d.ts +1 -1
- package/node_modules/@smithy/protocol-http/dist-types/Fields.d.ts +1 -1
- package/node_modules/@smithy/protocol-http/dist-types/httpHandler.d.ts +1 -2
- package/node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts +7 -12
- package/node_modules/@smithy/protocol-http/dist-types/httpResponse.d.ts +4 -9
- package/node_modules/@smithy/protocol-http/dist-types/types.d.ts +15 -50
- package/node_modules/@smithy/protocol-http/package.json +3 -2
- package/node_modules/@smithy/types/dist-cjs/auth.js +8 -0
- package/node_modules/@smithy/types/dist-cjs/checksum.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/client.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/command.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/connection/config.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/connection/index.js +6 -0
- package/node_modules/@smithy/types/dist-cjs/connection/manager.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/connection/pool.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/crypto.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/encode.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/endpoint.js +8 -0
- package/node_modules/@smithy/types/dist-cjs/endpoints/EndpointRuleObject.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/endpoints/ErrorRuleObject.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/endpoints/RuleSetObject.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/endpoints/TreeRuleObject.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/endpoints/index.js +8 -0
- package/node_modules/@smithy/types/dist-cjs/endpoints/shared.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/eventStream.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/http.js +6 -0
- package/node_modules/@smithy/types/dist-cjs/identity/awsCredentialIdentity.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/identity/identity.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/identity/index.js +5 -0
- package/node_modules/@smithy/types/dist-cjs/index.js +22 -0
- package/node_modules/@smithy/types/dist-cjs/logger.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/middleware.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/pagination.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/profile.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/response.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/retry.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/shapes.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/signature.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/stream.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/uri.js +2 -0
- package/node_modules/@smithy/types/dist-cjs/waiter.js +2 -0
- package/node_modules/@smithy/types/dist-es/auth.js +5 -0
- package/node_modules/@smithy/types/dist-es/checksum.js +1 -0
- package/node_modules/@smithy/types/dist-es/client.js +1 -0
- package/node_modules/@smithy/types/dist-es/command.js +1 -0
- package/node_modules/@smithy/types/dist-es/connection/config.js +1 -0
- package/node_modules/@smithy/types/dist-es/connection/index.js +3 -0
- package/node_modules/@smithy/types/dist-es/connection/manager.js +1 -0
- package/node_modules/@smithy/types/dist-es/connection/pool.js +1 -0
- package/node_modules/@smithy/types/dist-es/crypto.js +1 -0
- package/node_modules/@smithy/types/dist-es/encode.js +1 -0
- package/node_modules/@smithy/types/dist-es/endpoint.js +5 -0
- package/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +1 -0
- package/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +1 -0
- package/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +1 -0
- package/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +1 -0
- package/node_modules/@smithy/types/dist-es/endpoints/index.js +5 -0
- package/node_modules/@smithy/types/dist-es/endpoints/shared.js +1 -0
- package/node_modules/@smithy/types/dist-es/eventStream.js +1 -0
- package/node_modules/@smithy/types/dist-es/http.js +5 -1
- package/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +1 -0
- package/node_modules/@smithy/types/dist-es/identity/identity.js +1 -0
- package/node_modules/@smithy/types/dist-es/identity/index.js +2 -0
- package/node_modules/@smithy/types/dist-es/index.js +22 -0
- package/node_modules/@smithy/types/dist-es/logger.js +1 -0
- package/node_modules/@smithy/types/dist-es/middleware.js +1 -0
- package/node_modules/@smithy/types/dist-es/pagination.js +1 -0
- package/node_modules/@smithy/types/dist-es/profile.js +1 -0
- package/node_modules/@smithy/types/dist-es/response.js +1 -0
- package/node_modules/@smithy/types/dist-es/retry.js +1 -0
- package/node_modules/@smithy/types/dist-es/shapes.js +1 -0
- package/node_modules/@smithy/types/dist-es/signature.js +1 -0
- package/node_modules/@smithy/types/dist-es/stream.js +1 -0
- package/node_modules/@smithy/types/dist-es/uri.js +1 -0
- package/node_modules/@smithy/types/dist-es/waiter.js +1 -0
- package/node_modules/@smithy/types/dist-types/auth.d.ts +55 -0
- package/node_modules/@smithy/types/dist-types/checksum.d.ts +63 -0
- package/node_modules/@smithy/types/dist-types/client.d.ts +25 -0
- package/node_modules/@smithy/types/dist-types/command.d.ts +10 -0
- package/node_modules/@smithy/types/dist-types/connection/config.d.ts +7 -0
- package/node_modules/@smithy/types/dist-types/connection/index.d.ts +3 -0
- package/node_modules/@smithy/types/dist-types/connection/manager.d.ts +28 -0
- package/node_modules/@smithy/types/dist-types/connection/pool.d.ts +24 -0
- package/node_modules/@smithy/types/dist-types/crypto.d.ts +60 -0
- package/node_modules/@smithy/types/dist-types/encode.d.ts +19 -0
- package/node_modules/@smithy/types/dist-types/endpoint.d.ts +77 -0
- package/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts +15 -0
- package/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts +7 -0
- package/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts +19 -0
- package/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts +10 -0
- package/node_modules/@smithy/types/dist-types/endpoints/index.d.ts +5 -0
- package/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts +25 -0
- package/node_modules/@smithy/types/dist-types/eventStream.d.ts +108 -0
- package/node_modules/@smithy/types/dist-types/http.d.ts +86 -1
- package/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts +23 -0
- package/node_modules/@smithy/types/dist-types/identity/identity.d.ts +15 -0
- package/node_modules/@smithy/types/dist-types/identity/index.d.ts +2 -0
- package/node_modules/@smithy/types/dist-types/index.d.ts +22 -0
- package/node_modules/@smithy/types/dist-types/logger.d.ts +13 -0
- package/node_modules/@smithy/types/dist-types/middleware.d.ts +475 -0
- package/node_modules/@smithy/types/dist-types/pagination.d.ts +26 -0
- package/node_modules/@smithy/types/dist-types/profile.d.ts +22 -0
- package/node_modules/@smithy/types/dist-types/response.d.ts +40 -0
- package/node_modules/@smithy/types/dist-types/retry.d.ts +128 -0
- package/node_modules/@smithy/types/dist-types/serde.d.ts +68 -0
- package/node_modules/@smithy/types/dist-types/shapes.d.ts +72 -0
- package/node_modules/@smithy/types/dist-types/signature.d.ts +150 -0
- package/node_modules/@smithy/types/dist-types/stream.d.ts +22 -0
- package/node_modules/@smithy/types/dist-types/transfer.d.ts +3 -0
- package/node_modules/@smithy/types/dist-types/uri.d.ts +17 -0
- package/node_modules/@smithy/types/dist-types/util.d.ts +117 -0
- package/node_modules/@smithy/types/dist-types/waiter.d.ts +35 -0
- package/node_modules/@smithy/types/package.json +7 -2
- package/package.json +6 -6
|
@@ -34,3 +34,71 @@ export interface SerdeContext extends EndpointBearer {
|
|
|
34
34
|
requestHandler: RequestHandler<any, any>;
|
|
35
35
|
disableHostPrefix: boolean;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export interface RequestSerializer<Request, Context extends EndpointBearer = any> {
|
|
41
|
+
/**
|
|
42
|
+
* Converts the provided `input` into a request object
|
|
43
|
+
*
|
|
44
|
+
* @param input - The user input to serialize.
|
|
45
|
+
*
|
|
46
|
+
* @param context - Context containing runtime-specific util functions.
|
|
47
|
+
*/
|
|
48
|
+
(input: any, context: Context): Promise<Request>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
export interface ResponseDeserializer<OutputType, ResponseType = any, Context = any> {
|
|
54
|
+
/**
|
|
55
|
+
* Converts the output of an operation into JavaScript types.
|
|
56
|
+
*
|
|
57
|
+
* @param output - The HTTP response received from the service
|
|
58
|
+
*
|
|
59
|
+
* @param context - context containing runtime-specific util functions.
|
|
60
|
+
*/
|
|
61
|
+
(output: ResponseType, context: Context): Promise<OutputType>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The interface contains mix-in utility functions to transfer the runtime-specific
|
|
65
|
+
* stream implementation to specified format. Each stream can ONLY be transformed
|
|
66
|
+
* once.
|
|
67
|
+
*/
|
|
68
|
+
export interface SdkStreamMixin {
|
|
69
|
+
transformToByteArray: () => Promise<Uint8Array>;
|
|
70
|
+
transformToString: (encoding?: string) => Promise<string>;
|
|
71
|
+
transformToWebStream: () => ReadableStream;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @public
|
|
75
|
+
*
|
|
76
|
+
* The type describing a runtime-specific stream implementation with mix-in
|
|
77
|
+
* utility functions.
|
|
78
|
+
*/
|
|
79
|
+
export type SdkStream<BaseStream> = BaseStream & SdkStreamMixin;
|
|
80
|
+
/**
|
|
81
|
+
* @public
|
|
82
|
+
*
|
|
83
|
+
* Indicates that the member of type T with
|
|
84
|
+
* key StreamKey have been extended
|
|
85
|
+
* with the SdkStreamMixin helper methods.
|
|
86
|
+
*/
|
|
87
|
+
export type WithSdkStreamMixin<T, StreamKey extends keyof T> = {
|
|
88
|
+
[key in keyof T]: key extends StreamKey ? SdkStream<T[StreamKey]> : T[key];
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Interface for internal function to inject stream utility functions
|
|
92
|
+
* implementation
|
|
93
|
+
*
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
export interface SdkStreamMixinInjector {
|
|
97
|
+
(stream: unknown): SdkStreamMixin;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
export interface SdkStreamSerdeContext {
|
|
103
|
+
sdkStreamMixin: SdkStreamMixinInjector;
|
|
104
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { HttpResponse } from "./http";
|
|
2
|
+
import { MetadataBearer } from "./response";
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*
|
|
6
|
+
* A document type represents an untyped JSON-like value.
|
|
7
|
+
*
|
|
8
|
+
* Not all protocols support document types, and the serialization format of a
|
|
9
|
+
* document type is protocol specific. All JSON protocols SHOULD support
|
|
10
|
+
* document types and they SHOULD serialize document types inline as normal
|
|
11
|
+
* JSON values.
|
|
12
|
+
*/
|
|
13
|
+
export type DocumentType = null | boolean | number | string | DocumentType[] | {
|
|
14
|
+
[prop: string]: DocumentType;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
*
|
|
19
|
+
* A structure shape with the error trait.
|
|
20
|
+
* https://smithy.io/2.0/spec/behavior-traits.html#smithy-api-retryable-trait
|
|
21
|
+
*/
|
|
22
|
+
export interface RetryableTrait {
|
|
23
|
+
/**
|
|
24
|
+
* Indicates that the error is a retryable throttling error.
|
|
25
|
+
*/
|
|
26
|
+
readonly throttling?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
*
|
|
31
|
+
* Type that is implemented by all Smithy shapes marked with the
|
|
32
|
+
* error trait.
|
|
33
|
+
* @deprecated
|
|
34
|
+
*/
|
|
35
|
+
export interface SmithyException {
|
|
36
|
+
/**
|
|
37
|
+
* The shape ID name of the exception.
|
|
38
|
+
*/
|
|
39
|
+
readonly name: string;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the client or server are at fault.
|
|
42
|
+
*/
|
|
43
|
+
readonly $fault: "client" | "server";
|
|
44
|
+
/**
|
|
45
|
+
* The service that encountered the exception.
|
|
46
|
+
*/
|
|
47
|
+
readonly $service?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Indicates that an error MAY be retried by the client.
|
|
50
|
+
*/
|
|
51
|
+
readonly $retryable?: RetryableTrait;
|
|
52
|
+
/**
|
|
53
|
+
* Reference to low-level HTTP response object.
|
|
54
|
+
*/
|
|
55
|
+
readonly $response?: HttpResponse;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @public
|
|
59
|
+
*
|
|
60
|
+
* @deprecated See {@link https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/}
|
|
61
|
+
*
|
|
62
|
+
* This type should not be used in your application.
|
|
63
|
+
* Users of the AWS SDK for JavaScript v3 service clients should prefer to
|
|
64
|
+
* use the specific Exception classes corresponding to each operation.
|
|
65
|
+
* These can be found as code in the deserializer for the operation's Command class,
|
|
66
|
+
* or as declarations in the service model file in codegen/sdk-codegen/aws-models.
|
|
67
|
+
*
|
|
68
|
+
* If no exceptions are enumerated by a particular Command operation,
|
|
69
|
+
* the base exception for the service should be used. Each client exports
|
|
70
|
+
* a base ServiceException prefixed with the service name.
|
|
71
|
+
*/
|
|
72
|
+
export type SdkError = Error & Partial<SmithyException> & Partial<MetadataBearer>;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { Message } from "./eventStream";
|
|
2
|
+
import { HttpRequest } from "./http";
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*
|
|
6
|
+
* A `Date` object, a unix (epoch) timestamp in seconds, or a string that can be
|
|
7
|
+
* understood by the JavaScript `Date` constructor.
|
|
8
|
+
*/
|
|
9
|
+
export type DateInput = number | string | Date;
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export interface SigningArguments {
|
|
14
|
+
/**
|
|
15
|
+
* The date and time to be used as signature metadata. This value should be
|
|
16
|
+
* a Date object, a unix (epoch) timestamp, or a string that can be
|
|
17
|
+
* understood by the JavaScript `Date` constructor.If not supplied, the
|
|
18
|
+
* value returned by `new Date()` will be used.
|
|
19
|
+
*/
|
|
20
|
+
signingDate?: DateInput;
|
|
21
|
+
/**
|
|
22
|
+
* The service signing name. It will override the service name of the signer
|
|
23
|
+
* in current invocation
|
|
24
|
+
*/
|
|
25
|
+
signingService?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The region name to sign the request. It will override the signing region of the
|
|
28
|
+
* signer in current invocation
|
|
29
|
+
*/
|
|
30
|
+
signingRegion?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export interface RequestSigningArguments extends SigningArguments {
|
|
36
|
+
/**
|
|
37
|
+
* A set of strings whose members represents headers that cannot be signed.
|
|
38
|
+
* All headers in the provided request will have their names converted to
|
|
39
|
+
* lower case and then checked for existence in the unsignableHeaders set.
|
|
40
|
+
*/
|
|
41
|
+
unsignableHeaders?: Set<string>;
|
|
42
|
+
/**
|
|
43
|
+
* A set of strings whose members represents headers that should be signed.
|
|
44
|
+
* Any values passed here will override those provided via unsignableHeaders,
|
|
45
|
+
* allowing them to be signed.
|
|
46
|
+
*
|
|
47
|
+
* All headers in the provided request will have their names converted to
|
|
48
|
+
* lower case before signing.
|
|
49
|
+
*/
|
|
50
|
+
signableHeaders?: Set<string>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
export interface RequestPresigningArguments extends RequestSigningArguments {
|
|
56
|
+
/**
|
|
57
|
+
* The number of seconds before the presigned URL expires
|
|
58
|
+
*/
|
|
59
|
+
expiresIn?: number;
|
|
60
|
+
/**
|
|
61
|
+
* A set of strings whose representing headers that should not be hoisted
|
|
62
|
+
* to presigned request's query string. If not supplied, the presigner
|
|
63
|
+
* moves all the AWS-specific headers (starting with `x-amz-`) to the request
|
|
64
|
+
* query string. If supplied, these headers remain in the presigned request's
|
|
65
|
+
* header.
|
|
66
|
+
* All headers in the provided request will have their names converted to
|
|
67
|
+
* lower case and then checked for existence in the unhoistableHeaders set.
|
|
68
|
+
*/
|
|
69
|
+
unhoistableHeaders?: Set<string>;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
export interface EventSigningArguments extends SigningArguments {
|
|
75
|
+
priorSignature: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
export interface RequestPresigner {
|
|
81
|
+
/**
|
|
82
|
+
* Signs a request for future use.
|
|
83
|
+
*
|
|
84
|
+
* The request will be valid until either the provided `expiration` time has
|
|
85
|
+
* passed or the underlying credentials have expired.
|
|
86
|
+
*
|
|
87
|
+
* @param requestToSign - The request that should be signed.
|
|
88
|
+
* @param options - Additional signing options.
|
|
89
|
+
*/
|
|
90
|
+
presign(requestToSign: HttpRequest, options?: RequestPresigningArguments): Promise<HttpRequest>;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* @public
|
|
94
|
+
*
|
|
95
|
+
* An object that signs request objects with AWS credentials using one of the
|
|
96
|
+
* AWS authentication protocols.
|
|
97
|
+
*/
|
|
98
|
+
export interface RequestSigner {
|
|
99
|
+
/**
|
|
100
|
+
* Sign the provided request for immediate dispatch.
|
|
101
|
+
*/
|
|
102
|
+
sign(requestToSign: HttpRequest, options?: RequestSigningArguments): Promise<HttpRequest>;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @public
|
|
106
|
+
*/
|
|
107
|
+
export interface StringSigner {
|
|
108
|
+
/**
|
|
109
|
+
* Sign the provided `stringToSign` for use outside of the context of
|
|
110
|
+
* request signing. Typical uses include signed policy generation.
|
|
111
|
+
*/
|
|
112
|
+
sign(stringToSign: string, options?: SigningArguments): Promise<string>;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @public
|
|
116
|
+
*/
|
|
117
|
+
export interface FormattedEvent {
|
|
118
|
+
headers: Uint8Array;
|
|
119
|
+
payload: Uint8Array;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* @public
|
|
123
|
+
*/
|
|
124
|
+
export interface EventSigner {
|
|
125
|
+
/**
|
|
126
|
+
* Sign the individual event of the event stream.
|
|
127
|
+
*/
|
|
128
|
+
sign(event: FormattedEvent, options: EventSigningArguments): Promise<string>;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* @public
|
|
132
|
+
*/
|
|
133
|
+
export interface SignableMessage {
|
|
134
|
+
message: Message;
|
|
135
|
+
priorSignature: string;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* @public
|
|
139
|
+
*/
|
|
140
|
+
export interface SignedMessage {
|
|
141
|
+
message: Message;
|
|
142
|
+
signature: string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* @public
|
|
146
|
+
*/
|
|
147
|
+
export interface MessageSigner {
|
|
148
|
+
signMessage(message: SignableMessage, args: SigningArguments): Promise<SignedMessage>;
|
|
149
|
+
sign(event: SignableMessage, options: SigningArguments): Promise<SignedMessage>;
|
|
150
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ChecksumConstructor } from "./checksum";
|
|
2
|
+
import { HashConstructor, StreamHasher } from "./crypto";
|
|
3
|
+
import { BodyLengthCalculator, Encoder } from "./util";
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface GetAwsChunkedEncodingStreamOptions {
|
|
8
|
+
base64Encoder?: Encoder;
|
|
9
|
+
bodyLengthChecker: BodyLengthCalculator;
|
|
10
|
+
checksumAlgorithmFn?: ChecksumConstructor | HashConstructor;
|
|
11
|
+
checksumLocationName?: string;
|
|
12
|
+
streamHasher?: StreamHasher;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*
|
|
17
|
+
* A function that returns Readable Stream which follows aws-chunked encoding stream.
|
|
18
|
+
* It optionally adds checksum if options are provided.
|
|
19
|
+
*/
|
|
20
|
+
export interface GetAwsChunkedEncodingStream<StreamType = any> {
|
|
21
|
+
(readableStream: StreamType, options: GetAwsChunkedEncodingStreamOptions): StreamType;
|
|
22
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { QueryParameterBag } from "./http";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*
|
|
5
|
+
* Represents the components parts of a Uniform Resource Identifier used to
|
|
6
|
+
* construct the target location of a Request.
|
|
7
|
+
*/
|
|
8
|
+
export type URI = {
|
|
9
|
+
protocol: string;
|
|
10
|
+
hostname: string;
|
|
11
|
+
port?: number;
|
|
12
|
+
path: string;
|
|
13
|
+
query?: QueryParameterBag;
|
|
14
|
+
username?: string;
|
|
15
|
+
password?: string;
|
|
16
|
+
fragment?: string;
|
|
17
|
+
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { Endpoint } from "./http";
|
|
2
|
+
import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput } from "./middleware";
|
|
3
|
+
import { MetadataBearer } from "./response";
|
|
1
4
|
/**
|
|
2
5
|
* @public
|
|
3
6
|
*
|
|
@@ -36,3 +39,117 @@ export interface Decoder {
|
|
|
36
39
|
export interface Provider<T> {
|
|
37
40
|
(): Promise<T>;
|
|
38
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* @public
|
|
44
|
+
*
|
|
45
|
+
* A tuple that represents an API name and optional version
|
|
46
|
+
* of a library built using the AWS SDK.
|
|
47
|
+
*/
|
|
48
|
+
export type UserAgentPair = [name: string, version?: string];
|
|
49
|
+
/**
|
|
50
|
+
* @public
|
|
51
|
+
*
|
|
52
|
+
* User agent data that to be put into the request's user
|
|
53
|
+
* agent.
|
|
54
|
+
*/
|
|
55
|
+
export type UserAgent = UserAgentPair[];
|
|
56
|
+
/**
|
|
57
|
+
* @public
|
|
58
|
+
*
|
|
59
|
+
* Parses a URL in string form into an Endpoint object.
|
|
60
|
+
*/
|
|
61
|
+
export interface UrlParser {
|
|
62
|
+
(url: string | URL): Endpoint;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* @public
|
|
66
|
+
*
|
|
67
|
+
* A function that, when invoked, returns a promise that will be fulfilled with
|
|
68
|
+
* a value of type T. It memoizes the result from the previous invocation
|
|
69
|
+
* instead of calling the underlying resources every time.
|
|
70
|
+
*
|
|
71
|
+
* You can force the provider to refresh the memoized value by invoke the
|
|
72
|
+
* function with optional parameter hash with `forceRefresh` boolean key and
|
|
73
|
+
* value `true`.
|
|
74
|
+
*
|
|
75
|
+
* @example A function that reads credentials from IMDS service that could
|
|
76
|
+
* return expired credentials. The SDK will keep using the expired credentials
|
|
77
|
+
* until an unretryable service error requiring a force refresh of the
|
|
78
|
+
* credentials.
|
|
79
|
+
*/
|
|
80
|
+
export interface MemoizedProvider<T> {
|
|
81
|
+
(options?: {
|
|
82
|
+
forceRefresh?: boolean;
|
|
83
|
+
}): Promise<T>;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* @public
|
|
87
|
+
*
|
|
88
|
+
* A function that, given a request body, determines the
|
|
89
|
+
* length of the body. This is used to determine the Content-Length
|
|
90
|
+
* that should be sent with a request.
|
|
91
|
+
*
|
|
92
|
+
* @example A function that reads a file stream and calculates
|
|
93
|
+
* the size of the file.
|
|
94
|
+
*/
|
|
95
|
+
export interface BodyLengthCalculator {
|
|
96
|
+
(body: any): number | undefined;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @public
|
|
100
|
+
*
|
|
101
|
+
* Object containing regionalization information of
|
|
102
|
+
* AWS services.
|
|
103
|
+
*/
|
|
104
|
+
export interface RegionInfo {
|
|
105
|
+
hostname: string;
|
|
106
|
+
partition: string;
|
|
107
|
+
path?: string;
|
|
108
|
+
signingService?: string;
|
|
109
|
+
signingRegion?: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* @public
|
|
113
|
+
*
|
|
114
|
+
* Options to pass when calling {@link RegionInfoProvider}
|
|
115
|
+
*/
|
|
116
|
+
export interface RegionInfoProviderOptions {
|
|
117
|
+
/**
|
|
118
|
+
* Enables IPv6/IPv4 dualstack endpoint.
|
|
119
|
+
* @defaultValue false
|
|
120
|
+
*/
|
|
121
|
+
useDualstackEndpoint: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Enables FIPS compatible endpoints.
|
|
124
|
+
* @defaultValue false
|
|
125
|
+
*/
|
|
126
|
+
useFipsEndpoint: boolean;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* @public
|
|
130
|
+
*
|
|
131
|
+
* Function returns designated service's regionalization
|
|
132
|
+
* information from given region. Each service client
|
|
133
|
+
* comes with its regionalization provider. it serves
|
|
134
|
+
* to provide the default values of related configurations
|
|
135
|
+
*/
|
|
136
|
+
export interface RegionInfoProvider {
|
|
137
|
+
(region: string, options?: RegionInfoProviderOptions): Promise<RegionInfo | undefined>;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* @public
|
|
141
|
+
*
|
|
142
|
+
* Interface that specifies the retry behavior
|
|
143
|
+
*/
|
|
144
|
+
export interface RetryStrategy {
|
|
145
|
+
/**
|
|
146
|
+
* The retry mode describing how the retry strategy control the traffic flow.
|
|
147
|
+
*/
|
|
148
|
+
mode?: string;
|
|
149
|
+
/**
|
|
150
|
+
* the retry behavior the will invoke the next handler and handle the retry accordingly.
|
|
151
|
+
* This function should also update the $metadata from the response accordingly.
|
|
152
|
+
* @see {@link ResponseMetadata}
|
|
153
|
+
*/
|
|
154
|
+
retry: <Input extends object, Output extends MetadataBearer>(next: FinalizeHandler<Input, Output>, args: FinalizeHandlerArguments<Input>) => Promise<FinalizeHandlerOutput<Output>>;
|
|
155
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AbortController } from "./abort";
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface WaiterConfiguration<Client> {
|
|
6
|
+
/**
|
|
7
|
+
* Required service client
|
|
8
|
+
*/
|
|
9
|
+
client: Client;
|
|
10
|
+
/**
|
|
11
|
+
* The amount of time in seconds a user is willing to wait for a waiter to complete.
|
|
12
|
+
*/
|
|
13
|
+
maxWaitTime: number;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use abortSignal
|
|
16
|
+
* Abort controller. Used for ending the waiter early.
|
|
17
|
+
*/
|
|
18
|
+
abortController?: AbortController;
|
|
19
|
+
/**
|
|
20
|
+
* Abort Signal. Used for ending the waiter early.
|
|
21
|
+
*/
|
|
22
|
+
abortSignal?: AbortController["signal"];
|
|
23
|
+
/**
|
|
24
|
+
* The minimum amount of time to delay between retries in seconds. This is the
|
|
25
|
+
* floor of the exponential backoff. This value defaults to service default
|
|
26
|
+
* if not specified. This value MUST be less than or equal to maxDelay and greater than 0.
|
|
27
|
+
*/
|
|
28
|
+
minDelay?: number;
|
|
29
|
+
/**
|
|
30
|
+
* The maximum amount of time to delay between retries in seconds. This is the
|
|
31
|
+
* ceiling of the exponential backoff. This value defaults to service default
|
|
32
|
+
* if not specified. If specified, this value MUST be greater than or equal to 1.
|
|
33
|
+
*/
|
|
34
|
+
maxDelay?: number;
|
|
35
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
6
6
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
7
7
|
"build:es": "tsc -p tsconfig.es.json",
|
|
8
8
|
"build:types": "tsc -p tsconfig.types.json",
|
|
9
9
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
10
|
+
"stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
|
|
10
11
|
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
|
|
11
12
|
"lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
|
|
12
13
|
"format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"",
|
|
@@ -47,11 +48,15 @@
|
|
|
47
48
|
"@tsconfig/recommended": "1.0.1",
|
|
48
49
|
"concurrently": "7.0.0",
|
|
49
50
|
"downlevel-dts": "0.10.1",
|
|
51
|
+
"jest": "28.1.1",
|
|
50
52
|
"rimraf": "3.0.2",
|
|
51
53
|
"typedoc": "0.23.23",
|
|
52
54
|
"typescript": "~4.9.5"
|
|
53
55
|
},
|
|
54
56
|
"typedoc": {
|
|
55
57
|
"entryPoint": "src/index.ts"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"directory": ".release/package"
|
|
56
61
|
}
|
|
57
|
-
}
|
|
62
|
+
}
|
package/package.json
CHANGED
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"organization": true
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@aws-cdk/aws-synthetics-alpha": "2.
|
|
73
|
+
"@aws-cdk/aws-synthetics-alpha": "2.84.0-alpha.0",
|
|
74
74
|
"@aws-cdk/integ-runner": "latest",
|
|
75
75
|
"@aws-cdk/integ-tests-alpha": "latest",
|
|
76
76
|
"@types/aws-lambda": "^8.10.119",
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
"@typescript-eslint/eslint-plugin": "^5",
|
|
81
81
|
"@typescript-eslint/parser": "^5",
|
|
82
82
|
"aws-cdk": "^2",
|
|
83
|
-
"aws-cdk-lib": "2.
|
|
83
|
+
"aws-cdk-lib": "2.84.0",
|
|
84
84
|
"aws-sdk-client-mock": "^2.1.1",
|
|
85
85
|
"aws-sdk-client-mock-jest": "^2.1.1",
|
|
86
86
|
"cdk-nag": "^2.27.42",
|
|
87
|
-
"cdklabs-projen-project-types": "^0.1.
|
|
87
|
+
"cdklabs-projen-project-types": "^0.1.147",
|
|
88
88
|
"constructs": "10.0.5",
|
|
89
89
|
"esbuild": "^0.18.4",
|
|
90
90
|
"eslint": "^8",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"typescript": "^4.9.5"
|
|
108
108
|
},
|
|
109
109
|
"peerDependencies": {
|
|
110
|
-
"@aws-cdk/aws-synthetics-alpha": "^2.
|
|
111
|
-
"aws-cdk-lib": "^2.
|
|
110
|
+
"@aws-cdk/aws-synthetics-alpha": "^2.84.0-alpha.0",
|
|
111
|
+
"aws-cdk-lib": "^2.84.0",
|
|
112
112
|
"constructs": "^10.0.5"
|
|
113
113
|
},
|
|
114
114
|
"dependencies": {
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"publishConfig": {
|
|
135
135
|
"access": "public"
|
|
136
136
|
},
|
|
137
|
-
"version": "0.0.
|
|
137
|
+
"version": "0.0.197",
|
|
138
138
|
"jest": {
|
|
139
139
|
"testMatch": [
|
|
140
140
|
"<rootDir>/src/**/__tests__/**/*.ts?(x)",
|