@aws-sdk/client-license-manager-linux-subscriptions 3.489.0 → 3.495.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/LicenseManagerLinuxSubscriptions.js +1 -19
- package/dist-cjs/LicenseManagerLinuxSubscriptionsClient.js +1 -43
- package/dist-cjs/commands/GetServiceSettingsCommand.js +1 -28
- package/dist-cjs/commands/ListLinuxSubscriptionInstancesCommand.js +1 -28
- package/dist-cjs/commands/ListLinuxSubscriptionsCommand.js +1 -28
- package/dist-cjs/commands/UpdateServiceSettingsCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -7
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +689 -11
- package/dist-cjs/models/LicenseManagerLinuxSubscriptionsServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -62
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListLinuxSubscriptionInstancesPaginator.js +1 -7
- package/dist-cjs/pagination/ListLinuxSubscriptionsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -6
- package/dist-cjs/protocols/Aws_restJson1.js +1 -329
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
package/dist-cjs/index.js
CHANGED
|
@@ -1,12 +1,690 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
24
|
+
GetServiceSettingsCommand: () => GetServiceSettingsCommand,
|
|
25
|
+
InternalServerException: () => InternalServerException,
|
|
26
|
+
LicenseManagerLinuxSubscriptions: () => LicenseManagerLinuxSubscriptions,
|
|
27
|
+
LicenseManagerLinuxSubscriptionsClient: () => LicenseManagerLinuxSubscriptionsClient,
|
|
28
|
+
LicenseManagerLinuxSubscriptionsServiceException: () => LicenseManagerLinuxSubscriptionsServiceException,
|
|
29
|
+
LinuxSubscriptionsDiscovery: () => LinuxSubscriptionsDiscovery,
|
|
30
|
+
ListLinuxSubscriptionInstancesCommand: () => ListLinuxSubscriptionInstancesCommand,
|
|
31
|
+
ListLinuxSubscriptionsCommand: () => ListLinuxSubscriptionsCommand,
|
|
32
|
+
Operator: () => Operator,
|
|
33
|
+
OrganizationIntegration: () => OrganizationIntegration,
|
|
34
|
+
Status: () => Status,
|
|
35
|
+
ThrottlingException: () => ThrottlingException,
|
|
36
|
+
UpdateServiceSettingsCommand: () => UpdateServiceSettingsCommand,
|
|
37
|
+
ValidationException: () => ValidationException,
|
|
38
|
+
__Client: () => import_smithy_client.Client,
|
|
39
|
+
paginateListLinuxSubscriptionInstances: () => paginateListLinuxSubscriptionInstances,
|
|
40
|
+
paginateListLinuxSubscriptions: () => paginateListLinuxSubscriptions
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(src_exports);
|
|
43
|
+
|
|
44
|
+
// src/LicenseManagerLinuxSubscriptionsClient.ts
|
|
45
|
+
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
|
|
46
|
+
var import_middleware_logger = require("@aws-sdk/middleware-logger");
|
|
47
|
+
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
|
|
48
|
+
var import_middleware_signing = require("@aws-sdk/middleware-signing");
|
|
49
|
+
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
|
|
50
|
+
var import_config_resolver = require("@smithy/config-resolver");
|
|
51
|
+
var import_middleware_content_length = require("@smithy/middleware-content-length");
|
|
52
|
+
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
|
|
53
|
+
var import_middleware_retry = require("@smithy/middleware-retry");
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
// src/endpoint/EndpointParameters.ts
|
|
57
|
+
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
|
|
58
|
+
return {
|
|
59
|
+
...options,
|
|
60
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
61
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
62
|
+
defaultSigningName: "license-manager-linux-subscriptions"
|
|
63
|
+
};
|
|
64
|
+
}, "resolveClientEndpointParameters");
|
|
65
|
+
var commonParams = {
|
|
66
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
67
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
68
|
+
Region: { type: "builtInParams", name: "region" },
|
|
69
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// src/LicenseManagerLinuxSubscriptionsClient.ts
|
|
73
|
+
var import_runtimeConfig = require("././runtimeConfig");
|
|
74
|
+
|
|
75
|
+
// src/runtimeExtensions.ts
|
|
76
|
+
var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
|
|
77
|
+
var import_protocol_http = require("@smithy/protocol-http");
|
|
78
|
+
var import_smithy_client = require("@smithy/smithy-client");
|
|
79
|
+
var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
|
|
80
|
+
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
81
|
+
const extensionConfiguration = {
|
|
82
|
+
...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
83
|
+
...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
84
|
+
...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
|
|
85
|
+
};
|
|
86
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
87
|
+
return {
|
|
88
|
+
...runtimeConfig,
|
|
89
|
+
...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
90
|
+
...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
91
|
+
...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
|
|
92
|
+
};
|
|
93
|
+
}, "resolveRuntimeExtensions");
|
|
94
|
+
|
|
95
|
+
// src/LicenseManagerLinuxSubscriptionsClient.ts
|
|
96
|
+
var _LicenseManagerLinuxSubscriptionsClient = class _LicenseManagerLinuxSubscriptionsClient extends import_smithy_client.Client {
|
|
97
|
+
constructor(...[configuration]) {
|
|
98
|
+
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
|
|
99
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
100
|
+
const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
|
|
101
|
+
const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
|
|
102
|
+
const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
|
|
103
|
+
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
|
|
104
|
+
const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
|
|
105
|
+
const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
|
|
106
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
|
|
107
|
+
super(_config_8);
|
|
108
|
+
this.config = _config_8;
|
|
109
|
+
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
110
|
+
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
111
|
+
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
112
|
+
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
113
|
+
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
114
|
+
this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
|
|
115
|
+
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
119
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
120
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
121
|
+
*/
|
|
122
|
+
destroy() {
|
|
123
|
+
super.destroy();
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
__name(_LicenseManagerLinuxSubscriptionsClient, "LicenseManagerLinuxSubscriptionsClient");
|
|
127
|
+
var LicenseManagerLinuxSubscriptionsClient = _LicenseManagerLinuxSubscriptionsClient;
|
|
128
|
+
|
|
129
|
+
// src/LicenseManagerLinuxSubscriptions.ts
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
// src/commands/GetServiceSettingsCommand.ts
|
|
133
|
+
|
|
134
|
+
var import_middleware_serde = require("@smithy/middleware-serde");
|
|
135
|
+
|
|
136
|
+
var import_types = require("@smithy/types");
|
|
137
|
+
|
|
138
|
+
// src/protocols/Aws_restJson1.ts
|
|
139
|
+
var import_core = require("@smithy/core");
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
// src/models/LicenseManagerLinuxSubscriptionsServiceException.ts
|
|
143
|
+
|
|
144
|
+
var _LicenseManagerLinuxSubscriptionsServiceException = class _LicenseManagerLinuxSubscriptionsServiceException extends import_smithy_client.ServiceException {
|
|
145
|
+
/**
|
|
146
|
+
* @internal
|
|
147
|
+
*/
|
|
148
|
+
constructor(options) {
|
|
149
|
+
super(options);
|
|
150
|
+
Object.setPrototypeOf(this, _LicenseManagerLinuxSubscriptionsServiceException.prototype);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
__name(_LicenseManagerLinuxSubscriptionsServiceException, "LicenseManagerLinuxSubscriptionsServiceException");
|
|
154
|
+
var LicenseManagerLinuxSubscriptionsServiceException = _LicenseManagerLinuxSubscriptionsServiceException;
|
|
155
|
+
|
|
156
|
+
// src/models/models_0.ts
|
|
157
|
+
var Operator = {
|
|
158
|
+
/**
|
|
159
|
+
* Contains operator
|
|
160
|
+
*/
|
|
161
|
+
CONTAINS: "Contains",
|
|
162
|
+
/**
|
|
163
|
+
* Equal operator
|
|
164
|
+
*/
|
|
165
|
+
EQUAL: "Equal",
|
|
166
|
+
/**
|
|
167
|
+
* Not equal operator
|
|
168
|
+
*/
|
|
169
|
+
NOT_EQUAL: "NotEqual"
|
|
170
|
+
};
|
|
171
|
+
var LinuxSubscriptionsDiscovery = {
|
|
172
|
+
/**
|
|
173
|
+
* Disabled LinuxSubscriptionsDiscovery
|
|
174
|
+
*/
|
|
175
|
+
Disabled: "Disabled",
|
|
176
|
+
/**
|
|
177
|
+
* Enabled LinuxSubscriptionsDiscovery
|
|
178
|
+
*/
|
|
179
|
+
Enabled: "Enabled"
|
|
180
|
+
};
|
|
181
|
+
var OrganizationIntegration = {
|
|
182
|
+
/**
|
|
183
|
+
* Disabled OrganizationIntegration
|
|
184
|
+
*/
|
|
185
|
+
Disabled: "Disabled",
|
|
186
|
+
/**
|
|
187
|
+
* Enabled OrganizationIntegration
|
|
188
|
+
*/
|
|
189
|
+
Enabled: "Enabled"
|
|
190
|
+
};
|
|
191
|
+
var Status = {
|
|
192
|
+
/**
|
|
193
|
+
* Completed status
|
|
194
|
+
*/
|
|
195
|
+
Completed: "Completed",
|
|
196
|
+
/**
|
|
197
|
+
* Failed status
|
|
198
|
+
*/
|
|
199
|
+
Failed: "Failed",
|
|
200
|
+
/**
|
|
201
|
+
* InProgress status
|
|
202
|
+
*/
|
|
203
|
+
InProgress: "InProgress",
|
|
204
|
+
/**
|
|
205
|
+
* Successful status
|
|
206
|
+
*/
|
|
207
|
+
Successful: "Successful"
|
|
208
|
+
};
|
|
209
|
+
var _InternalServerException = class _InternalServerException extends LicenseManagerLinuxSubscriptionsServiceException {
|
|
210
|
+
/**
|
|
211
|
+
* @internal
|
|
212
|
+
*/
|
|
213
|
+
constructor(opts) {
|
|
214
|
+
super({
|
|
215
|
+
name: "InternalServerException",
|
|
216
|
+
$fault: "server",
|
|
217
|
+
...opts
|
|
218
|
+
});
|
|
219
|
+
this.name = "InternalServerException";
|
|
220
|
+
this.$fault = "server";
|
|
221
|
+
Object.setPrototypeOf(this, _InternalServerException.prototype);
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
__name(_InternalServerException, "InternalServerException");
|
|
225
|
+
var InternalServerException = _InternalServerException;
|
|
226
|
+
var _ThrottlingException = class _ThrottlingException extends LicenseManagerLinuxSubscriptionsServiceException {
|
|
227
|
+
/**
|
|
228
|
+
* @internal
|
|
229
|
+
*/
|
|
230
|
+
constructor(opts) {
|
|
231
|
+
super({
|
|
232
|
+
name: "ThrottlingException",
|
|
233
|
+
$fault: "client",
|
|
234
|
+
...opts
|
|
235
|
+
});
|
|
236
|
+
this.name = "ThrottlingException";
|
|
237
|
+
this.$fault = "client";
|
|
238
|
+
Object.setPrototypeOf(this, _ThrottlingException.prototype);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
__name(_ThrottlingException, "ThrottlingException");
|
|
242
|
+
var ThrottlingException = _ThrottlingException;
|
|
243
|
+
var _ValidationException = class _ValidationException extends LicenseManagerLinuxSubscriptionsServiceException {
|
|
244
|
+
/**
|
|
245
|
+
* @internal
|
|
246
|
+
*/
|
|
247
|
+
constructor(opts) {
|
|
248
|
+
super({
|
|
249
|
+
name: "ValidationException",
|
|
250
|
+
$fault: "client",
|
|
251
|
+
...opts
|
|
252
|
+
});
|
|
253
|
+
this.name = "ValidationException";
|
|
254
|
+
this.$fault = "client";
|
|
255
|
+
Object.setPrototypeOf(this, _ValidationException.prototype);
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
__name(_ValidationException, "ValidationException");
|
|
259
|
+
var ValidationException = _ValidationException;
|
|
260
|
+
|
|
261
|
+
// src/protocols/Aws_restJson1.ts
|
|
262
|
+
var se_GetServiceSettingsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
263
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
264
|
+
const headers = {
|
|
265
|
+
"content-type": "application/json"
|
|
266
|
+
};
|
|
267
|
+
b.bp("/subscription/GetServiceSettings");
|
|
268
|
+
let body;
|
|
269
|
+
body = "";
|
|
270
|
+
b.m("POST").h(headers).b(body);
|
|
271
|
+
return b.build();
|
|
272
|
+
}, "se_GetServiceSettingsCommand");
|
|
273
|
+
var se_ListLinuxSubscriptionInstancesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
274
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
275
|
+
const headers = {
|
|
276
|
+
"content-type": "application/json"
|
|
277
|
+
};
|
|
278
|
+
b.bp("/subscription/ListLinuxSubscriptionInstances");
|
|
279
|
+
let body;
|
|
280
|
+
body = JSON.stringify(
|
|
281
|
+
(0, import_smithy_client.take)(input, {
|
|
282
|
+
Filters: (_) => (0, import_smithy_client._json)(_),
|
|
283
|
+
MaxResults: [],
|
|
284
|
+
NextToken: []
|
|
285
|
+
})
|
|
286
|
+
);
|
|
287
|
+
b.m("POST").h(headers).b(body);
|
|
288
|
+
return b.build();
|
|
289
|
+
}, "se_ListLinuxSubscriptionInstancesCommand");
|
|
290
|
+
var se_ListLinuxSubscriptionsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
291
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
292
|
+
const headers = {
|
|
293
|
+
"content-type": "application/json"
|
|
294
|
+
};
|
|
295
|
+
b.bp("/subscription/ListLinuxSubscriptions");
|
|
296
|
+
let body;
|
|
297
|
+
body = JSON.stringify(
|
|
298
|
+
(0, import_smithy_client.take)(input, {
|
|
299
|
+
Filters: (_) => (0, import_smithy_client._json)(_),
|
|
300
|
+
MaxResults: [],
|
|
301
|
+
NextToken: []
|
|
302
|
+
})
|
|
303
|
+
);
|
|
304
|
+
b.m("POST").h(headers).b(body);
|
|
305
|
+
return b.build();
|
|
306
|
+
}, "se_ListLinuxSubscriptionsCommand");
|
|
307
|
+
var se_UpdateServiceSettingsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
308
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
309
|
+
const headers = {
|
|
310
|
+
"content-type": "application/json"
|
|
311
|
+
};
|
|
312
|
+
b.bp("/subscription/UpdateServiceSettings");
|
|
313
|
+
let body;
|
|
314
|
+
body = JSON.stringify(
|
|
315
|
+
(0, import_smithy_client.take)(input, {
|
|
316
|
+
AllowUpdate: [],
|
|
317
|
+
LinuxSubscriptionsDiscovery: [],
|
|
318
|
+
LinuxSubscriptionsDiscoverySettings: (_) => (0, import_smithy_client._json)(_)
|
|
319
|
+
})
|
|
320
|
+
);
|
|
321
|
+
b.m("POST").h(headers).b(body);
|
|
322
|
+
return b.build();
|
|
323
|
+
}, "se_UpdateServiceSettingsCommand");
|
|
324
|
+
var de_GetServiceSettingsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
325
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
326
|
+
return de_GetServiceSettingsCommandError(output, context);
|
|
327
|
+
}
|
|
328
|
+
const contents = (0, import_smithy_client.map)({
|
|
329
|
+
$metadata: deserializeMetadata(output)
|
|
330
|
+
});
|
|
331
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
332
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
333
|
+
HomeRegions: import_smithy_client._json,
|
|
334
|
+
LinuxSubscriptionsDiscovery: import_smithy_client.expectString,
|
|
335
|
+
LinuxSubscriptionsDiscoverySettings: import_smithy_client._json,
|
|
336
|
+
Status: import_smithy_client.expectString,
|
|
337
|
+
StatusMessage: import_smithy_client._json
|
|
338
|
+
});
|
|
339
|
+
Object.assign(contents, doc);
|
|
340
|
+
return contents;
|
|
341
|
+
}, "de_GetServiceSettingsCommand");
|
|
342
|
+
var de_GetServiceSettingsCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
343
|
+
const parsedOutput = {
|
|
344
|
+
...output,
|
|
345
|
+
body: await parseErrorBody(output.body, context)
|
|
346
|
+
};
|
|
347
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
348
|
+
switch (errorCode) {
|
|
349
|
+
case "InternalServerException":
|
|
350
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#InternalServerException":
|
|
351
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
352
|
+
case "ThrottlingException":
|
|
353
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ThrottlingException":
|
|
354
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
355
|
+
case "ValidationException":
|
|
356
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ValidationException":
|
|
357
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
358
|
+
default:
|
|
359
|
+
const parsedBody = parsedOutput.body;
|
|
360
|
+
return throwDefaultError({
|
|
361
|
+
output,
|
|
362
|
+
parsedBody,
|
|
363
|
+
errorCode
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
}, "de_GetServiceSettingsCommandError");
|
|
367
|
+
var de_ListLinuxSubscriptionInstancesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
368
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
369
|
+
return de_ListLinuxSubscriptionInstancesCommandError(output, context);
|
|
370
|
+
}
|
|
371
|
+
const contents = (0, import_smithy_client.map)({
|
|
372
|
+
$metadata: deserializeMetadata(output)
|
|
373
|
+
});
|
|
374
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
375
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
376
|
+
Instances: import_smithy_client._json,
|
|
377
|
+
NextToken: import_smithy_client.expectString
|
|
378
|
+
});
|
|
379
|
+
Object.assign(contents, doc);
|
|
380
|
+
return contents;
|
|
381
|
+
}, "de_ListLinuxSubscriptionInstancesCommand");
|
|
382
|
+
var de_ListLinuxSubscriptionInstancesCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
383
|
+
const parsedOutput = {
|
|
384
|
+
...output,
|
|
385
|
+
body: await parseErrorBody(output.body, context)
|
|
386
|
+
};
|
|
387
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
388
|
+
switch (errorCode) {
|
|
389
|
+
case "InternalServerException":
|
|
390
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#InternalServerException":
|
|
391
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
392
|
+
case "ThrottlingException":
|
|
393
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ThrottlingException":
|
|
394
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
395
|
+
case "ValidationException":
|
|
396
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ValidationException":
|
|
397
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
398
|
+
default:
|
|
399
|
+
const parsedBody = parsedOutput.body;
|
|
400
|
+
return throwDefaultError({
|
|
401
|
+
output,
|
|
402
|
+
parsedBody,
|
|
403
|
+
errorCode
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
}, "de_ListLinuxSubscriptionInstancesCommandError");
|
|
407
|
+
var de_ListLinuxSubscriptionsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
408
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
409
|
+
return de_ListLinuxSubscriptionsCommandError(output, context);
|
|
410
|
+
}
|
|
411
|
+
const contents = (0, import_smithy_client.map)({
|
|
412
|
+
$metadata: deserializeMetadata(output)
|
|
413
|
+
});
|
|
414
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
415
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
416
|
+
NextToken: import_smithy_client.expectString,
|
|
417
|
+
Subscriptions: import_smithy_client._json
|
|
418
|
+
});
|
|
419
|
+
Object.assign(contents, doc);
|
|
420
|
+
return contents;
|
|
421
|
+
}, "de_ListLinuxSubscriptionsCommand");
|
|
422
|
+
var de_ListLinuxSubscriptionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
423
|
+
const parsedOutput = {
|
|
424
|
+
...output,
|
|
425
|
+
body: await parseErrorBody(output.body, context)
|
|
426
|
+
};
|
|
427
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
428
|
+
switch (errorCode) {
|
|
429
|
+
case "InternalServerException":
|
|
430
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#InternalServerException":
|
|
431
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
432
|
+
case "ThrottlingException":
|
|
433
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ThrottlingException":
|
|
434
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
435
|
+
case "ValidationException":
|
|
436
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ValidationException":
|
|
437
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
438
|
+
default:
|
|
439
|
+
const parsedBody = parsedOutput.body;
|
|
440
|
+
return throwDefaultError({
|
|
441
|
+
output,
|
|
442
|
+
parsedBody,
|
|
443
|
+
errorCode
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
}, "de_ListLinuxSubscriptionsCommandError");
|
|
447
|
+
var de_UpdateServiceSettingsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
448
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
449
|
+
return de_UpdateServiceSettingsCommandError(output, context);
|
|
450
|
+
}
|
|
451
|
+
const contents = (0, import_smithy_client.map)({
|
|
452
|
+
$metadata: deserializeMetadata(output)
|
|
453
|
+
});
|
|
454
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
455
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
456
|
+
HomeRegions: import_smithy_client._json,
|
|
457
|
+
LinuxSubscriptionsDiscovery: import_smithy_client.expectString,
|
|
458
|
+
LinuxSubscriptionsDiscoverySettings: import_smithy_client._json,
|
|
459
|
+
Status: import_smithy_client.expectString,
|
|
460
|
+
StatusMessage: import_smithy_client._json
|
|
461
|
+
});
|
|
462
|
+
Object.assign(contents, doc);
|
|
463
|
+
return contents;
|
|
464
|
+
}, "de_UpdateServiceSettingsCommand");
|
|
465
|
+
var de_UpdateServiceSettingsCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
466
|
+
const parsedOutput = {
|
|
467
|
+
...output,
|
|
468
|
+
body: await parseErrorBody(output.body, context)
|
|
469
|
+
};
|
|
470
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
471
|
+
switch (errorCode) {
|
|
472
|
+
case "InternalServerException":
|
|
473
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#InternalServerException":
|
|
474
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
475
|
+
case "ThrottlingException":
|
|
476
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ThrottlingException":
|
|
477
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
478
|
+
case "ValidationException":
|
|
479
|
+
case "com.amazonaws.licensemanagerlinuxsubscriptions#ValidationException":
|
|
480
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
481
|
+
default:
|
|
482
|
+
const parsedBody = parsedOutput.body;
|
|
483
|
+
return throwDefaultError({
|
|
484
|
+
output,
|
|
485
|
+
parsedBody,
|
|
486
|
+
errorCode
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
}, "de_UpdateServiceSettingsCommandError");
|
|
490
|
+
var throwDefaultError = (0, import_smithy_client.withBaseException)(LicenseManagerLinuxSubscriptionsServiceException);
|
|
491
|
+
var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
492
|
+
const contents = (0, import_smithy_client.map)({});
|
|
493
|
+
const data = parsedOutput.body;
|
|
494
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
495
|
+
message: import_smithy_client.expectString
|
|
496
|
+
});
|
|
497
|
+
Object.assign(contents, doc);
|
|
498
|
+
const exception = new InternalServerException({
|
|
499
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
500
|
+
...contents
|
|
501
|
+
});
|
|
502
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
503
|
+
}, "de_InternalServerExceptionRes");
|
|
504
|
+
var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
505
|
+
const contents = (0, import_smithy_client.map)({});
|
|
506
|
+
const data = parsedOutput.body;
|
|
507
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
508
|
+
message: import_smithy_client.expectString
|
|
509
|
+
});
|
|
510
|
+
Object.assign(contents, doc);
|
|
511
|
+
const exception = new ThrottlingException({
|
|
512
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
513
|
+
...contents
|
|
514
|
+
});
|
|
515
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
516
|
+
}, "de_ThrottlingExceptionRes");
|
|
517
|
+
var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
518
|
+
const contents = (0, import_smithy_client.map)({});
|
|
519
|
+
const data = parsedOutput.body;
|
|
520
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
521
|
+
message: import_smithy_client.expectString
|
|
522
|
+
});
|
|
523
|
+
Object.assign(contents, doc);
|
|
524
|
+
const exception = new ValidationException({
|
|
525
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
526
|
+
...contents
|
|
527
|
+
});
|
|
528
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
529
|
+
}, "de_ValidationExceptionRes");
|
|
530
|
+
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
531
|
+
httpStatusCode: output.statusCode,
|
|
532
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
533
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
534
|
+
cfId: output.headers["x-amz-cf-id"]
|
|
535
|
+
}), "deserializeMetadata");
|
|
536
|
+
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
537
|
+
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
538
|
+
if (encoded.length) {
|
|
539
|
+
return JSON.parse(encoded);
|
|
540
|
+
}
|
|
541
|
+
return {};
|
|
542
|
+
}), "parseBody");
|
|
543
|
+
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
544
|
+
const value = await parseBody(errorBody, context);
|
|
545
|
+
value.message = value.message ?? value.Message;
|
|
546
|
+
return value;
|
|
547
|
+
}, "parseErrorBody");
|
|
548
|
+
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
549
|
+
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
550
|
+
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
551
|
+
let cleanValue = rawValue;
|
|
552
|
+
if (typeof cleanValue === "number") {
|
|
553
|
+
cleanValue = cleanValue.toString();
|
|
554
|
+
}
|
|
555
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
556
|
+
cleanValue = cleanValue.split(",")[0];
|
|
557
|
+
}
|
|
558
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
559
|
+
cleanValue = cleanValue.split(":")[0];
|
|
560
|
+
}
|
|
561
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
562
|
+
cleanValue = cleanValue.split("#")[1];
|
|
563
|
+
}
|
|
564
|
+
return cleanValue;
|
|
565
|
+
}, "sanitizeErrorCode");
|
|
566
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
567
|
+
if (headerKey !== void 0) {
|
|
568
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
569
|
+
}
|
|
570
|
+
if (data.code !== void 0) {
|
|
571
|
+
return sanitizeErrorCode(data.code);
|
|
572
|
+
}
|
|
573
|
+
if (data["__type"] !== void 0) {
|
|
574
|
+
return sanitizeErrorCode(data["__type"]);
|
|
575
|
+
}
|
|
576
|
+
}, "loadRestJsonErrorCode");
|
|
577
|
+
|
|
578
|
+
// src/commands/GetServiceSettingsCommand.ts
|
|
579
|
+
var _GetServiceSettingsCommand = class _GetServiceSettingsCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
580
|
+
...commonParams
|
|
581
|
+
}).m(function(Command, cs, config, o) {
|
|
582
|
+
return [
|
|
583
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
584
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
585
|
+
];
|
|
586
|
+
}).s("LicenseManagerLinuxSubscriptions", "GetServiceSettings", {}).n("LicenseManagerLinuxSubscriptionsClient", "GetServiceSettingsCommand").f(void 0, void 0).ser(se_GetServiceSettingsCommand).de(de_GetServiceSettingsCommand).build() {
|
|
587
|
+
};
|
|
588
|
+
__name(_GetServiceSettingsCommand, "GetServiceSettingsCommand");
|
|
589
|
+
var GetServiceSettingsCommand = _GetServiceSettingsCommand;
|
|
590
|
+
|
|
591
|
+
// src/commands/ListLinuxSubscriptionInstancesCommand.ts
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
var _ListLinuxSubscriptionInstancesCommand = class _ListLinuxSubscriptionInstancesCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
597
|
+
...commonParams
|
|
598
|
+
}).m(function(Command, cs, config, o) {
|
|
599
|
+
return [
|
|
600
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
601
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
602
|
+
];
|
|
603
|
+
}).s("LicenseManagerLinuxSubscriptions", "ListLinuxSubscriptionInstances", {}).n("LicenseManagerLinuxSubscriptionsClient", "ListLinuxSubscriptionInstancesCommand").f(void 0, void 0).ser(se_ListLinuxSubscriptionInstancesCommand).de(de_ListLinuxSubscriptionInstancesCommand).build() {
|
|
604
|
+
};
|
|
605
|
+
__name(_ListLinuxSubscriptionInstancesCommand, "ListLinuxSubscriptionInstancesCommand");
|
|
606
|
+
var ListLinuxSubscriptionInstancesCommand = _ListLinuxSubscriptionInstancesCommand;
|
|
607
|
+
|
|
608
|
+
// src/commands/ListLinuxSubscriptionsCommand.ts
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
var _ListLinuxSubscriptionsCommand = class _ListLinuxSubscriptionsCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
614
|
+
...commonParams
|
|
615
|
+
}).m(function(Command, cs, config, o) {
|
|
616
|
+
return [
|
|
617
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
618
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
619
|
+
];
|
|
620
|
+
}).s("LicenseManagerLinuxSubscriptions", "ListLinuxSubscriptions", {}).n("LicenseManagerLinuxSubscriptionsClient", "ListLinuxSubscriptionsCommand").f(void 0, void 0).ser(se_ListLinuxSubscriptionsCommand).de(de_ListLinuxSubscriptionsCommand).build() {
|
|
621
|
+
};
|
|
622
|
+
__name(_ListLinuxSubscriptionsCommand, "ListLinuxSubscriptionsCommand");
|
|
623
|
+
var ListLinuxSubscriptionsCommand = _ListLinuxSubscriptionsCommand;
|
|
624
|
+
|
|
625
|
+
// src/commands/UpdateServiceSettingsCommand.ts
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
var _UpdateServiceSettingsCommand = class _UpdateServiceSettingsCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
631
|
+
...commonParams
|
|
632
|
+
}).m(function(Command, cs, config, o) {
|
|
633
|
+
return [
|
|
634
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
635
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
636
|
+
];
|
|
637
|
+
}).s("LicenseManagerLinuxSubscriptions", "UpdateServiceSettings", {}).n("LicenseManagerLinuxSubscriptionsClient", "UpdateServiceSettingsCommand").f(void 0, void 0).ser(se_UpdateServiceSettingsCommand).de(de_UpdateServiceSettingsCommand).build() {
|
|
638
|
+
};
|
|
639
|
+
__name(_UpdateServiceSettingsCommand, "UpdateServiceSettingsCommand");
|
|
640
|
+
var UpdateServiceSettingsCommand = _UpdateServiceSettingsCommand;
|
|
641
|
+
|
|
642
|
+
// src/LicenseManagerLinuxSubscriptions.ts
|
|
643
|
+
var commands = {
|
|
644
|
+
GetServiceSettingsCommand,
|
|
645
|
+
ListLinuxSubscriptionInstancesCommand,
|
|
646
|
+
ListLinuxSubscriptionsCommand,
|
|
647
|
+
UpdateServiceSettingsCommand
|
|
648
|
+
};
|
|
649
|
+
var _LicenseManagerLinuxSubscriptions = class _LicenseManagerLinuxSubscriptions extends LicenseManagerLinuxSubscriptionsClient {
|
|
650
|
+
};
|
|
651
|
+
__name(_LicenseManagerLinuxSubscriptions, "LicenseManagerLinuxSubscriptions");
|
|
652
|
+
var LicenseManagerLinuxSubscriptions = _LicenseManagerLinuxSubscriptions;
|
|
653
|
+
(0, import_smithy_client.createAggregatedClient)(commands, LicenseManagerLinuxSubscriptions);
|
|
654
|
+
|
|
655
|
+
// src/pagination/ListLinuxSubscriptionInstancesPaginator.ts
|
|
656
|
+
|
|
657
|
+
var paginateListLinuxSubscriptionInstances = (0, import_core.createPaginator)(
|
|
658
|
+
LicenseManagerLinuxSubscriptionsClient,
|
|
659
|
+
ListLinuxSubscriptionInstancesCommand,
|
|
660
|
+
"NextToken",
|
|
661
|
+
"NextToken",
|
|
662
|
+
"MaxResults"
|
|
663
|
+
);
|
|
664
|
+
|
|
665
|
+
// src/pagination/ListLinuxSubscriptionsPaginator.ts
|
|
666
|
+
|
|
667
|
+
var paginateListLinuxSubscriptions = (0, import_core.createPaginator)(LicenseManagerLinuxSubscriptionsClient, ListLinuxSubscriptionsCommand, "NextToken", "NextToken", "MaxResults");
|
|
668
|
+
|
|
669
|
+
// src/index.ts
|
|
670
|
+
var import_util_endpoints = require("@aws-sdk/util-endpoints");
|
|
671
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
672
|
+
0 && (module.exports = {
|
|
673
|
+
GetServiceSettingsCommand,
|
|
674
|
+
InternalServerException,
|
|
675
|
+
LicenseManagerLinuxSubscriptions,
|
|
676
|
+
LicenseManagerLinuxSubscriptionsClient,
|
|
677
|
+
LicenseManagerLinuxSubscriptionsServiceException,
|
|
678
|
+
LinuxSubscriptionsDiscovery,
|
|
679
|
+
ListLinuxSubscriptionInstancesCommand,
|
|
680
|
+
ListLinuxSubscriptionsCommand,
|
|
681
|
+
Operator,
|
|
682
|
+
OrganizationIntegration,
|
|
683
|
+
Status,
|
|
684
|
+
ThrottlingException,
|
|
685
|
+
UpdateServiceSettingsCommand,
|
|
686
|
+
ValidationException,
|
|
687
|
+
__Client,
|
|
688
|
+
paginateListLinuxSubscriptionInstances,
|
|
689
|
+
paginateListLinuxSubscriptions
|
|
690
|
+
});
|