@aws-sdk/client-s3files 3.1026.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/LICENSE +201 -0
- package/README.md +328 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/index.js +477 -0
- package/dist-cjs/models/S3FilesServiceException.js +12 -0
- package/dist-cjs/models/errors.js +98 -0
- package/dist-cjs/runtimeConfig.browser.js +38 -0
- package/dist-cjs/runtimeConfig.js +54 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +44 -0
- package/dist-cjs/schemas/schemas_0.js +507 -0
- package/dist-es/S3Files.js +59 -0
- package/dist-es/S3FilesClient.js +50 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
- package/dist-es/commands/CreateAccessPointCommand.js +16 -0
- package/dist-es/commands/CreateFileSystemCommand.js +16 -0
- package/dist-es/commands/CreateMountTargetCommand.js +16 -0
- package/dist-es/commands/DeleteAccessPointCommand.js +16 -0
- package/dist-es/commands/DeleteFileSystemCommand.js +16 -0
- package/dist-es/commands/DeleteFileSystemPolicyCommand.js +16 -0
- package/dist-es/commands/DeleteMountTargetCommand.js +16 -0
- package/dist-es/commands/GetAccessPointCommand.js +16 -0
- package/dist-es/commands/GetFileSystemCommand.js +16 -0
- package/dist-es/commands/GetFileSystemPolicyCommand.js +16 -0
- package/dist-es/commands/GetMountTargetCommand.js +16 -0
- package/dist-es/commands/GetSynchronizationConfigurationCommand.js +16 -0
- package/dist-es/commands/ListAccessPointsCommand.js +16 -0
- package/dist-es/commands/ListFileSystemsCommand.js +16 -0
- package/dist-es/commands/ListMountTargetsCommand.js +16 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +16 -0
- package/dist-es/commands/PutFileSystemPolicyCommand.js +16 -0
- package/dist-es/commands/PutSynchronizationConfigurationCommand.js +16 -0
- package/dist-es/commands/TagResourceCommand.js +16 -0
- package/dist-es/commands/UntagResourceCommand.js +16 -0
- package/dist-es/commands/UpdateMountTargetCommand.js +16 -0
- package/dist-es/commands/index.js +21 -0
- package/dist-es/endpoint/EndpointParameters.js +11 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +9 -0
- package/dist-es/models/S3FilesServiceException.js +8 -0
- package/dist-es/models/enums.js +17 -0
- package/dist-es/models/errors.js +89 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListAccessPointsPaginator.js +4 -0
- package/dist-es/pagination/ListFileSystemsPaginator.js +4 -0
- package/dist-es/pagination/ListMountTargetsPaginator.js +4 -0
- package/dist-es/pagination/ListTagsForResourcePaginator.js +4 -0
- package/dist-es/pagination/index.js +5 -0
- package/dist-es/runtimeConfig.browser.js +33 -0
- package/dist-es/runtimeConfig.js +49 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +40 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-es/schemas/schemas_0.js +503 -0
- package/dist-types/S3Files.d.ts +187 -0
- package/dist-types/S3FilesClient.d.ts +208 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commands/CreateAccessPointCommand.d.ts +141 -0
- package/dist-types/commands/CreateFileSystemCommand.d.ts +120 -0
- package/dist-types/commands/CreateMountTargetCommand.d.ts +112 -0
- package/dist-types/commands/DeleteAccessPointCommand.d.ts +87 -0
- package/dist-types/commands/DeleteFileSystemCommand.d.ts +88 -0
- package/dist-types/commands/DeleteFileSystemPolicyCommand.d.ts +84 -0
- package/dist-types/commands/DeleteMountTargetCommand.d.ts +87 -0
- package/dist-types/commands/GetAccessPointCommand.d.ts +113 -0
- package/dist-types/commands/GetFileSystemCommand.d.ts +103 -0
- package/dist-types/commands/GetFileSystemPolicyCommand.d.ts +87 -0
- package/dist-types/commands/GetMountTargetCommand.d.ts +99 -0
- package/dist-types/commands/GetSynchronizationConfigurationCommand.d.ts +98 -0
- package/dist-types/commands/ListAccessPointsCommand.d.ts +113 -0
- package/dist-types/commands/ListFileSystemsCommand.d.ts +98 -0
- package/dist-types/commands/ListMountTargetsCommand.d.ts +104 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +94 -0
- package/dist-types/commands/PutFileSystemPolicyCommand.d.ts +85 -0
- package/dist-types/commands/PutSynchronizationConfigurationCommand.d.ts +100 -0
- package/dist-types/commands/TagResourceCommand.d.ts +90 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +87 -0
- package/dist-types/commands/UpdateMountTargetCommand.d.ts +102 -0
- package/dist-types/commands/index.d.ts +21 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +44 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +17 -0
- package/dist-types/models/S3FilesServiceException.d.ts +14 -0
- package/dist-types/models/enums.d.ts +41 -0
- package/dist-types/models/errors.d.ts +114 -0
- package/dist-types/models/models_0.d.ts +1185 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListAccessPointsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListFileSystemsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListMountTargetsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListTagsForResourcePaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +5 -0
- package/dist-types/runtimeConfig.browser.d.ts +55 -0
- package/dist-types/runtimeConfig.d.ts +55 -0
- package/dist-types/runtimeConfig.native.d.ts +54 -0
- package/dist-types/runtimeConfig.shared.d.ts +27 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/schemas/schemas_0.d.ts +81 -0
- package/dist-types/ts3.4/S3Files.d.ts +396 -0
- package/dist-types/ts3.4/S3FilesClient.d.ts +244 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
- package/dist-types/ts3.4/commands/CreateAccessPointCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/CreateFileSystemCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/CreateMountTargetCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DeleteAccessPointCommand.d.ts +46 -0
- package/dist-types/ts3.4/commands/DeleteFileSystemCommand.d.ts +45 -0
- package/dist-types/ts3.4/commands/DeleteFileSystemPolicyCommand.d.ts +46 -0
- package/dist-types/ts3.4/commands/DeleteMountTargetCommand.d.ts +46 -0
- package/dist-types/ts3.4/commands/GetAccessPointCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/GetFileSystemCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/GetFileSystemPolicyCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetMountTargetCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/GetSynchronizationConfigurationCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListAccessPointsCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/ListFileSystemsCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/ListMountTargetsCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/PutFileSystemPolicyCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/PutSynchronizationConfigurationCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +45 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +45 -0
- package/dist-types/ts3.4/commands/UpdateMountTargetCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +21 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +45 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/index.d.ts +12 -0
- package/dist-types/ts3.4/models/S3FilesServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/enums.d.ts +21 -0
- package/dist-types/ts3.4/models/errors.d.ts +50 -0
- package/dist-types/ts3.4/models/models_0.d.ts +279 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListAccessPointsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListFileSystemsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListMountTargetsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListTagsForResourcePaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +5 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +100 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +95 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +104 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +30 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +80 -0
- package/package.json +100 -0
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
|
|
4
|
+
var middlewareLogger = require('@aws-sdk/middleware-logger');
|
|
5
|
+
var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
|
|
6
|
+
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
7
|
+
var configResolver = require('@smithy/config-resolver');
|
|
8
|
+
var core = require('@smithy/core');
|
|
9
|
+
var schema = require('@smithy/core/schema');
|
|
10
|
+
var middlewareContentLength = require('@smithy/middleware-content-length');
|
|
11
|
+
var middlewareEndpoint = require('@smithy/middleware-endpoint');
|
|
12
|
+
var middlewareRetry = require('@smithy/middleware-retry');
|
|
13
|
+
var smithyClient = require('@smithy/smithy-client');
|
|
14
|
+
var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
15
|
+
var runtimeConfig = require('./runtimeConfig');
|
|
16
|
+
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
17
|
+
var protocolHttp = require('@smithy/protocol-http');
|
|
18
|
+
var schemas_0 = require('./schemas/schemas_0');
|
|
19
|
+
var errors = require('./models/errors');
|
|
20
|
+
var S3FilesServiceException = require('./models/S3FilesServiceException');
|
|
21
|
+
|
|
22
|
+
const resolveClientEndpointParameters = (options) => {
|
|
23
|
+
return Object.assign(options, {
|
|
24
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
25
|
+
defaultSigningName: "s3files",
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
const commonParams = {
|
|
29
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
30
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
31
|
+
Region: { type: "builtInParams", name: "region" },
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
35
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
36
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
37
|
+
let _credentials = runtimeConfig.credentials;
|
|
38
|
+
return {
|
|
39
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
40
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
41
|
+
if (index === -1) {
|
|
42
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
httpAuthSchemes() {
|
|
49
|
+
return _httpAuthSchemes;
|
|
50
|
+
},
|
|
51
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
52
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
53
|
+
},
|
|
54
|
+
httpAuthSchemeProvider() {
|
|
55
|
+
return _httpAuthSchemeProvider;
|
|
56
|
+
},
|
|
57
|
+
setCredentials(credentials) {
|
|
58
|
+
_credentials = credentials;
|
|
59
|
+
},
|
|
60
|
+
credentials() {
|
|
61
|
+
return _credentials;
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
66
|
+
return {
|
|
67
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
68
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
69
|
+
credentials: config.credentials(),
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
74
|
+
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
75
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
76
|
+
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
class S3FilesClient extends smithyClient.Client {
|
|
80
|
+
config;
|
|
81
|
+
constructor(...[configuration]) {
|
|
82
|
+
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
|
|
83
|
+
super(_config_0);
|
|
84
|
+
this.initConfig = _config_0;
|
|
85
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
86
|
+
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
|
|
87
|
+
const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
|
|
88
|
+
const _config_4 = configResolver.resolveRegionConfig(_config_3);
|
|
89
|
+
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
|
|
90
|
+
const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
|
|
91
|
+
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
92
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
93
|
+
this.config = _config_8;
|
|
94
|
+
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
|
95
|
+
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
96
|
+
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
97
|
+
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
98
|
+
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
|
|
99
|
+
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
|
|
100
|
+
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
|
|
101
|
+
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
102
|
+
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultS3FilesHttpAuthSchemeParametersProvider,
|
|
103
|
+
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
|
|
104
|
+
"aws.auth#sigv4": config.credentials,
|
|
105
|
+
}),
|
|
106
|
+
}));
|
|
107
|
+
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
|
|
108
|
+
}
|
|
109
|
+
destroy() {
|
|
110
|
+
super.destroy();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
class CreateAccessPointCommand extends smithyClient.Command
|
|
115
|
+
.classBuilder()
|
|
116
|
+
.ep(commonParams)
|
|
117
|
+
.m(function (Command, cs, config, o) {
|
|
118
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
119
|
+
})
|
|
120
|
+
.s("S3Files", "CreateAccessPoint", {})
|
|
121
|
+
.n("S3FilesClient", "CreateAccessPointCommand")
|
|
122
|
+
.sc(schemas_0.CreateAccessPoint$)
|
|
123
|
+
.build() {
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
class CreateFileSystemCommand extends smithyClient.Command
|
|
127
|
+
.classBuilder()
|
|
128
|
+
.ep(commonParams)
|
|
129
|
+
.m(function (Command, cs, config, o) {
|
|
130
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
131
|
+
})
|
|
132
|
+
.s("S3Files", "CreateFileSystem", {})
|
|
133
|
+
.n("S3FilesClient", "CreateFileSystemCommand")
|
|
134
|
+
.sc(schemas_0.CreateFileSystem$)
|
|
135
|
+
.build() {
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
class CreateMountTargetCommand extends smithyClient.Command
|
|
139
|
+
.classBuilder()
|
|
140
|
+
.ep(commonParams)
|
|
141
|
+
.m(function (Command, cs, config, o) {
|
|
142
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
143
|
+
})
|
|
144
|
+
.s("S3Files", "CreateMountTarget", {})
|
|
145
|
+
.n("S3FilesClient", "CreateMountTargetCommand")
|
|
146
|
+
.sc(schemas_0.CreateMountTarget$)
|
|
147
|
+
.build() {
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
class DeleteAccessPointCommand extends smithyClient.Command
|
|
151
|
+
.classBuilder()
|
|
152
|
+
.ep(commonParams)
|
|
153
|
+
.m(function (Command, cs, config, o) {
|
|
154
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
155
|
+
})
|
|
156
|
+
.s("S3Files", "DeleteAccessPoint", {})
|
|
157
|
+
.n("S3FilesClient", "DeleteAccessPointCommand")
|
|
158
|
+
.sc(schemas_0.DeleteAccessPoint$)
|
|
159
|
+
.build() {
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
class DeleteFileSystemCommand extends smithyClient.Command
|
|
163
|
+
.classBuilder()
|
|
164
|
+
.ep(commonParams)
|
|
165
|
+
.m(function (Command, cs, config, o) {
|
|
166
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
167
|
+
})
|
|
168
|
+
.s("S3Files", "DeleteFileSystem", {})
|
|
169
|
+
.n("S3FilesClient", "DeleteFileSystemCommand")
|
|
170
|
+
.sc(schemas_0.DeleteFileSystem$)
|
|
171
|
+
.build() {
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
class DeleteFileSystemPolicyCommand extends smithyClient.Command
|
|
175
|
+
.classBuilder()
|
|
176
|
+
.ep(commonParams)
|
|
177
|
+
.m(function (Command, cs, config, o) {
|
|
178
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
179
|
+
})
|
|
180
|
+
.s("S3Files", "DeleteFileSystemPolicy", {})
|
|
181
|
+
.n("S3FilesClient", "DeleteFileSystemPolicyCommand")
|
|
182
|
+
.sc(schemas_0.DeleteFileSystemPolicy$)
|
|
183
|
+
.build() {
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
class DeleteMountTargetCommand extends smithyClient.Command
|
|
187
|
+
.classBuilder()
|
|
188
|
+
.ep(commonParams)
|
|
189
|
+
.m(function (Command, cs, config, o) {
|
|
190
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
191
|
+
})
|
|
192
|
+
.s("S3Files", "DeleteMountTarget", {})
|
|
193
|
+
.n("S3FilesClient", "DeleteMountTargetCommand")
|
|
194
|
+
.sc(schemas_0.DeleteMountTarget$)
|
|
195
|
+
.build() {
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
class GetAccessPointCommand extends smithyClient.Command
|
|
199
|
+
.classBuilder()
|
|
200
|
+
.ep(commonParams)
|
|
201
|
+
.m(function (Command, cs, config, o) {
|
|
202
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
203
|
+
})
|
|
204
|
+
.s("S3Files", "GetAccessPoint", {})
|
|
205
|
+
.n("S3FilesClient", "GetAccessPointCommand")
|
|
206
|
+
.sc(schemas_0.GetAccessPoint$)
|
|
207
|
+
.build() {
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
class GetFileSystemCommand extends smithyClient.Command
|
|
211
|
+
.classBuilder()
|
|
212
|
+
.ep(commonParams)
|
|
213
|
+
.m(function (Command, cs, config, o) {
|
|
214
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
215
|
+
})
|
|
216
|
+
.s("S3Files", "GetFileSystem", {})
|
|
217
|
+
.n("S3FilesClient", "GetFileSystemCommand")
|
|
218
|
+
.sc(schemas_0.GetFileSystem$)
|
|
219
|
+
.build() {
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
class GetFileSystemPolicyCommand extends smithyClient.Command
|
|
223
|
+
.classBuilder()
|
|
224
|
+
.ep(commonParams)
|
|
225
|
+
.m(function (Command, cs, config, o) {
|
|
226
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
227
|
+
})
|
|
228
|
+
.s("S3Files", "GetFileSystemPolicy", {})
|
|
229
|
+
.n("S3FilesClient", "GetFileSystemPolicyCommand")
|
|
230
|
+
.sc(schemas_0.GetFileSystemPolicy$)
|
|
231
|
+
.build() {
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
class GetMountTargetCommand extends smithyClient.Command
|
|
235
|
+
.classBuilder()
|
|
236
|
+
.ep(commonParams)
|
|
237
|
+
.m(function (Command, cs, config, o) {
|
|
238
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
239
|
+
})
|
|
240
|
+
.s("S3Files", "GetMountTarget", {})
|
|
241
|
+
.n("S3FilesClient", "GetMountTargetCommand")
|
|
242
|
+
.sc(schemas_0.GetMountTarget$)
|
|
243
|
+
.build() {
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
class GetSynchronizationConfigurationCommand extends smithyClient.Command
|
|
247
|
+
.classBuilder()
|
|
248
|
+
.ep(commonParams)
|
|
249
|
+
.m(function (Command, cs, config, o) {
|
|
250
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
251
|
+
})
|
|
252
|
+
.s("S3Files", "GetSynchronizationConfiguration", {})
|
|
253
|
+
.n("S3FilesClient", "GetSynchronizationConfigurationCommand")
|
|
254
|
+
.sc(schemas_0.GetSynchronizationConfiguration$)
|
|
255
|
+
.build() {
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
class ListAccessPointsCommand extends smithyClient.Command
|
|
259
|
+
.classBuilder()
|
|
260
|
+
.ep(commonParams)
|
|
261
|
+
.m(function (Command, cs, config, o) {
|
|
262
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
263
|
+
})
|
|
264
|
+
.s("S3Files", "ListAccessPoints", {})
|
|
265
|
+
.n("S3FilesClient", "ListAccessPointsCommand")
|
|
266
|
+
.sc(schemas_0.ListAccessPoints$)
|
|
267
|
+
.build() {
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
class ListFileSystemsCommand extends smithyClient.Command
|
|
271
|
+
.classBuilder()
|
|
272
|
+
.ep(commonParams)
|
|
273
|
+
.m(function (Command, cs, config, o) {
|
|
274
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
275
|
+
})
|
|
276
|
+
.s("S3Files", "ListFileSystems", {})
|
|
277
|
+
.n("S3FilesClient", "ListFileSystemsCommand")
|
|
278
|
+
.sc(schemas_0.ListFileSystems$)
|
|
279
|
+
.build() {
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
class ListMountTargetsCommand extends smithyClient.Command
|
|
283
|
+
.classBuilder()
|
|
284
|
+
.ep(commonParams)
|
|
285
|
+
.m(function (Command, cs, config, o) {
|
|
286
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
287
|
+
})
|
|
288
|
+
.s("S3Files", "ListMountTargets", {})
|
|
289
|
+
.n("S3FilesClient", "ListMountTargetsCommand")
|
|
290
|
+
.sc(schemas_0.ListMountTargets$)
|
|
291
|
+
.build() {
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
class ListTagsForResourceCommand extends smithyClient.Command
|
|
295
|
+
.classBuilder()
|
|
296
|
+
.ep(commonParams)
|
|
297
|
+
.m(function (Command, cs, config, o) {
|
|
298
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
299
|
+
})
|
|
300
|
+
.s("S3Files", "ListTagsForResource", {})
|
|
301
|
+
.n("S3FilesClient", "ListTagsForResourceCommand")
|
|
302
|
+
.sc(schemas_0.ListTagsForResource$)
|
|
303
|
+
.build() {
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
class PutFileSystemPolicyCommand extends smithyClient.Command
|
|
307
|
+
.classBuilder()
|
|
308
|
+
.ep(commonParams)
|
|
309
|
+
.m(function (Command, cs, config, o) {
|
|
310
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
311
|
+
})
|
|
312
|
+
.s("S3Files", "PutFileSystemPolicy", {})
|
|
313
|
+
.n("S3FilesClient", "PutFileSystemPolicyCommand")
|
|
314
|
+
.sc(schemas_0.PutFileSystemPolicy$)
|
|
315
|
+
.build() {
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
class PutSynchronizationConfigurationCommand extends smithyClient.Command
|
|
319
|
+
.classBuilder()
|
|
320
|
+
.ep(commonParams)
|
|
321
|
+
.m(function (Command, cs, config, o) {
|
|
322
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
323
|
+
})
|
|
324
|
+
.s("S3Files", "PutSynchronizationConfiguration", {})
|
|
325
|
+
.n("S3FilesClient", "PutSynchronizationConfigurationCommand")
|
|
326
|
+
.sc(schemas_0.PutSynchronizationConfiguration$)
|
|
327
|
+
.build() {
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
class TagResourceCommand extends smithyClient.Command
|
|
331
|
+
.classBuilder()
|
|
332
|
+
.ep(commonParams)
|
|
333
|
+
.m(function (Command, cs, config, o) {
|
|
334
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
335
|
+
})
|
|
336
|
+
.s("S3Files", "TagResource", {})
|
|
337
|
+
.n("S3FilesClient", "TagResourceCommand")
|
|
338
|
+
.sc(schemas_0.TagResource$)
|
|
339
|
+
.build() {
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
class UntagResourceCommand extends smithyClient.Command
|
|
343
|
+
.classBuilder()
|
|
344
|
+
.ep(commonParams)
|
|
345
|
+
.m(function (Command, cs, config, o) {
|
|
346
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
347
|
+
})
|
|
348
|
+
.s("S3Files", "UntagResource", {})
|
|
349
|
+
.n("S3FilesClient", "UntagResourceCommand")
|
|
350
|
+
.sc(schemas_0.UntagResource$)
|
|
351
|
+
.build() {
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
class UpdateMountTargetCommand extends smithyClient.Command
|
|
355
|
+
.classBuilder()
|
|
356
|
+
.ep(commonParams)
|
|
357
|
+
.m(function (Command, cs, config, o) {
|
|
358
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
359
|
+
})
|
|
360
|
+
.s("S3Files", "UpdateMountTarget", {})
|
|
361
|
+
.n("S3FilesClient", "UpdateMountTargetCommand")
|
|
362
|
+
.sc(schemas_0.UpdateMountTarget$)
|
|
363
|
+
.build() {
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
const paginateListAccessPoints = core.createPaginator(S3FilesClient, ListAccessPointsCommand, "nextToken", "nextToken", "maxResults");
|
|
367
|
+
|
|
368
|
+
const paginateListFileSystems = core.createPaginator(S3FilesClient, ListFileSystemsCommand, "nextToken", "nextToken", "maxResults");
|
|
369
|
+
|
|
370
|
+
const paginateListMountTargets = core.createPaginator(S3FilesClient, ListMountTargetsCommand, "nextToken", "nextToken", "maxResults");
|
|
371
|
+
|
|
372
|
+
const paginateListTagsForResource = core.createPaginator(S3FilesClient, ListTagsForResourceCommand, "nextToken", "nextToken", "maxResults");
|
|
373
|
+
|
|
374
|
+
const commands = {
|
|
375
|
+
CreateAccessPointCommand,
|
|
376
|
+
CreateFileSystemCommand,
|
|
377
|
+
CreateMountTargetCommand,
|
|
378
|
+
DeleteAccessPointCommand,
|
|
379
|
+
DeleteFileSystemCommand,
|
|
380
|
+
DeleteFileSystemPolicyCommand,
|
|
381
|
+
DeleteMountTargetCommand,
|
|
382
|
+
GetAccessPointCommand,
|
|
383
|
+
GetFileSystemCommand,
|
|
384
|
+
GetFileSystemPolicyCommand,
|
|
385
|
+
GetMountTargetCommand,
|
|
386
|
+
GetSynchronizationConfigurationCommand,
|
|
387
|
+
ListAccessPointsCommand,
|
|
388
|
+
ListFileSystemsCommand,
|
|
389
|
+
ListMountTargetsCommand,
|
|
390
|
+
ListTagsForResourceCommand,
|
|
391
|
+
PutFileSystemPolicyCommand,
|
|
392
|
+
PutSynchronizationConfigurationCommand,
|
|
393
|
+
TagResourceCommand,
|
|
394
|
+
UntagResourceCommand,
|
|
395
|
+
UpdateMountTargetCommand,
|
|
396
|
+
};
|
|
397
|
+
const paginators = {
|
|
398
|
+
paginateListAccessPoints,
|
|
399
|
+
paginateListFileSystems,
|
|
400
|
+
paginateListMountTargets,
|
|
401
|
+
paginateListTagsForResource,
|
|
402
|
+
};
|
|
403
|
+
class S3Files extends S3FilesClient {
|
|
404
|
+
}
|
|
405
|
+
smithyClient.createAggregatedClient(commands, S3Files, { paginators });
|
|
406
|
+
|
|
407
|
+
const LifeCycleState = {
|
|
408
|
+
available: "available",
|
|
409
|
+
creating: "creating",
|
|
410
|
+
deleted: "deleted",
|
|
411
|
+
deleting: "deleting",
|
|
412
|
+
error: "error",
|
|
413
|
+
updating: "updating",
|
|
414
|
+
};
|
|
415
|
+
const IpAddressType = {
|
|
416
|
+
DUAL_STACK: "DUAL_STACK",
|
|
417
|
+
IPV4_ONLY: "IPV4_ONLY",
|
|
418
|
+
IPV6_ONLY: "IPV6_ONLY",
|
|
419
|
+
};
|
|
420
|
+
const ImportTrigger = {
|
|
421
|
+
ON_DIRECTORY_FIRST_ACCESS: "ON_DIRECTORY_FIRST_ACCESS",
|
|
422
|
+
ON_FILE_ACCESS: "ON_FILE_ACCESS",
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
exports.$Command = smithyClient.Command;
|
|
426
|
+
exports.__Client = smithyClient.Client;
|
|
427
|
+
exports.S3FilesServiceException = S3FilesServiceException.S3FilesServiceException;
|
|
428
|
+
exports.CreateAccessPointCommand = CreateAccessPointCommand;
|
|
429
|
+
exports.CreateFileSystemCommand = CreateFileSystemCommand;
|
|
430
|
+
exports.CreateMountTargetCommand = CreateMountTargetCommand;
|
|
431
|
+
exports.DeleteAccessPointCommand = DeleteAccessPointCommand;
|
|
432
|
+
exports.DeleteFileSystemCommand = DeleteFileSystemCommand;
|
|
433
|
+
exports.DeleteFileSystemPolicyCommand = DeleteFileSystemPolicyCommand;
|
|
434
|
+
exports.DeleteMountTargetCommand = DeleteMountTargetCommand;
|
|
435
|
+
exports.GetAccessPointCommand = GetAccessPointCommand;
|
|
436
|
+
exports.GetFileSystemCommand = GetFileSystemCommand;
|
|
437
|
+
exports.GetFileSystemPolicyCommand = GetFileSystemPolicyCommand;
|
|
438
|
+
exports.GetMountTargetCommand = GetMountTargetCommand;
|
|
439
|
+
exports.GetSynchronizationConfigurationCommand = GetSynchronizationConfigurationCommand;
|
|
440
|
+
exports.ImportTrigger = ImportTrigger;
|
|
441
|
+
exports.IpAddressType = IpAddressType;
|
|
442
|
+
exports.LifeCycleState = LifeCycleState;
|
|
443
|
+
exports.ListAccessPointsCommand = ListAccessPointsCommand;
|
|
444
|
+
exports.ListFileSystemsCommand = ListFileSystemsCommand;
|
|
445
|
+
exports.ListMountTargetsCommand = ListMountTargetsCommand;
|
|
446
|
+
exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
|
|
447
|
+
exports.PutFileSystemPolicyCommand = PutFileSystemPolicyCommand;
|
|
448
|
+
exports.PutSynchronizationConfigurationCommand = PutSynchronizationConfigurationCommand;
|
|
449
|
+
exports.S3Files = S3Files;
|
|
450
|
+
exports.S3FilesClient = S3FilesClient;
|
|
451
|
+
exports.TagResourceCommand = TagResourceCommand;
|
|
452
|
+
exports.UntagResourceCommand = UntagResourceCommand;
|
|
453
|
+
exports.UpdateMountTargetCommand = UpdateMountTargetCommand;
|
|
454
|
+
exports.paginateListAccessPoints = paginateListAccessPoints;
|
|
455
|
+
exports.paginateListFileSystems = paginateListFileSystems;
|
|
456
|
+
exports.paginateListMountTargets = paginateListMountTargets;
|
|
457
|
+
exports.paginateListTagsForResource = paginateListTagsForResource;
|
|
458
|
+
Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
|
|
459
|
+
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
460
|
+
Object.defineProperty(exports, '__proto__', {
|
|
461
|
+
enumerable: true,
|
|
462
|
+
value: schemas_0['__proto__']
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
Object.keys(schemas_0).forEach(function (k) {
|
|
466
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
|
|
467
|
+
});
|
|
468
|
+
Object.prototype.hasOwnProperty.call(errors, '__proto__') &&
|
|
469
|
+
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
470
|
+
Object.defineProperty(exports, '__proto__', {
|
|
471
|
+
enumerable: true,
|
|
472
|
+
value: errors['__proto__']
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
Object.keys(errors).forEach(function (k) {
|
|
476
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
|
|
477
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.S3FilesServiceException = exports.__ServiceException = void 0;
|
|
4
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
+
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
|
6
|
+
class S3FilesServiceException extends smithy_client_1.ServiceException {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
super(options);
|
|
9
|
+
Object.setPrototypeOf(this, S3FilesServiceException.prototype);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.S3FilesServiceException = S3FilesServiceException;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidationException = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InternalServerException = exports.ConflictException = void 0;
|
|
4
|
+
const S3FilesServiceException_1 = require("./S3FilesServiceException");
|
|
5
|
+
class ConflictException extends S3FilesServiceException_1.S3FilesServiceException {
|
|
6
|
+
name = "ConflictException";
|
|
7
|
+
$fault = "client";
|
|
8
|
+
errorCode;
|
|
9
|
+
resourceId;
|
|
10
|
+
resourceType;
|
|
11
|
+
constructor(opts) {
|
|
12
|
+
super({
|
|
13
|
+
name: "ConflictException",
|
|
14
|
+
$fault: "client",
|
|
15
|
+
...opts,
|
|
16
|
+
});
|
|
17
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
18
|
+
this.errorCode = opts.errorCode;
|
|
19
|
+
this.resourceId = opts.resourceId;
|
|
20
|
+
this.resourceType = opts.resourceType;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ConflictException = ConflictException;
|
|
24
|
+
class InternalServerException extends S3FilesServiceException_1.S3FilesServiceException {
|
|
25
|
+
name = "InternalServerException";
|
|
26
|
+
$fault = "server";
|
|
27
|
+
errorCode;
|
|
28
|
+
constructor(opts) {
|
|
29
|
+
super({
|
|
30
|
+
name: "InternalServerException",
|
|
31
|
+
$fault: "server",
|
|
32
|
+
...opts,
|
|
33
|
+
});
|
|
34
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
35
|
+
this.errorCode = opts.errorCode;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.InternalServerException = InternalServerException;
|
|
39
|
+
class ResourceNotFoundException extends S3FilesServiceException_1.S3FilesServiceException {
|
|
40
|
+
name = "ResourceNotFoundException";
|
|
41
|
+
$fault = "client";
|
|
42
|
+
errorCode;
|
|
43
|
+
constructor(opts) {
|
|
44
|
+
super({
|
|
45
|
+
name: "ResourceNotFoundException",
|
|
46
|
+
$fault: "client",
|
|
47
|
+
...opts,
|
|
48
|
+
});
|
|
49
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
50
|
+
this.errorCode = opts.errorCode;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
54
|
+
class ServiceQuotaExceededException extends S3FilesServiceException_1.S3FilesServiceException {
|
|
55
|
+
name = "ServiceQuotaExceededException";
|
|
56
|
+
$fault = "client";
|
|
57
|
+
errorCode;
|
|
58
|
+
constructor(opts) {
|
|
59
|
+
super({
|
|
60
|
+
name: "ServiceQuotaExceededException",
|
|
61
|
+
$fault: "client",
|
|
62
|
+
...opts,
|
|
63
|
+
});
|
|
64
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
65
|
+
this.errorCode = opts.errorCode;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
|
|
69
|
+
class ThrottlingException extends S3FilesServiceException_1.S3FilesServiceException {
|
|
70
|
+
name = "ThrottlingException";
|
|
71
|
+
$fault = "client";
|
|
72
|
+
errorCode;
|
|
73
|
+
constructor(opts) {
|
|
74
|
+
super({
|
|
75
|
+
name: "ThrottlingException",
|
|
76
|
+
$fault: "client",
|
|
77
|
+
...opts,
|
|
78
|
+
});
|
|
79
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
80
|
+
this.errorCode = opts.errorCode;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.ThrottlingException = ThrottlingException;
|
|
84
|
+
class ValidationException extends S3FilesServiceException_1.S3FilesServiceException {
|
|
85
|
+
name = "ValidationException";
|
|
86
|
+
$fault = "client";
|
|
87
|
+
errorCode;
|
|
88
|
+
constructor(opts) {
|
|
89
|
+
super({
|
|
90
|
+
name: "ValidationException",
|
|
91
|
+
$fault: "client",
|
|
92
|
+
...opts,
|
|
93
|
+
});
|
|
94
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
95
|
+
this.errorCode = opts.errorCode;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.ValidationException = ValidationException;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
|
+
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
|
7
|
+
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
|
8
|
+
const config_resolver_1 = require("@smithy/config-resolver");
|
|
9
|
+
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
10
|
+
const invalid_dependency_1 = require("@smithy/invalid-dependency");
|
|
11
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
12
|
+
const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
|
|
13
|
+
const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
|
|
14
|
+
const util_retry_1 = require("@smithy/util-retry");
|
|
15
|
+
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
16
|
+
const getRuntimeConfig = (config) => {
|
|
17
|
+
const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
|
|
18
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
19
|
+
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
20
|
+
return {
|
|
21
|
+
...clientSharedValues,
|
|
22
|
+
...config,
|
|
23
|
+
runtime: "browser",
|
|
24
|
+
defaultsMode,
|
|
25
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
|
|
26
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
27
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
28
|
+
maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
29
|
+
region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
|
|
30
|
+
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
31
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
|
|
32
|
+
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
33
|
+
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
|
34
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
35
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
|
+
const client_1 = require("@aws-sdk/core/client");
|
|
7
|
+
const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
|
|
8
|
+
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
|
9
|
+
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
10
|
+
const config_resolver_1 = require("@smithy/config-resolver");
|
|
11
|
+
const hash_node_1 = require("@smithy/hash-node");
|
|
12
|
+
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
13
|
+
const node_config_provider_1 = require("@smithy/node-config-provider");
|
|
14
|
+
const node_http_handler_1 = require("@smithy/node-http-handler");
|
|
15
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
16
|
+
const util_body_length_node_1 = require("@smithy/util-body-length-node");
|
|
17
|
+
const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
|
|
18
|
+
const util_retry_1 = require("@smithy/util-retry");
|
|
19
|
+
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
20
|
+
const getRuntimeConfig = (config) => {
|
|
21
|
+
(0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
|
|
22
|
+
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
|
23
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
24
|
+
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
25
|
+
(0, client_1.emitWarningIfUnsupportedVersion)(process.version);
|
|
26
|
+
const loaderConfig = {
|
|
27
|
+
profile: config?.profile,
|
|
28
|
+
logger: clientSharedValues.logger,
|
|
29
|
+
};
|
|
30
|
+
return {
|
|
31
|
+
...clientSharedValues,
|
|
32
|
+
...config,
|
|
33
|
+
runtime: "node",
|
|
34
|
+
defaultsMode,
|
|
35
|
+
authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
36
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
|
37
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
|
|
38
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
39
|
+
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
40
|
+
region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
41
|
+
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
42
|
+
retryMode: config?.retryMode ??
|
|
43
|
+
(0, node_config_provider_1.loadConfig)({
|
|
44
|
+
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
45
|
+
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
|
|
46
|
+
}, config),
|
|
47
|
+
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
|
48
|
+
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
49
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
50
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
51
|
+
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|