@aws-sdk/client-wafv2 3.1075.0 → 3.1077.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/index.js +3298 -15
- package/dist-es/models/enums.js +2 -0
- package/dist-es/runtimeConfig.browser.js +0 -2
- package/dist-es/runtimeConfig.js +1 -2
- package/dist-es/runtimeConfig.native.js +0 -2
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-types/commands/ListResourcesForWebACLCommand.d.ts +1 -1
- package/dist-types/models/enums.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +16 -1
- package/dist-types/runtimeConfig.browser.d.ts +2 -2
- package/dist-types/runtimeConfig.d.ts +2 -2
- package/dist-types/runtimeConfig.native.d.ts +2 -2
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/ts3.4/models/enums.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +8 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +8 -2
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +8 -2
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -0
- package/package.json +8 -10
- package/dist-cjs/auth/httpAuthSchemeProvider.js +0 -40
- package/dist-cjs/endpoint/bdd.js +0 -46
- package/dist-cjs/endpoint/endpointResolver.js +0 -14
- package/dist-cjs/models/WAFV2ServiceException.js +0 -8
- package/dist-cjs/models/errors.js +0 -287
- package/dist-cjs/runtimeConfig.browser.js +0 -32
- package/dist-cjs/runtimeConfig.js +0 -45
- package/dist-cjs/runtimeConfig.native.js +0 -12
- package/dist-cjs/runtimeConfig.shared.js +0 -39
- package/dist-cjs/schemas/schemas_0.js +0 -2764
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
const { WAFV2ServiceException: __BaseException } = require("./WAFV2ServiceException");
|
|
2
|
-
exports.WAFFeatureNotIncludedInPricingPlanException = class WAFFeatureNotIncludedInPricingPlanException extends __BaseException {
|
|
3
|
-
name = "WAFFeatureNotIncludedInPricingPlanException";
|
|
4
|
-
$fault = "client";
|
|
5
|
-
Message;
|
|
6
|
-
DisallowedFeatures;
|
|
7
|
-
constructor(opts) {
|
|
8
|
-
super({
|
|
9
|
-
name: "WAFFeatureNotIncludedInPricingPlanException",
|
|
10
|
-
$fault: "client",
|
|
11
|
-
...opts,
|
|
12
|
-
});
|
|
13
|
-
Object.setPrototypeOf(this, WAFFeatureNotIncludedInPricingPlanException.prototype);
|
|
14
|
-
this.Message = opts.Message;
|
|
15
|
-
this.DisallowedFeatures = opts.DisallowedFeatures;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
exports.WAFInternalErrorException = class WAFInternalErrorException extends __BaseException {
|
|
19
|
-
name = "WAFInternalErrorException";
|
|
20
|
-
$fault = "server";
|
|
21
|
-
Message;
|
|
22
|
-
constructor(opts) {
|
|
23
|
-
super({
|
|
24
|
-
name: "WAFInternalErrorException",
|
|
25
|
-
$fault: "server",
|
|
26
|
-
...opts,
|
|
27
|
-
});
|
|
28
|
-
Object.setPrototypeOf(this, WAFInternalErrorException.prototype);
|
|
29
|
-
this.Message = opts.Message;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
exports.WAFInvalidOperationException = class WAFInvalidOperationException extends __BaseException {
|
|
33
|
-
name = "WAFInvalidOperationException";
|
|
34
|
-
$fault = "client";
|
|
35
|
-
Message;
|
|
36
|
-
constructor(opts) {
|
|
37
|
-
super({
|
|
38
|
-
name: "WAFInvalidOperationException",
|
|
39
|
-
$fault: "client",
|
|
40
|
-
...opts,
|
|
41
|
-
});
|
|
42
|
-
Object.setPrototypeOf(this, WAFInvalidOperationException.prototype);
|
|
43
|
-
this.Message = opts.Message;
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
exports.WAFInvalidParameterException = class WAFInvalidParameterException extends __BaseException {
|
|
47
|
-
name = "WAFInvalidParameterException";
|
|
48
|
-
$fault = "client";
|
|
49
|
-
Field;
|
|
50
|
-
Parameter;
|
|
51
|
-
Reason;
|
|
52
|
-
constructor(opts) {
|
|
53
|
-
super({
|
|
54
|
-
name: "WAFInvalidParameterException",
|
|
55
|
-
$fault: "client",
|
|
56
|
-
...opts,
|
|
57
|
-
});
|
|
58
|
-
Object.setPrototypeOf(this, WAFInvalidParameterException.prototype);
|
|
59
|
-
this.Field = opts.Field;
|
|
60
|
-
this.Parameter = opts.Parameter;
|
|
61
|
-
this.Reason = opts.Reason;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
exports.WAFLimitsExceededException = class WAFLimitsExceededException extends __BaseException {
|
|
65
|
-
name = "WAFLimitsExceededException";
|
|
66
|
-
$fault = "client";
|
|
67
|
-
Message;
|
|
68
|
-
SourceType;
|
|
69
|
-
constructor(opts) {
|
|
70
|
-
super({
|
|
71
|
-
name: "WAFLimitsExceededException",
|
|
72
|
-
$fault: "client",
|
|
73
|
-
...opts,
|
|
74
|
-
});
|
|
75
|
-
Object.setPrototypeOf(this, WAFLimitsExceededException.prototype);
|
|
76
|
-
this.Message = opts.Message;
|
|
77
|
-
this.SourceType = opts.SourceType;
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
exports.WAFNonexistentItemException = class WAFNonexistentItemException extends __BaseException {
|
|
81
|
-
name = "WAFNonexistentItemException";
|
|
82
|
-
$fault = "client";
|
|
83
|
-
Message;
|
|
84
|
-
constructor(opts) {
|
|
85
|
-
super({
|
|
86
|
-
name: "WAFNonexistentItemException",
|
|
87
|
-
$fault: "client",
|
|
88
|
-
...opts,
|
|
89
|
-
});
|
|
90
|
-
Object.setPrototypeOf(this, WAFNonexistentItemException.prototype);
|
|
91
|
-
this.Message = opts.Message;
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
exports.WAFUnavailableEntityException = class WAFUnavailableEntityException extends __BaseException {
|
|
95
|
-
name = "WAFUnavailableEntityException";
|
|
96
|
-
$fault = "client";
|
|
97
|
-
Message;
|
|
98
|
-
constructor(opts) {
|
|
99
|
-
super({
|
|
100
|
-
name: "WAFUnavailableEntityException",
|
|
101
|
-
$fault: "client",
|
|
102
|
-
...opts,
|
|
103
|
-
});
|
|
104
|
-
Object.setPrototypeOf(this, WAFUnavailableEntityException.prototype);
|
|
105
|
-
this.Message = opts.Message;
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
exports.WAFExpiredManagedRuleGroupVersionException = class WAFExpiredManagedRuleGroupVersionException extends __BaseException {
|
|
109
|
-
name = "WAFExpiredManagedRuleGroupVersionException";
|
|
110
|
-
$fault = "client";
|
|
111
|
-
Message;
|
|
112
|
-
constructor(opts) {
|
|
113
|
-
super({
|
|
114
|
-
name: "WAFExpiredManagedRuleGroupVersionException",
|
|
115
|
-
$fault: "client",
|
|
116
|
-
...opts,
|
|
117
|
-
});
|
|
118
|
-
Object.setPrototypeOf(this, WAFExpiredManagedRuleGroupVersionException.prototype);
|
|
119
|
-
this.Message = opts.Message;
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
exports.WAFInvalidResourceException = class WAFInvalidResourceException extends __BaseException {
|
|
123
|
-
name = "WAFInvalidResourceException";
|
|
124
|
-
$fault = "client";
|
|
125
|
-
Message;
|
|
126
|
-
constructor(opts) {
|
|
127
|
-
super({
|
|
128
|
-
name: "WAFInvalidResourceException",
|
|
129
|
-
$fault: "client",
|
|
130
|
-
...opts,
|
|
131
|
-
});
|
|
132
|
-
Object.setPrototypeOf(this, WAFInvalidResourceException.prototype);
|
|
133
|
-
this.Message = opts.Message;
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
exports.WAFSubscriptionNotFoundException = class WAFSubscriptionNotFoundException extends __BaseException {
|
|
137
|
-
name = "WAFSubscriptionNotFoundException";
|
|
138
|
-
$fault = "client";
|
|
139
|
-
Message;
|
|
140
|
-
constructor(opts) {
|
|
141
|
-
super({
|
|
142
|
-
name: "WAFSubscriptionNotFoundException",
|
|
143
|
-
$fault: "client",
|
|
144
|
-
...opts,
|
|
145
|
-
});
|
|
146
|
-
Object.setPrototypeOf(this, WAFSubscriptionNotFoundException.prototype);
|
|
147
|
-
this.Message = opts.Message;
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
exports.WAFDuplicateItemException = class WAFDuplicateItemException extends __BaseException {
|
|
151
|
-
name = "WAFDuplicateItemException";
|
|
152
|
-
$fault = "client";
|
|
153
|
-
Message;
|
|
154
|
-
constructor(opts) {
|
|
155
|
-
super({
|
|
156
|
-
name: "WAFDuplicateItemException",
|
|
157
|
-
$fault: "client",
|
|
158
|
-
...opts,
|
|
159
|
-
});
|
|
160
|
-
Object.setPrototypeOf(this, WAFDuplicateItemException.prototype);
|
|
161
|
-
this.Message = opts.Message;
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
exports.WAFOptimisticLockException = class WAFOptimisticLockException extends __BaseException {
|
|
165
|
-
name = "WAFOptimisticLockException";
|
|
166
|
-
$fault = "client";
|
|
167
|
-
Message;
|
|
168
|
-
constructor(opts) {
|
|
169
|
-
super({
|
|
170
|
-
name: "WAFOptimisticLockException",
|
|
171
|
-
$fault: "client",
|
|
172
|
-
...opts,
|
|
173
|
-
});
|
|
174
|
-
Object.setPrototypeOf(this, WAFOptimisticLockException.prototype);
|
|
175
|
-
this.Message = opts.Message;
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
exports.WAFTagOperationException = class WAFTagOperationException extends __BaseException {
|
|
179
|
-
name = "WAFTagOperationException";
|
|
180
|
-
$fault = "client";
|
|
181
|
-
Message;
|
|
182
|
-
constructor(opts) {
|
|
183
|
-
super({
|
|
184
|
-
name: "WAFTagOperationException",
|
|
185
|
-
$fault: "client",
|
|
186
|
-
...opts,
|
|
187
|
-
});
|
|
188
|
-
Object.setPrototypeOf(this, WAFTagOperationException.prototype);
|
|
189
|
-
this.Message = opts.Message;
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
exports.WAFTagOperationInternalErrorException = class WAFTagOperationInternalErrorException extends __BaseException {
|
|
193
|
-
name = "WAFTagOperationInternalErrorException";
|
|
194
|
-
$fault = "server";
|
|
195
|
-
Message;
|
|
196
|
-
constructor(opts) {
|
|
197
|
-
super({
|
|
198
|
-
name: "WAFTagOperationInternalErrorException",
|
|
199
|
-
$fault: "server",
|
|
200
|
-
...opts,
|
|
201
|
-
});
|
|
202
|
-
Object.setPrototypeOf(this, WAFTagOperationInternalErrorException.prototype);
|
|
203
|
-
this.Message = opts.Message;
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
exports.WAFConfigurationWarningException = class WAFConfigurationWarningException extends __BaseException {
|
|
207
|
-
name = "WAFConfigurationWarningException";
|
|
208
|
-
$fault = "client";
|
|
209
|
-
Message;
|
|
210
|
-
constructor(opts) {
|
|
211
|
-
super({
|
|
212
|
-
name: "WAFConfigurationWarningException",
|
|
213
|
-
$fault: "client",
|
|
214
|
-
...opts,
|
|
215
|
-
});
|
|
216
|
-
Object.setPrototypeOf(this, WAFConfigurationWarningException.prototype);
|
|
217
|
-
this.Message = opts.Message;
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
exports.WAFAssociatedItemException = class WAFAssociatedItemException extends __BaseException {
|
|
221
|
-
name = "WAFAssociatedItemException";
|
|
222
|
-
$fault = "client";
|
|
223
|
-
Message;
|
|
224
|
-
constructor(opts) {
|
|
225
|
-
super({
|
|
226
|
-
name: "WAFAssociatedItemException",
|
|
227
|
-
$fault: "client",
|
|
228
|
-
...opts,
|
|
229
|
-
});
|
|
230
|
-
Object.setPrototypeOf(this, WAFAssociatedItemException.prototype);
|
|
231
|
-
this.Message = opts.Message;
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
exports.WAFUnsupportedAggregateKeyTypeException = class WAFUnsupportedAggregateKeyTypeException extends __BaseException {
|
|
235
|
-
name = "WAFUnsupportedAggregateKeyTypeException";
|
|
236
|
-
$fault = "client";
|
|
237
|
-
Message;
|
|
238
|
-
constructor(opts) {
|
|
239
|
-
super({
|
|
240
|
-
name: "WAFUnsupportedAggregateKeyTypeException",
|
|
241
|
-
$fault: "client",
|
|
242
|
-
...opts,
|
|
243
|
-
});
|
|
244
|
-
Object.setPrototypeOf(this, WAFUnsupportedAggregateKeyTypeException.prototype);
|
|
245
|
-
this.Message = opts.Message;
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
exports.WAFLogDestinationPermissionIssueException = class WAFLogDestinationPermissionIssueException extends __BaseException {
|
|
249
|
-
name = "WAFLogDestinationPermissionIssueException";
|
|
250
|
-
$fault = "client";
|
|
251
|
-
Message;
|
|
252
|
-
constructor(opts) {
|
|
253
|
-
super({
|
|
254
|
-
name: "WAFLogDestinationPermissionIssueException",
|
|
255
|
-
$fault: "client",
|
|
256
|
-
...opts,
|
|
257
|
-
});
|
|
258
|
-
Object.setPrototypeOf(this, WAFLogDestinationPermissionIssueException.prototype);
|
|
259
|
-
this.Message = opts.Message;
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
exports.WAFServiceLinkedRoleErrorException = class WAFServiceLinkedRoleErrorException extends __BaseException {
|
|
263
|
-
name = "WAFServiceLinkedRoleErrorException";
|
|
264
|
-
$fault = "client";
|
|
265
|
-
constructor(opts) {
|
|
266
|
-
super({
|
|
267
|
-
name: "WAFServiceLinkedRoleErrorException",
|
|
268
|
-
$fault: "client",
|
|
269
|
-
...opts,
|
|
270
|
-
});
|
|
271
|
-
Object.setPrototypeOf(this, WAFServiceLinkedRoleErrorException.prototype);
|
|
272
|
-
}
|
|
273
|
-
};
|
|
274
|
-
exports.WAFInvalidPermissionPolicyException = class WAFInvalidPermissionPolicyException extends __BaseException {
|
|
275
|
-
name = "WAFInvalidPermissionPolicyException";
|
|
276
|
-
$fault = "client";
|
|
277
|
-
Message;
|
|
278
|
-
constructor(opts) {
|
|
279
|
-
super({
|
|
280
|
-
name: "WAFInvalidPermissionPolicyException",
|
|
281
|
-
$fault: "client",
|
|
282
|
-
...opts,
|
|
283
|
-
});
|
|
284
|
-
Object.setPrototypeOf(this, WAFInvalidPermissionPolicyException.prototype);
|
|
285
|
-
this.Message = opts.Message;
|
|
286
|
-
}
|
|
287
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
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 { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
10
|
-
const getRuntimeConfig = (config) => {
|
|
11
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
12
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
13
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
14
|
-
return {
|
|
15
|
-
...clientSharedValues,
|
|
16
|
-
...config,
|
|
17
|
-
runtime: "browser",
|
|
18
|
-
defaultsMode,
|
|
19
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
20
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
21
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
22
|
-
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
23
|
-
region: config?.region ?? invalidProvider("Region is missing"),
|
|
24
|
-
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
25
|
-
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
26
|
-
sha256: config?.sha256 ?? Sha256,
|
|
27
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
28
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
29
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,45 +0,0 @@
|
|
|
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 { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
|
|
10
|
-
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
11
|
-
const getRuntimeConfig = (config) => {
|
|
12
|
-
emitWarningIfUnsupportedVersion(process.version);
|
|
13
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
-
awsCheckVersion(process.version);
|
|
17
|
-
const loaderConfig = {
|
|
18
|
-
profile: config?.profile,
|
|
19
|
-
logger: clientSharedValues.logger,
|
|
20
|
-
};
|
|
21
|
-
return {
|
|
22
|
-
...clientSharedValues,
|
|
23
|
-
...config,
|
|
24
|
-
runtime: "node",
|
|
25
|
-
defaultsMode,
|
|
26
|
-
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
27
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
28
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
29
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
30
|
-
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
31
|
-
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
32
|
-
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
33
|
-
retryMode: config?.retryMode ??
|
|
34
|
-
loadNodeConfig({
|
|
35
|
-
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
36
|
-
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
37
|
-
}, config),
|
|
38
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
39
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
40
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
41
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
42
|
-
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const { Sha256 } = require("@aws-crypto/sha256-js");
|
|
2
|
-
const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
|
|
3
|
-
const getRuntimeConfig = (config) => {
|
|
4
|
-
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
-
return {
|
|
6
|
-
...browserDefaults,
|
|
7
|
-
...config,
|
|
8
|
-
runtime: "react-native",
|
|
9
|
-
sha256: config?.sha256 ?? Sha256,
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const { AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
-
const { AwsJson1_1Protocol } = 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 { defaultWAFV2HttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
|
|
7
|
-
const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
|
|
8
|
-
const { errorTypeRegistries } = require("./schemas/schemas_0");
|
|
9
|
-
exports.getRuntimeConfig = (config) => {
|
|
10
|
-
return {
|
|
11
|
-
apiVersion: "2019-07-29",
|
|
12
|
-
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
13
|
-
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
14
|
-
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
15
|
-
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
16
|
-
extensions: config?.extensions ?? [],
|
|
17
|
-
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultWAFV2HttpAuthSchemeProvider,
|
|
18
|
-
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
19
|
-
{
|
|
20
|
-
schemeId: "aws.auth#sigv4",
|
|
21
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
22
|
-
signer: new AwsSdkSigV4Signer(),
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
logger: config?.logger ?? new NoOpLogger(),
|
|
26
|
-
protocol: config?.protocol ?? AwsJson1_1Protocol,
|
|
27
|
-
protocolSettings: config?.protocolSettings ?? {
|
|
28
|
-
defaultNamespace: "com.amazonaws.wafv2",
|
|
29
|
-
errorTypeRegistries,
|
|
30
|
-
xmlNamespace: "http://waf.amazonaws.com/doc/2019-07-29/",
|
|
31
|
-
version: "2019-07-29",
|
|
32
|
-
serviceTarget: "AWSWAF_20190729",
|
|
33
|
-
},
|
|
34
|
-
serviceId: config?.serviceId ?? "WAFV2",
|
|
35
|
-
urlParser: config?.urlParser ?? parseUrl,
|
|
36
|
-
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
37
|
-
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
38
|
-
};
|
|
39
|
-
};
|