@aws-sdk/client-cloudwatch 3.1068.0 → 3.1069.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.
- package/dist-cjs/auth/httpAuthSchemeProvider.js +9 -15
- package/dist-cjs/endpoint/bdd.js +2 -5
- package/dist-cjs/endpoint/endpointResolver.js +7 -11
- package/dist-cjs/index.js +222 -242
- package/dist-cjs/models/CloudWatchServiceException.js +4 -8
- package/dist-cjs/models/errors.js +35 -55
- package/dist-cjs/runtimeConfig.browser.js +25 -29
- package/dist-cjs/runtimeConfig.js +33 -37
- package/dist-cjs/runtimeConfig.native.js +4 -7
- package/dist-cjs/runtimeConfig.shared.js +20 -24
- package/dist-cjs/schemas/schemas_0.js +419 -275
- package/package.json +9 -9
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.CloudWatchServiceException =
|
|
4
|
-
const client_1 = require("@smithy/core/client");
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
|
|
6
|
-
class CloudWatchServiceException extends client_1.ServiceException {
|
|
1
|
+
const { ServiceException: __ServiceException } = require("@smithy/core/client");
|
|
2
|
+
exports.__ServiceException = __ServiceException;
|
|
3
|
+
exports.CloudWatchServiceException = class CloudWatchServiceException extends __ServiceException {
|
|
7
4
|
constructor(options) {
|
|
8
5
|
super(options);
|
|
9
6
|
Object.setPrototypeOf(this, CloudWatchServiceException.prototype);
|
|
10
7
|
}
|
|
11
|
-
}
|
|
12
|
-
exports.CloudWatchServiceException = CloudWatchServiceException;
|
|
8
|
+
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.InvalidFormatFault = exports.LimitExceededFault = exports.LimitExceededException = exports.InvalidNextToken = exports.MissingRequiredParameterException = exports.InvalidParameterValueException = exports.InvalidParameterCombinationException = exports.InternalServiceFault = exports.ResourceNotFound = exports.DashboardNotFoundError = exports.DashboardInvalidInputError = exports.ConcurrentModificationException = exports.ResourceNotFoundException = exports.KmsKeyNotFoundException = exports.KmsKeyDisabledException = exports.KmsAccessDeniedException = exports.ConflictException = void 0;
|
|
4
|
-
const CloudWatchServiceException_1 = require("./CloudWatchServiceException");
|
|
5
|
-
class ConflictException extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
1
|
+
const { CloudWatchServiceException: __BaseException } = require("./CloudWatchServiceException");
|
|
2
|
+
exports.ConflictException = class ConflictException extends __BaseException {
|
|
6
3
|
name = "ConflictException";
|
|
7
4
|
$fault = "client";
|
|
8
5
|
Message;
|
|
@@ -15,9 +12,8 @@ class ConflictException extends CloudWatchServiceException_1.CloudWatchServiceEx
|
|
|
15
12
|
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
16
13
|
this.Message = opts.Message;
|
|
17
14
|
}
|
|
18
|
-
}
|
|
19
|
-
exports.
|
|
20
|
-
class KmsAccessDeniedException extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
15
|
+
};
|
|
16
|
+
exports.KmsAccessDeniedException = class KmsAccessDeniedException extends __BaseException {
|
|
21
17
|
name = "KmsAccessDeniedException";
|
|
22
18
|
$fault = "client";
|
|
23
19
|
Message;
|
|
@@ -30,9 +26,8 @@ class KmsAccessDeniedException extends CloudWatchServiceException_1.CloudWatchSe
|
|
|
30
26
|
Object.setPrototypeOf(this, KmsAccessDeniedException.prototype);
|
|
31
27
|
this.Message = opts.Message;
|
|
32
28
|
}
|
|
33
|
-
}
|
|
34
|
-
exports.
|
|
35
|
-
class KmsKeyDisabledException extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
29
|
+
};
|
|
30
|
+
exports.KmsKeyDisabledException = class KmsKeyDisabledException extends __BaseException {
|
|
36
31
|
name = "KmsKeyDisabledException";
|
|
37
32
|
$fault = "client";
|
|
38
33
|
Message;
|
|
@@ -45,9 +40,8 @@ class KmsKeyDisabledException extends CloudWatchServiceException_1.CloudWatchSer
|
|
|
45
40
|
Object.setPrototypeOf(this, KmsKeyDisabledException.prototype);
|
|
46
41
|
this.Message = opts.Message;
|
|
47
42
|
}
|
|
48
|
-
}
|
|
49
|
-
exports.
|
|
50
|
-
class KmsKeyNotFoundException extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
43
|
+
};
|
|
44
|
+
exports.KmsKeyNotFoundException = class KmsKeyNotFoundException extends __BaseException {
|
|
51
45
|
name = "KmsKeyNotFoundException";
|
|
52
46
|
$fault = "client";
|
|
53
47
|
Message;
|
|
@@ -60,9 +54,8 @@ class KmsKeyNotFoundException extends CloudWatchServiceException_1.CloudWatchSer
|
|
|
60
54
|
Object.setPrototypeOf(this, KmsKeyNotFoundException.prototype);
|
|
61
55
|
this.Message = opts.Message;
|
|
62
56
|
}
|
|
63
|
-
}
|
|
64
|
-
exports.
|
|
65
|
-
class ResourceNotFoundException extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
57
|
+
};
|
|
58
|
+
exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
|
|
66
59
|
name = "ResourceNotFoundException";
|
|
67
60
|
$fault = "client";
|
|
68
61
|
ResourceType;
|
|
@@ -79,9 +72,8 @@ class ResourceNotFoundException extends CloudWatchServiceException_1.CloudWatchS
|
|
|
79
72
|
this.ResourceId = opts.ResourceId;
|
|
80
73
|
this.Message = opts.Message;
|
|
81
74
|
}
|
|
82
|
-
}
|
|
83
|
-
exports.
|
|
84
|
-
class ConcurrentModificationException extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
75
|
+
};
|
|
76
|
+
exports.ConcurrentModificationException = class ConcurrentModificationException extends __BaseException {
|
|
85
77
|
name = "ConcurrentModificationException";
|
|
86
78
|
$fault = "client";
|
|
87
79
|
Message;
|
|
@@ -94,9 +86,8 @@ class ConcurrentModificationException extends CloudWatchServiceException_1.Cloud
|
|
|
94
86
|
Object.setPrototypeOf(this, ConcurrentModificationException.prototype);
|
|
95
87
|
this.Message = opts.Message;
|
|
96
88
|
}
|
|
97
|
-
}
|
|
98
|
-
exports.
|
|
99
|
-
class DashboardInvalidInputError extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
89
|
+
};
|
|
90
|
+
exports.DashboardInvalidInputError = class DashboardInvalidInputError extends __BaseException {
|
|
100
91
|
name = "DashboardInvalidInputError";
|
|
101
92
|
$fault = "client";
|
|
102
93
|
dashboardValidationMessages;
|
|
@@ -109,9 +100,8 @@ class DashboardInvalidInputError extends CloudWatchServiceException_1.CloudWatch
|
|
|
109
100
|
Object.setPrototypeOf(this, DashboardInvalidInputError.prototype);
|
|
110
101
|
this.dashboardValidationMessages = opts.dashboardValidationMessages;
|
|
111
102
|
}
|
|
112
|
-
}
|
|
113
|
-
exports.
|
|
114
|
-
class DashboardNotFoundError extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
103
|
+
};
|
|
104
|
+
exports.DashboardNotFoundError = class DashboardNotFoundError extends __BaseException {
|
|
115
105
|
name = "DashboardNotFoundError";
|
|
116
106
|
$fault = "client";
|
|
117
107
|
constructor(opts) {
|
|
@@ -122,9 +112,8 @@ class DashboardNotFoundError extends CloudWatchServiceException_1.CloudWatchServ
|
|
|
122
112
|
});
|
|
123
113
|
Object.setPrototypeOf(this, DashboardNotFoundError.prototype);
|
|
124
114
|
}
|
|
125
|
-
}
|
|
126
|
-
exports.
|
|
127
|
-
class ResourceNotFound extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
115
|
+
};
|
|
116
|
+
exports.ResourceNotFound = class ResourceNotFound extends __BaseException {
|
|
128
117
|
name = "ResourceNotFound";
|
|
129
118
|
$fault = "client";
|
|
130
119
|
constructor(opts) {
|
|
@@ -135,9 +124,8 @@ class ResourceNotFound extends CloudWatchServiceException_1.CloudWatchServiceExc
|
|
|
135
124
|
});
|
|
136
125
|
Object.setPrototypeOf(this, ResourceNotFound.prototype);
|
|
137
126
|
}
|
|
138
|
-
}
|
|
139
|
-
exports.
|
|
140
|
-
class InternalServiceFault extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
127
|
+
};
|
|
128
|
+
exports.InternalServiceFault = class InternalServiceFault extends __BaseException {
|
|
141
129
|
name = "InternalServiceFault";
|
|
142
130
|
$fault = "server";
|
|
143
131
|
Message;
|
|
@@ -150,9 +138,8 @@ class InternalServiceFault extends CloudWatchServiceException_1.CloudWatchServic
|
|
|
150
138
|
Object.setPrototypeOf(this, InternalServiceFault.prototype);
|
|
151
139
|
this.Message = opts.Message;
|
|
152
140
|
}
|
|
153
|
-
}
|
|
154
|
-
exports.
|
|
155
|
-
class InvalidParameterCombinationException extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
141
|
+
};
|
|
142
|
+
exports.InvalidParameterCombinationException = class InvalidParameterCombinationException extends __BaseException {
|
|
156
143
|
name = "InvalidParameterCombinationException";
|
|
157
144
|
$fault = "client";
|
|
158
145
|
constructor(opts) {
|
|
@@ -163,9 +150,8 @@ class InvalidParameterCombinationException extends CloudWatchServiceException_1.
|
|
|
163
150
|
});
|
|
164
151
|
Object.setPrototypeOf(this, InvalidParameterCombinationException.prototype);
|
|
165
152
|
}
|
|
166
|
-
}
|
|
167
|
-
exports.
|
|
168
|
-
class InvalidParameterValueException extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
153
|
+
};
|
|
154
|
+
exports.InvalidParameterValueException = class InvalidParameterValueException extends __BaseException {
|
|
169
155
|
name = "InvalidParameterValueException";
|
|
170
156
|
$fault = "client";
|
|
171
157
|
constructor(opts) {
|
|
@@ -176,9 +162,8 @@ class InvalidParameterValueException extends CloudWatchServiceException_1.CloudW
|
|
|
176
162
|
});
|
|
177
163
|
Object.setPrototypeOf(this, InvalidParameterValueException.prototype);
|
|
178
164
|
}
|
|
179
|
-
}
|
|
180
|
-
exports.
|
|
181
|
-
class MissingRequiredParameterException extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
165
|
+
};
|
|
166
|
+
exports.MissingRequiredParameterException = class MissingRequiredParameterException extends __BaseException {
|
|
182
167
|
name = "MissingRequiredParameterException";
|
|
183
168
|
$fault = "client";
|
|
184
169
|
constructor(opts) {
|
|
@@ -189,9 +174,8 @@ class MissingRequiredParameterException extends CloudWatchServiceException_1.Clo
|
|
|
189
174
|
});
|
|
190
175
|
Object.setPrototypeOf(this, MissingRequiredParameterException.prototype);
|
|
191
176
|
}
|
|
192
|
-
}
|
|
193
|
-
exports.
|
|
194
|
-
class InvalidNextToken extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
177
|
+
};
|
|
178
|
+
exports.InvalidNextToken = class InvalidNextToken extends __BaseException {
|
|
195
179
|
name = "InvalidNextToken";
|
|
196
180
|
$fault = "client";
|
|
197
181
|
constructor(opts) {
|
|
@@ -202,9 +186,8 @@ class InvalidNextToken extends CloudWatchServiceException_1.CloudWatchServiceExc
|
|
|
202
186
|
});
|
|
203
187
|
Object.setPrototypeOf(this, InvalidNextToken.prototype);
|
|
204
188
|
}
|
|
205
|
-
}
|
|
206
|
-
exports.
|
|
207
|
-
class LimitExceededException extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
189
|
+
};
|
|
190
|
+
exports.LimitExceededException = class LimitExceededException extends __BaseException {
|
|
208
191
|
name = "LimitExceededException";
|
|
209
192
|
$fault = "client";
|
|
210
193
|
Message;
|
|
@@ -217,9 +200,8 @@ class LimitExceededException extends CloudWatchServiceException_1.CloudWatchServ
|
|
|
217
200
|
Object.setPrototypeOf(this, LimitExceededException.prototype);
|
|
218
201
|
this.Message = opts.Message;
|
|
219
202
|
}
|
|
220
|
-
}
|
|
221
|
-
exports.
|
|
222
|
-
class LimitExceededFault extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
203
|
+
};
|
|
204
|
+
exports.LimitExceededFault = class LimitExceededFault extends __BaseException {
|
|
223
205
|
name = "LimitExceededFault";
|
|
224
206
|
$fault = "client";
|
|
225
207
|
constructor(opts) {
|
|
@@ -230,9 +212,8 @@ class LimitExceededFault extends CloudWatchServiceException_1.CloudWatchServiceE
|
|
|
230
212
|
});
|
|
231
213
|
Object.setPrototypeOf(this, LimitExceededFault.prototype);
|
|
232
214
|
}
|
|
233
|
-
}
|
|
234
|
-
exports.
|
|
235
|
-
class InvalidFormatFault extends CloudWatchServiceException_1.CloudWatchServiceException {
|
|
215
|
+
};
|
|
216
|
+
exports.InvalidFormatFault = class InvalidFormatFault extends __BaseException {
|
|
236
217
|
name = "InvalidFormatFault";
|
|
237
218
|
$fault = "client";
|
|
238
219
|
constructor(opts) {
|
|
@@ -243,5 +224,4 @@ class InvalidFormatFault extends CloudWatchServiceException_1.CloudWatchServiceE
|
|
|
243
224
|
});
|
|
244
225
|
Object.setPrototypeOf(this, InvalidFormatFault.prototype);
|
|
245
226
|
}
|
|
246
|
-
}
|
|
247
|
-
exports.InvalidFormatFault = InvalidFormatFault;
|
|
227
|
+
};
|
|
@@ -1,39 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const serde_1 = require("@smithy/core/serde");
|
|
12
|
-
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
13
|
-
const middleware_compression_1 = require("@smithy/middleware-compression");
|
|
14
|
-
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
1
|
+
const packageInfo = require("../package.json");
|
|
2
|
+
const { Sha256 } = require("@aws-crypto/sha256-browser");
|
|
3
|
+
const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
|
|
4
|
+
const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
5
|
+
const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
6
|
+
const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
|
|
7
|
+
const { calculateBodyLength } = require("@smithy/core/serde");
|
|
8
|
+
const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
|
|
9
|
+
const { DEFAULT_DISABLE_REQUEST_COMPRESSION, DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES } = require("@smithy/middleware-compression");
|
|
10
|
+
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
15
11
|
const getRuntimeConfig = (config) => {
|
|
16
|
-
const defaultsMode =
|
|
17
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
18
|
-
const clientSharedValues = (
|
|
12
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
13
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
14
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
19
15
|
return {
|
|
20
16
|
...clientSharedValues,
|
|
21
17
|
...config,
|
|
22
18
|
runtime: "browser",
|
|
23
19
|
defaultsMode,
|
|
24
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
20
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
25
21
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
26
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
27
|
-
disableRequestCompression: config?.disableRequestCompression ??
|
|
28
|
-
maxAttempts: config?.maxAttempts ??
|
|
29
|
-
region: config?.region ??
|
|
30
|
-
requestHandler:
|
|
31
|
-
requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ??
|
|
32
|
-
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode ||
|
|
33
|
-
sha256: config?.sha256 ??
|
|
34
|
-
streamCollector: config?.streamCollector ??
|
|
35
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(
|
|
36
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(
|
|
22
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
23
|
+
disableRequestCompression: config?.disableRequestCompression ?? DEFAULT_DISABLE_REQUEST_COMPRESSION,
|
|
24
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
25
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
26
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
27
|
+
requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES,
|
|
28
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
29
|
+
sha256: config?.sha256 ?? Sha256,
|
|
30
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
31
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
32
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
37
33
|
};
|
|
38
34
|
};
|
|
39
35
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const serde_1 = require("@smithy/core/serde");
|
|
13
|
-
const middleware_compression_1 = require("@smithy/middleware-compression");
|
|
14
|
-
const node_http_handler_1 = require("@smithy/node-http-handler");
|
|
15
|
-
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
1
|
+
const packageInfo = require("../package.json");
|
|
2
|
+
const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
|
|
3
|
+
const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
|
|
4
|
+
const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
|
|
5
|
+
const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
6
|
+
const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
7
|
+
const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
|
|
8
|
+
const { calculateBodyLength, Hash } = require("@smithy/core/serde");
|
|
9
|
+
const { NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS, NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS } = require("@smithy/middleware-compression");
|
|
10
|
+
const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
|
|
11
|
+
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
16
12
|
const getRuntimeConfig = (config) => {
|
|
17
|
-
|
|
18
|
-
const defaultsMode =
|
|
19
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
20
|
-
const clientSharedValues = (
|
|
21
|
-
(
|
|
13
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
14
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
15
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
16
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
17
|
+
awsCheckVersion(process.version);
|
|
22
18
|
const loaderConfig = {
|
|
23
19
|
profile: config?.profile,
|
|
24
20
|
logger: clientSharedValues.logger,
|
|
@@ -28,25 +24,25 @@ const getRuntimeConfig = (config) => {
|
|
|
28
24
|
...config,
|
|
29
25
|
runtime: "node",
|
|
30
26
|
defaultsMode,
|
|
31
|
-
authSchemePreference: config?.authSchemePreference ?? (
|
|
32
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
33
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ??
|
|
34
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
35
|
-
disableRequestCompression: config?.disableRequestCompression ?? (
|
|
36
|
-
maxAttempts: config?.maxAttempts ?? (
|
|
37
|
-
region: config?.region ?? (
|
|
38
|
-
requestHandler:
|
|
39
|
-
requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? (
|
|
27
|
+
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
28
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
29
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
30
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
31
|
+
disableRequestCompression: config?.disableRequestCompression ?? loadNodeConfig(NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS, config),
|
|
32
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
33
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
34
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
35
|
+
requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? loadNodeConfig(NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS, config),
|
|
40
36
|
retryMode: config?.retryMode ??
|
|
41
|
-
(
|
|
42
|
-
...
|
|
43
|
-
default: async () => (await defaultConfigProvider()).retryMode ||
|
|
37
|
+
loadNodeConfig({
|
|
38
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
39
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
44
40
|
}, config),
|
|
45
|
-
sha256: config?.sha256 ??
|
|
46
|
-
streamCollector: config?.streamCollector ??
|
|
47
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (
|
|
48
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (
|
|
49
|
-
userAgentAppId: config?.userAgentAppId ?? (
|
|
41
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
42
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
43
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
44
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
45
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
50
46
|
};
|
|
51
47
|
};
|
|
52
48
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.getRuntimeConfig = void 0;
|
|
4
|
-
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
|
5
|
-
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
|
1
|
+
const { Sha256 } = require("@aws-crypto/sha256-js");
|
|
2
|
+
const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
|
|
6
3
|
const getRuntimeConfig = (config) => {
|
|
7
|
-
const browserDefaults = (
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
8
5
|
return {
|
|
9
6
|
...browserDefaults,
|
|
10
7
|
...config,
|
|
11
8
|
runtime: "react-native",
|
|
12
|
-
sha256: config?.sha256 ??
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
13
10
|
};
|
|
14
11
|
};
|
|
15
12
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,44 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
|
11
|
-
const schemas_0_1 = require("./schemas/schemas_0");
|
|
12
|
-
const getRuntimeConfig = (config) => {
|
|
1
|
+
const { AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
+
const { AwsJson1_0Protocol } = require("@aws-sdk/core/protocols");
|
|
3
|
+
const { NoOpLogger } = require("@smithy/core/client");
|
|
4
|
+
const { parseUrl } = require("@smithy/core/protocols");
|
|
5
|
+
const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
|
|
6
|
+
const { defaultCloudWatchHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
|
|
7
|
+
const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
|
|
8
|
+
const { errorTypeRegistries } = require("./schemas/schemas_0");
|
|
9
|
+
exports.getRuntimeConfig = (config) => {
|
|
13
10
|
return {
|
|
14
11
|
apiVersion: "2010-08-01",
|
|
15
|
-
base64Decoder: config?.base64Decoder ??
|
|
16
|
-
base64Encoder: config?.base64Encoder ??
|
|
12
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
13
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
17
14
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
18
|
-
endpointProvider: config?.endpointProvider ??
|
|
15
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
19
16
|
extensions: config?.extensions ?? [],
|
|
20
|
-
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ??
|
|
17
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultCloudWatchHttpAuthSchemeProvider,
|
|
21
18
|
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
22
19
|
{
|
|
23
20
|
schemeId: "aws.auth#sigv4",
|
|
24
21
|
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
25
|
-
signer: new
|
|
22
|
+
signer: new AwsSdkSigV4Signer(),
|
|
26
23
|
},
|
|
27
24
|
],
|
|
28
|
-
logger: config?.logger ?? new
|
|
29
|
-
protocol: config?.protocol ??
|
|
25
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
26
|
+
protocol: config?.protocol ?? AwsJson1_0Protocol,
|
|
30
27
|
protocolSettings: config?.protocolSettings ?? {
|
|
31
28
|
defaultNamespace: "com.amazonaws.cloudwatch",
|
|
32
|
-
errorTypeRegistries
|
|
29
|
+
errorTypeRegistries,
|
|
33
30
|
xmlNamespace: "http://monitoring.amazonaws.com/doc/2010-08-01/",
|
|
34
31
|
version: "2010-08-01",
|
|
35
32
|
serviceTarget: "GraniteServiceVersion20100801",
|
|
36
33
|
awsQueryCompatible: true,
|
|
37
34
|
},
|
|
38
35
|
serviceId: config?.serviceId ?? "CloudWatch",
|
|
39
|
-
urlParser: config?.urlParser ??
|
|
40
|
-
utf8Decoder: config?.utf8Decoder ??
|
|
41
|
-
utf8Encoder: config?.utf8Encoder ??
|
|
36
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
37
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
38
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
42
39
|
};
|
|
43
40
|
};
|
|
44
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|