@aws-sdk/client-license-manager-linux-subscriptions 3.236.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 +212 -0
- package/dist-cjs/LicenseManagerLinuxSubscriptions.js +67 -0
- package/dist-cjs/LicenseManagerLinuxSubscriptionsClient.js +40 -0
- package/dist-cjs/commands/GetServiceSettingsCommand.js +46 -0
- package/dist-cjs/commands/ListLinuxSubscriptionInstancesCommand.js +46 -0
- package/dist-cjs/commands/ListLinuxSubscriptionsCommand.js +46 -0
- package/dist-cjs/commands/UpdateServiceSettingsCommand.js +46 -0
- package/dist-cjs/commands/index.js +7 -0
- package/dist-cjs/endpoint/EndpointParameters.js +12 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/LicenseManagerLinuxSubscriptionsServiceException.js +11 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +114 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListLinuxSubscriptionInstancesPaginator.js +36 -0
- package/dist-cjs/pagination/ListLinuxSubscriptionsPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +6 -0
- package/dist-cjs/protocols/Aws_restJson1.js +494 -0
- package/dist-cjs/runtimeConfig.browser.js +42 -0
- package/dist-cjs/runtimeConfig.js +51 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +18 -0
- package/dist-es/LicenseManagerLinuxSubscriptions.js +63 -0
- package/dist-es/LicenseManagerLinuxSubscriptionsClient.js +36 -0
- package/dist-es/commands/GetServiceSettingsCommand.js +42 -0
- package/dist-es/commands/ListLinuxSubscriptionInstancesCommand.js +42 -0
- package/dist-es/commands/ListLinuxSubscriptionsCommand.js +42 -0
- package/dist-es/commands/UpdateServiceSettingsCommand.js +42 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/LicenseManagerLinuxSubscriptionsServiceException.js +7 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +96 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListLinuxSubscriptionInstancesPaginator.js +32 -0
- package/dist-es/pagination/ListLinuxSubscriptionsPaginator.js +32 -0
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/protocols/Aws_restJson1.js +483 -0
- package/dist-es/runtimeConfig.browser.js +37 -0
- package/dist-es/runtimeConfig.js +46 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +14 -0
- package/dist-types/LicenseManagerLinuxSubscriptions.d.ts +39 -0
- package/dist-types/LicenseManagerLinuxSubscriptionsClient.d.ts +146 -0
- package/dist-types/commands/GetServiceSettingsCommand.d.ts +37 -0
- package/dist-types/commands/ListLinuxSubscriptionInstancesCommand.d.ts +38 -0
- package/dist-types/commands/ListLinuxSubscriptionsCommand.d.ts +39 -0
- package/dist-types/commands/UpdateServiceSettingsCommand.d.ts +37 -0
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +19 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/index.d.ts +6 -0
- package/dist-types/models/LicenseManagerLinuxSubscriptionsServiceException.d.ts +10 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +448 -0
- package/dist-types/pagination/Interfaces.d.ts +6 -0
- package/dist-types/pagination/ListLinuxSubscriptionInstancesPaginator.d.ts +4 -0
- package/dist-types/pagination/ListLinuxSubscriptionsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +14 -0
- package/dist-types/runtimeConfig.browser.d.ts +42 -0
- package/dist-types/runtimeConfig.d.ts +42 -0
- package/dist-types/runtimeConfig.native.d.ts +41 -0
- package/dist-types/runtimeConfig.shared.d.ts +16 -0
- package/dist-types/ts3.4/LicenseManagerLinuxSubscriptions.d.ts +72 -0
- package/dist-types/ts3.4/LicenseManagerLinuxSubscriptionsClient.d.ts +136 -0
- package/dist-types/ts3.4/commands/GetServiceSettingsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListLinuxSubscriptionInstancesCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/ListLinuxSubscriptionsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/UpdateServiceSettingsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/index.d.ts +4 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +34 -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/index.d.ts +6 -0
- package/dist-types/ts3.4/models/LicenseManagerLinuxSubscriptionsServiceException.d.ts +7 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +138 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +9 -0
- package/dist-types/ts3.4/pagination/ListLinuxSubscriptionInstancesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListLinuxSubscriptionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +53 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +93 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +82 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +18 -0
- package/package.json +102 -0
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deserializeAws_restJson1UpdateServiceSettingsCommand = exports.deserializeAws_restJson1ListLinuxSubscriptionsCommand = exports.deserializeAws_restJson1ListLinuxSubscriptionInstancesCommand = exports.deserializeAws_restJson1GetServiceSettingsCommand = exports.serializeAws_restJson1UpdateServiceSettingsCommand = exports.serializeAws_restJson1ListLinuxSubscriptionsCommand = exports.serializeAws_restJson1ListLinuxSubscriptionInstancesCommand = exports.serializeAws_restJson1GetServiceSettingsCommand = void 0;
|
|
4
|
+
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const LicenseManagerLinuxSubscriptionsServiceException_1 = require("../models/LicenseManagerLinuxSubscriptionsServiceException");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const serializeAws_restJson1GetServiceSettingsCommand = async (input, context) => {
|
|
9
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
|
+
const headers = {
|
|
11
|
+
"content-type": "application/json",
|
|
12
|
+
};
|
|
13
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/subscription/GetServiceSettings";
|
|
14
|
+
let body;
|
|
15
|
+
body = "";
|
|
16
|
+
return new protocol_http_1.HttpRequest({
|
|
17
|
+
protocol,
|
|
18
|
+
hostname,
|
|
19
|
+
port,
|
|
20
|
+
method: "POST",
|
|
21
|
+
headers,
|
|
22
|
+
path: resolvedPath,
|
|
23
|
+
body,
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
exports.serializeAws_restJson1GetServiceSettingsCommand = serializeAws_restJson1GetServiceSettingsCommand;
|
|
27
|
+
const serializeAws_restJson1ListLinuxSubscriptionInstancesCommand = async (input, context) => {
|
|
28
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
29
|
+
const headers = {
|
|
30
|
+
"content-type": "application/json",
|
|
31
|
+
};
|
|
32
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
33
|
+
"/subscription/ListLinuxSubscriptionInstances";
|
|
34
|
+
let body;
|
|
35
|
+
body = JSON.stringify({
|
|
36
|
+
...(input.Filters != null && { Filters: serializeAws_restJson1FilterList(input.Filters, context) }),
|
|
37
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
38
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
39
|
+
});
|
|
40
|
+
return new protocol_http_1.HttpRequest({
|
|
41
|
+
protocol,
|
|
42
|
+
hostname,
|
|
43
|
+
port,
|
|
44
|
+
method: "POST",
|
|
45
|
+
headers,
|
|
46
|
+
path: resolvedPath,
|
|
47
|
+
body,
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
exports.serializeAws_restJson1ListLinuxSubscriptionInstancesCommand = serializeAws_restJson1ListLinuxSubscriptionInstancesCommand;
|
|
51
|
+
const serializeAws_restJson1ListLinuxSubscriptionsCommand = async (input, context) => {
|
|
52
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
53
|
+
const headers = {
|
|
54
|
+
"content-type": "application/json",
|
|
55
|
+
};
|
|
56
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/subscription/ListLinuxSubscriptions";
|
|
57
|
+
let body;
|
|
58
|
+
body = JSON.stringify({
|
|
59
|
+
...(input.Filters != null && { Filters: serializeAws_restJson1FilterList(input.Filters, context) }),
|
|
60
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
61
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
62
|
+
});
|
|
63
|
+
return new protocol_http_1.HttpRequest({
|
|
64
|
+
protocol,
|
|
65
|
+
hostname,
|
|
66
|
+
port,
|
|
67
|
+
method: "POST",
|
|
68
|
+
headers,
|
|
69
|
+
path: resolvedPath,
|
|
70
|
+
body,
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
exports.serializeAws_restJson1ListLinuxSubscriptionsCommand = serializeAws_restJson1ListLinuxSubscriptionsCommand;
|
|
74
|
+
const serializeAws_restJson1UpdateServiceSettingsCommand = async (input, context) => {
|
|
75
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
76
|
+
const headers = {
|
|
77
|
+
"content-type": "application/json",
|
|
78
|
+
};
|
|
79
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/subscription/UpdateServiceSettings";
|
|
80
|
+
let body;
|
|
81
|
+
body = JSON.stringify({
|
|
82
|
+
...(input.AllowUpdate != null && { AllowUpdate: input.AllowUpdate }),
|
|
83
|
+
...(input.LinuxSubscriptionsDiscovery != null && {
|
|
84
|
+
LinuxSubscriptionsDiscovery: input.LinuxSubscriptionsDiscovery,
|
|
85
|
+
}),
|
|
86
|
+
...(input.LinuxSubscriptionsDiscoverySettings != null && {
|
|
87
|
+
LinuxSubscriptionsDiscoverySettings: serializeAws_restJson1LinuxSubscriptionsDiscoverySettings(input.LinuxSubscriptionsDiscoverySettings, context),
|
|
88
|
+
}),
|
|
89
|
+
});
|
|
90
|
+
return new protocol_http_1.HttpRequest({
|
|
91
|
+
protocol,
|
|
92
|
+
hostname,
|
|
93
|
+
port,
|
|
94
|
+
method: "POST",
|
|
95
|
+
headers,
|
|
96
|
+
path: resolvedPath,
|
|
97
|
+
body,
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
exports.serializeAws_restJson1UpdateServiceSettingsCommand = serializeAws_restJson1UpdateServiceSettingsCommand;
|
|
101
|
+
const deserializeAws_restJson1GetServiceSettingsCommand = async (output, context) => {
|
|
102
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
103
|
+
return deserializeAws_restJson1GetServiceSettingsCommandError(output, context);
|
|
104
|
+
}
|
|
105
|
+
const contents = map({
|
|
106
|
+
$metadata: deserializeMetadata(output),
|
|
107
|
+
});
|
|
108
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
109
|
+
if (data.HomeRegions != null) {
|
|
110
|
+
contents.HomeRegions = deserializeAws_restJson1StringList(data.HomeRegions, context);
|
|
111
|
+
}
|
|
112
|
+
if (data.LinuxSubscriptionsDiscovery != null) {
|
|
113
|
+
contents.LinuxSubscriptionsDiscovery = (0, smithy_client_1.expectString)(data.LinuxSubscriptionsDiscovery);
|
|
114
|
+
}
|
|
115
|
+
if (data.LinuxSubscriptionsDiscoverySettings != null) {
|
|
116
|
+
contents.LinuxSubscriptionsDiscoverySettings = deserializeAws_restJson1LinuxSubscriptionsDiscoverySettings(data.LinuxSubscriptionsDiscoverySettings, context);
|
|
117
|
+
}
|
|
118
|
+
if (data.Status != null) {
|
|
119
|
+
contents.Status = (0, smithy_client_1.expectString)(data.Status);
|
|
120
|
+
}
|
|
121
|
+
if (data.StatusMessage != null) {
|
|
122
|
+
contents.StatusMessage = deserializeAws_restJson1StringMap(data.StatusMessage, context);
|
|
123
|
+
}
|
|
124
|
+
return contents;
|
|
125
|
+
};
|
|
126
|
+
exports.deserializeAws_restJson1GetServiceSettingsCommand = deserializeAws_restJson1GetServiceSettingsCommand;
|
|
127
|
+
const deserializeAws_restJson1GetServiceSettingsCommandError = async (output, context) => {
|
|
128
|
+
const parsedOutput = {
|
|
129
|
+
...output,
|
|
130
|
+
body: await parseErrorBody(output.body, context),
|
|
131
|
+
};
|
|
132
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
133
|
+
switch (errorCode) {
|
|
134
|
+
case "InternalServerException":
|
|
135
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#InternalServerException":
|
|
136
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
137
|
+
case "ThrottlingException":
|
|
138
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ThrottlingException":
|
|
139
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
140
|
+
case "ValidationException":
|
|
141
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ValidationException":
|
|
142
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
143
|
+
default:
|
|
144
|
+
const parsedBody = parsedOutput.body;
|
|
145
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
146
|
+
output,
|
|
147
|
+
parsedBody,
|
|
148
|
+
exceptionCtor: LicenseManagerLinuxSubscriptionsServiceException_1.LicenseManagerLinuxSubscriptionsServiceException,
|
|
149
|
+
errorCode,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
const deserializeAws_restJson1ListLinuxSubscriptionInstancesCommand = async (output, context) => {
|
|
154
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
155
|
+
return deserializeAws_restJson1ListLinuxSubscriptionInstancesCommandError(output, context);
|
|
156
|
+
}
|
|
157
|
+
const contents = map({
|
|
158
|
+
$metadata: deserializeMetadata(output),
|
|
159
|
+
});
|
|
160
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
161
|
+
if (data.Instances != null) {
|
|
162
|
+
contents.Instances = deserializeAws_restJson1InstanceList(data.Instances, context);
|
|
163
|
+
}
|
|
164
|
+
if (data.NextToken != null) {
|
|
165
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
166
|
+
}
|
|
167
|
+
return contents;
|
|
168
|
+
};
|
|
169
|
+
exports.deserializeAws_restJson1ListLinuxSubscriptionInstancesCommand = deserializeAws_restJson1ListLinuxSubscriptionInstancesCommand;
|
|
170
|
+
const deserializeAws_restJson1ListLinuxSubscriptionInstancesCommandError = async (output, context) => {
|
|
171
|
+
const parsedOutput = {
|
|
172
|
+
...output,
|
|
173
|
+
body: await parseErrorBody(output.body, context),
|
|
174
|
+
};
|
|
175
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
176
|
+
switch (errorCode) {
|
|
177
|
+
case "InternalServerException":
|
|
178
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#InternalServerException":
|
|
179
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
180
|
+
case "ThrottlingException":
|
|
181
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ThrottlingException":
|
|
182
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
183
|
+
case "ValidationException":
|
|
184
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ValidationException":
|
|
185
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
186
|
+
default:
|
|
187
|
+
const parsedBody = parsedOutput.body;
|
|
188
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
189
|
+
output,
|
|
190
|
+
parsedBody,
|
|
191
|
+
exceptionCtor: LicenseManagerLinuxSubscriptionsServiceException_1.LicenseManagerLinuxSubscriptionsServiceException,
|
|
192
|
+
errorCode,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
const deserializeAws_restJson1ListLinuxSubscriptionsCommand = async (output, context) => {
|
|
197
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
198
|
+
return deserializeAws_restJson1ListLinuxSubscriptionsCommandError(output, context);
|
|
199
|
+
}
|
|
200
|
+
const contents = map({
|
|
201
|
+
$metadata: deserializeMetadata(output),
|
|
202
|
+
});
|
|
203
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
204
|
+
if (data.NextToken != null) {
|
|
205
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
206
|
+
}
|
|
207
|
+
if (data.Subscriptions != null) {
|
|
208
|
+
contents.Subscriptions = deserializeAws_restJson1SubscriptionList(data.Subscriptions, context);
|
|
209
|
+
}
|
|
210
|
+
return contents;
|
|
211
|
+
};
|
|
212
|
+
exports.deserializeAws_restJson1ListLinuxSubscriptionsCommand = deserializeAws_restJson1ListLinuxSubscriptionsCommand;
|
|
213
|
+
const deserializeAws_restJson1ListLinuxSubscriptionsCommandError = async (output, context) => {
|
|
214
|
+
const parsedOutput = {
|
|
215
|
+
...output,
|
|
216
|
+
body: await parseErrorBody(output.body, context),
|
|
217
|
+
};
|
|
218
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
219
|
+
switch (errorCode) {
|
|
220
|
+
case "InternalServerException":
|
|
221
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#InternalServerException":
|
|
222
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
223
|
+
case "ThrottlingException":
|
|
224
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ThrottlingException":
|
|
225
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
226
|
+
case "ValidationException":
|
|
227
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ValidationException":
|
|
228
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
229
|
+
default:
|
|
230
|
+
const parsedBody = parsedOutput.body;
|
|
231
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
232
|
+
output,
|
|
233
|
+
parsedBody,
|
|
234
|
+
exceptionCtor: LicenseManagerLinuxSubscriptionsServiceException_1.LicenseManagerLinuxSubscriptionsServiceException,
|
|
235
|
+
errorCode,
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
const deserializeAws_restJson1UpdateServiceSettingsCommand = async (output, context) => {
|
|
240
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
241
|
+
return deserializeAws_restJson1UpdateServiceSettingsCommandError(output, context);
|
|
242
|
+
}
|
|
243
|
+
const contents = map({
|
|
244
|
+
$metadata: deserializeMetadata(output),
|
|
245
|
+
});
|
|
246
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
247
|
+
if (data.HomeRegions != null) {
|
|
248
|
+
contents.HomeRegions = deserializeAws_restJson1StringList(data.HomeRegions, context);
|
|
249
|
+
}
|
|
250
|
+
if (data.LinuxSubscriptionsDiscovery != null) {
|
|
251
|
+
contents.LinuxSubscriptionsDiscovery = (0, smithy_client_1.expectString)(data.LinuxSubscriptionsDiscovery);
|
|
252
|
+
}
|
|
253
|
+
if (data.LinuxSubscriptionsDiscoverySettings != null) {
|
|
254
|
+
contents.LinuxSubscriptionsDiscoverySettings = deserializeAws_restJson1LinuxSubscriptionsDiscoverySettings(data.LinuxSubscriptionsDiscoverySettings, context);
|
|
255
|
+
}
|
|
256
|
+
if (data.Status != null) {
|
|
257
|
+
contents.Status = (0, smithy_client_1.expectString)(data.Status);
|
|
258
|
+
}
|
|
259
|
+
if (data.StatusMessage != null) {
|
|
260
|
+
contents.StatusMessage = deserializeAws_restJson1StringMap(data.StatusMessage, context);
|
|
261
|
+
}
|
|
262
|
+
return contents;
|
|
263
|
+
};
|
|
264
|
+
exports.deserializeAws_restJson1UpdateServiceSettingsCommand = deserializeAws_restJson1UpdateServiceSettingsCommand;
|
|
265
|
+
const deserializeAws_restJson1UpdateServiceSettingsCommandError = async (output, context) => {
|
|
266
|
+
const parsedOutput = {
|
|
267
|
+
...output,
|
|
268
|
+
body: await parseErrorBody(output.body, context),
|
|
269
|
+
};
|
|
270
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
271
|
+
switch (errorCode) {
|
|
272
|
+
case "InternalServerException":
|
|
273
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#InternalServerException":
|
|
274
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
275
|
+
case "ThrottlingException":
|
|
276
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ThrottlingException":
|
|
277
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
278
|
+
case "ValidationException":
|
|
279
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ValidationException":
|
|
280
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
281
|
+
default:
|
|
282
|
+
const parsedBody = parsedOutput.body;
|
|
283
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
284
|
+
output,
|
|
285
|
+
parsedBody,
|
|
286
|
+
exceptionCtor: LicenseManagerLinuxSubscriptionsServiceException_1.LicenseManagerLinuxSubscriptionsServiceException,
|
|
287
|
+
errorCode,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
const map = smithy_client_1.map;
|
|
292
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
293
|
+
const contents = map({});
|
|
294
|
+
const data = parsedOutput.body;
|
|
295
|
+
if (data.message != null) {
|
|
296
|
+
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
297
|
+
}
|
|
298
|
+
const exception = new models_0_1.InternalServerException({
|
|
299
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
300
|
+
...contents,
|
|
301
|
+
});
|
|
302
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
303
|
+
};
|
|
304
|
+
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
305
|
+
const contents = map({});
|
|
306
|
+
const data = parsedOutput.body;
|
|
307
|
+
if (data.message != null) {
|
|
308
|
+
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
309
|
+
}
|
|
310
|
+
const exception = new models_0_1.ThrottlingException({
|
|
311
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
312
|
+
...contents,
|
|
313
|
+
});
|
|
314
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
315
|
+
};
|
|
316
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
317
|
+
const contents = map({});
|
|
318
|
+
const data = parsedOutput.body;
|
|
319
|
+
if (data.message != null) {
|
|
320
|
+
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
321
|
+
}
|
|
322
|
+
const exception = new models_0_1.ValidationException({
|
|
323
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
324
|
+
...contents,
|
|
325
|
+
});
|
|
326
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
327
|
+
};
|
|
328
|
+
const serializeAws_restJson1Filter = (input, context) => {
|
|
329
|
+
return {
|
|
330
|
+
...(input.Name != null && { Name: input.Name }),
|
|
331
|
+
...(input.Operator != null && { Operator: input.Operator }),
|
|
332
|
+
...(input.Values != null && { Values: serializeAws_restJson1StringList(input.Values, context) }),
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
const serializeAws_restJson1FilterList = (input, context) => {
|
|
336
|
+
return input
|
|
337
|
+
.filter((e) => e != null)
|
|
338
|
+
.map((entry) => {
|
|
339
|
+
return serializeAws_restJson1Filter(entry, context);
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
const serializeAws_restJson1LinuxSubscriptionsDiscoverySettings = (input, context) => {
|
|
343
|
+
return {
|
|
344
|
+
...(input.OrganizationIntegration != null && { OrganizationIntegration: input.OrganizationIntegration }),
|
|
345
|
+
...(input.SourceRegions != null && {
|
|
346
|
+
SourceRegions: serializeAws_restJson1StringList(input.SourceRegions, context),
|
|
347
|
+
}),
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
const serializeAws_restJson1StringList = (input, context) => {
|
|
351
|
+
return input
|
|
352
|
+
.filter((e) => e != null)
|
|
353
|
+
.map((entry) => {
|
|
354
|
+
return entry;
|
|
355
|
+
});
|
|
356
|
+
};
|
|
357
|
+
const deserializeAws_restJson1Instance = (output, context) => {
|
|
358
|
+
return {
|
|
359
|
+
AccountID: (0, smithy_client_1.expectString)(output.AccountID),
|
|
360
|
+
AmiId: (0, smithy_client_1.expectString)(output.AmiId),
|
|
361
|
+
InstanceID: (0, smithy_client_1.expectString)(output.InstanceID),
|
|
362
|
+
InstanceType: (0, smithy_client_1.expectString)(output.InstanceType),
|
|
363
|
+
LastUpdatedTime: (0, smithy_client_1.expectString)(output.LastUpdatedTime),
|
|
364
|
+
ProductCode: output.ProductCode != null ? deserializeAws_restJson1ProductCodeList(output.ProductCode, context) : undefined,
|
|
365
|
+
Region: (0, smithy_client_1.expectString)(output.Region),
|
|
366
|
+
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
367
|
+
SubscriptionName: (0, smithy_client_1.expectString)(output.SubscriptionName),
|
|
368
|
+
UsageOperation: (0, smithy_client_1.expectString)(output.UsageOperation),
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
const deserializeAws_restJson1InstanceList = (output, context) => {
|
|
372
|
+
const retVal = (output || [])
|
|
373
|
+
.filter((e) => e != null)
|
|
374
|
+
.map((entry) => {
|
|
375
|
+
if (entry === null) {
|
|
376
|
+
return null;
|
|
377
|
+
}
|
|
378
|
+
return deserializeAws_restJson1Instance(entry, context);
|
|
379
|
+
});
|
|
380
|
+
return retVal;
|
|
381
|
+
};
|
|
382
|
+
const deserializeAws_restJson1LinuxSubscriptionsDiscoverySettings = (output, context) => {
|
|
383
|
+
return {
|
|
384
|
+
OrganizationIntegration: (0, smithy_client_1.expectString)(output.OrganizationIntegration),
|
|
385
|
+
SourceRegions: output.SourceRegions != null ? deserializeAws_restJson1StringList(output.SourceRegions, context) : undefined,
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
const deserializeAws_restJson1ProductCodeList = (output, context) => {
|
|
389
|
+
const retVal = (output || [])
|
|
390
|
+
.filter((e) => e != null)
|
|
391
|
+
.map((entry) => {
|
|
392
|
+
if (entry === null) {
|
|
393
|
+
return null;
|
|
394
|
+
}
|
|
395
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
396
|
+
});
|
|
397
|
+
return retVal;
|
|
398
|
+
};
|
|
399
|
+
const deserializeAws_restJson1StringList = (output, context) => {
|
|
400
|
+
const retVal = (output || [])
|
|
401
|
+
.filter((e) => e != null)
|
|
402
|
+
.map((entry) => {
|
|
403
|
+
if (entry === null) {
|
|
404
|
+
return null;
|
|
405
|
+
}
|
|
406
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
407
|
+
});
|
|
408
|
+
return retVal;
|
|
409
|
+
};
|
|
410
|
+
const deserializeAws_restJson1StringMap = (output, context) => {
|
|
411
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
412
|
+
if (value === null) {
|
|
413
|
+
return acc;
|
|
414
|
+
}
|
|
415
|
+
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
416
|
+
return acc;
|
|
417
|
+
}, {});
|
|
418
|
+
};
|
|
419
|
+
const deserializeAws_restJson1Subscription = (output, context) => {
|
|
420
|
+
return {
|
|
421
|
+
InstanceCount: (0, smithy_client_1.expectLong)(output.InstanceCount),
|
|
422
|
+
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
423
|
+
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
const deserializeAws_restJson1SubscriptionList = (output, context) => {
|
|
427
|
+
const retVal = (output || [])
|
|
428
|
+
.filter((e) => e != null)
|
|
429
|
+
.map((entry) => {
|
|
430
|
+
if (entry === null) {
|
|
431
|
+
return null;
|
|
432
|
+
}
|
|
433
|
+
return deserializeAws_restJson1Subscription(entry, context);
|
|
434
|
+
});
|
|
435
|
+
return retVal;
|
|
436
|
+
};
|
|
437
|
+
const deserializeMetadata = (output) => ({
|
|
438
|
+
httpStatusCode: output.statusCode,
|
|
439
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
440
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
441
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
442
|
+
});
|
|
443
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
444
|
+
if (streamBody instanceof Uint8Array) {
|
|
445
|
+
return Promise.resolve(streamBody);
|
|
446
|
+
}
|
|
447
|
+
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
448
|
+
};
|
|
449
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
450
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
451
|
+
value !== null &&
|
|
452
|
+
value !== "" &&
|
|
453
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
454
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
455
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
456
|
+
if (encoded.length) {
|
|
457
|
+
return JSON.parse(encoded);
|
|
458
|
+
}
|
|
459
|
+
return {};
|
|
460
|
+
});
|
|
461
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
462
|
+
const value = await parseBody(errorBody, context);
|
|
463
|
+
value.message = value.message ?? value.Message;
|
|
464
|
+
return value;
|
|
465
|
+
};
|
|
466
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
467
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
468
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
469
|
+
let cleanValue = rawValue;
|
|
470
|
+
if (typeof cleanValue === "number") {
|
|
471
|
+
cleanValue = cleanValue.toString();
|
|
472
|
+
}
|
|
473
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
474
|
+
cleanValue = cleanValue.split(",")[0];
|
|
475
|
+
}
|
|
476
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
477
|
+
cleanValue = cleanValue.split(":")[0];
|
|
478
|
+
}
|
|
479
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
480
|
+
cleanValue = cleanValue.split("#")[1];
|
|
481
|
+
}
|
|
482
|
+
return cleanValue;
|
|
483
|
+
};
|
|
484
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
485
|
+
if (headerKey !== undefined) {
|
|
486
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
487
|
+
}
|
|
488
|
+
if (data.code !== undefined) {
|
|
489
|
+
return sanitizeErrorCode(data.code);
|
|
490
|
+
}
|
|
491
|
+
if (data["__type"] !== undefined) {
|
|
492
|
+
return sanitizeErrorCode(data["__type"]);
|
|
493
|
+
}
|
|
494
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
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 config_resolver_1 = require("@aws-sdk/config-resolver");
|
|
8
|
+
const fetch_http_handler_1 = require("@aws-sdk/fetch-http-handler");
|
|
9
|
+
const invalid_dependency_1 = require("@aws-sdk/invalid-dependency");
|
|
10
|
+
const util_body_length_browser_1 = require("@aws-sdk/util-body-length-browser");
|
|
11
|
+
const util_retry_1 = require("@aws-sdk/util-retry");
|
|
12
|
+
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
|
13
|
+
const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
|
|
14
|
+
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
15
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
16
|
+
const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
|
|
17
|
+
const getRuntimeConfig = (config) => {
|
|
18
|
+
const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
|
|
19
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
20
|
+
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
21
|
+
return {
|
|
22
|
+
...clientSharedValues,
|
|
23
|
+
...config,
|
|
24
|
+
runtime: "browser",
|
|
25
|
+
defaultsMode,
|
|
26
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
|
|
27
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
28
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
29
|
+
(0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
30
|
+
maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
31
|
+
region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
|
|
32
|
+
requestHandler: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
|
|
33
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
|
|
34
|
+
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
35
|
+
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
|
36
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
37
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
|
|
38
|
+
utf8Decoder: config?.utf8Decoder ?? util_utf8_browser_1.fromUtf8,
|
|
39
|
+
utf8Encoder: config?.utf8Encoder ?? util_utf8_browser_1.toUtf8,
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,51 @@
|
|
|
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_sts_1 = require("@aws-sdk/client-sts");
|
|
7
|
+
const config_resolver_1 = require("@aws-sdk/config-resolver");
|
|
8
|
+
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
|
9
|
+
const hash_node_1 = require("@aws-sdk/hash-node");
|
|
10
|
+
const middleware_retry_1 = require("@aws-sdk/middleware-retry");
|
|
11
|
+
const node_config_provider_1 = require("@aws-sdk/node-config-provider");
|
|
12
|
+
const node_http_handler_1 = require("@aws-sdk/node-http-handler");
|
|
13
|
+
const util_body_length_node_1 = require("@aws-sdk/util-body-length-node");
|
|
14
|
+
const util_retry_1 = require("@aws-sdk/util-retry");
|
|
15
|
+
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
16
|
+
const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
|
|
17
|
+
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
18
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
19
|
+
const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
|
|
20
|
+
const smithy_client_2 = require("@aws-sdk/smithy-client");
|
|
21
|
+
const getRuntimeConfig = (config) => {
|
|
22
|
+
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
|
23
|
+
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
|
24
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
25
|
+
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
26
|
+
return {
|
|
27
|
+
...clientSharedValues,
|
|
28
|
+
...config,
|
|
29
|
+
runtime: "node",
|
|
30
|
+
defaultsMode,
|
|
31
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
|
32
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
|
|
33
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
34
|
+
(0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
35
|
+
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
36
|
+
region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
37
|
+
requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
|
|
38
|
+
retryMode: config?.retryMode ??
|
|
39
|
+
(0, node_config_provider_1.loadConfig)({
|
|
40
|
+
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
41
|
+
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
|
|
42
|
+
}),
|
|
43
|
+
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
|
44
|
+
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
45
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
46
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
47
|
+
utf8Decoder: config?.utf8Decoder ?? util_utf8_node_1.fromUtf8,
|
|
48
|
+
utf8Encoder: config?.utf8Encoder ?? util_utf8_node_1.toUtf8,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
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,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
|
+
const url_parser_1 = require("@aws-sdk/url-parser");
|
|
6
|
+
const util_base64_1 = require("@aws-sdk/util-base64");
|
|
7
|
+
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
|
8
|
+
const getRuntimeConfig = (config) => ({
|
|
9
|
+
apiVersion: "2018-05-10",
|
|
10
|
+
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
|
|
11
|
+
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
|
|
12
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
13
|
+
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
|
14
|
+
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
15
|
+
serviceId: config?.serviceId ?? "License Manager Linux Subscriptions",
|
|
16
|
+
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
17
|
+
});
|
|
18
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|