@aws-sdk/client-workspaces-instances 3.835.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 +309 -0
- package/dist-cjs/WorkspacesInstances.js +37 -0
- package/dist-cjs/WorkspacesInstancesClient.js +52 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/commands/AssociateVolumeCommand.js +26 -0
- package/dist-cjs/commands/CreateVolumeCommand.js +27 -0
- package/dist-cjs/commands/CreateWorkspaceInstanceCommand.js +27 -0
- package/dist-cjs/commands/DeleteVolumeCommand.js +26 -0
- package/dist-cjs/commands/DeleteWorkspaceInstanceCommand.js +26 -0
- package/dist-cjs/commands/DisassociateVolumeCommand.js +26 -0
- package/dist-cjs/commands/GetWorkspaceInstanceCommand.js +26 -0
- package/dist-cjs/commands/ListInstanceTypesCommand.js +27 -0
- package/dist-cjs/commands/ListRegionsCommand.js +27 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +26 -0
- package/dist-cjs/commands/ListWorkspaceInstancesCommand.js +27 -0
- package/dist-cjs/commands/TagResourceCommand.js +26 -0
- package/dist-cjs/commands/UntagResourceCommand.js +26 -0
- package/dist-cjs/commands/index.js +16 -0
- package/dist-cjs/endpoint/EndpointParameters.js +15 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/WorkspacesInstancesServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +329 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListInstanceTypesPaginator.js +7 -0
- package/dist-cjs/pagination/ListRegionsPaginator.js +7 -0
- package/dist-cjs/pagination/ListWorkspaceInstancesPaginator.js +7 -0
- package/dist-cjs/pagination/index.js +7 -0
- package/dist-cjs/protocols/Aws_json1_0.js +486 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +56 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +34 -0
- package/dist-cjs/runtimeExtensions.js +13 -0
- package/dist-es/WorkspacesInstances.js +33 -0
- package/dist-es/WorkspacesInstancesClient.js +48 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/commands/AssociateVolumeCommand.js +22 -0
- package/dist-es/commands/CreateVolumeCommand.js +23 -0
- package/dist-es/commands/CreateWorkspaceInstanceCommand.js +23 -0
- package/dist-es/commands/DeleteVolumeCommand.js +22 -0
- package/dist-es/commands/DeleteWorkspaceInstanceCommand.js +22 -0
- package/dist-es/commands/DisassociateVolumeCommand.js +22 -0
- package/dist-es/commands/GetWorkspaceInstanceCommand.js +22 -0
- package/dist-es/commands/ListInstanceTypesCommand.js +23 -0
- package/dist-es/commands/ListRegionsCommand.js +23 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +22 -0
- package/dist-es/commands/ListWorkspaceInstancesCommand.js +23 -0
- package/dist-es/commands/TagResourceCommand.js +22 -0
- package/dist-es/commands/UntagResourceCommand.js +22 -0
- package/dist-es/commands/index.js +13 -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 +6 -0
- package/dist-es/models/WorkspacesInstancesServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +305 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListInstanceTypesPaginator.js +4 -0
- package/dist-es/pagination/ListRegionsPaginator.js +4 -0
- package/dist-es/pagination/ListWorkspaceInstancesPaginator.js +4 -0
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/protocols/Aws_json1_0.js +457 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +51 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +30 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-types/WorkspacesInstances.d.ts +104 -0
- package/dist-types/WorkspacesInstancesClient.d.ts +200 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commands/AssociateVolumeCommand.d.ts +90 -0
- package/dist-types/commands/CreateVolumeCommand.d.ts +109 -0
- package/dist-types/commands/CreateWorkspaceInstanceCommand.d.ts +273 -0
- package/dist-types/commands/DeleteVolumeCommand.d.ts +88 -0
- package/dist-types/commands/DeleteWorkspaceInstanceCommand.d.ts +88 -0
- package/dist-types/commands/DisassociateVolumeCommand.d.ts +91 -0
- package/dist-types/commands/GetWorkspaceInstanceCommand.d.ts +104 -0
- package/dist-types/commands/ListInstanceTypesCommand.d.ts +90 -0
- package/dist-types/commands/ListRegionsCommand.d.ts +90 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +92 -0
- package/dist-types/commands/ListWorkspaceInstancesCommand.d.ts +97 -0
- package/dist-types/commands/TagResourceCommand.d.ts +91 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +88 -0
- package/dist-types/commands/index.d.ts +13 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +32 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +14 -0
- package/dist-types/models/WorkspacesInstancesServiceException.d.ts +14 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +1787 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListInstanceTypesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListRegionsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListWorkspaceInstancesPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/protocols/Aws_json1_0.d.ts +119 -0
- package/dist-types/runtimeConfig.browser.d.ts +50 -0
- package/dist-types/runtimeConfig.d.ts +50 -0
- package/dist-types/runtimeConfig.native.d.ts +49 -0
- package/dist-types/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/WorkspacesInstances.d.ts +231 -0
- package/dist-types/ts3.4/WorkspacesInstancesClient.d.ts +200 -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/AssociateVolumeCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/CreateVolumeCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/CreateWorkspaceInstanceCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DeleteVolumeCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/DeleteWorkspaceInstanceCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DisassociateVolumeCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetWorkspaceInstanceCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListInstanceTypesCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListRegionsCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListWorkspaceInstancesCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/index.d.ts +13 -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 +9 -0
- package/dist-types/ts3.4/models/WorkspacesInstancesServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +558 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListInstanceTypesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListRegionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListWorkspaceInstancesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +161 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +91 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +97 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +23 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
- package/package.json +101 -0
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListWorkspaceInstancesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListRegionsCommand = exports.de_ListInstanceTypesCommand = exports.de_GetWorkspaceInstanceCommand = exports.de_DisassociateVolumeCommand = exports.de_DeleteWorkspaceInstanceCommand = exports.de_DeleteVolumeCommand = exports.de_CreateWorkspaceInstanceCommand = exports.de_CreateVolumeCommand = exports.de_AssociateVolumeCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListWorkspaceInstancesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListRegionsCommand = exports.se_ListInstanceTypesCommand = exports.se_GetWorkspaceInstanceCommand = exports.se_DisassociateVolumeCommand = exports.se_DeleteWorkspaceInstanceCommand = exports.se_DeleteVolumeCommand = exports.se_CreateWorkspaceInstanceCommand = exports.se_CreateVolumeCommand = exports.se_AssociateVolumeCommand = void 0;
|
|
4
|
+
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
const uuid_1 = require("uuid");
|
|
8
|
+
const models_0_1 = require("../models/models_0");
|
|
9
|
+
const WorkspacesInstancesServiceException_1 = require("../models/WorkspacesInstancesServiceException");
|
|
10
|
+
const se_AssociateVolumeCommand = async (input, context) => {
|
|
11
|
+
const headers = sharedHeaders("AssociateVolume");
|
|
12
|
+
let body;
|
|
13
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
14
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
15
|
+
};
|
|
16
|
+
exports.se_AssociateVolumeCommand = se_AssociateVolumeCommand;
|
|
17
|
+
const se_CreateVolumeCommand = async (input, context) => {
|
|
18
|
+
const headers = sharedHeaders("CreateVolume");
|
|
19
|
+
let body;
|
|
20
|
+
body = JSON.stringify(se_CreateVolumeRequest(input, context));
|
|
21
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
+
};
|
|
23
|
+
exports.se_CreateVolumeCommand = se_CreateVolumeCommand;
|
|
24
|
+
const se_CreateWorkspaceInstanceCommand = async (input, context) => {
|
|
25
|
+
const headers = sharedHeaders("CreateWorkspaceInstance");
|
|
26
|
+
let body;
|
|
27
|
+
body = JSON.stringify(se_CreateWorkspaceInstanceRequest(input, context));
|
|
28
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
29
|
+
};
|
|
30
|
+
exports.se_CreateWorkspaceInstanceCommand = se_CreateWorkspaceInstanceCommand;
|
|
31
|
+
const se_DeleteVolumeCommand = async (input, context) => {
|
|
32
|
+
const headers = sharedHeaders("DeleteVolume");
|
|
33
|
+
let body;
|
|
34
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
35
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
|
+
};
|
|
37
|
+
exports.se_DeleteVolumeCommand = se_DeleteVolumeCommand;
|
|
38
|
+
const se_DeleteWorkspaceInstanceCommand = async (input, context) => {
|
|
39
|
+
const headers = sharedHeaders("DeleteWorkspaceInstance");
|
|
40
|
+
let body;
|
|
41
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
42
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
43
|
+
};
|
|
44
|
+
exports.se_DeleteWorkspaceInstanceCommand = se_DeleteWorkspaceInstanceCommand;
|
|
45
|
+
const se_DisassociateVolumeCommand = async (input, context) => {
|
|
46
|
+
const headers = sharedHeaders("DisassociateVolume");
|
|
47
|
+
let body;
|
|
48
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
49
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
50
|
+
};
|
|
51
|
+
exports.se_DisassociateVolumeCommand = se_DisassociateVolumeCommand;
|
|
52
|
+
const se_GetWorkspaceInstanceCommand = async (input, context) => {
|
|
53
|
+
const headers = sharedHeaders("GetWorkspaceInstance");
|
|
54
|
+
let body;
|
|
55
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
56
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
57
|
+
};
|
|
58
|
+
exports.se_GetWorkspaceInstanceCommand = se_GetWorkspaceInstanceCommand;
|
|
59
|
+
const se_ListInstanceTypesCommand = async (input, context) => {
|
|
60
|
+
const headers = sharedHeaders("ListInstanceTypes");
|
|
61
|
+
let body;
|
|
62
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
63
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
64
|
+
};
|
|
65
|
+
exports.se_ListInstanceTypesCommand = se_ListInstanceTypesCommand;
|
|
66
|
+
const se_ListRegionsCommand = async (input, context) => {
|
|
67
|
+
const headers = sharedHeaders("ListRegions");
|
|
68
|
+
let body;
|
|
69
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
70
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
71
|
+
};
|
|
72
|
+
exports.se_ListRegionsCommand = se_ListRegionsCommand;
|
|
73
|
+
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
74
|
+
const headers = sharedHeaders("ListTagsForResource");
|
|
75
|
+
let body;
|
|
76
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
77
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
78
|
+
};
|
|
79
|
+
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
80
|
+
const se_ListWorkspaceInstancesCommand = async (input, context) => {
|
|
81
|
+
const headers = sharedHeaders("ListWorkspaceInstances");
|
|
82
|
+
let body;
|
|
83
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
84
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
85
|
+
};
|
|
86
|
+
exports.se_ListWorkspaceInstancesCommand = se_ListWorkspaceInstancesCommand;
|
|
87
|
+
const se_TagResourceCommand = async (input, context) => {
|
|
88
|
+
const headers = sharedHeaders("TagResource");
|
|
89
|
+
let body;
|
|
90
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
91
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
92
|
+
};
|
|
93
|
+
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
94
|
+
const se_UntagResourceCommand = async (input, context) => {
|
|
95
|
+
const headers = sharedHeaders("UntagResource");
|
|
96
|
+
let body;
|
|
97
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
98
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
99
|
+
};
|
|
100
|
+
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
101
|
+
const de_AssociateVolumeCommand = async (output, context) => {
|
|
102
|
+
if (output.statusCode >= 300) {
|
|
103
|
+
return de_CommandError(output, context);
|
|
104
|
+
}
|
|
105
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
106
|
+
let contents = {};
|
|
107
|
+
contents = (0, smithy_client_1._json)(data);
|
|
108
|
+
const response = {
|
|
109
|
+
$metadata: deserializeMetadata(output),
|
|
110
|
+
...contents,
|
|
111
|
+
};
|
|
112
|
+
return response;
|
|
113
|
+
};
|
|
114
|
+
exports.de_AssociateVolumeCommand = de_AssociateVolumeCommand;
|
|
115
|
+
const de_CreateVolumeCommand = async (output, context) => {
|
|
116
|
+
if (output.statusCode >= 300) {
|
|
117
|
+
return de_CommandError(output, context);
|
|
118
|
+
}
|
|
119
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
120
|
+
let contents = {};
|
|
121
|
+
contents = (0, smithy_client_1._json)(data);
|
|
122
|
+
const response = {
|
|
123
|
+
$metadata: deserializeMetadata(output),
|
|
124
|
+
...contents,
|
|
125
|
+
};
|
|
126
|
+
return response;
|
|
127
|
+
};
|
|
128
|
+
exports.de_CreateVolumeCommand = de_CreateVolumeCommand;
|
|
129
|
+
const de_CreateWorkspaceInstanceCommand = async (output, context) => {
|
|
130
|
+
if (output.statusCode >= 300) {
|
|
131
|
+
return de_CommandError(output, context);
|
|
132
|
+
}
|
|
133
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
134
|
+
let contents = {};
|
|
135
|
+
contents = (0, smithy_client_1._json)(data);
|
|
136
|
+
const response = {
|
|
137
|
+
$metadata: deserializeMetadata(output),
|
|
138
|
+
...contents,
|
|
139
|
+
};
|
|
140
|
+
return response;
|
|
141
|
+
};
|
|
142
|
+
exports.de_CreateWorkspaceInstanceCommand = de_CreateWorkspaceInstanceCommand;
|
|
143
|
+
const de_DeleteVolumeCommand = async (output, context) => {
|
|
144
|
+
if (output.statusCode >= 300) {
|
|
145
|
+
return de_CommandError(output, context);
|
|
146
|
+
}
|
|
147
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
148
|
+
let contents = {};
|
|
149
|
+
contents = (0, smithy_client_1._json)(data);
|
|
150
|
+
const response = {
|
|
151
|
+
$metadata: deserializeMetadata(output),
|
|
152
|
+
...contents,
|
|
153
|
+
};
|
|
154
|
+
return response;
|
|
155
|
+
};
|
|
156
|
+
exports.de_DeleteVolumeCommand = de_DeleteVolumeCommand;
|
|
157
|
+
const de_DeleteWorkspaceInstanceCommand = async (output, context) => {
|
|
158
|
+
if (output.statusCode >= 300) {
|
|
159
|
+
return de_CommandError(output, context);
|
|
160
|
+
}
|
|
161
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
162
|
+
let contents = {};
|
|
163
|
+
contents = (0, smithy_client_1._json)(data);
|
|
164
|
+
const response = {
|
|
165
|
+
$metadata: deserializeMetadata(output),
|
|
166
|
+
...contents,
|
|
167
|
+
};
|
|
168
|
+
return response;
|
|
169
|
+
};
|
|
170
|
+
exports.de_DeleteWorkspaceInstanceCommand = de_DeleteWorkspaceInstanceCommand;
|
|
171
|
+
const de_DisassociateVolumeCommand = async (output, context) => {
|
|
172
|
+
if (output.statusCode >= 300) {
|
|
173
|
+
return de_CommandError(output, context);
|
|
174
|
+
}
|
|
175
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
176
|
+
let contents = {};
|
|
177
|
+
contents = (0, smithy_client_1._json)(data);
|
|
178
|
+
const response = {
|
|
179
|
+
$metadata: deserializeMetadata(output),
|
|
180
|
+
...contents,
|
|
181
|
+
};
|
|
182
|
+
return response;
|
|
183
|
+
};
|
|
184
|
+
exports.de_DisassociateVolumeCommand = de_DisassociateVolumeCommand;
|
|
185
|
+
const de_GetWorkspaceInstanceCommand = async (output, context) => {
|
|
186
|
+
if (output.statusCode >= 300) {
|
|
187
|
+
return de_CommandError(output, context);
|
|
188
|
+
}
|
|
189
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
190
|
+
let contents = {};
|
|
191
|
+
contents = (0, smithy_client_1._json)(data);
|
|
192
|
+
const response = {
|
|
193
|
+
$metadata: deserializeMetadata(output),
|
|
194
|
+
...contents,
|
|
195
|
+
};
|
|
196
|
+
return response;
|
|
197
|
+
};
|
|
198
|
+
exports.de_GetWorkspaceInstanceCommand = de_GetWorkspaceInstanceCommand;
|
|
199
|
+
const de_ListInstanceTypesCommand = async (output, context) => {
|
|
200
|
+
if (output.statusCode >= 300) {
|
|
201
|
+
return de_CommandError(output, context);
|
|
202
|
+
}
|
|
203
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
204
|
+
let contents = {};
|
|
205
|
+
contents = (0, smithy_client_1._json)(data);
|
|
206
|
+
const response = {
|
|
207
|
+
$metadata: deserializeMetadata(output),
|
|
208
|
+
...contents,
|
|
209
|
+
};
|
|
210
|
+
return response;
|
|
211
|
+
};
|
|
212
|
+
exports.de_ListInstanceTypesCommand = de_ListInstanceTypesCommand;
|
|
213
|
+
const de_ListRegionsCommand = async (output, context) => {
|
|
214
|
+
if (output.statusCode >= 300) {
|
|
215
|
+
return de_CommandError(output, context);
|
|
216
|
+
}
|
|
217
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
218
|
+
let contents = {};
|
|
219
|
+
contents = (0, smithy_client_1._json)(data);
|
|
220
|
+
const response = {
|
|
221
|
+
$metadata: deserializeMetadata(output),
|
|
222
|
+
...contents,
|
|
223
|
+
};
|
|
224
|
+
return response;
|
|
225
|
+
};
|
|
226
|
+
exports.de_ListRegionsCommand = de_ListRegionsCommand;
|
|
227
|
+
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
228
|
+
if (output.statusCode >= 300) {
|
|
229
|
+
return de_CommandError(output, context);
|
|
230
|
+
}
|
|
231
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
232
|
+
let contents = {};
|
|
233
|
+
contents = (0, smithy_client_1._json)(data);
|
|
234
|
+
const response = {
|
|
235
|
+
$metadata: deserializeMetadata(output),
|
|
236
|
+
...contents,
|
|
237
|
+
};
|
|
238
|
+
return response;
|
|
239
|
+
};
|
|
240
|
+
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
241
|
+
const de_ListWorkspaceInstancesCommand = async (output, context) => {
|
|
242
|
+
if (output.statusCode >= 300) {
|
|
243
|
+
return de_CommandError(output, context);
|
|
244
|
+
}
|
|
245
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
246
|
+
let contents = {};
|
|
247
|
+
contents = (0, smithy_client_1._json)(data);
|
|
248
|
+
const response = {
|
|
249
|
+
$metadata: deserializeMetadata(output),
|
|
250
|
+
...contents,
|
|
251
|
+
};
|
|
252
|
+
return response;
|
|
253
|
+
};
|
|
254
|
+
exports.de_ListWorkspaceInstancesCommand = de_ListWorkspaceInstancesCommand;
|
|
255
|
+
const de_TagResourceCommand = async (output, context) => {
|
|
256
|
+
if (output.statusCode >= 300) {
|
|
257
|
+
return de_CommandError(output, context);
|
|
258
|
+
}
|
|
259
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
260
|
+
let contents = {};
|
|
261
|
+
contents = (0, smithy_client_1._json)(data);
|
|
262
|
+
const response = {
|
|
263
|
+
$metadata: deserializeMetadata(output),
|
|
264
|
+
...contents,
|
|
265
|
+
};
|
|
266
|
+
return response;
|
|
267
|
+
};
|
|
268
|
+
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
269
|
+
const de_UntagResourceCommand = async (output, context) => {
|
|
270
|
+
if (output.statusCode >= 300) {
|
|
271
|
+
return de_CommandError(output, context);
|
|
272
|
+
}
|
|
273
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
274
|
+
let contents = {};
|
|
275
|
+
contents = (0, smithy_client_1._json)(data);
|
|
276
|
+
const response = {
|
|
277
|
+
$metadata: deserializeMetadata(output),
|
|
278
|
+
...contents,
|
|
279
|
+
};
|
|
280
|
+
return response;
|
|
281
|
+
};
|
|
282
|
+
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
283
|
+
const de_CommandError = async (output, context) => {
|
|
284
|
+
const parsedOutput = {
|
|
285
|
+
...output,
|
|
286
|
+
body: await (0, core_1.parseJsonErrorBody)(output.body, context),
|
|
287
|
+
};
|
|
288
|
+
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
289
|
+
switch (errorCode) {
|
|
290
|
+
case "AccessDeniedException":
|
|
291
|
+
case "com.amazonaws.workspacesinstances#AccessDeniedException":
|
|
292
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
293
|
+
case "ConflictException":
|
|
294
|
+
case "com.amazonaws.workspacesinstances#ConflictException":
|
|
295
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
296
|
+
case "InternalServerException":
|
|
297
|
+
case "com.amazonaws.workspacesinstances#InternalServerException":
|
|
298
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
299
|
+
case "ResourceNotFoundException":
|
|
300
|
+
case "com.amazonaws.workspacesinstances#ResourceNotFoundException":
|
|
301
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
302
|
+
case "ThrottlingException":
|
|
303
|
+
case "com.amazonaws.workspacesinstances#ThrottlingException":
|
|
304
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
305
|
+
case "ValidationException":
|
|
306
|
+
case "com.amazonaws.workspacesinstances#ValidationException":
|
|
307
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
308
|
+
case "ServiceQuotaExceededException":
|
|
309
|
+
case "com.amazonaws.workspacesinstances#ServiceQuotaExceededException":
|
|
310
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
311
|
+
default:
|
|
312
|
+
const parsedBody = parsedOutput.body;
|
|
313
|
+
return throwDefaultError({
|
|
314
|
+
output,
|
|
315
|
+
parsedBody,
|
|
316
|
+
errorCode,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
321
|
+
const body = parsedOutput.body;
|
|
322
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
323
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
324
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
325
|
+
...deserialized,
|
|
326
|
+
});
|
|
327
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
328
|
+
};
|
|
329
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
330
|
+
const body = parsedOutput.body;
|
|
331
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
332
|
+
const exception = new models_0_1.ConflictException({
|
|
333
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
334
|
+
...deserialized,
|
|
335
|
+
});
|
|
336
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
337
|
+
};
|
|
338
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
339
|
+
const body = parsedOutput.body;
|
|
340
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
341
|
+
const exception = new models_0_1.InternalServerException({
|
|
342
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
343
|
+
...deserialized,
|
|
344
|
+
});
|
|
345
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
346
|
+
};
|
|
347
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
348
|
+
const body = parsedOutput.body;
|
|
349
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
350
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
351
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
352
|
+
...deserialized,
|
|
353
|
+
});
|
|
354
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
355
|
+
};
|
|
356
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
357
|
+
const body = parsedOutput.body;
|
|
358
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
359
|
+
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
360
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
361
|
+
...deserialized,
|
|
362
|
+
});
|
|
363
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
364
|
+
};
|
|
365
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
366
|
+
const body = parsedOutput.body;
|
|
367
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
368
|
+
const exception = new models_0_1.ThrottlingException({
|
|
369
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
370
|
+
...deserialized,
|
|
371
|
+
});
|
|
372
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
373
|
+
};
|
|
374
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
375
|
+
const body = parsedOutput.body;
|
|
376
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
377
|
+
const exception = new models_0_1.ValidationException({
|
|
378
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
379
|
+
...deserialized,
|
|
380
|
+
});
|
|
381
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
382
|
+
};
|
|
383
|
+
const se_CreateVolumeRequest = (input, context) => {
|
|
384
|
+
return (0, smithy_client_1.take)(input, {
|
|
385
|
+
AvailabilityZone: [],
|
|
386
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
387
|
+
Encrypted: [],
|
|
388
|
+
Iops: [],
|
|
389
|
+
KmsKeyId: [],
|
|
390
|
+
SizeInGB: [],
|
|
391
|
+
SnapshotId: [],
|
|
392
|
+
TagSpecifications: smithy_client_1._json,
|
|
393
|
+
Throughput: [],
|
|
394
|
+
VolumeType: [],
|
|
395
|
+
});
|
|
396
|
+
};
|
|
397
|
+
const se_CreateWorkspaceInstanceRequest = (input, context) => {
|
|
398
|
+
return (0, smithy_client_1.take)(input, {
|
|
399
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
400
|
+
ManagedInstance: (_) => se_ManagedInstanceRequest(_, context),
|
|
401
|
+
Tags: smithy_client_1._json,
|
|
402
|
+
});
|
|
403
|
+
};
|
|
404
|
+
const se_InstanceMarketOptionsRequest = (input, context) => {
|
|
405
|
+
return (0, smithy_client_1.take)(input, {
|
|
406
|
+
MarketType: [],
|
|
407
|
+
SpotOptions: (_) => se_SpotMarketOptions(_, context),
|
|
408
|
+
});
|
|
409
|
+
};
|
|
410
|
+
const se_ManagedInstanceRequest = (input, context) => {
|
|
411
|
+
return (0, smithy_client_1.take)(input, {
|
|
412
|
+
BlockDeviceMappings: smithy_client_1._json,
|
|
413
|
+
CapacityReservationSpecification: smithy_client_1._json,
|
|
414
|
+
CpuOptions: smithy_client_1._json,
|
|
415
|
+
CreditSpecification: smithy_client_1._json,
|
|
416
|
+
DisableApiStop: [],
|
|
417
|
+
EbsOptimized: [],
|
|
418
|
+
EnablePrimaryIpv6: [],
|
|
419
|
+
EnclaveOptions: smithy_client_1._json,
|
|
420
|
+
HibernationOptions: smithy_client_1._json,
|
|
421
|
+
IamInstanceProfile: smithy_client_1._json,
|
|
422
|
+
ImageId: [],
|
|
423
|
+
InstanceMarketOptions: (_) => se_InstanceMarketOptionsRequest(_, context),
|
|
424
|
+
InstanceType: [],
|
|
425
|
+
Ipv6AddressCount: [],
|
|
426
|
+
Ipv6Addresses: smithy_client_1._json,
|
|
427
|
+
KernelId: [],
|
|
428
|
+
KeyName: [],
|
|
429
|
+
LicenseSpecifications: smithy_client_1._json,
|
|
430
|
+
MaintenanceOptions: smithy_client_1._json,
|
|
431
|
+
MetadataOptions: smithy_client_1._json,
|
|
432
|
+
Monitoring: smithy_client_1._json,
|
|
433
|
+
NetworkInterfaces: smithy_client_1._json,
|
|
434
|
+
NetworkPerformanceOptions: smithy_client_1._json,
|
|
435
|
+
Placement: smithy_client_1._json,
|
|
436
|
+
PrivateDnsNameOptions: smithy_client_1._json,
|
|
437
|
+
PrivateIpAddress: [],
|
|
438
|
+
RamdiskId: [],
|
|
439
|
+
SecurityGroupIds: smithy_client_1._json,
|
|
440
|
+
SecurityGroups: smithy_client_1._json,
|
|
441
|
+
SubnetId: [],
|
|
442
|
+
TagSpecifications: smithy_client_1._json,
|
|
443
|
+
UserData: [],
|
|
444
|
+
});
|
|
445
|
+
};
|
|
446
|
+
const se_SpotMarketOptions = (input, context) => {
|
|
447
|
+
return (0, smithy_client_1.take)(input, {
|
|
448
|
+
BlockDurationMinutes: [],
|
|
449
|
+
InstanceInterruptionBehavior: [],
|
|
450
|
+
MaxPrice: [],
|
|
451
|
+
SpotInstanceType: [],
|
|
452
|
+
ValidUntilUtc: (_) => _.getTime() / 1_000,
|
|
453
|
+
});
|
|
454
|
+
};
|
|
455
|
+
const deserializeMetadata = (output) => ({
|
|
456
|
+
httpStatusCode: output.statusCode,
|
|
457
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
458
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
459
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
460
|
+
});
|
|
461
|
+
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
462
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(WorkspacesInstancesServiceException_1.WorkspacesInstancesServiceException);
|
|
463
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
464
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
465
|
+
const contents = {
|
|
466
|
+
protocol,
|
|
467
|
+
hostname,
|
|
468
|
+
port,
|
|
469
|
+
method: "POST",
|
|
470
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
471
|
+
headers,
|
|
472
|
+
};
|
|
473
|
+
if (resolvedHostname !== undefined) {
|
|
474
|
+
contents.hostname = resolvedHostname;
|
|
475
|
+
}
|
|
476
|
+
if (body !== undefined) {
|
|
477
|
+
contents.body = body;
|
|
478
|
+
}
|
|
479
|
+
return new protocol_http_1.HttpRequest(contents);
|
|
480
|
+
};
|
|
481
|
+
function sharedHeaders(operation) {
|
|
482
|
+
return {
|
|
483
|
+
"content-type": "application/x-amz-json-1.0",
|
|
484
|
+
"x-amz-target": `EUCMIFrontendAPIService.${operation}`,
|
|
485
|
+
};
|
|
486
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 util_body_length_browser_1 = require("@smithy/util-body-length-browser");
|
|
12
|
+
const util_retry_1 = require("@smithy/util-retry");
|
|
13
|
+
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
14
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
15
|
+
const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
|
|
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 ??
|
|
28
|
+
(0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
29
|
+
maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
30
|
+
region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
|
|
31
|
+
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
32
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
|
|
33
|
+
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
34
|
+
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
|
35
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
36
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 core_1 = require("@aws-sdk/core");
|
|
7
|
+
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
|
8
|
+
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
9
|
+
const config_resolver_1 = require("@smithy/config-resolver");
|
|
10
|
+
const hash_node_1 = require("@smithy/hash-node");
|
|
11
|
+
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
12
|
+
const node_config_provider_1 = require("@smithy/node-config-provider");
|
|
13
|
+
const node_http_handler_1 = require("@smithy/node-http-handler");
|
|
14
|
+
const util_body_length_node_1 = require("@smithy/util-body-length-node");
|
|
15
|
+
const util_retry_1 = require("@smithy/util-retry");
|
|
16
|
+
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
17
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
18
|
+
const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
|
|
19
|
+
const smithy_client_2 = require("@smithy/smithy-client");
|
|
20
|
+
const getRuntimeConfig = (config) => {
|
|
21
|
+
(0, smithy_client_2.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, core_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)(core_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 ??
|
|
39
|
+
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
40
|
+
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
41
|
+
region: config?.region ??
|
|
42
|
+
(0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
43
|
+
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
44
|
+
retryMode: config?.retryMode ??
|
|
45
|
+
(0, node_config_provider_1.loadConfig)({
|
|
46
|
+
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
47
|
+
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
|
|
48
|
+
}, config),
|
|
49
|
+
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
|
50
|
+
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
51
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
52
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
53
|
+
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
|
5
|
+
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
|
6
|
+
const getRuntimeConfig = (config) => {
|
|
7
|
+
const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
|
|
8
|
+
return {
|
|
9
|
+
...browserDefaults,
|
|
10
|
+
...config,
|
|
11
|
+
runtime: "react-native",
|
|
12
|
+
sha256: config?.sha256 ?? sha256_js_1.Sha256,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
+
const url_parser_1 = require("@smithy/url-parser");
|
|
7
|
+
const util_base64_1 = require("@smithy/util-base64");
|
|
8
|
+
const util_utf8_1 = require("@smithy/util-utf8");
|
|
9
|
+
const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
|
|
10
|
+
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
|
11
|
+
const getRuntimeConfig = (config) => {
|
|
12
|
+
return {
|
|
13
|
+
apiVersion: "2022-07-26",
|
|
14
|
+
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
|
|
15
|
+
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
|
|
16
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
17
|
+
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
|
18
|
+
extensions: config?.extensions ?? [],
|
|
19
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultWorkspacesInstancesHttpAuthSchemeProvider,
|
|
20
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
21
|
+
{
|
|
22
|
+
schemeId: "aws.auth#sigv4",
|
|
23
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
24
|
+
signer: new core_1.AwsSdkSigV4Signer(),
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
28
|
+
serviceId: config?.serviceId ?? "Workspaces Instances",
|
|
29
|
+
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
30
|
+
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
|
31
|
+
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveRuntimeExtensions = void 0;
|
|
4
|
+
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
|
|
5
|
+
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
const httpAuthExtensionConfiguration_1 = require("./auth/httpAuthExtensionConfiguration");
|
|
8
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
9
|
+
const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));
|
|
10
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
11
|
+
return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));
|
|
12
|
+
};
|
|
13
|
+
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|