@aws-sdk/client-cost-optimization-hub 3.490.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/CostOptimizationHub.js +1 -25
- package/dist-cjs/CostOptimizationHubClient.js +1 -43
- package/dist-cjs/commands/GetPreferencesCommand.js +1 -28
- package/dist-cjs/commands/GetRecommendationCommand.js +1 -28
- package/dist-cjs/commands/ListEnrollmentStatusesCommand.js +1 -28
- package/dist-cjs/commands/ListRecommendationSummariesCommand.js +1 -28
- package/dist-cjs/commands/ListRecommendationsCommand.js +1 -28
- package/dist-cjs/commands/UpdateEnrollmentStatusCommand.js +1 -28
- package/dist-cjs/commands/UpdatePreferencesCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -10
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1323 -11
- package/dist-cjs/models/CostOptimizationHubServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -158
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListEnrollmentStatusesPaginator.js +1 -7
- package/dist-cjs/pagination/ListRecommendationSummariesPaginator.js +1 -7
- package/dist-cjs/pagination/ListRecommendationsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -7
- package/dist-cjs/protocols/Aws_json1_0.js +1 -830
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
package/dist-cjs/index.js
CHANGED
|
@@ -1,12 +1,1324 @@
|
|
|
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
|
+
AccessDeniedException: () => AccessDeniedException,
|
|
25
|
+
ActionType: () => ActionType,
|
|
26
|
+
CostOptimizationHub: () => CostOptimizationHub,
|
|
27
|
+
CostOptimizationHubClient: () => CostOptimizationHubClient,
|
|
28
|
+
CostOptimizationHubServiceException: () => CostOptimizationHubServiceException,
|
|
29
|
+
EnrollmentStatus: () => EnrollmentStatus,
|
|
30
|
+
GetPreferencesCommand: () => GetPreferencesCommand,
|
|
31
|
+
GetRecommendationCommand: () => GetRecommendationCommand,
|
|
32
|
+
ImplementationEffort: () => ImplementationEffort,
|
|
33
|
+
InternalServerException: () => InternalServerException,
|
|
34
|
+
ListEnrollmentStatusesCommand: () => ListEnrollmentStatusesCommand,
|
|
35
|
+
ListRecommendationSummariesCommand: () => ListRecommendationSummariesCommand,
|
|
36
|
+
ListRecommendationsCommand: () => ListRecommendationsCommand,
|
|
37
|
+
MemberAccountDiscountVisibility: () => MemberAccountDiscountVisibility,
|
|
38
|
+
Order: () => Order,
|
|
39
|
+
ResourceDetails: () => ResourceDetails,
|
|
40
|
+
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
41
|
+
ResourceType: () => ResourceType,
|
|
42
|
+
SavingsEstimationMode: () => SavingsEstimationMode,
|
|
43
|
+
Source: () => Source,
|
|
44
|
+
ThrottlingException: () => ThrottlingException,
|
|
45
|
+
UpdateEnrollmentStatusCommand: () => UpdateEnrollmentStatusCommand,
|
|
46
|
+
UpdatePreferencesCommand: () => UpdatePreferencesCommand,
|
|
47
|
+
ValidationException: () => ValidationException,
|
|
48
|
+
ValidationExceptionReason: () => ValidationExceptionReason,
|
|
49
|
+
__Client: () => import_smithy_client.Client,
|
|
50
|
+
paginateListEnrollmentStatuses: () => paginateListEnrollmentStatuses,
|
|
51
|
+
paginateListRecommendationSummaries: () => paginateListRecommendationSummaries,
|
|
52
|
+
paginateListRecommendations: () => paginateListRecommendations
|
|
53
|
+
});
|
|
54
|
+
module.exports = __toCommonJS(src_exports);
|
|
55
|
+
|
|
56
|
+
// src/CostOptimizationHubClient.ts
|
|
57
|
+
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
|
|
58
|
+
var import_middleware_logger = require("@aws-sdk/middleware-logger");
|
|
59
|
+
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
|
|
60
|
+
var import_middleware_signing = require("@aws-sdk/middleware-signing");
|
|
61
|
+
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
|
|
62
|
+
var import_config_resolver = require("@smithy/config-resolver");
|
|
63
|
+
var import_middleware_content_length = require("@smithy/middleware-content-length");
|
|
64
|
+
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
|
|
65
|
+
var import_middleware_retry = require("@smithy/middleware-retry");
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
// src/endpoint/EndpointParameters.ts
|
|
69
|
+
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
|
|
70
|
+
return {
|
|
71
|
+
...options,
|
|
72
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
73
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
74
|
+
defaultSigningName: "cost-optimization-hub"
|
|
75
|
+
};
|
|
76
|
+
}, "resolveClientEndpointParameters");
|
|
77
|
+
var commonParams = {
|
|
78
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
79
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
80
|
+
Region: { type: "builtInParams", name: "region" },
|
|
81
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// src/CostOptimizationHubClient.ts
|
|
85
|
+
var import_runtimeConfig = require("././runtimeConfig");
|
|
86
|
+
|
|
87
|
+
// src/runtimeExtensions.ts
|
|
88
|
+
var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
|
|
89
|
+
var import_protocol_http = require("@smithy/protocol-http");
|
|
90
|
+
var import_smithy_client = require("@smithy/smithy-client");
|
|
91
|
+
var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
|
|
92
|
+
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
93
|
+
const extensionConfiguration = {
|
|
94
|
+
...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
95
|
+
...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
96
|
+
...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
|
|
97
|
+
};
|
|
98
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
99
|
+
return {
|
|
100
|
+
...runtimeConfig,
|
|
101
|
+
...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
102
|
+
...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
103
|
+
...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
|
|
104
|
+
};
|
|
105
|
+
}, "resolveRuntimeExtensions");
|
|
106
|
+
|
|
107
|
+
// src/CostOptimizationHubClient.ts
|
|
108
|
+
var _CostOptimizationHubClient = class _CostOptimizationHubClient extends import_smithy_client.Client {
|
|
109
|
+
constructor(...[configuration]) {
|
|
110
|
+
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
|
|
111
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
112
|
+
const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
|
|
113
|
+
const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
|
|
114
|
+
const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
|
|
115
|
+
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
|
|
116
|
+
const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
|
|
117
|
+
const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
|
|
118
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
|
|
119
|
+
super(_config_8);
|
|
120
|
+
this.config = _config_8;
|
|
121
|
+
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
122
|
+
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
123
|
+
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
124
|
+
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
125
|
+
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
126
|
+
this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
|
|
127
|
+
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
131
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
132
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
133
|
+
*/
|
|
134
|
+
destroy() {
|
|
135
|
+
super.destroy();
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
__name(_CostOptimizationHubClient, "CostOptimizationHubClient");
|
|
139
|
+
var CostOptimizationHubClient = _CostOptimizationHubClient;
|
|
140
|
+
|
|
141
|
+
// src/CostOptimizationHub.ts
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
// src/commands/GetPreferencesCommand.ts
|
|
145
|
+
|
|
146
|
+
var import_middleware_serde = require("@smithy/middleware-serde");
|
|
147
|
+
|
|
148
|
+
var import_types = require("@smithy/types");
|
|
149
|
+
|
|
150
|
+
// src/protocols/Aws_json1_0.ts
|
|
151
|
+
var import_core = require("@aws-sdk/core");
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
// src/models/CostOptimizationHubServiceException.ts
|
|
156
|
+
|
|
157
|
+
var _CostOptimizationHubServiceException = class _CostOptimizationHubServiceException extends import_smithy_client.ServiceException {
|
|
158
|
+
/**
|
|
159
|
+
* @internal
|
|
160
|
+
*/
|
|
161
|
+
constructor(options) {
|
|
162
|
+
super(options);
|
|
163
|
+
Object.setPrototypeOf(this, _CostOptimizationHubServiceException.prototype);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
__name(_CostOptimizationHubServiceException, "CostOptimizationHubServiceException");
|
|
167
|
+
var CostOptimizationHubServiceException = _CostOptimizationHubServiceException;
|
|
168
|
+
|
|
169
|
+
// src/models/models_0.ts
|
|
170
|
+
var _AccessDeniedException = class _AccessDeniedException extends CostOptimizationHubServiceException {
|
|
171
|
+
/**
|
|
172
|
+
* @internal
|
|
173
|
+
*/
|
|
174
|
+
constructor(opts) {
|
|
175
|
+
super({
|
|
176
|
+
name: "AccessDeniedException",
|
|
177
|
+
$fault: "client",
|
|
178
|
+
...opts
|
|
179
|
+
});
|
|
180
|
+
this.name = "AccessDeniedException";
|
|
181
|
+
this.$fault = "client";
|
|
182
|
+
Object.setPrototypeOf(this, _AccessDeniedException.prototype);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
__name(_AccessDeniedException, "AccessDeniedException");
|
|
186
|
+
var AccessDeniedException = _AccessDeniedException;
|
|
187
|
+
var EnrollmentStatus = {
|
|
188
|
+
ACTIVE: "Active",
|
|
189
|
+
INACTIVE: "Inactive"
|
|
190
|
+
};
|
|
191
|
+
var ActionType = {
|
|
192
|
+
MIGRATE_TO_GRAVITON: "MigrateToGraviton",
|
|
193
|
+
PURCHASE_RESERVED_INSTANCES: "PurchaseReservedInstances",
|
|
194
|
+
PURCHASE_SAVINGS_PLANS: "PurchaseSavingsPlans",
|
|
195
|
+
RIGHTSIZE: "Rightsize",
|
|
196
|
+
STOP: "Stop",
|
|
197
|
+
UPGRADE: "Upgrade"
|
|
198
|
+
};
|
|
199
|
+
var MemberAccountDiscountVisibility = {
|
|
200
|
+
ALL: "All",
|
|
201
|
+
NONE: "None"
|
|
202
|
+
};
|
|
203
|
+
var SavingsEstimationMode = {
|
|
204
|
+
AFTER_DISCOUNTS: "AfterDiscounts",
|
|
205
|
+
BEFORE_DISCOUNTS: "BeforeDiscounts"
|
|
206
|
+
};
|
|
207
|
+
var _InternalServerException = class _InternalServerException extends CostOptimizationHubServiceException {
|
|
208
|
+
/**
|
|
209
|
+
* @internal
|
|
210
|
+
*/
|
|
211
|
+
constructor(opts) {
|
|
212
|
+
super({
|
|
213
|
+
name: "InternalServerException",
|
|
214
|
+
$fault: "server",
|
|
215
|
+
...opts
|
|
216
|
+
});
|
|
217
|
+
this.name = "InternalServerException";
|
|
218
|
+
this.$fault = "server";
|
|
219
|
+
Object.setPrototypeOf(this, _InternalServerException.prototype);
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
__name(_InternalServerException, "InternalServerException");
|
|
223
|
+
var InternalServerException = _InternalServerException;
|
|
224
|
+
var _ThrottlingException = class _ThrottlingException extends CostOptimizationHubServiceException {
|
|
225
|
+
/**
|
|
226
|
+
* @internal
|
|
227
|
+
*/
|
|
228
|
+
constructor(opts) {
|
|
229
|
+
super({
|
|
230
|
+
name: "ThrottlingException",
|
|
231
|
+
$fault: "client",
|
|
232
|
+
...opts
|
|
233
|
+
});
|
|
234
|
+
this.name = "ThrottlingException";
|
|
235
|
+
this.$fault = "client";
|
|
236
|
+
Object.setPrototypeOf(this, _ThrottlingException.prototype);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
__name(_ThrottlingException, "ThrottlingException");
|
|
240
|
+
var ThrottlingException = _ThrottlingException;
|
|
241
|
+
var ValidationExceptionReason = {
|
|
242
|
+
FIELD_VALIDATION_FAILED: "FieldValidationFailed",
|
|
243
|
+
OTHER: "Other"
|
|
244
|
+
};
|
|
245
|
+
var _ValidationException = class _ValidationException extends CostOptimizationHubServiceException {
|
|
246
|
+
/**
|
|
247
|
+
* @internal
|
|
248
|
+
*/
|
|
249
|
+
constructor(opts) {
|
|
250
|
+
super({
|
|
251
|
+
name: "ValidationException",
|
|
252
|
+
$fault: "client",
|
|
253
|
+
...opts
|
|
254
|
+
});
|
|
255
|
+
this.name = "ValidationException";
|
|
256
|
+
this.$fault = "client";
|
|
257
|
+
Object.setPrototypeOf(this, _ValidationException.prototype);
|
|
258
|
+
this.reason = opts.reason;
|
|
259
|
+
this.fields = opts.fields;
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
__name(_ValidationException, "ValidationException");
|
|
263
|
+
var ValidationException = _ValidationException;
|
|
264
|
+
var ResourceDetails;
|
|
265
|
+
((ResourceDetails3) => {
|
|
266
|
+
ResourceDetails3.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
267
|
+
if (value.lambdaFunction !== void 0)
|
|
268
|
+
return visitor.lambdaFunction(value.lambdaFunction);
|
|
269
|
+
if (value.ecsService !== void 0)
|
|
270
|
+
return visitor.ecsService(value.ecsService);
|
|
271
|
+
if (value.ec2Instance !== void 0)
|
|
272
|
+
return visitor.ec2Instance(value.ec2Instance);
|
|
273
|
+
if (value.ebsVolume !== void 0)
|
|
274
|
+
return visitor.ebsVolume(value.ebsVolume);
|
|
275
|
+
if (value.ec2AutoScalingGroup !== void 0)
|
|
276
|
+
return visitor.ec2AutoScalingGroup(value.ec2AutoScalingGroup);
|
|
277
|
+
if (value.ec2ReservedInstances !== void 0)
|
|
278
|
+
return visitor.ec2ReservedInstances(value.ec2ReservedInstances);
|
|
279
|
+
if (value.rdsReservedInstances !== void 0)
|
|
280
|
+
return visitor.rdsReservedInstances(value.rdsReservedInstances);
|
|
281
|
+
if (value.elastiCacheReservedInstances !== void 0)
|
|
282
|
+
return visitor.elastiCacheReservedInstances(value.elastiCacheReservedInstances);
|
|
283
|
+
if (value.openSearchReservedInstances !== void 0)
|
|
284
|
+
return visitor.openSearchReservedInstances(value.openSearchReservedInstances);
|
|
285
|
+
if (value.redshiftReservedInstances !== void 0)
|
|
286
|
+
return visitor.redshiftReservedInstances(value.redshiftReservedInstances);
|
|
287
|
+
if (value.ec2InstanceSavingsPlans !== void 0)
|
|
288
|
+
return visitor.ec2InstanceSavingsPlans(value.ec2InstanceSavingsPlans);
|
|
289
|
+
if (value.computeSavingsPlans !== void 0)
|
|
290
|
+
return visitor.computeSavingsPlans(value.computeSavingsPlans);
|
|
291
|
+
if (value.sageMakerSavingsPlans !== void 0)
|
|
292
|
+
return visitor.sageMakerSavingsPlans(value.sageMakerSavingsPlans);
|
|
293
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
294
|
+
}, "visit");
|
|
295
|
+
})(ResourceDetails || (ResourceDetails = {}));
|
|
296
|
+
var ResourceType = {
|
|
297
|
+
COMPUTE_SAVINGS_PLANS: "ComputeSavingsPlans",
|
|
298
|
+
EBS_VOLUME: "EbsVolume",
|
|
299
|
+
EC2_AUTO_SCALING_GROUP: "Ec2AutoScalingGroup",
|
|
300
|
+
EC2_INSTANCE: "Ec2Instance",
|
|
301
|
+
EC2_INSTANCE_SAVINGS_PLANS: "Ec2InstanceSavingsPlans",
|
|
302
|
+
EC2_RESERVED_INSTANCES: "Ec2ReservedInstances",
|
|
303
|
+
ECS_SERVICE: "EcsService",
|
|
304
|
+
ELASTI_CACHE_RESERVED_INSTANCES: "ElastiCacheReservedInstances",
|
|
305
|
+
LAMBDA_FUNCTION: "LambdaFunction",
|
|
306
|
+
OPEN_SEARCH_RESERVED_INSTANCES: "OpenSearchReservedInstances",
|
|
307
|
+
RDS_RESERVED_INSTANCES: "RdsReservedInstances",
|
|
308
|
+
REDSHIFT_RESERVED_INSTANCES: "RedshiftReservedInstances",
|
|
309
|
+
SAGE_MAKER_SAVINGS_PLANS: "SageMakerSavingsPlans"
|
|
310
|
+
};
|
|
311
|
+
var ImplementationEffort = {
|
|
312
|
+
HIGH: "High",
|
|
313
|
+
LOW: "Low",
|
|
314
|
+
MEDIUM: "Medium",
|
|
315
|
+
VERY_HIGH: "VeryHigh",
|
|
316
|
+
VERY_LOW: "VeryLow"
|
|
317
|
+
};
|
|
318
|
+
var Source = {
|
|
319
|
+
COMPUTE_OPTIMIZER: "ComputeOptimizer",
|
|
320
|
+
COST_EXPLORER: "CostExplorer"
|
|
321
|
+
};
|
|
322
|
+
var _ResourceNotFoundException = class _ResourceNotFoundException extends CostOptimizationHubServiceException {
|
|
323
|
+
/**
|
|
324
|
+
* @internal
|
|
325
|
+
*/
|
|
326
|
+
constructor(opts) {
|
|
327
|
+
super({
|
|
328
|
+
name: "ResourceNotFoundException",
|
|
329
|
+
$fault: "client",
|
|
330
|
+
...opts
|
|
331
|
+
});
|
|
332
|
+
this.name = "ResourceNotFoundException";
|
|
333
|
+
this.$fault = "client";
|
|
334
|
+
Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
|
|
335
|
+
this.resourceId = opts.resourceId;
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
__name(_ResourceNotFoundException, "ResourceNotFoundException");
|
|
339
|
+
var ResourceNotFoundException = _ResourceNotFoundException;
|
|
340
|
+
var Order = {
|
|
341
|
+
ASC: "Asc",
|
|
342
|
+
DESC: "Desc"
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
// src/protocols/Aws_json1_0.ts
|
|
346
|
+
var se_GetPreferencesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
347
|
+
const headers = sharedHeaders("GetPreferences");
|
|
348
|
+
let body;
|
|
349
|
+
body = JSON.stringify((0, import_smithy_client._json)(input));
|
|
350
|
+
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
351
|
+
}, "se_GetPreferencesCommand");
|
|
352
|
+
var se_GetRecommendationCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
353
|
+
const headers = sharedHeaders("GetRecommendation");
|
|
354
|
+
let body;
|
|
355
|
+
body = JSON.stringify((0, import_smithy_client._json)(input));
|
|
356
|
+
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
357
|
+
}, "se_GetRecommendationCommand");
|
|
358
|
+
var se_ListEnrollmentStatusesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
359
|
+
const headers = sharedHeaders("ListEnrollmentStatuses");
|
|
360
|
+
let body;
|
|
361
|
+
body = JSON.stringify((0, import_smithy_client._json)(input));
|
|
362
|
+
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
363
|
+
}, "se_ListEnrollmentStatusesCommand");
|
|
364
|
+
var se_ListRecommendationsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
365
|
+
const headers = sharedHeaders("ListRecommendations");
|
|
366
|
+
let body;
|
|
367
|
+
body = JSON.stringify((0, import_smithy_client._json)(input));
|
|
368
|
+
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
369
|
+
}, "se_ListRecommendationsCommand");
|
|
370
|
+
var se_ListRecommendationSummariesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
371
|
+
const headers = sharedHeaders("ListRecommendationSummaries");
|
|
372
|
+
let body;
|
|
373
|
+
body = JSON.stringify((0, import_smithy_client._json)(input));
|
|
374
|
+
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
375
|
+
}, "se_ListRecommendationSummariesCommand");
|
|
376
|
+
var se_UpdateEnrollmentStatusCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
377
|
+
const headers = sharedHeaders("UpdateEnrollmentStatus");
|
|
378
|
+
let body;
|
|
379
|
+
body = JSON.stringify((0, import_smithy_client._json)(input));
|
|
380
|
+
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
381
|
+
}, "se_UpdateEnrollmentStatusCommand");
|
|
382
|
+
var se_UpdatePreferencesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
383
|
+
const headers = sharedHeaders("UpdatePreferences");
|
|
384
|
+
let body;
|
|
385
|
+
body = JSON.stringify((0, import_smithy_client._json)(input));
|
|
386
|
+
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
387
|
+
}, "se_UpdatePreferencesCommand");
|
|
388
|
+
var de_GetPreferencesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
389
|
+
if (output.statusCode >= 300) {
|
|
390
|
+
return de_GetPreferencesCommandError(output, context);
|
|
391
|
+
}
|
|
392
|
+
const data = await parseBody(output.body, context);
|
|
393
|
+
let contents = {};
|
|
394
|
+
contents = (0, import_smithy_client._json)(data);
|
|
395
|
+
const response = {
|
|
396
|
+
$metadata: deserializeMetadata(output),
|
|
397
|
+
...contents
|
|
398
|
+
};
|
|
399
|
+
return response;
|
|
400
|
+
}, "de_GetPreferencesCommand");
|
|
401
|
+
var de_GetPreferencesCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
402
|
+
const parsedOutput = {
|
|
403
|
+
...output,
|
|
404
|
+
body: await parseErrorBody(output.body, context)
|
|
405
|
+
};
|
|
406
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
407
|
+
switch (errorCode) {
|
|
408
|
+
case "AccessDeniedException":
|
|
409
|
+
case "com.amazonaws.costoptimizationhub#AccessDeniedException":
|
|
410
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
411
|
+
case "InternalServerException":
|
|
412
|
+
case "com.amazonaws.costoptimizationhub#InternalServerException":
|
|
413
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
414
|
+
case "ThrottlingException":
|
|
415
|
+
case "com.amazonaws.costoptimizationhub#ThrottlingException":
|
|
416
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
417
|
+
case "ValidationException":
|
|
418
|
+
case "com.amazonaws.costoptimizationhub#ValidationException":
|
|
419
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
420
|
+
default:
|
|
421
|
+
const parsedBody = parsedOutput.body;
|
|
422
|
+
return throwDefaultError({
|
|
423
|
+
output,
|
|
424
|
+
parsedBody,
|
|
425
|
+
errorCode
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
}, "de_GetPreferencesCommandError");
|
|
429
|
+
var de_GetRecommendationCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
430
|
+
if (output.statusCode >= 300) {
|
|
431
|
+
return de_GetRecommendationCommandError(output, context);
|
|
432
|
+
}
|
|
433
|
+
const data = await parseBody(output.body, context);
|
|
434
|
+
let contents = {};
|
|
435
|
+
contents = de_GetRecommendationResponse(data, context);
|
|
436
|
+
const response = {
|
|
437
|
+
$metadata: deserializeMetadata(output),
|
|
438
|
+
...contents
|
|
439
|
+
};
|
|
440
|
+
return response;
|
|
441
|
+
}, "de_GetRecommendationCommand");
|
|
442
|
+
var de_GetRecommendationCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
443
|
+
const parsedOutput = {
|
|
444
|
+
...output,
|
|
445
|
+
body: await parseErrorBody(output.body, context)
|
|
446
|
+
};
|
|
447
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
448
|
+
switch (errorCode) {
|
|
449
|
+
case "AccessDeniedException":
|
|
450
|
+
case "com.amazonaws.costoptimizationhub#AccessDeniedException":
|
|
451
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
452
|
+
case "InternalServerException":
|
|
453
|
+
case "com.amazonaws.costoptimizationhub#InternalServerException":
|
|
454
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
455
|
+
case "ResourceNotFoundException":
|
|
456
|
+
case "com.amazonaws.costoptimizationhub#ResourceNotFoundException":
|
|
457
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
458
|
+
case "ThrottlingException":
|
|
459
|
+
case "com.amazonaws.costoptimizationhub#ThrottlingException":
|
|
460
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
461
|
+
case "ValidationException":
|
|
462
|
+
case "com.amazonaws.costoptimizationhub#ValidationException":
|
|
463
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
464
|
+
default:
|
|
465
|
+
const parsedBody = parsedOutput.body;
|
|
466
|
+
return throwDefaultError({
|
|
467
|
+
output,
|
|
468
|
+
parsedBody,
|
|
469
|
+
errorCode
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
}, "de_GetRecommendationCommandError");
|
|
473
|
+
var de_ListEnrollmentStatusesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
474
|
+
if (output.statusCode >= 300) {
|
|
475
|
+
return de_ListEnrollmentStatusesCommandError(output, context);
|
|
476
|
+
}
|
|
477
|
+
const data = await parseBody(output.body, context);
|
|
478
|
+
let contents = {};
|
|
479
|
+
contents = de_ListEnrollmentStatusesResponse(data, context);
|
|
480
|
+
const response = {
|
|
481
|
+
$metadata: deserializeMetadata(output),
|
|
482
|
+
...contents
|
|
483
|
+
};
|
|
484
|
+
return response;
|
|
485
|
+
}, "de_ListEnrollmentStatusesCommand");
|
|
486
|
+
var de_ListEnrollmentStatusesCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
487
|
+
const parsedOutput = {
|
|
488
|
+
...output,
|
|
489
|
+
body: await parseErrorBody(output.body, context)
|
|
490
|
+
};
|
|
491
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
492
|
+
switch (errorCode) {
|
|
493
|
+
case "AccessDeniedException":
|
|
494
|
+
case "com.amazonaws.costoptimizationhub#AccessDeniedException":
|
|
495
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
496
|
+
case "InternalServerException":
|
|
497
|
+
case "com.amazonaws.costoptimizationhub#InternalServerException":
|
|
498
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
499
|
+
case "ThrottlingException":
|
|
500
|
+
case "com.amazonaws.costoptimizationhub#ThrottlingException":
|
|
501
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
502
|
+
case "ValidationException":
|
|
503
|
+
case "com.amazonaws.costoptimizationhub#ValidationException":
|
|
504
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
505
|
+
default:
|
|
506
|
+
const parsedBody = parsedOutput.body;
|
|
507
|
+
return throwDefaultError({
|
|
508
|
+
output,
|
|
509
|
+
parsedBody,
|
|
510
|
+
errorCode
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
}, "de_ListEnrollmentStatusesCommandError");
|
|
514
|
+
var de_ListRecommendationsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
515
|
+
if (output.statusCode >= 300) {
|
|
516
|
+
return de_ListRecommendationsCommandError(output, context);
|
|
517
|
+
}
|
|
518
|
+
const data = await parseBody(output.body, context);
|
|
519
|
+
let contents = {};
|
|
520
|
+
contents = de_ListRecommendationsResponse(data, context);
|
|
521
|
+
const response = {
|
|
522
|
+
$metadata: deserializeMetadata(output),
|
|
523
|
+
...contents
|
|
524
|
+
};
|
|
525
|
+
return response;
|
|
526
|
+
}, "de_ListRecommendationsCommand");
|
|
527
|
+
var de_ListRecommendationsCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
528
|
+
const parsedOutput = {
|
|
529
|
+
...output,
|
|
530
|
+
body: await parseErrorBody(output.body, context)
|
|
531
|
+
};
|
|
532
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
533
|
+
switch (errorCode) {
|
|
534
|
+
case "AccessDeniedException":
|
|
535
|
+
case "com.amazonaws.costoptimizationhub#AccessDeniedException":
|
|
536
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
537
|
+
case "InternalServerException":
|
|
538
|
+
case "com.amazonaws.costoptimizationhub#InternalServerException":
|
|
539
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
540
|
+
case "ThrottlingException":
|
|
541
|
+
case "com.amazonaws.costoptimizationhub#ThrottlingException":
|
|
542
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
543
|
+
case "ValidationException":
|
|
544
|
+
case "com.amazonaws.costoptimizationhub#ValidationException":
|
|
545
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
546
|
+
default:
|
|
547
|
+
const parsedBody = parsedOutput.body;
|
|
548
|
+
return throwDefaultError({
|
|
549
|
+
output,
|
|
550
|
+
parsedBody,
|
|
551
|
+
errorCode
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
}, "de_ListRecommendationsCommandError");
|
|
555
|
+
var de_ListRecommendationSummariesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
556
|
+
if (output.statusCode >= 300) {
|
|
557
|
+
return de_ListRecommendationSummariesCommandError(output, context);
|
|
558
|
+
}
|
|
559
|
+
const data = await parseBody(output.body, context);
|
|
560
|
+
let contents = {};
|
|
561
|
+
contents = de_ListRecommendationSummariesResponse(data, context);
|
|
562
|
+
const response = {
|
|
563
|
+
$metadata: deserializeMetadata(output),
|
|
564
|
+
...contents
|
|
565
|
+
};
|
|
566
|
+
return response;
|
|
567
|
+
}, "de_ListRecommendationSummariesCommand");
|
|
568
|
+
var de_ListRecommendationSummariesCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
569
|
+
const parsedOutput = {
|
|
570
|
+
...output,
|
|
571
|
+
body: await parseErrorBody(output.body, context)
|
|
572
|
+
};
|
|
573
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
574
|
+
switch (errorCode) {
|
|
575
|
+
case "AccessDeniedException":
|
|
576
|
+
case "com.amazonaws.costoptimizationhub#AccessDeniedException":
|
|
577
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
578
|
+
case "InternalServerException":
|
|
579
|
+
case "com.amazonaws.costoptimizationhub#InternalServerException":
|
|
580
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
581
|
+
case "ThrottlingException":
|
|
582
|
+
case "com.amazonaws.costoptimizationhub#ThrottlingException":
|
|
583
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
584
|
+
case "ValidationException":
|
|
585
|
+
case "com.amazonaws.costoptimizationhub#ValidationException":
|
|
586
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
587
|
+
default:
|
|
588
|
+
const parsedBody = parsedOutput.body;
|
|
589
|
+
return throwDefaultError({
|
|
590
|
+
output,
|
|
591
|
+
parsedBody,
|
|
592
|
+
errorCode
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
}, "de_ListRecommendationSummariesCommandError");
|
|
596
|
+
var de_UpdateEnrollmentStatusCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
597
|
+
if (output.statusCode >= 300) {
|
|
598
|
+
return de_UpdateEnrollmentStatusCommandError(output, context);
|
|
599
|
+
}
|
|
600
|
+
const data = await parseBody(output.body, context);
|
|
601
|
+
let contents = {};
|
|
602
|
+
contents = (0, import_smithy_client._json)(data);
|
|
603
|
+
const response = {
|
|
604
|
+
$metadata: deserializeMetadata(output),
|
|
605
|
+
...contents
|
|
606
|
+
};
|
|
607
|
+
return response;
|
|
608
|
+
}, "de_UpdateEnrollmentStatusCommand");
|
|
609
|
+
var de_UpdateEnrollmentStatusCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
610
|
+
const parsedOutput = {
|
|
611
|
+
...output,
|
|
612
|
+
body: await parseErrorBody(output.body, context)
|
|
613
|
+
};
|
|
614
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
615
|
+
switch (errorCode) {
|
|
616
|
+
case "AccessDeniedException":
|
|
617
|
+
case "com.amazonaws.costoptimizationhub#AccessDeniedException":
|
|
618
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
619
|
+
case "InternalServerException":
|
|
620
|
+
case "com.amazonaws.costoptimizationhub#InternalServerException":
|
|
621
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
622
|
+
case "ThrottlingException":
|
|
623
|
+
case "com.amazonaws.costoptimizationhub#ThrottlingException":
|
|
624
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
625
|
+
case "ValidationException":
|
|
626
|
+
case "com.amazonaws.costoptimizationhub#ValidationException":
|
|
627
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
628
|
+
default:
|
|
629
|
+
const parsedBody = parsedOutput.body;
|
|
630
|
+
return throwDefaultError({
|
|
631
|
+
output,
|
|
632
|
+
parsedBody,
|
|
633
|
+
errorCode
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
}, "de_UpdateEnrollmentStatusCommandError");
|
|
637
|
+
var de_UpdatePreferencesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
638
|
+
if (output.statusCode >= 300) {
|
|
639
|
+
return de_UpdatePreferencesCommandError(output, context);
|
|
640
|
+
}
|
|
641
|
+
const data = await parseBody(output.body, context);
|
|
642
|
+
let contents = {};
|
|
643
|
+
contents = (0, import_smithy_client._json)(data);
|
|
644
|
+
const response = {
|
|
645
|
+
$metadata: deserializeMetadata(output),
|
|
646
|
+
...contents
|
|
647
|
+
};
|
|
648
|
+
return response;
|
|
649
|
+
}, "de_UpdatePreferencesCommand");
|
|
650
|
+
var de_UpdatePreferencesCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
651
|
+
const parsedOutput = {
|
|
652
|
+
...output,
|
|
653
|
+
body: await parseErrorBody(output.body, context)
|
|
654
|
+
};
|
|
655
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
656
|
+
switch (errorCode) {
|
|
657
|
+
case "AccessDeniedException":
|
|
658
|
+
case "com.amazonaws.costoptimizationhub#AccessDeniedException":
|
|
659
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
660
|
+
case "InternalServerException":
|
|
661
|
+
case "com.amazonaws.costoptimizationhub#InternalServerException":
|
|
662
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
663
|
+
case "ThrottlingException":
|
|
664
|
+
case "com.amazonaws.costoptimizationhub#ThrottlingException":
|
|
665
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
666
|
+
case "ValidationException":
|
|
667
|
+
case "com.amazonaws.costoptimizationhub#ValidationException":
|
|
668
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
669
|
+
default:
|
|
670
|
+
const parsedBody = parsedOutput.body;
|
|
671
|
+
return throwDefaultError({
|
|
672
|
+
output,
|
|
673
|
+
parsedBody,
|
|
674
|
+
errorCode
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
}, "de_UpdatePreferencesCommandError");
|
|
678
|
+
var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
679
|
+
const body = parsedOutput.body;
|
|
680
|
+
const deserialized = (0, import_smithy_client._json)(body);
|
|
681
|
+
const exception = new AccessDeniedException({
|
|
682
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
683
|
+
...deserialized
|
|
684
|
+
});
|
|
685
|
+
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
686
|
+
}, "de_AccessDeniedExceptionRes");
|
|
687
|
+
var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
688
|
+
const body = parsedOutput.body;
|
|
689
|
+
const deserialized = (0, import_smithy_client._json)(body);
|
|
690
|
+
const exception = new InternalServerException({
|
|
691
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
692
|
+
...deserialized
|
|
693
|
+
});
|
|
694
|
+
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
695
|
+
}, "de_InternalServerExceptionRes");
|
|
696
|
+
var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
697
|
+
const body = parsedOutput.body;
|
|
698
|
+
const deserialized = (0, import_smithy_client._json)(body);
|
|
699
|
+
const exception = new ResourceNotFoundException({
|
|
700
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
701
|
+
...deserialized
|
|
702
|
+
});
|
|
703
|
+
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
704
|
+
}, "de_ResourceNotFoundExceptionRes");
|
|
705
|
+
var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
706
|
+
const body = parsedOutput.body;
|
|
707
|
+
const deserialized = (0, import_smithy_client._json)(body);
|
|
708
|
+
const exception = new ThrottlingException({
|
|
709
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
710
|
+
...deserialized
|
|
711
|
+
});
|
|
712
|
+
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
713
|
+
}, "de_ThrottlingExceptionRes");
|
|
714
|
+
var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
715
|
+
const body = parsedOutput.body;
|
|
716
|
+
const deserialized = (0, import_smithy_client._json)(body);
|
|
717
|
+
const exception = new ValidationException({
|
|
718
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
719
|
+
...deserialized
|
|
720
|
+
});
|
|
721
|
+
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
722
|
+
}, "de_ValidationExceptionRes");
|
|
723
|
+
var de_AccountEnrollmentStatus = /* @__PURE__ */ __name((output, context) => {
|
|
724
|
+
return (0, import_smithy_client.take)(output, {
|
|
725
|
+
accountId: import_smithy_client.expectString,
|
|
726
|
+
createdTimestamp: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
|
|
727
|
+
lastUpdatedTimestamp: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
|
|
728
|
+
status: import_smithy_client.expectString
|
|
729
|
+
});
|
|
730
|
+
}, "de_AccountEnrollmentStatus");
|
|
731
|
+
var de_AccountEnrollmentStatuses = /* @__PURE__ */ __name((output, context) => {
|
|
732
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
733
|
+
return de_AccountEnrollmentStatus(entry, context);
|
|
734
|
+
});
|
|
735
|
+
return retVal;
|
|
736
|
+
}, "de_AccountEnrollmentStatuses");
|
|
737
|
+
var de_BlockStoragePerformanceConfiguration = /* @__PURE__ */ __name((output, context) => {
|
|
738
|
+
return (0, import_smithy_client.take)(output, {
|
|
739
|
+
iops: import_smithy_client.limitedParseDouble,
|
|
740
|
+
throughput: import_smithy_client.limitedParseDouble
|
|
741
|
+
});
|
|
742
|
+
}, "de_BlockStoragePerformanceConfiguration");
|
|
743
|
+
var de_ComputeConfiguration = /* @__PURE__ */ __name((output, context) => {
|
|
744
|
+
return (0, import_smithy_client.take)(output, {
|
|
745
|
+
architecture: import_smithy_client.expectString,
|
|
746
|
+
memorySizeInMB: import_smithy_client.expectInt32,
|
|
747
|
+
platform: import_smithy_client.expectString,
|
|
748
|
+
vCpu: import_smithy_client.limitedParseDouble
|
|
749
|
+
});
|
|
750
|
+
}, "de_ComputeConfiguration");
|
|
751
|
+
var de_ComputeSavingsPlans = /* @__PURE__ */ __name((output, context) => {
|
|
752
|
+
return (0, import_smithy_client.take)(output, {
|
|
753
|
+
configuration: import_smithy_client._json,
|
|
754
|
+
costCalculation: (_) => de_SavingsPlansCostCalculation(_, context)
|
|
755
|
+
});
|
|
756
|
+
}, "de_ComputeSavingsPlans");
|
|
757
|
+
var de_EbsVolume = /* @__PURE__ */ __name((output, context) => {
|
|
758
|
+
return (0, import_smithy_client.take)(output, {
|
|
759
|
+
configuration: (_) => de_EbsVolumeConfiguration(_, context),
|
|
760
|
+
costCalculation: (_) => de_ResourceCostCalculation(_, context)
|
|
761
|
+
});
|
|
762
|
+
}, "de_EbsVolume");
|
|
763
|
+
var de_EbsVolumeConfiguration = /* @__PURE__ */ __name((output, context) => {
|
|
764
|
+
return (0, import_smithy_client.take)(output, {
|
|
765
|
+
attachmentState: import_smithy_client.expectString,
|
|
766
|
+
performance: (_) => de_BlockStoragePerformanceConfiguration(_, context),
|
|
767
|
+
storage: (_) => de_StorageConfiguration(_, context)
|
|
768
|
+
});
|
|
769
|
+
}, "de_EbsVolumeConfiguration");
|
|
770
|
+
var de_Ec2AutoScalingGroup = /* @__PURE__ */ __name((output, context) => {
|
|
771
|
+
return (0, import_smithy_client.take)(output, {
|
|
772
|
+
configuration: import_smithy_client._json,
|
|
773
|
+
costCalculation: (_) => de_ResourceCostCalculation(_, context)
|
|
774
|
+
});
|
|
775
|
+
}, "de_Ec2AutoScalingGroup");
|
|
776
|
+
var de_Ec2Instance = /* @__PURE__ */ __name((output, context) => {
|
|
777
|
+
return (0, import_smithy_client.take)(output, {
|
|
778
|
+
configuration: import_smithy_client._json,
|
|
779
|
+
costCalculation: (_) => de_ResourceCostCalculation(_, context)
|
|
780
|
+
});
|
|
781
|
+
}, "de_Ec2Instance");
|
|
782
|
+
var de_Ec2InstanceSavingsPlans = /* @__PURE__ */ __name((output, context) => {
|
|
783
|
+
return (0, import_smithy_client.take)(output, {
|
|
784
|
+
configuration: import_smithy_client._json,
|
|
785
|
+
costCalculation: (_) => de_SavingsPlansCostCalculation(_, context)
|
|
786
|
+
});
|
|
787
|
+
}, "de_Ec2InstanceSavingsPlans");
|
|
788
|
+
var de_Ec2ReservedInstances = /* @__PURE__ */ __name((output, context) => {
|
|
789
|
+
return (0, import_smithy_client.take)(output, {
|
|
790
|
+
configuration: import_smithy_client._json,
|
|
791
|
+
costCalculation: (_) => de_ReservedInstancesCostCalculation(_, context)
|
|
792
|
+
});
|
|
793
|
+
}, "de_Ec2ReservedInstances");
|
|
794
|
+
var de_EcsService = /* @__PURE__ */ __name((output, context) => {
|
|
795
|
+
return (0, import_smithy_client.take)(output, {
|
|
796
|
+
configuration: (_) => de_EcsServiceConfiguration(_, context),
|
|
797
|
+
costCalculation: (_) => de_ResourceCostCalculation(_, context)
|
|
798
|
+
});
|
|
799
|
+
}, "de_EcsService");
|
|
800
|
+
var de_EcsServiceConfiguration = /* @__PURE__ */ __name((output, context) => {
|
|
801
|
+
return (0, import_smithy_client.take)(output, {
|
|
802
|
+
compute: (_) => de_ComputeConfiguration(_, context)
|
|
803
|
+
});
|
|
804
|
+
}, "de_EcsServiceConfiguration");
|
|
805
|
+
var de_ElastiCacheReservedInstances = /* @__PURE__ */ __name((output, context) => {
|
|
806
|
+
return (0, import_smithy_client.take)(output, {
|
|
807
|
+
configuration: import_smithy_client._json,
|
|
808
|
+
costCalculation: (_) => de_ReservedInstancesCostCalculation(_, context)
|
|
809
|
+
});
|
|
810
|
+
}, "de_ElastiCacheReservedInstances");
|
|
811
|
+
var de_EstimatedDiscounts = /* @__PURE__ */ __name((output, context) => {
|
|
812
|
+
return (0, import_smithy_client.take)(output, {
|
|
813
|
+
otherDiscount: import_smithy_client.limitedParseDouble,
|
|
814
|
+
reservedInstancesDiscount: import_smithy_client.limitedParseDouble,
|
|
815
|
+
savingsPlansDiscount: import_smithy_client.limitedParseDouble
|
|
816
|
+
});
|
|
817
|
+
}, "de_EstimatedDiscounts");
|
|
818
|
+
var de_GetRecommendationResponse = /* @__PURE__ */ __name((output, context) => {
|
|
819
|
+
return (0, import_smithy_client.take)(output, {
|
|
820
|
+
accountId: import_smithy_client.expectString,
|
|
821
|
+
actionType: import_smithy_client.expectString,
|
|
822
|
+
costCalculationLookbackPeriodInDays: import_smithy_client.expectInt32,
|
|
823
|
+
currencyCode: import_smithy_client.expectString,
|
|
824
|
+
currentResourceDetails: (_) => de_ResourceDetails((0, import_core.awsExpectUnion)(_), context),
|
|
825
|
+
currentResourceType: import_smithy_client.expectString,
|
|
826
|
+
estimatedMonthlyCost: import_smithy_client.limitedParseDouble,
|
|
827
|
+
estimatedMonthlySavings: import_smithy_client.limitedParseDouble,
|
|
828
|
+
estimatedSavingsOverCostCalculationLookbackPeriod: import_smithy_client.limitedParseDouble,
|
|
829
|
+
estimatedSavingsPercentage: import_smithy_client.limitedParseDouble,
|
|
830
|
+
implementationEffort: import_smithy_client.expectString,
|
|
831
|
+
lastRefreshTimestamp: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
|
|
832
|
+
recommendationId: import_smithy_client.expectString,
|
|
833
|
+
recommendationLookbackPeriodInDays: import_smithy_client.expectInt32,
|
|
834
|
+
recommendedResourceDetails: (_) => de_ResourceDetails((0, import_core.awsExpectUnion)(_), context),
|
|
835
|
+
recommendedResourceType: import_smithy_client.expectString,
|
|
836
|
+
region: import_smithy_client.expectString,
|
|
837
|
+
resourceArn: import_smithy_client.expectString,
|
|
838
|
+
resourceId: import_smithy_client.expectString,
|
|
839
|
+
restartNeeded: import_smithy_client.expectBoolean,
|
|
840
|
+
rollbackPossible: import_smithy_client.expectBoolean,
|
|
841
|
+
source: import_smithy_client.expectString,
|
|
842
|
+
tags: import_smithy_client._json
|
|
843
|
+
});
|
|
844
|
+
}, "de_GetRecommendationResponse");
|
|
845
|
+
var de_LambdaFunction = /* @__PURE__ */ __name((output, context) => {
|
|
846
|
+
return (0, import_smithy_client.take)(output, {
|
|
847
|
+
configuration: (_) => de_LambdaFunctionConfiguration(_, context),
|
|
848
|
+
costCalculation: (_) => de_ResourceCostCalculation(_, context)
|
|
849
|
+
});
|
|
850
|
+
}, "de_LambdaFunction");
|
|
851
|
+
var de_LambdaFunctionConfiguration = /* @__PURE__ */ __name((output, context) => {
|
|
852
|
+
return (0, import_smithy_client.take)(output, {
|
|
853
|
+
compute: (_) => de_ComputeConfiguration(_, context)
|
|
854
|
+
});
|
|
855
|
+
}, "de_LambdaFunctionConfiguration");
|
|
856
|
+
var de_ListEnrollmentStatusesResponse = /* @__PURE__ */ __name((output, context) => {
|
|
857
|
+
return (0, import_smithy_client.take)(output, {
|
|
858
|
+
items: (_) => de_AccountEnrollmentStatuses(_, context),
|
|
859
|
+
nextToken: import_smithy_client.expectString
|
|
860
|
+
});
|
|
861
|
+
}, "de_ListEnrollmentStatusesResponse");
|
|
862
|
+
var de_ListRecommendationsResponse = /* @__PURE__ */ __name((output, context) => {
|
|
863
|
+
return (0, import_smithy_client.take)(output, {
|
|
864
|
+
items: (_) => de_RecommendationList(_, context),
|
|
865
|
+
nextToken: import_smithy_client.expectString
|
|
866
|
+
});
|
|
867
|
+
}, "de_ListRecommendationsResponse");
|
|
868
|
+
var de_ListRecommendationSummariesResponse = /* @__PURE__ */ __name((output, context) => {
|
|
869
|
+
return (0, import_smithy_client.take)(output, {
|
|
870
|
+
currencyCode: import_smithy_client.expectString,
|
|
871
|
+
estimatedTotalDedupedSavings: import_smithy_client.limitedParseDouble,
|
|
872
|
+
groupBy: import_smithy_client.expectString,
|
|
873
|
+
items: (_) => de_RecommendationSummariesList(_, context),
|
|
874
|
+
nextToken: import_smithy_client.expectString
|
|
875
|
+
});
|
|
876
|
+
}, "de_ListRecommendationSummariesResponse");
|
|
877
|
+
var de_OpenSearchReservedInstances = /* @__PURE__ */ __name((output, context) => {
|
|
878
|
+
return (0, import_smithy_client.take)(output, {
|
|
879
|
+
configuration: import_smithy_client._json,
|
|
880
|
+
costCalculation: (_) => de_ReservedInstancesCostCalculation(_, context)
|
|
881
|
+
});
|
|
882
|
+
}, "de_OpenSearchReservedInstances");
|
|
883
|
+
var de_RdsReservedInstances = /* @__PURE__ */ __name((output, context) => {
|
|
884
|
+
return (0, import_smithy_client.take)(output, {
|
|
885
|
+
configuration: import_smithy_client._json,
|
|
886
|
+
costCalculation: (_) => de_ReservedInstancesCostCalculation(_, context)
|
|
887
|
+
});
|
|
888
|
+
}, "de_RdsReservedInstances");
|
|
889
|
+
var de_Recommendation = /* @__PURE__ */ __name((output, context) => {
|
|
890
|
+
return (0, import_smithy_client.take)(output, {
|
|
891
|
+
accountId: import_smithy_client.expectString,
|
|
892
|
+
actionType: import_smithy_client.expectString,
|
|
893
|
+
currencyCode: import_smithy_client.expectString,
|
|
894
|
+
currentResourceSummary: import_smithy_client.expectString,
|
|
895
|
+
currentResourceType: import_smithy_client.expectString,
|
|
896
|
+
estimatedMonthlyCost: import_smithy_client.limitedParseDouble,
|
|
897
|
+
estimatedMonthlySavings: import_smithy_client.limitedParseDouble,
|
|
898
|
+
estimatedSavingsPercentage: import_smithy_client.limitedParseDouble,
|
|
899
|
+
implementationEffort: import_smithy_client.expectString,
|
|
900
|
+
lastRefreshTimestamp: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
|
|
901
|
+
recommendationId: import_smithy_client.expectString,
|
|
902
|
+
recommendationLookbackPeriodInDays: import_smithy_client.expectInt32,
|
|
903
|
+
recommendedResourceSummary: import_smithy_client.expectString,
|
|
904
|
+
recommendedResourceType: import_smithy_client.expectString,
|
|
905
|
+
region: import_smithy_client.expectString,
|
|
906
|
+
resourceArn: import_smithy_client.expectString,
|
|
907
|
+
resourceId: import_smithy_client.expectString,
|
|
908
|
+
restartNeeded: import_smithy_client.expectBoolean,
|
|
909
|
+
rollbackPossible: import_smithy_client.expectBoolean,
|
|
910
|
+
source: import_smithy_client.expectString,
|
|
911
|
+
tags: import_smithy_client._json
|
|
912
|
+
});
|
|
913
|
+
}, "de_Recommendation");
|
|
914
|
+
var de_RecommendationList = /* @__PURE__ */ __name((output, context) => {
|
|
915
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
916
|
+
return de_Recommendation(entry, context);
|
|
917
|
+
});
|
|
918
|
+
return retVal;
|
|
919
|
+
}, "de_RecommendationList");
|
|
920
|
+
var de_RecommendationSummariesList = /* @__PURE__ */ __name((output, context) => {
|
|
921
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
922
|
+
return de_RecommendationSummary(entry, context);
|
|
923
|
+
});
|
|
924
|
+
return retVal;
|
|
925
|
+
}, "de_RecommendationSummariesList");
|
|
926
|
+
var de_RecommendationSummary = /* @__PURE__ */ __name((output, context) => {
|
|
927
|
+
return (0, import_smithy_client.take)(output, {
|
|
928
|
+
estimatedMonthlySavings: import_smithy_client.limitedParseDouble,
|
|
929
|
+
group: import_smithy_client.expectString,
|
|
930
|
+
recommendationCount: import_smithy_client.expectInt32
|
|
931
|
+
});
|
|
932
|
+
}, "de_RecommendationSummary");
|
|
933
|
+
var de_RedshiftReservedInstances = /* @__PURE__ */ __name((output, context) => {
|
|
934
|
+
return (0, import_smithy_client.take)(output, {
|
|
935
|
+
configuration: import_smithy_client._json,
|
|
936
|
+
costCalculation: (_) => de_ReservedInstancesCostCalculation(_, context)
|
|
937
|
+
});
|
|
938
|
+
}, "de_RedshiftReservedInstances");
|
|
939
|
+
var de_ReservedInstancesCostCalculation = /* @__PURE__ */ __name((output, context) => {
|
|
940
|
+
return (0, import_smithy_client.take)(output, {
|
|
941
|
+
pricing: (_) => de_ReservedInstancesPricing(_, context)
|
|
942
|
+
});
|
|
943
|
+
}, "de_ReservedInstancesCostCalculation");
|
|
944
|
+
var de_ReservedInstancesPricing = /* @__PURE__ */ __name((output, context) => {
|
|
945
|
+
return (0, import_smithy_client.take)(output, {
|
|
946
|
+
estimatedMonthlyAmortizedReservationCost: import_smithy_client.limitedParseDouble,
|
|
947
|
+
estimatedOnDemandCost: import_smithy_client.limitedParseDouble,
|
|
948
|
+
monthlyReservationEligibleCost: import_smithy_client.limitedParseDouble,
|
|
949
|
+
savingsPercentage: import_smithy_client.limitedParseDouble
|
|
950
|
+
});
|
|
951
|
+
}, "de_ReservedInstancesPricing");
|
|
952
|
+
var de_ResourceCostCalculation = /* @__PURE__ */ __name((output, context) => {
|
|
953
|
+
return (0, import_smithy_client.take)(output, {
|
|
954
|
+
pricing: (_) => de_ResourcePricing(_, context),
|
|
955
|
+
usages: (_) => de_UsageList(_, context)
|
|
956
|
+
});
|
|
957
|
+
}, "de_ResourceCostCalculation");
|
|
958
|
+
var de_ResourceDetails = /* @__PURE__ */ __name((output, context) => {
|
|
959
|
+
if (output.computeSavingsPlans != null) {
|
|
960
|
+
return {
|
|
961
|
+
computeSavingsPlans: de_ComputeSavingsPlans(output.computeSavingsPlans, context)
|
|
962
|
+
};
|
|
963
|
+
}
|
|
964
|
+
if (output.ebsVolume != null) {
|
|
965
|
+
return {
|
|
966
|
+
ebsVolume: de_EbsVolume(output.ebsVolume, context)
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
if (output.ec2AutoScalingGroup != null) {
|
|
970
|
+
return {
|
|
971
|
+
ec2AutoScalingGroup: de_Ec2AutoScalingGroup(output.ec2AutoScalingGroup, context)
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
if (output.ec2Instance != null) {
|
|
975
|
+
return {
|
|
976
|
+
ec2Instance: de_Ec2Instance(output.ec2Instance, context)
|
|
977
|
+
};
|
|
978
|
+
}
|
|
979
|
+
if (output.ec2InstanceSavingsPlans != null) {
|
|
980
|
+
return {
|
|
981
|
+
ec2InstanceSavingsPlans: de_Ec2InstanceSavingsPlans(output.ec2InstanceSavingsPlans, context)
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
if (output.ec2ReservedInstances != null) {
|
|
985
|
+
return {
|
|
986
|
+
ec2ReservedInstances: de_Ec2ReservedInstances(output.ec2ReservedInstances, context)
|
|
987
|
+
};
|
|
988
|
+
}
|
|
989
|
+
if (output.ecsService != null) {
|
|
990
|
+
return {
|
|
991
|
+
ecsService: de_EcsService(output.ecsService, context)
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
if (output.elastiCacheReservedInstances != null) {
|
|
995
|
+
return {
|
|
996
|
+
elastiCacheReservedInstances: de_ElastiCacheReservedInstances(output.elastiCacheReservedInstances, context)
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
if (output.lambdaFunction != null) {
|
|
1000
|
+
return {
|
|
1001
|
+
lambdaFunction: de_LambdaFunction(output.lambdaFunction, context)
|
|
1002
|
+
};
|
|
1003
|
+
}
|
|
1004
|
+
if (output.openSearchReservedInstances != null) {
|
|
1005
|
+
return {
|
|
1006
|
+
openSearchReservedInstances: de_OpenSearchReservedInstances(output.openSearchReservedInstances, context)
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
if (output.rdsReservedInstances != null) {
|
|
1010
|
+
return {
|
|
1011
|
+
rdsReservedInstances: de_RdsReservedInstances(output.rdsReservedInstances, context)
|
|
1012
|
+
};
|
|
1013
|
+
}
|
|
1014
|
+
if (output.redshiftReservedInstances != null) {
|
|
1015
|
+
return {
|
|
1016
|
+
redshiftReservedInstances: de_RedshiftReservedInstances(output.redshiftReservedInstances, context)
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
if (output.sageMakerSavingsPlans != null) {
|
|
1020
|
+
return {
|
|
1021
|
+
sageMakerSavingsPlans: de_SageMakerSavingsPlans(output.sageMakerSavingsPlans, context)
|
|
1022
|
+
};
|
|
1023
|
+
}
|
|
1024
|
+
return { $unknown: Object.entries(output)[0] };
|
|
1025
|
+
}, "de_ResourceDetails");
|
|
1026
|
+
var de_ResourcePricing = /* @__PURE__ */ __name((output, context) => {
|
|
1027
|
+
return (0, import_smithy_client.take)(output, {
|
|
1028
|
+
estimatedCostAfterDiscounts: import_smithy_client.limitedParseDouble,
|
|
1029
|
+
estimatedCostBeforeDiscounts: import_smithy_client.limitedParseDouble,
|
|
1030
|
+
estimatedDiscounts: (_) => de_EstimatedDiscounts(_, context),
|
|
1031
|
+
estimatedNetUnusedAmortizedCommitments: import_smithy_client.limitedParseDouble
|
|
1032
|
+
});
|
|
1033
|
+
}, "de_ResourcePricing");
|
|
1034
|
+
var de_SageMakerSavingsPlans = /* @__PURE__ */ __name((output, context) => {
|
|
1035
|
+
return (0, import_smithy_client.take)(output, {
|
|
1036
|
+
configuration: import_smithy_client._json,
|
|
1037
|
+
costCalculation: (_) => de_SavingsPlansCostCalculation(_, context)
|
|
1038
|
+
});
|
|
1039
|
+
}, "de_SageMakerSavingsPlans");
|
|
1040
|
+
var de_SavingsPlansCostCalculation = /* @__PURE__ */ __name((output, context) => {
|
|
1041
|
+
return (0, import_smithy_client.take)(output, {
|
|
1042
|
+
pricing: (_) => de_SavingsPlansPricing(_, context)
|
|
1043
|
+
});
|
|
1044
|
+
}, "de_SavingsPlansCostCalculation");
|
|
1045
|
+
var de_SavingsPlansPricing = /* @__PURE__ */ __name((output, context) => {
|
|
1046
|
+
return (0, import_smithy_client.take)(output, {
|
|
1047
|
+
estimatedMonthlyCommitment: import_smithy_client.limitedParseDouble,
|
|
1048
|
+
estimatedOnDemandCost: import_smithy_client.limitedParseDouble,
|
|
1049
|
+
monthlySavingsPlansEligibleCost: import_smithy_client.limitedParseDouble,
|
|
1050
|
+
savingsPercentage: import_smithy_client.limitedParseDouble
|
|
1051
|
+
});
|
|
1052
|
+
}, "de_SavingsPlansPricing");
|
|
1053
|
+
var de_StorageConfiguration = /* @__PURE__ */ __name((output, context) => {
|
|
1054
|
+
return (0, import_smithy_client.take)(output, {
|
|
1055
|
+
sizeInGb: import_smithy_client.limitedParseDouble,
|
|
1056
|
+
type: import_smithy_client.expectString
|
|
1057
|
+
});
|
|
1058
|
+
}, "de_StorageConfiguration");
|
|
1059
|
+
var de_Usage = /* @__PURE__ */ __name((output, context) => {
|
|
1060
|
+
return (0, import_smithy_client.take)(output, {
|
|
1061
|
+
operation: import_smithy_client.expectString,
|
|
1062
|
+
productCode: import_smithy_client.expectString,
|
|
1063
|
+
unit: import_smithy_client.expectString,
|
|
1064
|
+
usageAmount: import_smithy_client.limitedParseDouble,
|
|
1065
|
+
usageType: import_smithy_client.expectString
|
|
1066
|
+
});
|
|
1067
|
+
}, "de_Usage");
|
|
1068
|
+
var de_UsageList = /* @__PURE__ */ __name((output, context) => {
|
|
1069
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1070
|
+
return de_Usage(entry, context);
|
|
1071
|
+
});
|
|
1072
|
+
return retVal;
|
|
1073
|
+
}, "de_UsageList");
|
|
1074
|
+
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
1075
|
+
httpStatusCode: output.statusCode,
|
|
1076
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1077
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1078
|
+
cfId: output.headers["x-amz-cf-id"]
|
|
1079
|
+
}), "deserializeMetadata");
|
|
1080
|
+
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1081
|
+
var throwDefaultError = (0, import_smithy_client.withBaseException)(CostOptimizationHubServiceException);
|
|
1082
|
+
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
1083
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1084
|
+
const contents = {
|
|
1085
|
+
protocol,
|
|
1086
|
+
hostname,
|
|
1087
|
+
port,
|
|
1088
|
+
method: "POST",
|
|
1089
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1090
|
+
headers
|
|
1091
|
+
};
|
|
1092
|
+
if (resolvedHostname !== void 0) {
|
|
1093
|
+
contents.hostname = resolvedHostname;
|
|
1094
|
+
}
|
|
1095
|
+
if (body !== void 0) {
|
|
1096
|
+
contents.body = body;
|
|
1097
|
+
}
|
|
1098
|
+
return new import_protocol_http.HttpRequest(contents);
|
|
1099
|
+
}, "buildHttpRpcRequest");
|
|
1100
|
+
function sharedHeaders(operation) {
|
|
1101
|
+
return {
|
|
1102
|
+
"content-type": "application/x-amz-json-1.0",
|
|
1103
|
+
"x-amz-target": `CostOptimizationHubService.${operation}`
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
__name(sharedHeaders, "sharedHeaders");
|
|
1107
|
+
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1108
|
+
if (encoded.length) {
|
|
1109
|
+
return JSON.parse(encoded);
|
|
1110
|
+
}
|
|
1111
|
+
return {};
|
|
1112
|
+
}), "parseBody");
|
|
1113
|
+
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1114
|
+
const value = await parseBody(errorBody, context);
|
|
1115
|
+
value.message = value.message ?? value.Message;
|
|
1116
|
+
return value;
|
|
1117
|
+
}, "parseErrorBody");
|
|
1118
|
+
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1119
|
+
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1120
|
+
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1121
|
+
let cleanValue = rawValue;
|
|
1122
|
+
if (typeof cleanValue === "number") {
|
|
1123
|
+
cleanValue = cleanValue.toString();
|
|
1124
|
+
}
|
|
1125
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
1126
|
+
cleanValue = cleanValue.split(",")[0];
|
|
1127
|
+
}
|
|
1128
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
1129
|
+
cleanValue = cleanValue.split(":")[0];
|
|
1130
|
+
}
|
|
1131
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
1132
|
+
cleanValue = cleanValue.split("#")[1];
|
|
1133
|
+
}
|
|
1134
|
+
return cleanValue;
|
|
1135
|
+
}, "sanitizeErrorCode");
|
|
1136
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1137
|
+
if (headerKey !== void 0) {
|
|
1138
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1139
|
+
}
|
|
1140
|
+
if (data.code !== void 0) {
|
|
1141
|
+
return sanitizeErrorCode(data.code);
|
|
1142
|
+
}
|
|
1143
|
+
if (data["__type"] !== void 0) {
|
|
1144
|
+
return sanitizeErrorCode(data["__type"]);
|
|
1145
|
+
}
|
|
1146
|
+
}, "loadRestJsonErrorCode");
|
|
1147
|
+
|
|
1148
|
+
// src/commands/GetPreferencesCommand.ts
|
|
1149
|
+
var _GetPreferencesCommand = class _GetPreferencesCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1150
|
+
...commonParams
|
|
1151
|
+
}).m(function(Command, cs, config, o) {
|
|
1152
|
+
return [
|
|
1153
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1154
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1155
|
+
];
|
|
1156
|
+
}).s("CostOptimizationHubService", "GetPreferences", {}).n("CostOptimizationHubClient", "GetPreferencesCommand").f(void 0, void 0).ser(se_GetPreferencesCommand).de(de_GetPreferencesCommand).build() {
|
|
1157
|
+
};
|
|
1158
|
+
__name(_GetPreferencesCommand, "GetPreferencesCommand");
|
|
1159
|
+
var GetPreferencesCommand = _GetPreferencesCommand;
|
|
1160
|
+
|
|
1161
|
+
// src/commands/GetRecommendationCommand.ts
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
var _GetRecommendationCommand = class _GetRecommendationCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1167
|
+
...commonParams
|
|
1168
|
+
}).m(function(Command, cs, config, o) {
|
|
1169
|
+
return [
|
|
1170
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1171
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1172
|
+
];
|
|
1173
|
+
}).s("CostOptimizationHubService", "GetRecommendation", {}).n("CostOptimizationHubClient", "GetRecommendationCommand").f(void 0, void 0).ser(se_GetRecommendationCommand).de(de_GetRecommendationCommand).build() {
|
|
1174
|
+
};
|
|
1175
|
+
__name(_GetRecommendationCommand, "GetRecommendationCommand");
|
|
1176
|
+
var GetRecommendationCommand = _GetRecommendationCommand;
|
|
1177
|
+
|
|
1178
|
+
// src/commands/ListEnrollmentStatusesCommand.ts
|
|
1179
|
+
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
var _ListEnrollmentStatusesCommand = class _ListEnrollmentStatusesCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1184
|
+
...commonParams
|
|
1185
|
+
}).m(function(Command, cs, config, o) {
|
|
1186
|
+
return [
|
|
1187
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1188
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1189
|
+
];
|
|
1190
|
+
}).s("CostOptimizationHubService", "ListEnrollmentStatuses", {}).n("CostOptimizationHubClient", "ListEnrollmentStatusesCommand").f(void 0, void 0).ser(se_ListEnrollmentStatusesCommand).de(de_ListEnrollmentStatusesCommand).build() {
|
|
1191
|
+
};
|
|
1192
|
+
__name(_ListEnrollmentStatusesCommand, "ListEnrollmentStatusesCommand");
|
|
1193
|
+
var ListEnrollmentStatusesCommand = _ListEnrollmentStatusesCommand;
|
|
1194
|
+
|
|
1195
|
+
// src/commands/ListRecommendationsCommand.ts
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
var _ListRecommendationsCommand = class _ListRecommendationsCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1201
|
+
...commonParams
|
|
1202
|
+
}).m(function(Command, cs, config, o) {
|
|
1203
|
+
return [
|
|
1204
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1205
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1206
|
+
];
|
|
1207
|
+
}).s("CostOptimizationHubService", "ListRecommendations", {}).n("CostOptimizationHubClient", "ListRecommendationsCommand").f(void 0, void 0).ser(se_ListRecommendationsCommand).de(de_ListRecommendationsCommand).build() {
|
|
1208
|
+
};
|
|
1209
|
+
__name(_ListRecommendationsCommand, "ListRecommendationsCommand");
|
|
1210
|
+
var ListRecommendationsCommand = _ListRecommendationsCommand;
|
|
1211
|
+
|
|
1212
|
+
// src/commands/ListRecommendationSummariesCommand.ts
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
var _ListRecommendationSummariesCommand = class _ListRecommendationSummariesCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1218
|
+
...commonParams
|
|
1219
|
+
}).m(function(Command, cs, config, o) {
|
|
1220
|
+
return [
|
|
1221
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1222
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1223
|
+
];
|
|
1224
|
+
}).s("CostOptimizationHubService", "ListRecommendationSummaries", {}).n("CostOptimizationHubClient", "ListRecommendationSummariesCommand").f(void 0, void 0).ser(se_ListRecommendationSummariesCommand).de(de_ListRecommendationSummariesCommand).build() {
|
|
1225
|
+
};
|
|
1226
|
+
__name(_ListRecommendationSummariesCommand, "ListRecommendationSummariesCommand");
|
|
1227
|
+
var ListRecommendationSummariesCommand = _ListRecommendationSummariesCommand;
|
|
1228
|
+
|
|
1229
|
+
// src/commands/UpdateEnrollmentStatusCommand.ts
|
|
1230
|
+
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
var _UpdateEnrollmentStatusCommand = class _UpdateEnrollmentStatusCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1235
|
+
...commonParams
|
|
1236
|
+
}).m(function(Command, cs, config, o) {
|
|
1237
|
+
return [
|
|
1238
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1239
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1240
|
+
];
|
|
1241
|
+
}).s("CostOptimizationHubService", "UpdateEnrollmentStatus", {}).n("CostOptimizationHubClient", "UpdateEnrollmentStatusCommand").f(void 0, void 0).ser(se_UpdateEnrollmentStatusCommand).de(de_UpdateEnrollmentStatusCommand).build() {
|
|
1242
|
+
};
|
|
1243
|
+
__name(_UpdateEnrollmentStatusCommand, "UpdateEnrollmentStatusCommand");
|
|
1244
|
+
var UpdateEnrollmentStatusCommand = _UpdateEnrollmentStatusCommand;
|
|
1245
|
+
|
|
1246
|
+
// src/commands/UpdatePreferencesCommand.ts
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
var _UpdatePreferencesCommand = class _UpdatePreferencesCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
1252
|
+
...commonParams
|
|
1253
|
+
}).m(function(Command, cs, config, o) {
|
|
1254
|
+
return [
|
|
1255
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1256
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1257
|
+
];
|
|
1258
|
+
}).s("CostOptimizationHubService", "UpdatePreferences", {}).n("CostOptimizationHubClient", "UpdatePreferencesCommand").f(void 0, void 0).ser(se_UpdatePreferencesCommand).de(de_UpdatePreferencesCommand).build() {
|
|
1259
|
+
};
|
|
1260
|
+
__name(_UpdatePreferencesCommand, "UpdatePreferencesCommand");
|
|
1261
|
+
var UpdatePreferencesCommand = _UpdatePreferencesCommand;
|
|
1262
|
+
|
|
1263
|
+
// src/CostOptimizationHub.ts
|
|
1264
|
+
var commands = {
|
|
1265
|
+
GetPreferencesCommand,
|
|
1266
|
+
GetRecommendationCommand,
|
|
1267
|
+
ListEnrollmentStatusesCommand,
|
|
1268
|
+
ListRecommendationsCommand,
|
|
1269
|
+
ListRecommendationSummariesCommand,
|
|
1270
|
+
UpdateEnrollmentStatusCommand,
|
|
1271
|
+
UpdatePreferencesCommand
|
|
1272
|
+
};
|
|
1273
|
+
var _CostOptimizationHub = class _CostOptimizationHub extends CostOptimizationHubClient {
|
|
1274
|
+
};
|
|
1275
|
+
__name(_CostOptimizationHub, "CostOptimizationHub");
|
|
1276
|
+
var CostOptimizationHub = _CostOptimizationHub;
|
|
1277
|
+
(0, import_smithy_client.createAggregatedClient)(commands, CostOptimizationHub);
|
|
1278
|
+
|
|
1279
|
+
// src/pagination/ListEnrollmentStatusesPaginator.ts
|
|
1280
|
+
var import_core2 = require("@smithy/core");
|
|
1281
|
+
var paginateListEnrollmentStatuses = (0, import_core2.createPaginator)(CostOptimizationHubClient, ListEnrollmentStatusesCommand, "nextToken", "nextToken", "maxResults");
|
|
1282
|
+
|
|
1283
|
+
// src/pagination/ListRecommendationSummariesPaginator.ts
|
|
1284
|
+
var import_core3 = require("@smithy/core");
|
|
1285
|
+
var paginateListRecommendationSummaries = (0, import_core3.createPaginator)(CostOptimizationHubClient, ListRecommendationSummariesCommand, "nextToken", "nextToken", "maxResults");
|
|
1286
|
+
|
|
1287
|
+
// src/pagination/ListRecommendationsPaginator.ts
|
|
1288
|
+
var import_core4 = require("@smithy/core");
|
|
1289
|
+
var paginateListRecommendations = (0, import_core4.createPaginator)(CostOptimizationHubClient, ListRecommendationsCommand, "nextToken", "nextToken", "maxResults");
|
|
1290
|
+
|
|
1291
|
+
// src/index.ts
|
|
1292
|
+
var import_util_endpoints = require("@aws-sdk/util-endpoints");
|
|
1293
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1294
|
+
0 && (module.exports = {
|
|
1295
|
+
AccessDeniedException,
|
|
1296
|
+
ActionType,
|
|
1297
|
+
CostOptimizationHub,
|
|
1298
|
+
CostOptimizationHubClient,
|
|
1299
|
+
CostOptimizationHubServiceException,
|
|
1300
|
+
EnrollmentStatus,
|
|
1301
|
+
GetPreferencesCommand,
|
|
1302
|
+
GetRecommendationCommand,
|
|
1303
|
+
ImplementationEffort,
|
|
1304
|
+
InternalServerException,
|
|
1305
|
+
ListEnrollmentStatusesCommand,
|
|
1306
|
+
ListRecommendationSummariesCommand,
|
|
1307
|
+
ListRecommendationsCommand,
|
|
1308
|
+
MemberAccountDiscountVisibility,
|
|
1309
|
+
Order,
|
|
1310
|
+
ResourceDetails,
|
|
1311
|
+
ResourceNotFoundException,
|
|
1312
|
+
ResourceType,
|
|
1313
|
+
SavingsEstimationMode,
|
|
1314
|
+
Source,
|
|
1315
|
+
ThrottlingException,
|
|
1316
|
+
UpdateEnrollmentStatusCommand,
|
|
1317
|
+
UpdatePreferencesCommand,
|
|
1318
|
+
ValidationException,
|
|
1319
|
+
ValidationExceptionReason,
|
|
1320
|
+
__Client,
|
|
1321
|
+
paginateListEnrollmentStatuses,
|
|
1322
|
+
paginateListRecommendationSummaries,
|
|
1323
|
+
paginateListRecommendations
|
|
1324
|
+
});
|