@aws-sdk/client-savingsplans 3.901.0 → 3.906.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/index.js +845 -977
- package/package.json +5 -5
package/dist-cjs/index.js
CHANGED
|
@@ -1,999 +1,867 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
DescribeSavingsPlanRatesCommand: () => DescribeSavingsPlanRatesCommand,
|
|
28
|
-
DescribeSavingsPlansCommand: () => DescribeSavingsPlansCommand,
|
|
29
|
-
DescribeSavingsPlansOfferingRatesCommand: () => DescribeSavingsPlansOfferingRatesCommand,
|
|
30
|
-
DescribeSavingsPlansOfferingsCommand: () => DescribeSavingsPlansOfferingsCommand,
|
|
31
|
-
InternalServerException: () => InternalServerException,
|
|
32
|
-
ListTagsForResourceCommand: () => ListTagsForResourceCommand,
|
|
33
|
-
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
34
|
-
ReturnSavingsPlanCommand: () => ReturnSavingsPlanCommand,
|
|
35
|
-
SavingsPlanOfferingFilterAttribute: () => SavingsPlanOfferingFilterAttribute,
|
|
36
|
-
SavingsPlanOfferingPropertyKey: () => SavingsPlanOfferingPropertyKey,
|
|
37
|
-
SavingsPlanPaymentOption: () => SavingsPlanPaymentOption,
|
|
38
|
-
SavingsPlanProductType: () => SavingsPlanProductType,
|
|
39
|
-
SavingsPlanRateFilterAttribute: () => SavingsPlanRateFilterAttribute,
|
|
40
|
-
SavingsPlanRateFilterName: () => SavingsPlanRateFilterName,
|
|
41
|
-
SavingsPlanRatePropertyKey: () => SavingsPlanRatePropertyKey,
|
|
42
|
-
SavingsPlanRateServiceCode: () => SavingsPlanRateServiceCode,
|
|
43
|
-
SavingsPlanRateUnit: () => SavingsPlanRateUnit,
|
|
44
|
-
SavingsPlanState: () => SavingsPlanState,
|
|
45
|
-
SavingsPlanType: () => SavingsPlanType,
|
|
46
|
-
SavingsPlansFilterName: () => SavingsPlansFilterName,
|
|
47
|
-
Savingsplans: () => Savingsplans,
|
|
48
|
-
SavingsplansClient: () => SavingsplansClient,
|
|
49
|
-
SavingsplansServiceException: () => SavingsplansServiceException,
|
|
50
|
-
ServiceQuotaExceededException: () => ServiceQuotaExceededException,
|
|
51
|
-
TagResourceCommand: () => TagResourceCommand,
|
|
52
|
-
UntagResourceCommand: () => UntagResourceCommand,
|
|
53
|
-
ValidationException: () => ValidationException,
|
|
54
|
-
__Client: () => import_smithy_client.Client
|
|
55
|
-
});
|
|
56
|
-
module.exports = __toCommonJS(index_exports);
|
|
57
|
-
|
|
58
|
-
// src/SavingsplansClient.ts
|
|
59
|
-
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
|
|
60
|
-
var import_middleware_logger = require("@aws-sdk/middleware-logger");
|
|
61
|
-
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
|
|
62
|
-
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
|
|
63
|
-
var import_config_resolver = require("@smithy/config-resolver");
|
|
64
|
-
var import_core = require("@smithy/core");
|
|
65
|
-
var import_middleware_content_length = require("@smithy/middleware-content-length");
|
|
66
|
-
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
|
|
67
|
-
var import_middleware_retry = require("@smithy/middleware-retry");
|
|
68
|
-
|
|
69
|
-
var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
|
|
70
|
-
|
|
71
|
-
// src/endpoint/EndpointParameters.ts
|
|
72
|
-
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
|
|
73
|
-
return Object.assign(options, {
|
|
74
|
-
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
75
|
-
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
76
|
-
defaultSigningName: "savingsplans"
|
|
77
|
-
});
|
|
78
|
-
}, "resolveClientEndpointParameters");
|
|
79
|
-
var commonParams = {
|
|
80
|
-
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
81
|
-
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
82
|
-
Region: { type: "builtInParams", name: "region" },
|
|
83
|
-
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
|
|
4
|
+
var middlewareLogger = require('@aws-sdk/middleware-logger');
|
|
5
|
+
var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
|
|
6
|
+
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
7
|
+
var configResolver = require('@smithy/config-resolver');
|
|
8
|
+
var core = require('@smithy/core');
|
|
9
|
+
var middlewareContentLength = require('@smithy/middleware-content-length');
|
|
10
|
+
var middlewareEndpoint = require('@smithy/middleware-endpoint');
|
|
11
|
+
var middlewareRetry = require('@smithy/middleware-retry');
|
|
12
|
+
var smithyClient = require('@smithy/smithy-client');
|
|
13
|
+
var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
14
|
+
var runtimeConfig = require('./runtimeConfig');
|
|
15
|
+
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
16
|
+
var protocolHttp = require('@smithy/protocol-http');
|
|
17
|
+
var middlewareSerde = require('@smithy/middleware-serde');
|
|
18
|
+
var core$1 = require('@aws-sdk/core');
|
|
19
|
+
var uuid = require('@smithy/uuid');
|
|
20
|
+
|
|
21
|
+
const resolveClientEndpointParameters = (options) => {
|
|
22
|
+
return Object.assign(options, {
|
|
23
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
24
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
25
|
+
defaultSigningName: "savingsplans",
|
|
26
|
+
});
|
|
84
27
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
28
|
+
const commonParams = {
|
|
29
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
30
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
31
|
+
Region: { type: "builtInParams", name: "region" },
|
|
32
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
36
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
37
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
38
|
+
let _credentials = runtimeConfig.credentials;
|
|
39
|
+
return {
|
|
40
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
41
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
42
|
+
if (index === -1) {
|
|
43
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
httpAuthSchemes() {
|
|
50
|
+
return _httpAuthSchemes;
|
|
51
|
+
},
|
|
52
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
53
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
54
|
+
},
|
|
55
|
+
httpAuthSchemeProvider() {
|
|
56
|
+
return _httpAuthSchemeProvider;
|
|
57
|
+
},
|
|
58
|
+
setCredentials(credentials) {
|
|
59
|
+
_credentials = credentials;
|
|
60
|
+
},
|
|
61
|
+
credentials() {
|
|
62
|
+
return _credentials;
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
67
|
+
return {
|
|
68
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
69
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
70
|
+
credentials: config.credentials(),
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
75
|
+
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
76
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
77
|
+
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
class SavingsplansClient extends smithyClient.Client {
|
|
81
|
+
config;
|
|
82
|
+
constructor(...[configuration]) {
|
|
83
|
+
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
|
|
84
|
+
super(_config_0);
|
|
85
|
+
this.initConfig = _config_0;
|
|
86
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
87
|
+
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
|
|
88
|
+
const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
|
|
89
|
+
const _config_4 = configResolver.resolveRegionConfig(_config_3);
|
|
90
|
+
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
|
|
91
|
+
const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
|
|
92
|
+
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
93
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
94
|
+
this.config = _config_8;
|
|
95
|
+
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
96
|
+
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
97
|
+
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
98
|
+
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
|
|
99
|
+
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
|
|
100
|
+
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
|
|
101
|
+
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
102
|
+
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSavingsplansHttpAuthSchemeParametersProvider,
|
|
103
|
+
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
|
|
104
|
+
"aws.auth#sigv4": config.credentials,
|
|
105
|
+
}),
|
|
106
|
+
}));
|
|
107
|
+
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
|
|
122
108
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
httpAuthSchemes: config.httpAuthSchemes(),
|
|
128
|
-
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
129
|
-
credentials: config.credentials()
|
|
130
|
-
};
|
|
131
|
-
}, "resolveHttpAuthRuntimeConfig");
|
|
132
|
-
|
|
133
|
-
// src/runtimeExtensions.ts
|
|
134
|
-
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
135
|
-
const extensionConfiguration = Object.assign(
|
|
136
|
-
(0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
|
|
137
|
-
(0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
|
|
138
|
-
(0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
|
|
139
|
-
getHttpAuthExtensionConfiguration(runtimeConfig)
|
|
140
|
-
);
|
|
141
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
142
|
-
return Object.assign(
|
|
143
|
-
runtimeConfig,
|
|
144
|
-
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
145
|
-
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
146
|
-
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
147
|
-
resolveHttpAuthRuntimeConfig(extensionConfiguration)
|
|
148
|
-
);
|
|
149
|
-
}, "resolveRuntimeExtensions");
|
|
109
|
+
destroy() {
|
|
110
|
+
super.destroy();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
150
113
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
114
|
+
class SavingsplansServiceException extends smithyClient.ServiceException {
|
|
115
|
+
constructor(options) {
|
|
116
|
+
super(options);
|
|
117
|
+
Object.setPrototypeOf(this, SavingsplansServiceException.prototype);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
class InternalServerException extends SavingsplansServiceException {
|
|
122
|
+
name = "InternalServerException";
|
|
123
|
+
$fault = "server";
|
|
124
|
+
constructor(opts) {
|
|
125
|
+
super({
|
|
126
|
+
name: "InternalServerException",
|
|
127
|
+
$fault: "server",
|
|
128
|
+
...opts,
|
|
129
|
+
});
|
|
130
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
class ResourceNotFoundException extends SavingsplansServiceException {
|
|
134
|
+
name = "ResourceNotFoundException";
|
|
135
|
+
$fault = "client";
|
|
136
|
+
constructor(opts) {
|
|
137
|
+
super({
|
|
138
|
+
name: "ResourceNotFoundException",
|
|
139
|
+
$fault: "client",
|
|
140
|
+
...opts,
|
|
141
|
+
});
|
|
142
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
class ServiceQuotaExceededException extends SavingsplansServiceException {
|
|
146
|
+
name = "ServiceQuotaExceededException";
|
|
147
|
+
$fault = "client";
|
|
148
|
+
constructor(opts) {
|
|
149
|
+
super({
|
|
150
|
+
name: "ServiceQuotaExceededException",
|
|
151
|
+
$fault: "client",
|
|
152
|
+
...opts,
|
|
153
|
+
});
|
|
154
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
class ValidationException extends SavingsplansServiceException {
|
|
158
|
+
name = "ValidationException";
|
|
159
|
+
$fault = "client";
|
|
160
|
+
constructor(opts) {
|
|
161
|
+
super({
|
|
162
|
+
name: "ValidationException",
|
|
163
|
+
$fault: "client",
|
|
164
|
+
...opts,
|
|
165
|
+
});
|
|
166
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
const SavingsPlanRateFilterName = {
|
|
170
|
+
INSTANCE_TYPE: "instanceType",
|
|
171
|
+
OPERATION: "operation",
|
|
172
|
+
PRODUCT_DESCRIPTION: "productDescription",
|
|
173
|
+
PRODUCT_TYPE: "productType",
|
|
174
|
+
REGION: "region",
|
|
175
|
+
SERVICE_CODE: "serviceCode",
|
|
176
|
+
TENANCY: "tenancy",
|
|
177
|
+
USAGE_TYPE: "usageType",
|
|
178
|
+
};
|
|
179
|
+
const CurrencyCode = {
|
|
180
|
+
CNY: "CNY",
|
|
181
|
+
USD: "USD",
|
|
182
|
+
};
|
|
183
|
+
const SavingsPlanProductType = {
|
|
184
|
+
EC2: "EC2",
|
|
185
|
+
FARGATE: "Fargate",
|
|
186
|
+
LAMBDA: "Lambda",
|
|
187
|
+
SAGEMAKER: "SageMaker",
|
|
188
|
+
};
|
|
189
|
+
const SavingsPlanRatePropertyKey = {
|
|
190
|
+
INSTANCE_FAMILY: "instanceFamily",
|
|
191
|
+
INSTANCE_TYPE: "instanceType",
|
|
192
|
+
PRODUCT_DESCRIPTION: "productDescription",
|
|
193
|
+
REGION: "region",
|
|
194
|
+
TENANCY: "tenancy",
|
|
195
|
+
};
|
|
196
|
+
const SavingsPlanRateServiceCode = {
|
|
197
|
+
EC2: "AmazonEC2",
|
|
198
|
+
FARGATE: "AmazonECS",
|
|
199
|
+
FARGATE_EKS: "AmazonEKS",
|
|
200
|
+
LAMBDA: "AWSLambda",
|
|
201
|
+
SAGEMAKER: "AmazonSageMaker",
|
|
202
|
+
};
|
|
203
|
+
const SavingsPlanRateUnit = {
|
|
204
|
+
HOURS: "Hrs",
|
|
205
|
+
LAMBDA_GB_SECOND: "Lambda-GB-Second",
|
|
206
|
+
REQUEST: "Request",
|
|
207
|
+
};
|
|
208
|
+
const SavingsPlansFilterName = {
|
|
209
|
+
COMMITMENT: "commitment",
|
|
210
|
+
EC2_INSTANCE_FAMILY: "ec2-instance-family",
|
|
211
|
+
END: "end",
|
|
212
|
+
PAYMENT_OPTION: "payment-option",
|
|
213
|
+
REGION: "region",
|
|
214
|
+
SAVINGS_PLAN_TYPE: "savings-plan-type",
|
|
215
|
+
START: "start",
|
|
216
|
+
TERM: "term",
|
|
217
|
+
UPFRONT: "upfront",
|
|
218
|
+
};
|
|
219
|
+
const SavingsPlanState = {
|
|
220
|
+
ACTIVE: "active",
|
|
221
|
+
PAYMENT_FAILED: "payment-failed",
|
|
222
|
+
PAYMENT_PENDING: "payment-pending",
|
|
223
|
+
PENDING_RETURN: "pending-return",
|
|
224
|
+
QUEUED: "queued",
|
|
225
|
+
QUEUED_DELETED: "queued-deleted",
|
|
226
|
+
RETIRED: "retired",
|
|
227
|
+
RETURNED: "returned",
|
|
228
|
+
};
|
|
229
|
+
const SavingsPlanPaymentOption = {
|
|
230
|
+
ALL_UPFRONT: "All Upfront",
|
|
231
|
+
NO_UPFRONT: "No Upfront",
|
|
232
|
+
PARTIAL_UPFRONT: "Partial Upfront",
|
|
233
|
+
};
|
|
234
|
+
const SavingsPlanType = {
|
|
235
|
+
COMPUTE: "Compute",
|
|
236
|
+
EC2_INSTANCE: "EC2Instance",
|
|
237
|
+
SAGEMAKER: "SageMaker",
|
|
238
|
+
};
|
|
239
|
+
const SavingsPlanRateFilterAttribute = {
|
|
240
|
+
INSTANCE_FAMILY: "instanceFamily",
|
|
241
|
+
INSTANCE_TYPE: "instanceType",
|
|
242
|
+
PRODUCT_DESCRIPTION: "productDescription",
|
|
243
|
+
PRODUCT_ID: "productId",
|
|
244
|
+
REGION: "region",
|
|
245
|
+
TENANCY: "tenancy",
|
|
246
|
+
};
|
|
247
|
+
const SavingsPlanOfferingFilterAttribute = {
|
|
248
|
+
instanceFamily: "instanceFamily",
|
|
249
|
+
region: "region",
|
|
250
|
+
};
|
|
251
|
+
const SavingsPlanOfferingPropertyKey = {
|
|
252
|
+
INSTANCE_FAMILY: "instanceFamily",
|
|
253
|
+
REGION: "region",
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
const se_CreateSavingsPlanCommand = async (input, context) => {
|
|
257
|
+
const b = core.requestBuilder(input, context);
|
|
258
|
+
const headers = {
|
|
259
|
+
"content-type": "application/json",
|
|
260
|
+
};
|
|
261
|
+
b.bp("/CreateSavingsPlan");
|
|
262
|
+
let body;
|
|
263
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
264
|
+
clientToken: [true, (_) => _ ?? uuid.v4()],
|
|
265
|
+
commitment: [],
|
|
266
|
+
purchaseTime: (_) => _.getTime() / 1_000,
|
|
267
|
+
savingsPlanOfferingId: [],
|
|
268
|
+
tags: (_) => smithyClient._json(_),
|
|
269
|
+
upfrontPaymentAmount: [],
|
|
270
|
+
}));
|
|
271
|
+
b.m("POST").h(headers).b(body);
|
|
272
|
+
return b.build();
|
|
273
|
+
};
|
|
274
|
+
const se_DeleteQueuedSavingsPlanCommand = async (input, context) => {
|
|
275
|
+
const b = core.requestBuilder(input, context);
|
|
276
|
+
const headers = {
|
|
277
|
+
"content-type": "application/json",
|
|
278
|
+
};
|
|
279
|
+
b.bp("/DeleteQueuedSavingsPlan");
|
|
280
|
+
let body;
|
|
281
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
282
|
+
savingsPlanId: [],
|
|
283
|
+
}));
|
|
284
|
+
b.m("POST").h(headers).b(body);
|
|
285
|
+
return b.build();
|
|
286
|
+
};
|
|
287
|
+
const se_DescribeSavingsPlanRatesCommand = async (input, context) => {
|
|
288
|
+
const b = core.requestBuilder(input, context);
|
|
289
|
+
const headers = {
|
|
290
|
+
"content-type": "application/json",
|
|
291
|
+
};
|
|
292
|
+
b.bp("/DescribeSavingsPlanRates");
|
|
293
|
+
let body;
|
|
294
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
295
|
+
filters: (_) => smithyClient._json(_),
|
|
296
|
+
maxResults: [],
|
|
297
|
+
nextToken: [],
|
|
298
|
+
savingsPlanId: [],
|
|
299
|
+
}));
|
|
300
|
+
b.m("POST").h(headers).b(body);
|
|
301
|
+
return b.build();
|
|
302
|
+
};
|
|
303
|
+
const se_DescribeSavingsPlansCommand = async (input, context) => {
|
|
304
|
+
const b = core.requestBuilder(input, context);
|
|
305
|
+
const headers = {
|
|
306
|
+
"content-type": "application/json",
|
|
307
|
+
};
|
|
308
|
+
b.bp("/DescribeSavingsPlans");
|
|
309
|
+
let body;
|
|
310
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
311
|
+
filters: (_) => smithyClient._json(_),
|
|
312
|
+
maxResults: [],
|
|
313
|
+
nextToken: [],
|
|
314
|
+
savingsPlanArns: (_) => smithyClient._json(_),
|
|
315
|
+
savingsPlanIds: (_) => smithyClient._json(_),
|
|
316
|
+
states: (_) => smithyClient._json(_),
|
|
317
|
+
}));
|
|
318
|
+
b.m("POST").h(headers).b(body);
|
|
319
|
+
return b.build();
|
|
320
|
+
};
|
|
321
|
+
const se_DescribeSavingsPlansOfferingRatesCommand = async (input, context) => {
|
|
322
|
+
const b = core.requestBuilder(input, context);
|
|
323
|
+
const headers = {
|
|
324
|
+
"content-type": "application/json",
|
|
325
|
+
};
|
|
326
|
+
b.bp("/DescribeSavingsPlansOfferingRates");
|
|
327
|
+
let body;
|
|
328
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
329
|
+
filters: (_) => smithyClient._json(_),
|
|
330
|
+
maxResults: [],
|
|
331
|
+
nextToken: [],
|
|
332
|
+
operations: (_) => smithyClient._json(_),
|
|
333
|
+
products: (_) => smithyClient._json(_),
|
|
334
|
+
savingsPlanOfferingIds: (_) => smithyClient._json(_),
|
|
335
|
+
savingsPlanPaymentOptions: (_) => smithyClient._json(_),
|
|
336
|
+
savingsPlanTypes: (_) => smithyClient._json(_),
|
|
337
|
+
serviceCodes: (_) => smithyClient._json(_),
|
|
338
|
+
usageTypes: (_) => smithyClient._json(_),
|
|
339
|
+
}));
|
|
340
|
+
b.m("POST").h(headers).b(body);
|
|
341
|
+
return b.build();
|
|
342
|
+
};
|
|
343
|
+
const se_DescribeSavingsPlansOfferingsCommand = async (input, context) => {
|
|
344
|
+
const b = core.requestBuilder(input, context);
|
|
345
|
+
const headers = {
|
|
346
|
+
"content-type": "application/json",
|
|
347
|
+
};
|
|
348
|
+
b.bp("/DescribeSavingsPlansOfferings");
|
|
349
|
+
let body;
|
|
350
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
351
|
+
currencies: (_) => smithyClient._json(_),
|
|
352
|
+
descriptions: (_) => smithyClient._json(_),
|
|
353
|
+
durations: (_) => smithyClient._json(_),
|
|
354
|
+
filters: (_) => smithyClient._json(_),
|
|
355
|
+
maxResults: [],
|
|
356
|
+
nextToken: [],
|
|
357
|
+
offeringIds: (_) => smithyClient._json(_),
|
|
358
|
+
operations: (_) => smithyClient._json(_),
|
|
359
|
+
paymentOptions: (_) => smithyClient._json(_),
|
|
360
|
+
planTypes: (_) => smithyClient._json(_),
|
|
361
|
+
productType: [],
|
|
362
|
+
serviceCodes: (_) => smithyClient._json(_),
|
|
363
|
+
usageTypes: (_) => smithyClient._json(_),
|
|
364
|
+
}));
|
|
365
|
+
b.m("POST").h(headers).b(body);
|
|
366
|
+
return b.build();
|
|
367
|
+
};
|
|
368
|
+
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
369
|
+
const b = core.requestBuilder(input, context);
|
|
370
|
+
const headers = {
|
|
371
|
+
"content-type": "application/json",
|
|
372
|
+
};
|
|
373
|
+
b.bp("/ListTagsForResource");
|
|
374
|
+
let body;
|
|
375
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
376
|
+
resourceArn: [],
|
|
377
|
+
}));
|
|
378
|
+
b.m("POST").h(headers).b(body);
|
|
379
|
+
return b.build();
|
|
380
|
+
};
|
|
381
|
+
const se_ReturnSavingsPlanCommand = async (input, context) => {
|
|
382
|
+
const b = core.requestBuilder(input, context);
|
|
383
|
+
const headers = {
|
|
384
|
+
"content-type": "application/json",
|
|
385
|
+
};
|
|
386
|
+
b.bp("/ReturnSavingsPlan");
|
|
387
|
+
let body;
|
|
388
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
389
|
+
clientToken: [true, (_) => _ ?? uuid.v4()],
|
|
390
|
+
savingsPlanId: [],
|
|
391
|
+
}));
|
|
392
|
+
b.m("POST").h(headers).b(body);
|
|
393
|
+
return b.build();
|
|
394
|
+
};
|
|
395
|
+
const se_TagResourceCommand = async (input, context) => {
|
|
396
|
+
const b = core.requestBuilder(input, context);
|
|
397
|
+
const headers = {
|
|
398
|
+
"content-type": "application/json",
|
|
399
|
+
};
|
|
400
|
+
b.bp("/TagResource");
|
|
401
|
+
let body;
|
|
402
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
403
|
+
resourceArn: [],
|
|
404
|
+
tags: (_) => smithyClient._json(_),
|
|
405
|
+
}));
|
|
406
|
+
b.m("POST").h(headers).b(body);
|
|
407
|
+
return b.build();
|
|
408
|
+
};
|
|
409
|
+
const se_UntagResourceCommand = async (input, context) => {
|
|
410
|
+
const b = core.requestBuilder(input, context);
|
|
411
|
+
const headers = {
|
|
412
|
+
"content-type": "application/json",
|
|
413
|
+
};
|
|
414
|
+
b.bp("/UntagResource");
|
|
415
|
+
let body;
|
|
416
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
417
|
+
resourceArn: [],
|
|
418
|
+
tagKeys: (_) => smithyClient._json(_),
|
|
419
|
+
}));
|
|
420
|
+
b.m("POST").h(headers).b(body);
|
|
421
|
+
return b.build();
|
|
422
|
+
};
|
|
423
|
+
const de_CreateSavingsPlanCommand = async (output, context) => {
|
|
424
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
425
|
+
return de_CommandError(output, context);
|
|
426
|
+
}
|
|
427
|
+
const contents = smithyClient.map({
|
|
428
|
+
$metadata: deserializeMetadata(output),
|
|
429
|
+
});
|
|
430
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
431
|
+
const doc = smithyClient.take(data, {
|
|
432
|
+
savingsPlanId: smithyClient.expectString,
|
|
433
|
+
});
|
|
434
|
+
Object.assign(contents, doc);
|
|
435
|
+
return contents;
|
|
197
436
|
};
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
// src/protocols/Aws_restJson1.ts
|
|
208
|
-
var import_core2 = require("@aws-sdk/core");
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
var import_uuid = require("@smithy/uuid");
|
|
212
|
-
|
|
213
|
-
// src/models/SavingsplansServiceException.ts
|
|
214
|
-
|
|
215
|
-
var SavingsplansServiceException = class _SavingsplansServiceException extends import_smithy_client.ServiceException {
|
|
216
|
-
static {
|
|
217
|
-
__name(this, "SavingsplansServiceException");
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* @internal
|
|
221
|
-
*/
|
|
222
|
-
constructor(options) {
|
|
223
|
-
super(options);
|
|
224
|
-
Object.setPrototypeOf(this, _SavingsplansServiceException.prototype);
|
|
225
|
-
}
|
|
437
|
+
const de_DeleteQueuedSavingsPlanCommand = async (output, context) => {
|
|
438
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
439
|
+
return de_CommandError(output, context);
|
|
440
|
+
}
|
|
441
|
+
const contents = smithyClient.map({
|
|
442
|
+
$metadata: deserializeMetadata(output),
|
|
443
|
+
});
|
|
444
|
+
await smithyClient.collectBody(output.body, context);
|
|
445
|
+
return contents;
|
|
226
446
|
};
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
name = "InternalServerException";
|
|
234
|
-
$fault = "server";
|
|
235
|
-
/**
|
|
236
|
-
* @internal
|
|
237
|
-
*/
|
|
238
|
-
constructor(opts) {
|
|
239
|
-
super({
|
|
240
|
-
name: "InternalServerException",
|
|
241
|
-
$fault: "server",
|
|
242
|
-
...opts
|
|
447
|
+
const de_DescribeSavingsPlanRatesCommand = async (output, context) => {
|
|
448
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
449
|
+
return de_CommandError(output, context);
|
|
450
|
+
}
|
|
451
|
+
const contents = smithyClient.map({
|
|
452
|
+
$metadata: deserializeMetadata(output),
|
|
243
453
|
});
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
__name(this, "ResourceNotFoundException");
|
|
250
|
-
}
|
|
251
|
-
name = "ResourceNotFoundException";
|
|
252
|
-
$fault = "client";
|
|
253
|
-
/**
|
|
254
|
-
* @internal
|
|
255
|
-
*/
|
|
256
|
-
constructor(opts) {
|
|
257
|
-
super({
|
|
258
|
-
name: "ResourceNotFoundException",
|
|
259
|
-
$fault: "client",
|
|
260
|
-
...opts
|
|
454
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
455
|
+
const doc = smithyClient.take(data, {
|
|
456
|
+
nextToken: smithyClient.expectString,
|
|
457
|
+
savingsPlanId: smithyClient.expectString,
|
|
458
|
+
searchResults: smithyClient._json,
|
|
261
459
|
});
|
|
262
|
-
Object.
|
|
263
|
-
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* @internal
|
|
273
|
-
*/
|
|
274
|
-
constructor(opts) {
|
|
275
|
-
super({
|
|
276
|
-
name: "ServiceQuotaExceededException",
|
|
277
|
-
$fault: "client",
|
|
278
|
-
...opts
|
|
460
|
+
Object.assign(contents, doc);
|
|
461
|
+
return contents;
|
|
462
|
+
};
|
|
463
|
+
const de_DescribeSavingsPlansCommand = async (output, context) => {
|
|
464
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
465
|
+
return de_CommandError(output, context);
|
|
466
|
+
}
|
|
467
|
+
const contents = smithyClient.map({
|
|
468
|
+
$metadata: deserializeMetadata(output),
|
|
279
469
|
});
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
static {
|
|
285
|
-
__name(this, "ValidationException");
|
|
286
|
-
}
|
|
287
|
-
name = "ValidationException";
|
|
288
|
-
$fault = "client";
|
|
289
|
-
/**
|
|
290
|
-
* @internal
|
|
291
|
-
*/
|
|
292
|
-
constructor(opts) {
|
|
293
|
-
super({
|
|
294
|
-
name: "ValidationException",
|
|
295
|
-
$fault: "client",
|
|
296
|
-
...opts
|
|
470
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
471
|
+
const doc = smithyClient.take(data, {
|
|
472
|
+
nextToken: smithyClient.expectString,
|
|
473
|
+
savingsPlans: smithyClient._json,
|
|
297
474
|
});
|
|
298
|
-
Object.
|
|
299
|
-
|
|
300
|
-
};
|
|
301
|
-
var SavingsPlanRateFilterName = {
|
|
302
|
-
INSTANCE_TYPE: "instanceType",
|
|
303
|
-
OPERATION: "operation",
|
|
304
|
-
PRODUCT_DESCRIPTION: "productDescription",
|
|
305
|
-
PRODUCT_TYPE: "productType",
|
|
306
|
-
REGION: "region",
|
|
307
|
-
SERVICE_CODE: "serviceCode",
|
|
308
|
-
TENANCY: "tenancy",
|
|
309
|
-
USAGE_TYPE: "usageType"
|
|
310
|
-
};
|
|
311
|
-
var CurrencyCode = {
|
|
312
|
-
CNY: "CNY",
|
|
313
|
-
USD: "USD"
|
|
314
|
-
};
|
|
315
|
-
var SavingsPlanProductType = {
|
|
316
|
-
EC2: "EC2",
|
|
317
|
-
FARGATE: "Fargate",
|
|
318
|
-
LAMBDA: "Lambda",
|
|
319
|
-
SAGEMAKER: "SageMaker"
|
|
320
|
-
};
|
|
321
|
-
var SavingsPlanRatePropertyKey = {
|
|
322
|
-
INSTANCE_FAMILY: "instanceFamily",
|
|
323
|
-
INSTANCE_TYPE: "instanceType",
|
|
324
|
-
PRODUCT_DESCRIPTION: "productDescription",
|
|
325
|
-
REGION: "region",
|
|
326
|
-
TENANCY: "tenancy"
|
|
327
|
-
};
|
|
328
|
-
var SavingsPlanRateServiceCode = {
|
|
329
|
-
EC2: "AmazonEC2",
|
|
330
|
-
FARGATE: "AmazonECS",
|
|
331
|
-
FARGATE_EKS: "AmazonEKS",
|
|
332
|
-
LAMBDA: "AWSLambda",
|
|
333
|
-
SAGEMAKER: "AmazonSageMaker"
|
|
334
|
-
};
|
|
335
|
-
var SavingsPlanRateUnit = {
|
|
336
|
-
HOURS: "Hrs",
|
|
337
|
-
LAMBDA_GB_SECOND: "Lambda-GB-Second",
|
|
338
|
-
REQUEST: "Request"
|
|
339
|
-
};
|
|
340
|
-
var SavingsPlansFilterName = {
|
|
341
|
-
COMMITMENT: "commitment",
|
|
342
|
-
EC2_INSTANCE_FAMILY: "ec2-instance-family",
|
|
343
|
-
END: "end",
|
|
344
|
-
PAYMENT_OPTION: "payment-option",
|
|
345
|
-
REGION: "region",
|
|
346
|
-
SAVINGS_PLAN_TYPE: "savings-plan-type",
|
|
347
|
-
START: "start",
|
|
348
|
-
TERM: "term",
|
|
349
|
-
UPFRONT: "upfront"
|
|
350
|
-
};
|
|
351
|
-
var SavingsPlanState = {
|
|
352
|
-
ACTIVE: "active",
|
|
353
|
-
PAYMENT_FAILED: "payment-failed",
|
|
354
|
-
PAYMENT_PENDING: "payment-pending",
|
|
355
|
-
PENDING_RETURN: "pending-return",
|
|
356
|
-
QUEUED: "queued",
|
|
357
|
-
QUEUED_DELETED: "queued-deleted",
|
|
358
|
-
RETIRED: "retired",
|
|
359
|
-
RETURNED: "returned"
|
|
360
|
-
};
|
|
361
|
-
var SavingsPlanPaymentOption = {
|
|
362
|
-
ALL_UPFRONT: "All Upfront",
|
|
363
|
-
NO_UPFRONT: "No Upfront",
|
|
364
|
-
PARTIAL_UPFRONT: "Partial Upfront"
|
|
365
|
-
};
|
|
366
|
-
var SavingsPlanType = {
|
|
367
|
-
COMPUTE: "Compute",
|
|
368
|
-
EC2_INSTANCE: "EC2Instance",
|
|
369
|
-
SAGEMAKER: "SageMaker"
|
|
370
|
-
};
|
|
371
|
-
var SavingsPlanRateFilterAttribute = {
|
|
372
|
-
INSTANCE_FAMILY: "instanceFamily",
|
|
373
|
-
INSTANCE_TYPE: "instanceType",
|
|
374
|
-
PRODUCT_DESCRIPTION: "productDescription",
|
|
375
|
-
PRODUCT_ID: "productId",
|
|
376
|
-
REGION: "region",
|
|
377
|
-
TENANCY: "tenancy"
|
|
378
|
-
};
|
|
379
|
-
var SavingsPlanOfferingFilterAttribute = {
|
|
380
|
-
instanceFamily: "instanceFamily",
|
|
381
|
-
region: "region"
|
|
382
|
-
};
|
|
383
|
-
var SavingsPlanOfferingPropertyKey = {
|
|
384
|
-
INSTANCE_FAMILY: "instanceFamily",
|
|
385
|
-
REGION: "region"
|
|
475
|
+
Object.assign(contents, doc);
|
|
476
|
+
return contents;
|
|
386
477
|
};
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
savingsPlanOfferingId: [],
|
|
402
|
-
tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "tags"),
|
|
403
|
-
upfrontPaymentAmount: []
|
|
404
|
-
})
|
|
405
|
-
);
|
|
406
|
-
b.m("POST").h(headers).b(body);
|
|
407
|
-
return b.build();
|
|
408
|
-
}, "se_CreateSavingsPlanCommand");
|
|
409
|
-
var se_DeleteQueuedSavingsPlanCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
410
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
411
|
-
const headers = {
|
|
412
|
-
"content-type": "application/json"
|
|
413
|
-
};
|
|
414
|
-
b.bp("/DeleteQueuedSavingsPlan");
|
|
415
|
-
let body;
|
|
416
|
-
body = JSON.stringify(
|
|
417
|
-
(0, import_smithy_client.take)(input, {
|
|
418
|
-
savingsPlanId: []
|
|
419
|
-
})
|
|
420
|
-
);
|
|
421
|
-
b.m("POST").h(headers).b(body);
|
|
422
|
-
return b.build();
|
|
423
|
-
}, "se_DeleteQueuedSavingsPlanCommand");
|
|
424
|
-
var se_DescribeSavingsPlanRatesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
425
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
426
|
-
const headers = {
|
|
427
|
-
"content-type": "application/json"
|
|
428
|
-
};
|
|
429
|
-
b.bp("/DescribeSavingsPlanRates");
|
|
430
|
-
let body;
|
|
431
|
-
body = JSON.stringify(
|
|
432
|
-
(0, import_smithy_client.take)(input, {
|
|
433
|
-
filters: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "filters"),
|
|
434
|
-
maxResults: [],
|
|
435
|
-
nextToken: [],
|
|
436
|
-
savingsPlanId: []
|
|
437
|
-
})
|
|
438
|
-
);
|
|
439
|
-
b.m("POST").h(headers).b(body);
|
|
440
|
-
return b.build();
|
|
441
|
-
}, "se_DescribeSavingsPlanRatesCommand");
|
|
442
|
-
var se_DescribeSavingsPlansCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
443
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
444
|
-
const headers = {
|
|
445
|
-
"content-type": "application/json"
|
|
446
|
-
};
|
|
447
|
-
b.bp("/DescribeSavingsPlans");
|
|
448
|
-
let body;
|
|
449
|
-
body = JSON.stringify(
|
|
450
|
-
(0, import_smithy_client.take)(input, {
|
|
451
|
-
filters: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "filters"),
|
|
452
|
-
maxResults: [],
|
|
453
|
-
nextToken: [],
|
|
454
|
-
savingsPlanArns: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "savingsPlanArns"),
|
|
455
|
-
savingsPlanIds: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "savingsPlanIds"),
|
|
456
|
-
states: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "states")
|
|
457
|
-
})
|
|
458
|
-
);
|
|
459
|
-
b.m("POST").h(headers).b(body);
|
|
460
|
-
return b.build();
|
|
461
|
-
}, "se_DescribeSavingsPlansCommand");
|
|
462
|
-
var se_DescribeSavingsPlansOfferingRatesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
463
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
464
|
-
const headers = {
|
|
465
|
-
"content-type": "application/json"
|
|
466
|
-
};
|
|
467
|
-
b.bp("/DescribeSavingsPlansOfferingRates");
|
|
468
|
-
let body;
|
|
469
|
-
body = JSON.stringify(
|
|
470
|
-
(0, import_smithy_client.take)(input, {
|
|
471
|
-
filters: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "filters"),
|
|
472
|
-
maxResults: [],
|
|
473
|
-
nextToken: [],
|
|
474
|
-
operations: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "operations"),
|
|
475
|
-
products: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "products"),
|
|
476
|
-
savingsPlanOfferingIds: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "savingsPlanOfferingIds"),
|
|
477
|
-
savingsPlanPaymentOptions: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "savingsPlanPaymentOptions"),
|
|
478
|
-
savingsPlanTypes: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "savingsPlanTypes"),
|
|
479
|
-
serviceCodes: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "serviceCodes"),
|
|
480
|
-
usageTypes: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "usageTypes")
|
|
481
|
-
})
|
|
482
|
-
);
|
|
483
|
-
b.m("POST").h(headers).b(body);
|
|
484
|
-
return b.build();
|
|
485
|
-
}, "se_DescribeSavingsPlansOfferingRatesCommand");
|
|
486
|
-
var se_DescribeSavingsPlansOfferingsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
487
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
488
|
-
const headers = {
|
|
489
|
-
"content-type": "application/json"
|
|
490
|
-
};
|
|
491
|
-
b.bp("/DescribeSavingsPlansOfferings");
|
|
492
|
-
let body;
|
|
493
|
-
body = JSON.stringify(
|
|
494
|
-
(0, import_smithy_client.take)(input, {
|
|
495
|
-
currencies: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "currencies"),
|
|
496
|
-
descriptions: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "descriptions"),
|
|
497
|
-
durations: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "durations"),
|
|
498
|
-
filters: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "filters"),
|
|
499
|
-
maxResults: [],
|
|
500
|
-
nextToken: [],
|
|
501
|
-
offeringIds: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "offeringIds"),
|
|
502
|
-
operations: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "operations"),
|
|
503
|
-
paymentOptions: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "paymentOptions"),
|
|
504
|
-
planTypes: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "planTypes"),
|
|
505
|
-
productType: [],
|
|
506
|
-
serviceCodes: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "serviceCodes"),
|
|
507
|
-
usageTypes: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "usageTypes")
|
|
508
|
-
})
|
|
509
|
-
);
|
|
510
|
-
b.m("POST").h(headers).b(body);
|
|
511
|
-
return b.build();
|
|
512
|
-
}, "se_DescribeSavingsPlansOfferingsCommand");
|
|
513
|
-
var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
514
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
515
|
-
const headers = {
|
|
516
|
-
"content-type": "application/json"
|
|
517
|
-
};
|
|
518
|
-
b.bp("/ListTagsForResource");
|
|
519
|
-
let body;
|
|
520
|
-
body = JSON.stringify(
|
|
521
|
-
(0, import_smithy_client.take)(input, {
|
|
522
|
-
resourceArn: []
|
|
523
|
-
})
|
|
524
|
-
);
|
|
525
|
-
b.m("POST").h(headers).b(body);
|
|
526
|
-
return b.build();
|
|
527
|
-
}, "se_ListTagsForResourceCommand");
|
|
528
|
-
var se_ReturnSavingsPlanCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
529
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
530
|
-
const headers = {
|
|
531
|
-
"content-type": "application/json"
|
|
532
|
-
};
|
|
533
|
-
b.bp("/ReturnSavingsPlan");
|
|
534
|
-
let body;
|
|
535
|
-
body = JSON.stringify(
|
|
536
|
-
(0, import_smithy_client.take)(input, {
|
|
537
|
-
clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
|
|
538
|
-
savingsPlanId: []
|
|
539
|
-
})
|
|
540
|
-
);
|
|
541
|
-
b.m("POST").h(headers).b(body);
|
|
542
|
-
return b.build();
|
|
543
|
-
}, "se_ReturnSavingsPlanCommand");
|
|
544
|
-
var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
545
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
546
|
-
const headers = {
|
|
547
|
-
"content-type": "application/json"
|
|
548
|
-
};
|
|
549
|
-
b.bp("/TagResource");
|
|
550
|
-
let body;
|
|
551
|
-
body = JSON.stringify(
|
|
552
|
-
(0, import_smithy_client.take)(input, {
|
|
553
|
-
resourceArn: [],
|
|
554
|
-
tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "tags")
|
|
555
|
-
})
|
|
556
|
-
);
|
|
557
|
-
b.m("POST").h(headers).b(body);
|
|
558
|
-
return b.build();
|
|
559
|
-
}, "se_TagResourceCommand");
|
|
560
|
-
var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
561
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
562
|
-
const headers = {
|
|
563
|
-
"content-type": "application/json"
|
|
564
|
-
};
|
|
565
|
-
b.bp("/UntagResource");
|
|
566
|
-
let body;
|
|
567
|
-
body = JSON.stringify(
|
|
568
|
-
(0, import_smithy_client.take)(input, {
|
|
569
|
-
resourceArn: [],
|
|
570
|
-
tagKeys: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "tagKeys")
|
|
571
|
-
})
|
|
572
|
-
);
|
|
573
|
-
b.m("POST").h(headers).b(body);
|
|
574
|
-
return b.build();
|
|
575
|
-
}, "se_UntagResourceCommand");
|
|
576
|
-
var de_CreateSavingsPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
577
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
578
|
-
return de_CommandError(output, context);
|
|
579
|
-
}
|
|
580
|
-
const contents = (0, import_smithy_client.map)({
|
|
581
|
-
$metadata: deserializeMetadata(output)
|
|
582
|
-
});
|
|
583
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
584
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
585
|
-
savingsPlanId: import_smithy_client.expectString
|
|
586
|
-
});
|
|
587
|
-
Object.assign(contents, doc);
|
|
588
|
-
return contents;
|
|
589
|
-
}, "de_CreateSavingsPlanCommand");
|
|
590
|
-
var de_DeleteQueuedSavingsPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
591
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
592
|
-
return de_CommandError(output, context);
|
|
593
|
-
}
|
|
594
|
-
const contents = (0, import_smithy_client.map)({
|
|
595
|
-
$metadata: deserializeMetadata(output)
|
|
596
|
-
});
|
|
597
|
-
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
598
|
-
return contents;
|
|
599
|
-
}, "de_DeleteQueuedSavingsPlanCommand");
|
|
600
|
-
var de_DescribeSavingsPlanRatesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
601
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
602
|
-
return de_CommandError(output, context);
|
|
603
|
-
}
|
|
604
|
-
const contents = (0, import_smithy_client.map)({
|
|
605
|
-
$metadata: deserializeMetadata(output)
|
|
606
|
-
});
|
|
607
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
608
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
609
|
-
nextToken: import_smithy_client.expectString,
|
|
610
|
-
savingsPlanId: import_smithy_client.expectString,
|
|
611
|
-
searchResults: import_smithy_client._json
|
|
612
|
-
});
|
|
613
|
-
Object.assign(contents, doc);
|
|
614
|
-
return contents;
|
|
615
|
-
}, "de_DescribeSavingsPlanRatesCommand");
|
|
616
|
-
var de_DescribeSavingsPlansCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
617
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
618
|
-
return de_CommandError(output, context);
|
|
619
|
-
}
|
|
620
|
-
const contents = (0, import_smithy_client.map)({
|
|
621
|
-
$metadata: deserializeMetadata(output)
|
|
622
|
-
});
|
|
623
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
624
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
625
|
-
nextToken: import_smithy_client.expectString,
|
|
626
|
-
savingsPlans: import_smithy_client._json
|
|
627
|
-
});
|
|
628
|
-
Object.assign(contents, doc);
|
|
629
|
-
return contents;
|
|
630
|
-
}, "de_DescribeSavingsPlansCommand");
|
|
631
|
-
var de_DescribeSavingsPlansOfferingRatesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
632
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
633
|
-
return de_CommandError(output, context);
|
|
634
|
-
}
|
|
635
|
-
const contents = (0, import_smithy_client.map)({
|
|
636
|
-
$metadata: deserializeMetadata(output)
|
|
637
|
-
});
|
|
638
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
639
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
640
|
-
nextToken: import_smithy_client.expectString,
|
|
641
|
-
searchResults: import_smithy_client._json
|
|
642
|
-
});
|
|
643
|
-
Object.assign(contents, doc);
|
|
644
|
-
return contents;
|
|
645
|
-
}, "de_DescribeSavingsPlansOfferingRatesCommand");
|
|
646
|
-
var de_DescribeSavingsPlansOfferingsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
647
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
648
|
-
return de_CommandError(output, context);
|
|
649
|
-
}
|
|
650
|
-
const contents = (0, import_smithy_client.map)({
|
|
651
|
-
$metadata: deserializeMetadata(output)
|
|
652
|
-
});
|
|
653
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
654
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
655
|
-
nextToken: import_smithy_client.expectString,
|
|
656
|
-
searchResults: import_smithy_client._json
|
|
657
|
-
});
|
|
658
|
-
Object.assign(contents, doc);
|
|
659
|
-
return contents;
|
|
660
|
-
}, "de_DescribeSavingsPlansOfferingsCommand");
|
|
661
|
-
var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
662
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
663
|
-
return de_CommandError(output, context);
|
|
664
|
-
}
|
|
665
|
-
const contents = (0, import_smithy_client.map)({
|
|
666
|
-
$metadata: deserializeMetadata(output)
|
|
667
|
-
});
|
|
668
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
669
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
670
|
-
tags: import_smithy_client._json
|
|
671
|
-
});
|
|
672
|
-
Object.assign(contents, doc);
|
|
673
|
-
return contents;
|
|
674
|
-
}, "de_ListTagsForResourceCommand");
|
|
675
|
-
var de_ReturnSavingsPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
676
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
677
|
-
return de_CommandError(output, context);
|
|
678
|
-
}
|
|
679
|
-
const contents = (0, import_smithy_client.map)({
|
|
680
|
-
$metadata: deserializeMetadata(output)
|
|
681
|
-
});
|
|
682
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
683
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
684
|
-
savingsPlanId: import_smithy_client.expectString
|
|
685
|
-
});
|
|
686
|
-
Object.assign(contents, doc);
|
|
687
|
-
return contents;
|
|
688
|
-
}, "de_ReturnSavingsPlanCommand");
|
|
689
|
-
var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
690
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
691
|
-
return de_CommandError(output, context);
|
|
692
|
-
}
|
|
693
|
-
const contents = (0, import_smithy_client.map)({
|
|
694
|
-
$metadata: deserializeMetadata(output)
|
|
695
|
-
});
|
|
696
|
-
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
697
|
-
return contents;
|
|
698
|
-
}, "de_TagResourceCommand");
|
|
699
|
-
var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
700
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
701
|
-
return de_CommandError(output, context);
|
|
702
|
-
}
|
|
703
|
-
const contents = (0, import_smithy_client.map)({
|
|
704
|
-
$metadata: deserializeMetadata(output)
|
|
705
|
-
});
|
|
706
|
-
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
707
|
-
return contents;
|
|
708
|
-
}, "de_UntagResourceCommand");
|
|
709
|
-
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
710
|
-
const parsedOutput = {
|
|
711
|
-
...output,
|
|
712
|
-
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
713
|
-
};
|
|
714
|
-
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
715
|
-
switch (errorCode) {
|
|
716
|
-
case "InternalServerException":
|
|
717
|
-
case "com.amazonaws.savingsplans#InternalServerException":
|
|
718
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
719
|
-
case "ResourceNotFoundException":
|
|
720
|
-
case "com.amazonaws.savingsplans#ResourceNotFoundException":
|
|
721
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
722
|
-
case "ServiceQuotaExceededException":
|
|
723
|
-
case "com.amazonaws.savingsplans#ServiceQuotaExceededException":
|
|
724
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
725
|
-
case "ValidationException":
|
|
726
|
-
case "com.amazonaws.savingsplans#ValidationException":
|
|
727
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
728
|
-
default:
|
|
729
|
-
const parsedBody = parsedOutput.body;
|
|
730
|
-
return throwDefaultError({
|
|
731
|
-
output,
|
|
732
|
-
parsedBody,
|
|
733
|
-
errorCode
|
|
734
|
-
});
|
|
735
|
-
}
|
|
736
|
-
}, "de_CommandError");
|
|
737
|
-
var throwDefaultError = (0, import_smithy_client.withBaseException)(SavingsplansServiceException);
|
|
738
|
-
var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
739
|
-
const contents = (0, import_smithy_client.map)({});
|
|
740
|
-
const data = parsedOutput.body;
|
|
741
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
742
|
-
message: import_smithy_client.expectString
|
|
743
|
-
});
|
|
744
|
-
Object.assign(contents, doc);
|
|
745
|
-
const exception = new InternalServerException({
|
|
746
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
747
|
-
...contents
|
|
748
|
-
});
|
|
749
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
750
|
-
}, "de_InternalServerExceptionRes");
|
|
751
|
-
var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
752
|
-
const contents = (0, import_smithy_client.map)({});
|
|
753
|
-
const data = parsedOutput.body;
|
|
754
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
755
|
-
message: import_smithy_client.expectString
|
|
756
|
-
});
|
|
757
|
-
Object.assign(contents, doc);
|
|
758
|
-
const exception = new ResourceNotFoundException({
|
|
759
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
760
|
-
...contents
|
|
761
|
-
});
|
|
762
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
763
|
-
}, "de_ResourceNotFoundExceptionRes");
|
|
764
|
-
var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
765
|
-
const contents = (0, import_smithy_client.map)({});
|
|
766
|
-
const data = parsedOutput.body;
|
|
767
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
768
|
-
message: import_smithy_client.expectString
|
|
769
|
-
});
|
|
770
|
-
Object.assign(contents, doc);
|
|
771
|
-
const exception = new ServiceQuotaExceededException({
|
|
772
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
773
|
-
...contents
|
|
774
|
-
});
|
|
775
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
776
|
-
}, "de_ServiceQuotaExceededExceptionRes");
|
|
777
|
-
var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
778
|
-
const contents = (0, import_smithy_client.map)({});
|
|
779
|
-
const data = parsedOutput.body;
|
|
780
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
781
|
-
message: import_smithy_client.expectString
|
|
782
|
-
});
|
|
783
|
-
Object.assign(contents, doc);
|
|
784
|
-
const exception = new ValidationException({
|
|
785
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
786
|
-
...contents
|
|
787
|
-
});
|
|
788
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
789
|
-
}, "de_ValidationExceptionRes");
|
|
790
|
-
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
791
|
-
httpStatusCode: output.statusCode,
|
|
792
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
793
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
794
|
-
cfId: output.headers["x-amz-cf-id"]
|
|
795
|
-
}), "deserializeMetadata");
|
|
796
|
-
|
|
797
|
-
// src/commands/CreateSavingsPlanCommand.ts
|
|
798
|
-
var CreateSavingsPlanCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
799
|
-
return [
|
|
800
|
-
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
801
|
-
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
802
|
-
];
|
|
803
|
-
}).s("AWSSavingsPlan", "CreateSavingsPlan", {}).n("SavingsplansClient", "CreateSavingsPlanCommand").f(void 0, void 0).ser(se_CreateSavingsPlanCommand).de(de_CreateSavingsPlanCommand).build() {
|
|
804
|
-
static {
|
|
805
|
-
__name(this, "CreateSavingsPlanCommand");
|
|
806
|
-
}
|
|
478
|
+
const de_DescribeSavingsPlansOfferingRatesCommand = async (output, context) => {
|
|
479
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
480
|
+
return de_CommandError(output, context);
|
|
481
|
+
}
|
|
482
|
+
const contents = smithyClient.map({
|
|
483
|
+
$metadata: deserializeMetadata(output),
|
|
484
|
+
});
|
|
485
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
486
|
+
const doc = smithyClient.take(data, {
|
|
487
|
+
nextToken: smithyClient.expectString,
|
|
488
|
+
searchResults: smithyClient._json,
|
|
489
|
+
});
|
|
490
|
+
Object.assign(contents, doc);
|
|
491
|
+
return contents;
|
|
807
492
|
};
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
(
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
493
|
+
const de_DescribeSavingsPlansOfferingsCommand = async (output, context) => {
|
|
494
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
495
|
+
return de_CommandError(output, context);
|
|
496
|
+
}
|
|
497
|
+
const contents = smithyClient.map({
|
|
498
|
+
$metadata: deserializeMetadata(output),
|
|
499
|
+
});
|
|
500
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
501
|
+
const doc = smithyClient.take(data, {
|
|
502
|
+
nextToken: smithyClient.expectString,
|
|
503
|
+
searchResults: smithyClient._json,
|
|
504
|
+
});
|
|
505
|
+
Object.assign(contents, doc);
|
|
506
|
+
return contents;
|
|
822
507
|
};
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
(
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
})
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
}
|
|
508
|
+
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
509
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
510
|
+
return de_CommandError(output, context);
|
|
511
|
+
}
|
|
512
|
+
const contents = smithyClient.map({
|
|
513
|
+
$metadata: deserializeMetadata(output),
|
|
514
|
+
});
|
|
515
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
516
|
+
const doc = smithyClient.take(data, {
|
|
517
|
+
tags: smithyClient._json,
|
|
518
|
+
});
|
|
519
|
+
Object.assign(contents, doc);
|
|
520
|
+
return contents;
|
|
837
521
|
};
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
(
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
})
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
}
|
|
522
|
+
const de_ReturnSavingsPlanCommand = async (output, context) => {
|
|
523
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
524
|
+
return de_CommandError(output, context);
|
|
525
|
+
}
|
|
526
|
+
const contents = smithyClient.map({
|
|
527
|
+
$metadata: deserializeMetadata(output),
|
|
528
|
+
});
|
|
529
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
530
|
+
const doc = smithyClient.take(data, {
|
|
531
|
+
savingsPlanId: smithyClient.expectString,
|
|
532
|
+
});
|
|
533
|
+
Object.assign(contents, doc);
|
|
534
|
+
return contents;
|
|
852
535
|
};
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
];
|
|
863
|
-
}).s("AWSSavingsPlan", "DescribeSavingsPlansOfferingRates", {}).n("SavingsplansClient", "DescribeSavingsPlansOfferingRatesCommand").f(void 0, void 0).ser(se_DescribeSavingsPlansOfferingRatesCommand).de(de_DescribeSavingsPlansOfferingRatesCommand).build() {
|
|
864
|
-
static {
|
|
865
|
-
__name(this, "DescribeSavingsPlansOfferingRatesCommand");
|
|
866
|
-
}
|
|
536
|
+
const de_TagResourceCommand = async (output, context) => {
|
|
537
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
538
|
+
return de_CommandError(output, context);
|
|
539
|
+
}
|
|
540
|
+
const contents = smithyClient.map({
|
|
541
|
+
$metadata: deserializeMetadata(output),
|
|
542
|
+
});
|
|
543
|
+
await smithyClient.collectBody(output.body, context);
|
|
544
|
+
return contents;
|
|
867
545
|
};
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
546
|
+
const de_UntagResourceCommand = async (output, context) => {
|
|
547
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
548
|
+
return de_CommandError(output, context);
|
|
549
|
+
}
|
|
550
|
+
const contents = smithyClient.map({
|
|
551
|
+
$metadata: deserializeMetadata(output),
|
|
552
|
+
});
|
|
553
|
+
await smithyClient.collectBody(output.body, context);
|
|
554
|
+
return contents;
|
|
555
|
+
};
|
|
556
|
+
const de_CommandError = async (output, context) => {
|
|
557
|
+
const parsedOutput = {
|
|
558
|
+
...output,
|
|
559
|
+
body: await core$1.parseJsonErrorBody(output.body, context),
|
|
560
|
+
};
|
|
561
|
+
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
562
|
+
switch (errorCode) {
|
|
563
|
+
case "InternalServerException":
|
|
564
|
+
case "com.amazonaws.savingsplans#InternalServerException":
|
|
565
|
+
throw await de_InternalServerExceptionRes(parsedOutput);
|
|
566
|
+
case "ResourceNotFoundException":
|
|
567
|
+
case "com.amazonaws.savingsplans#ResourceNotFoundException":
|
|
568
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput);
|
|
569
|
+
case "ServiceQuotaExceededException":
|
|
570
|
+
case "com.amazonaws.savingsplans#ServiceQuotaExceededException":
|
|
571
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput);
|
|
572
|
+
case "ValidationException":
|
|
573
|
+
case "com.amazonaws.savingsplans#ValidationException":
|
|
574
|
+
throw await de_ValidationExceptionRes(parsedOutput);
|
|
575
|
+
default:
|
|
576
|
+
const parsedBody = parsedOutput.body;
|
|
577
|
+
return throwDefaultError({
|
|
578
|
+
output,
|
|
579
|
+
parsedBody,
|
|
580
|
+
errorCode,
|
|
581
|
+
});
|
|
582
|
+
}
|
|
882
583
|
};
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
}
|
|
584
|
+
const throwDefaultError = smithyClient.withBaseException(SavingsplansServiceException);
|
|
585
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
586
|
+
const contents = smithyClient.map({});
|
|
587
|
+
const data = parsedOutput.body;
|
|
588
|
+
const doc = smithyClient.take(data, {
|
|
589
|
+
message: smithyClient.expectString,
|
|
590
|
+
});
|
|
591
|
+
Object.assign(contents, doc);
|
|
592
|
+
const exception = new InternalServerException({
|
|
593
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
594
|
+
...contents,
|
|
595
|
+
});
|
|
596
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
897
597
|
};
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
})
|
|
909
|
-
|
|
910
|
-
__name(this, "ReturnSavingsPlanCommand");
|
|
911
|
-
}
|
|
598
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
599
|
+
const contents = smithyClient.map({});
|
|
600
|
+
const data = parsedOutput.body;
|
|
601
|
+
const doc = smithyClient.take(data, {
|
|
602
|
+
message: smithyClient.expectString,
|
|
603
|
+
});
|
|
604
|
+
Object.assign(contents, doc);
|
|
605
|
+
const exception = new ResourceNotFoundException({
|
|
606
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
607
|
+
...contents,
|
|
608
|
+
});
|
|
609
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
912
610
|
};
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
})
|
|
924
|
-
|
|
925
|
-
__name(this, "TagResourceCommand");
|
|
926
|
-
}
|
|
611
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
612
|
+
const contents = smithyClient.map({});
|
|
613
|
+
const data = parsedOutput.body;
|
|
614
|
+
const doc = smithyClient.take(data, {
|
|
615
|
+
message: smithyClient.expectString,
|
|
616
|
+
});
|
|
617
|
+
Object.assign(contents, doc);
|
|
618
|
+
const exception = new ServiceQuotaExceededException({
|
|
619
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
620
|
+
...contents,
|
|
621
|
+
});
|
|
622
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
927
623
|
};
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
})
|
|
939
|
-
|
|
940
|
-
__name(this, "UntagResourceCommand");
|
|
941
|
-
}
|
|
624
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
625
|
+
const contents = smithyClient.map({});
|
|
626
|
+
const data = parsedOutput.body;
|
|
627
|
+
const doc = smithyClient.take(data, {
|
|
628
|
+
message: smithyClient.expectString,
|
|
629
|
+
});
|
|
630
|
+
Object.assign(contents, doc);
|
|
631
|
+
const exception = new ValidationException({
|
|
632
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
633
|
+
...contents,
|
|
634
|
+
});
|
|
635
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
942
636
|
};
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
DescribeSavingsPlanRatesCommand,
|
|
949
|
-
DescribeSavingsPlansCommand,
|
|
950
|
-
DescribeSavingsPlansOfferingRatesCommand,
|
|
951
|
-
DescribeSavingsPlansOfferingsCommand,
|
|
952
|
-
ListTagsForResourceCommand,
|
|
953
|
-
ReturnSavingsPlanCommand,
|
|
954
|
-
TagResourceCommand,
|
|
955
|
-
UntagResourceCommand
|
|
956
|
-
};
|
|
957
|
-
var Savingsplans = class extends SavingsplansClient {
|
|
958
|
-
static {
|
|
959
|
-
__name(this, "Savingsplans");
|
|
960
|
-
}
|
|
961
|
-
};
|
|
962
|
-
(0, import_smithy_client.createAggregatedClient)(commands, Savingsplans);
|
|
963
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
964
|
-
|
|
965
|
-
0 && (module.exports = {
|
|
966
|
-
SavingsplansServiceException,
|
|
967
|
-
__Client,
|
|
968
|
-
SavingsplansClient,
|
|
969
|
-
Savingsplans,
|
|
970
|
-
$Command,
|
|
971
|
-
CreateSavingsPlanCommand,
|
|
972
|
-
DeleteQueuedSavingsPlanCommand,
|
|
973
|
-
DescribeSavingsPlanRatesCommand,
|
|
974
|
-
DescribeSavingsPlansCommand,
|
|
975
|
-
DescribeSavingsPlansOfferingRatesCommand,
|
|
976
|
-
DescribeSavingsPlansOfferingsCommand,
|
|
977
|
-
ListTagsForResourceCommand,
|
|
978
|
-
ReturnSavingsPlanCommand,
|
|
979
|
-
TagResourceCommand,
|
|
980
|
-
UntagResourceCommand,
|
|
981
|
-
InternalServerException,
|
|
982
|
-
ResourceNotFoundException,
|
|
983
|
-
ServiceQuotaExceededException,
|
|
984
|
-
ValidationException,
|
|
985
|
-
SavingsPlanRateFilterName,
|
|
986
|
-
CurrencyCode,
|
|
987
|
-
SavingsPlanProductType,
|
|
988
|
-
SavingsPlanRatePropertyKey,
|
|
989
|
-
SavingsPlanRateServiceCode,
|
|
990
|
-
SavingsPlanRateUnit,
|
|
991
|
-
SavingsPlansFilterName,
|
|
992
|
-
SavingsPlanState,
|
|
993
|
-
SavingsPlanPaymentOption,
|
|
994
|
-
SavingsPlanType,
|
|
995
|
-
SavingsPlanRateFilterAttribute,
|
|
996
|
-
SavingsPlanOfferingFilterAttribute,
|
|
997
|
-
SavingsPlanOfferingPropertyKey
|
|
637
|
+
const deserializeMetadata = (output) => ({
|
|
638
|
+
httpStatusCode: output.statusCode,
|
|
639
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
640
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
641
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
998
642
|
});
|
|
999
643
|
|
|
644
|
+
class CreateSavingsPlanCommand extends smithyClient.Command
|
|
645
|
+
.classBuilder()
|
|
646
|
+
.ep(commonParams)
|
|
647
|
+
.m(function (Command, cs, config, o) {
|
|
648
|
+
return [
|
|
649
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
650
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
651
|
+
];
|
|
652
|
+
})
|
|
653
|
+
.s("AWSSavingsPlan", "CreateSavingsPlan", {})
|
|
654
|
+
.n("SavingsplansClient", "CreateSavingsPlanCommand")
|
|
655
|
+
.f(void 0, void 0)
|
|
656
|
+
.ser(se_CreateSavingsPlanCommand)
|
|
657
|
+
.de(de_CreateSavingsPlanCommand)
|
|
658
|
+
.build() {
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
class DeleteQueuedSavingsPlanCommand extends smithyClient.Command
|
|
662
|
+
.classBuilder()
|
|
663
|
+
.ep(commonParams)
|
|
664
|
+
.m(function (Command, cs, config, o) {
|
|
665
|
+
return [
|
|
666
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
667
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
668
|
+
];
|
|
669
|
+
})
|
|
670
|
+
.s("AWSSavingsPlan", "DeleteQueuedSavingsPlan", {})
|
|
671
|
+
.n("SavingsplansClient", "DeleteQueuedSavingsPlanCommand")
|
|
672
|
+
.f(void 0, void 0)
|
|
673
|
+
.ser(se_DeleteQueuedSavingsPlanCommand)
|
|
674
|
+
.de(de_DeleteQueuedSavingsPlanCommand)
|
|
675
|
+
.build() {
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
class DescribeSavingsPlanRatesCommand extends smithyClient.Command
|
|
679
|
+
.classBuilder()
|
|
680
|
+
.ep(commonParams)
|
|
681
|
+
.m(function (Command, cs, config, o) {
|
|
682
|
+
return [
|
|
683
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
684
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
685
|
+
];
|
|
686
|
+
})
|
|
687
|
+
.s("AWSSavingsPlan", "DescribeSavingsPlanRates", {})
|
|
688
|
+
.n("SavingsplansClient", "DescribeSavingsPlanRatesCommand")
|
|
689
|
+
.f(void 0, void 0)
|
|
690
|
+
.ser(se_DescribeSavingsPlanRatesCommand)
|
|
691
|
+
.de(de_DescribeSavingsPlanRatesCommand)
|
|
692
|
+
.build() {
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
class DescribeSavingsPlansCommand extends smithyClient.Command
|
|
696
|
+
.classBuilder()
|
|
697
|
+
.ep(commonParams)
|
|
698
|
+
.m(function (Command, cs, config, o) {
|
|
699
|
+
return [
|
|
700
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
701
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
702
|
+
];
|
|
703
|
+
})
|
|
704
|
+
.s("AWSSavingsPlan", "DescribeSavingsPlans", {})
|
|
705
|
+
.n("SavingsplansClient", "DescribeSavingsPlansCommand")
|
|
706
|
+
.f(void 0, void 0)
|
|
707
|
+
.ser(se_DescribeSavingsPlansCommand)
|
|
708
|
+
.de(de_DescribeSavingsPlansCommand)
|
|
709
|
+
.build() {
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
class DescribeSavingsPlansOfferingRatesCommand extends smithyClient.Command
|
|
713
|
+
.classBuilder()
|
|
714
|
+
.ep(commonParams)
|
|
715
|
+
.m(function (Command, cs, config, o) {
|
|
716
|
+
return [
|
|
717
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
718
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
719
|
+
];
|
|
720
|
+
})
|
|
721
|
+
.s("AWSSavingsPlan", "DescribeSavingsPlansOfferingRates", {})
|
|
722
|
+
.n("SavingsplansClient", "DescribeSavingsPlansOfferingRatesCommand")
|
|
723
|
+
.f(void 0, void 0)
|
|
724
|
+
.ser(se_DescribeSavingsPlansOfferingRatesCommand)
|
|
725
|
+
.de(de_DescribeSavingsPlansOfferingRatesCommand)
|
|
726
|
+
.build() {
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
class DescribeSavingsPlansOfferingsCommand extends smithyClient.Command
|
|
730
|
+
.classBuilder()
|
|
731
|
+
.ep(commonParams)
|
|
732
|
+
.m(function (Command, cs, config, o) {
|
|
733
|
+
return [
|
|
734
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
735
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
736
|
+
];
|
|
737
|
+
})
|
|
738
|
+
.s("AWSSavingsPlan", "DescribeSavingsPlansOfferings", {})
|
|
739
|
+
.n("SavingsplansClient", "DescribeSavingsPlansOfferingsCommand")
|
|
740
|
+
.f(void 0, void 0)
|
|
741
|
+
.ser(se_DescribeSavingsPlansOfferingsCommand)
|
|
742
|
+
.de(de_DescribeSavingsPlansOfferingsCommand)
|
|
743
|
+
.build() {
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
class ListTagsForResourceCommand extends smithyClient.Command
|
|
747
|
+
.classBuilder()
|
|
748
|
+
.ep(commonParams)
|
|
749
|
+
.m(function (Command, cs, config, o) {
|
|
750
|
+
return [
|
|
751
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
752
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
753
|
+
];
|
|
754
|
+
})
|
|
755
|
+
.s("AWSSavingsPlan", "ListTagsForResource", {})
|
|
756
|
+
.n("SavingsplansClient", "ListTagsForResourceCommand")
|
|
757
|
+
.f(void 0, void 0)
|
|
758
|
+
.ser(se_ListTagsForResourceCommand)
|
|
759
|
+
.de(de_ListTagsForResourceCommand)
|
|
760
|
+
.build() {
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
class ReturnSavingsPlanCommand extends smithyClient.Command
|
|
764
|
+
.classBuilder()
|
|
765
|
+
.ep(commonParams)
|
|
766
|
+
.m(function (Command, cs, config, o) {
|
|
767
|
+
return [
|
|
768
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
769
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
770
|
+
];
|
|
771
|
+
})
|
|
772
|
+
.s("AWSSavingsPlan", "ReturnSavingsPlan", {})
|
|
773
|
+
.n("SavingsplansClient", "ReturnSavingsPlanCommand")
|
|
774
|
+
.f(void 0, void 0)
|
|
775
|
+
.ser(se_ReturnSavingsPlanCommand)
|
|
776
|
+
.de(de_ReturnSavingsPlanCommand)
|
|
777
|
+
.build() {
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
class TagResourceCommand extends smithyClient.Command
|
|
781
|
+
.classBuilder()
|
|
782
|
+
.ep(commonParams)
|
|
783
|
+
.m(function (Command, cs, config, o) {
|
|
784
|
+
return [
|
|
785
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
786
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
787
|
+
];
|
|
788
|
+
})
|
|
789
|
+
.s("AWSSavingsPlan", "TagResource", {})
|
|
790
|
+
.n("SavingsplansClient", "TagResourceCommand")
|
|
791
|
+
.f(void 0, void 0)
|
|
792
|
+
.ser(se_TagResourceCommand)
|
|
793
|
+
.de(de_TagResourceCommand)
|
|
794
|
+
.build() {
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
class UntagResourceCommand extends smithyClient.Command
|
|
798
|
+
.classBuilder()
|
|
799
|
+
.ep(commonParams)
|
|
800
|
+
.m(function (Command, cs, config, o) {
|
|
801
|
+
return [
|
|
802
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
803
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
804
|
+
];
|
|
805
|
+
})
|
|
806
|
+
.s("AWSSavingsPlan", "UntagResource", {})
|
|
807
|
+
.n("SavingsplansClient", "UntagResourceCommand")
|
|
808
|
+
.f(void 0, void 0)
|
|
809
|
+
.ser(se_UntagResourceCommand)
|
|
810
|
+
.de(de_UntagResourceCommand)
|
|
811
|
+
.build() {
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
const commands = {
|
|
815
|
+
CreateSavingsPlanCommand,
|
|
816
|
+
DeleteQueuedSavingsPlanCommand,
|
|
817
|
+
DescribeSavingsPlanRatesCommand,
|
|
818
|
+
DescribeSavingsPlansCommand,
|
|
819
|
+
DescribeSavingsPlansOfferingRatesCommand,
|
|
820
|
+
DescribeSavingsPlansOfferingsCommand,
|
|
821
|
+
ListTagsForResourceCommand,
|
|
822
|
+
ReturnSavingsPlanCommand,
|
|
823
|
+
TagResourceCommand,
|
|
824
|
+
UntagResourceCommand,
|
|
825
|
+
};
|
|
826
|
+
class Savingsplans extends SavingsplansClient {
|
|
827
|
+
}
|
|
828
|
+
smithyClient.createAggregatedClient(commands, Savingsplans);
|
|
829
|
+
|
|
830
|
+
Object.defineProperty(exports, "$Command", {
|
|
831
|
+
enumerable: true,
|
|
832
|
+
get: function () { return smithyClient.Command; }
|
|
833
|
+
});
|
|
834
|
+
Object.defineProperty(exports, "__Client", {
|
|
835
|
+
enumerable: true,
|
|
836
|
+
get: function () { return smithyClient.Client; }
|
|
837
|
+
});
|
|
838
|
+
exports.CreateSavingsPlanCommand = CreateSavingsPlanCommand;
|
|
839
|
+
exports.CurrencyCode = CurrencyCode;
|
|
840
|
+
exports.DeleteQueuedSavingsPlanCommand = DeleteQueuedSavingsPlanCommand;
|
|
841
|
+
exports.DescribeSavingsPlanRatesCommand = DescribeSavingsPlanRatesCommand;
|
|
842
|
+
exports.DescribeSavingsPlansCommand = DescribeSavingsPlansCommand;
|
|
843
|
+
exports.DescribeSavingsPlansOfferingRatesCommand = DescribeSavingsPlansOfferingRatesCommand;
|
|
844
|
+
exports.DescribeSavingsPlansOfferingsCommand = DescribeSavingsPlansOfferingsCommand;
|
|
845
|
+
exports.InternalServerException = InternalServerException;
|
|
846
|
+
exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
|
|
847
|
+
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
848
|
+
exports.ReturnSavingsPlanCommand = ReturnSavingsPlanCommand;
|
|
849
|
+
exports.SavingsPlanOfferingFilterAttribute = SavingsPlanOfferingFilterAttribute;
|
|
850
|
+
exports.SavingsPlanOfferingPropertyKey = SavingsPlanOfferingPropertyKey;
|
|
851
|
+
exports.SavingsPlanPaymentOption = SavingsPlanPaymentOption;
|
|
852
|
+
exports.SavingsPlanProductType = SavingsPlanProductType;
|
|
853
|
+
exports.SavingsPlanRateFilterAttribute = SavingsPlanRateFilterAttribute;
|
|
854
|
+
exports.SavingsPlanRateFilterName = SavingsPlanRateFilterName;
|
|
855
|
+
exports.SavingsPlanRatePropertyKey = SavingsPlanRatePropertyKey;
|
|
856
|
+
exports.SavingsPlanRateServiceCode = SavingsPlanRateServiceCode;
|
|
857
|
+
exports.SavingsPlanRateUnit = SavingsPlanRateUnit;
|
|
858
|
+
exports.SavingsPlanState = SavingsPlanState;
|
|
859
|
+
exports.SavingsPlanType = SavingsPlanType;
|
|
860
|
+
exports.SavingsPlansFilterName = SavingsPlansFilterName;
|
|
861
|
+
exports.Savingsplans = Savingsplans;
|
|
862
|
+
exports.SavingsplansClient = SavingsplansClient;
|
|
863
|
+
exports.SavingsplansServiceException = SavingsplansServiceException;
|
|
864
|
+
exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
|
|
865
|
+
exports.TagResourceCommand = TagResourceCommand;
|
|
866
|
+
exports.UntagResourceCommand = UntagResourceCommand;
|
|
867
|
+
exports.ValidationException = ValidationException;
|