@aws-sdk/client-cost-and-usage-report-service 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.
Files changed (2) hide show
  1. package/dist-cjs/index.js +627 -771
  2. package/package.json +5 -5
package/dist-cjs/index.js CHANGED
@@ -1,801 +1,657 @@
1
- "use strict";
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 index_exports = {};
23
- __export(index_exports, {
24
- AWSRegion: () => AWSRegion,
25
- AdditionalArtifact: () => AdditionalArtifact,
26
- CompressionFormat: () => CompressionFormat,
27
- CostAndUsageReportService: () => CostAndUsageReportService,
28
- CostAndUsageReportServiceClient: () => CostAndUsageReportServiceClient,
29
- CostAndUsageReportServiceServiceException: () => CostAndUsageReportServiceServiceException,
30
- DeleteReportDefinitionCommand: () => DeleteReportDefinitionCommand,
31
- DescribeReportDefinitionsCommand: () => DescribeReportDefinitionsCommand,
32
- DuplicateReportNameException: () => DuplicateReportNameException,
33
- InternalErrorException: () => InternalErrorException,
34
- LastStatus: () => LastStatus,
35
- ListTagsForResourceCommand: () => ListTagsForResourceCommand,
36
- ModifyReportDefinitionCommand: () => ModifyReportDefinitionCommand,
37
- PutReportDefinitionCommand: () => PutReportDefinitionCommand,
38
- ReportFormat: () => ReportFormat,
39
- ReportLimitReachedException: () => ReportLimitReachedException,
40
- ReportVersioning: () => ReportVersioning,
41
- ResourceNotFoundException: () => ResourceNotFoundException,
42
- SchemaElement: () => SchemaElement,
43
- TagResourceCommand: () => TagResourceCommand,
44
- TimeUnit: () => TimeUnit,
45
- UntagResourceCommand: () => UntagResourceCommand,
46
- ValidationException: () => ValidationException,
47
- __Client: () => import_smithy_client.Client,
48
- paginateDescribeReportDefinitions: () => paginateDescribeReportDefinitions
49
- });
50
- module.exports = __toCommonJS(index_exports);
51
-
52
- // src/CostAndUsageReportServiceClient.ts
53
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
54
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
55
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
56
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
57
- var import_config_resolver = require("@smithy/config-resolver");
58
- var import_core = require("@smithy/core");
59
- var import_middleware_content_length = require("@smithy/middleware-content-length");
60
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
61
- var import_middleware_retry = require("@smithy/middleware-retry");
62
-
63
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
64
-
65
- // src/endpoint/EndpointParameters.ts
66
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
67
- return Object.assign(options, {
68
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
69
- useFipsEndpoint: options.useFipsEndpoint ?? false,
70
- defaultSigningName: "cur"
71
- });
72
- }, "resolveClientEndpointParameters");
73
- var commonParams = {
74
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
75
- Endpoint: { type: "builtInParams", name: "endpoint" },
76
- Region: { type: "builtInParams", name: "region" },
77
- 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
+
20
+ const resolveClientEndpointParameters = (options) => {
21
+ return Object.assign(options, {
22
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
23
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
24
+ defaultSigningName: "cur",
25
+ });
26
+ };
27
+ const commonParams = {
28
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
29
+ Endpoint: { type: "builtInParams", name: "endpoint" },
30
+ Region: { type: "builtInParams", name: "region" },
31
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
78
32
  };
79
33
 
80
- // src/CostAndUsageReportServiceClient.ts
81
- var import_runtimeConfig = require("././runtimeConfig");
34
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
35
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
36
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
37
+ let _credentials = runtimeConfig.credentials;
38
+ return {
39
+ setHttpAuthScheme(httpAuthScheme) {
40
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
41
+ if (index === -1) {
42
+ _httpAuthSchemes.push(httpAuthScheme);
43
+ }
44
+ else {
45
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
46
+ }
47
+ },
48
+ httpAuthSchemes() {
49
+ return _httpAuthSchemes;
50
+ },
51
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
52
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
53
+ },
54
+ httpAuthSchemeProvider() {
55
+ return _httpAuthSchemeProvider;
56
+ },
57
+ setCredentials(credentials) {
58
+ _credentials = credentials;
59
+ },
60
+ credentials() {
61
+ return _credentials;
62
+ },
63
+ };
64
+ };
65
+ const resolveHttpAuthRuntimeConfig = (config) => {
66
+ return {
67
+ httpAuthSchemes: config.httpAuthSchemes(),
68
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
69
+ credentials: config.credentials(),
70
+ };
71
+ };
82
72
 
83
- // src/runtimeExtensions.ts
84
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
85
- var import_protocol_http = require("@smithy/protocol-http");
86
- var import_smithy_client = require("@smithy/smithy-client");
73
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
74
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
75
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
76
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
77
+ };
87
78
 
88
- // src/auth/httpAuthExtensionConfiguration.ts
89
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
90
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
91
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
92
- let _credentials = runtimeConfig.credentials;
93
- return {
94
- setHttpAuthScheme(httpAuthScheme) {
95
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
96
- if (index === -1) {
97
- _httpAuthSchemes.push(httpAuthScheme);
98
- } else {
99
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
100
- }
101
- },
102
- httpAuthSchemes() {
103
- return _httpAuthSchemes;
104
- },
105
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
106
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
107
- },
108
- httpAuthSchemeProvider() {
109
- return _httpAuthSchemeProvider;
110
- },
111
- setCredentials(credentials) {
112
- _credentials = credentials;
113
- },
114
- credentials() {
115
- return _credentials;
79
+ class CostAndUsageReportServiceClient extends smithyClient.Client {
80
+ config;
81
+ constructor(...[configuration]) {
82
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
83
+ super(_config_0);
84
+ this.initConfig = _config_0;
85
+ const _config_1 = resolveClientEndpointParameters(_config_0);
86
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
87
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
88
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
89
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
90
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
91
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
92
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
93
+ this.config = _config_8;
94
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
95
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
96
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
97
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
98
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
99
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
100
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
101
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultCostAndUsageReportServiceHttpAuthSchemeParametersProvider,
102
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
103
+ "aws.auth#sigv4": config.credentials,
104
+ }),
105
+ }));
106
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
107
+ }
108
+ destroy() {
109
+ super.destroy();
116
110
  }
117
- };
118
- }, "getHttpAuthExtensionConfiguration");
119
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
120
- return {
121
- httpAuthSchemes: config.httpAuthSchemes(),
122
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
123
- credentials: config.credentials()
124
- };
125
- }, "resolveHttpAuthRuntimeConfig");
111
+ }
126
112
 
127
- // src/runtimeExtensions.ts
128
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
129
- const extensionConfiguration = Object.assign(
130
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
131
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
132
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
133
- getHttpAuthExtensionConfiguration(runtimeConfig)
134
- );
135
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
136
- return Object.assign(
137
- runtimeConfig,
138
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
139
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
140
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
141
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
142
- );
143
- }, "resolveRuntimeExtensions");
113
+ class CostAndUsageReportServiceServiceException extends smithyClient.ServiceException {
114
+ constructor(options) {
115
+ super(options);
116
+ Object.setPrototypeOf(this, CostAndUsageReportServiceServiceException.prototype);
117
+ }
118
+ }
144
119
 
145
- // src/CostAndUsageReportServiceClient.ts
146
- var CostAndUsageReportServiceClient = class extends import_smithy_client.Client {
147
- static {
148
- __name(this, "CostAndUsageReportServiceClient");
149
- }
150
- /**
151
- * The resolved configuration of CostAndUsageReportServiceClient class. This is resolved and normalized from the {@link CostAndUsageReportServiceClientConfig | constructor configuration interface}.
152
- */
153
- config;
154
- constructor(...[configuration]) {
155
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
156
- super(_config_0);
157
- this.initConfig = _config_0;
158
- const _config_1 = resolveClientEndpointParameters(_config_0);
159
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
160
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
161
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
162
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
163
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
164
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
165
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
166
- this.config = _config_8;
167
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
168
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
169
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
170
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
171
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
172
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
173
- this.middlewareStack.use(
174
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
175
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultCostAndUsageReportServiceHttpAuthSchemeParametersProvider,
176
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
177
- "aws.auth#sigv4": config.credentials
178
- }), "identityProviderConfigProvider")
179
- })
180
- );
181
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
182
- }
183
- /**
184
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
185
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
186
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
187
- */
188
- destroy() {
189
- super.destroy();
190
- }
120
+ const AdditionalArtifact = {
121
+ ATHENA: "ATHENA",
122
+ QUICKSIGHT: "QUICKSIGHT",
123
+ REDSHIFT: "REDSHIFT",
191
124
  };
192
-
193
- // src/CostAndUsageReportService.ts
194
-
195
-
196
- // src/commands/DeleteReportDefinitionCommand.ts
197
-
198
- var import_middleware_serde = require("@smithy/middleware-serde");
199
-
200
-
201
- // src/protocols/Aws_json1_1.ts
202
- var import_core2 = require("@aws-sdk/core");
203
-
204
-
205
-
206
- // src/models/CostAndUsageReportServiceServiceException.ts
207
-
208
- var CostAndUsageReportServiceServiceException = class _CostAndUsageReportServiceServiceException extends import_smithy_client.ServiceException {
209
- static {
210
- __name(this, "CostAndUsageReportServiceServiceException");
211
- }
212
- /**
213
- * @internal
214
- */
215
- constructor(options) {
216
- super(options);
217
- Object.setPrototypeOf(this, _CostAndUsageReportServiceServiceException.prototype);
218
- }
125
+ class InternalErrorException extends CostAndUsageReportServiceServiceException {
126
+ name = "InternalErrorException";
127
+ $fault = "server";
128
+ Message;
129
+ constructor(opts) {
130
+ super({
131
+ name: "InternalErrorException",
132
+ $fault: "server",
133
+ ...opts,
134
+ });
135
+ Object.setPrototypeOf(this, InternalErrorException.prototype);
136
+ this.Message = opts.Message;
137
+ }
138
+ }
139
+ class ValidationException extends CostAndUsageReportServiceServiceException {
140
+ name = "ValidationException";
141
+ $fault = "client";
142
+ Message;
143
+ constructor(opts) {
144
+ super({
145
+ name: "ValidationException",
146
+ $fault: "client",
147
+ ...opts,
148
+ });
149
+ Object.setPrototypeOf(this, ValidationException.prototype);
150
+ this.Message = opts.Message;
151
+ }
152
+ }
153
+ const SchemaElement = {
154
+ MANUAL_DISCOUNT_COMPATIBILITY: "MANUAL_DISCOUNT_COMPATIBILITY",
155
+ RESOURCES: "RESOURCES",
156
+ SPLIT_COST_ALLOCATION_DATA: "SPLIT_COST_ALLOCATION_DATA",
157
+ };
158
+ const CompressionFormat = {
159
+ GZIP: "GZIP",
160
+ Parquet: "Parquet",
161
+ ZIP: "ZIP",
162
+ };
163
+ const ReportFormat = {
164
+ CSV: "textORcsv",
165
+ Parquet: "Parquet",
166
+ };
167
+ const LastStatus = {
168
+ ERROR_NO_BUCKET: "ERROR_NO_BUCKET",
169
+ ERROR_PERMISSIONS: "ERROR_PERMISSIONS",
170
+ SUCCESS: "SUCCESS",
171
+ };
172
+ const ReportVersioning = {
173
+ CREATE_NEW_REPORT: "CREATE_NEW_REPORT",
174
+ OVERWRITE_REPORT: "OVERWRITE_REPORT",
175
+ };
176
+ const AWSRegion = {
177
+ BAHRAIN: "me-south-1",
178
+ BEIJING: "cn-north-1",
179
+ CANADA_CENTRAL: "ca-central-1",
180
+ CAPE_TOWN: "af-south-1",
181
+ FRANKFURT: "eu-central-1",
182
+ HONG_KONG: "ap-east-1",
183
+ HYDERABAD: "ap-south-2",
184
+ IRELAND: "eu-west-1",
185
+ JAKARTA: "ap-southeast-3",
186
+ LONDON: "eu-west-2",
187
+ MILANO: "eu-south-1",
188
+ MUMBAI: "ap-south-1",
189
+ NINGXIA: "cn-northwest-1",
190
+ NORTHERN_CALIFORNIA: "us-west-1",
191
+ OHIO: "us-east-2",
192
+ OREGON: "us-west-2",
193
+ OSAKA: "ap-northeast-3",
194
+ PARIS: "eu-west-3",
195
+ SAO_PAULO: "sa-east-1",
196
+ SEOUL: "ap-northeast-2",
197
+ SINGAPORE: "ap-southeast-1",
198
+ SPAIN: "eu-south-2",
199
+ STOCKHOLM: "eu-north-1",
200
+ SYDNEY: "ap-southeast-2",
201
+ TOKYO: "ap-northeast-1",
202
+ UAE: "me-central-1",
203
+ US_STANDARD: "us-east-1",
204
+ ZURICH: "eu-central-2",
205
+ };
206
+ const TimeUnit = {
207
+ DAILY: "DAILY",
208
+ HOURLY: "HOURLY",
209
+ MONTHLY: "MONTHLY",
219
210
  };
211
+ class ResourceNotFoundException extends CostAndUsageReportServiceServiceException {
212
+ name = "ResourceNotFoundException";
213
+ $fault = "client";
214
+ Message;
215
+ constructor(opts) {
216
+ super({
217
+ name: "ResourceNotFoundException",
218
+ $fault: "client",
219
+ ...opts,
220
+ });
221
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
222
+ this.Message = opts.Message;
223
+ }
224
+ }
225
+ class DuplicateReportNameException extends CostAndUsageReportServiceServiceException {
226
+ name = "DuplicateReportNameException";
227
+ $fault = "client";
228
+ Message;
229
+ constructor(opts) {
230
+ super({
231
+ name: "DuplicateReportNameException",
232
+ $fault: "client",
233
+ ...opts,
234
+ });
235
+ Object.setPrototypeOf(this, DuplicateReportNameException.prototype);
236
+ this.Message = opts.Message;
237
+ }
238
+ }
239
+ class ReportLimitReachedException extends CostAndUsageReportServiceServiceException {
240
+ name = "ReportLimitReachedException";
241
+ $fault = "client";
242
+ Message;
243
+ constructor(opts) {
244
+ super({
245
+ name: "ReportLimitReachedException",
246
+ $fault: "client",
247
+ ...opts,
248
+ });
249
+ Object.setPrototypeOf(this, ReportLimitReachedException.prototype);
250
+ this.Message = opts.Message;
251
+ }
252
+ }
220
253
 
221
- // src/models/models_0.ts
222
- var AdditionalArtifact = {
223
- ATHENA: "ATHENA",
224
- QUICKSIGHT: "QUICKSIGHT",
225
- REDSHIFT: "REDSHIFT"
226
- };
227
- var InternalErrorException = class _InternalErrorException extends CostAndUsageReportServiceServiceException {
228
- static {
229
- __name(this, "InternalErrorException");
230
- }
231
- name = "InternalErrorException";
232
- $fault = "server";
233
- /**
234
- * <p>A message to show the detail of the exception.</p>
235
- * @public
236
- */
237
- Message;
238
- /**
239
- * @internal
240
- */
241
- constructor(opts) {
242
- super({
243
- name: "InternalErrorException",
244
- $fault: "server",
245
- ...opts
254
+ const se_DeleteReportDefinitionCommand = async (input, context) => {
255
+ const headers = sharedHeaders("DeleteReportDefinition");
256
+ let body;
257
+ body = JSON.stringify(smithyClient._json(input));
258
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
259
+ };
260
+ const se_DescribeReportDefinitionsCommand = async (input, context) => {
261
+ const headers = sharedHeaders("DescribeReportDefinitions");
262
+ let body;
263
+ body = JSON.stringify(smithyClient._json(input));
264
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
265
+ };
266
+ const se_ListTagsForResourceCommand = async (input, context) => {
267
+ const headers = sharedHeaders("ListTagsForResource");
268
+ let body;
269
+ body = JSON.stringify(smithyClient._json(input));
270
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
271
+ };
272
+ const se_ModifyReportDefinitionCommand = async (input, context) => {
273
+ const headers = sharedHeaders("ModifyReportDefinition");
274
+ let body;
275
+ body = JSON.stringify(smithyClient._json(input));
276
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
277
+ };
278
+ const se_PutReportDefinitionCommand = async (input, context) => {
279
+ const headers = sharedHeaders("PutReportDefinition");
280
+ let body;
281
+ body = JSON.stringify(smithyClient._json(input));
282
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
283
+ };
284
+ const se_TagResourceCommand = async (input, context) => {
285
+ const headers = sharedHeaders("TagResource");
286
+ let body;
287
+ body = JSON.stringify(smithyClient._json(input));
288
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
289
+ };
290
+ const se_UntagResourceCommand = async (input, context) => {
291
+ const headers = sharedHeaders("UntagResource");
292
+ let body;
293
+ body = JSON.stringify(smithyClient._json(input));
294
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
295
+ };
296
+ const de_DeleteReportDefinitionCommand = async (output, context) => {
297
+ if (output.statusCode >= 300) {
298
+ return de_CommandError(output, context);
299
+ }
300
+ const data = await core$1.parseJsonBody(output.body, context);
301
+ let contents = {};
302
+ contents = smithyClient._json(data);
303
+ const response = {
304
+ $metadata: deserializeMetadata(output),
305
+ ...contents,
306
+ };
307
+ return response;
308
+ };
309
+ const de_DescribeReportDefinitionsCommand = async (output, context) => {
310
+ if (output.statusCode >= 300) {
311
+ return de_CommandError(output, context);
312
+ }
313
+ const data = await core$1.parseJsonBody(output.body, context);
314
+ let contents = {};
315
+ contents = smithyClient._json(data);
316
+ const response = {
317
+ $metadata: deserializeMetadata(output),
318
+ ...contents,
319
+ };
320
+ return response;
321
+ };
322
+ const de_ListTagsForResourceCommand = async (output, context) => {
323
+ if (output.statusCode >= 300) {
324
+ return de_CommandError(output, context);
325
+ }
326
+ const data = await core$1.parseJsonBody(output.body, context);
327
+ let contents = {};
328
+ contents = smithyClient._json(data);
329
+ const response = {
330
+ $metadata: deserializeMetadata(output),
331
+ ...contents,
332
+ };
333
+ return response;
334
+ };
335
+ const de_ModifyReportDefinitionCommand = async (output, context) => {
336
+ if (output.statusCode >= 300) {
337
+ return de_CommandError(output, context);
338
+ }
339
+ const data = await core$1.parseJsonBody(output.body, context);
340
+ let contents = {};
341
+ contents = smithyClient._json(data);
342
+ const response = {
343
+ $metadata: deserializeMetadata(output),
344
+ ...contents,
345
+ };
346
+ return response;
347
+ };
348
+ const de_PutReportDefinitionCommand = async (output, context) => {
349
+ if (output.statusCode >= 300) {
350
+ return de_CommandError(output, context);
351
+ }
352
+ const data = await core$1.parseJsonBody(output.body, context);
353
+ let contents = {};
354
+ contents = smithyClient._json(data);
355
+ const response = {
356
+ $metadata: deserializeMetadata(output),
357
+ ...contents,
358
+ };
359
+ return response;
360
+ };
361
+ const de_TagResourceCommand = async (output, context) => {
362
+ if (output.statusCode >= 300) {
363
+ return de_CommandError(output, context);
364
+ }
365
+ const data = await core$1.parseJsonBody(output.body, context);
366
+ let contents = {};
367
+ contents = smithyClient._json(data);
368
+ const response = {
369
+ $metadata: deserializeMetadata(output),
370
+ ...contents,
371
+ };
372
+ return response;
373
+ };
374
+ const de_UntagResourceCommand = async (output, context) => {
375
+ if (output.statusCode >= 300) {
376
+ return de_CommandError(output, context);
377
+ }
378
+ const data = await core$1.parseJsonBody(output.body, context);
379
+ let contents = {};
380
+ contents = smithyClient._json(data);
381
+ const response = {
382
+ $metadata: deserializeMetadata(output),
383
+ ...contents,
384
+ };
385
+ return response;
386
+ };
387
+ const de_CommandError = async (output, context) => {
388
+ const parsedOutput = {
389
+ ...output,
390
+ body: await core$1.parseJsonErrorBody(output.body, context),
391
+ };
392
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
393
+ switch (errorCode) {
394
+ case "InternalErrorException":
395
+ case "com.amazonaws.costandusagereportservice#InternalErrorException":
396
+ throw await de_InternalErrorExceptionRes(parsedOutput);
397
+ case "ValidationException":
398
+ case "com.amazonaws.costandusagereportservice#ValidationException":
399
+ throw await de_ValidationExceptionRes(parsedOutput);
400
+ case "ResourceNotFoundException":
401
+ case "com.amazonaws.costandusagereportservice#ResourceNotFoundException":
402
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput);
403
+ case "DuplicateReportNameException":
404
+ case "com.amazonaws.costandusagereportservice#DuplicateReportNameException":
405
+ throw await de_DuplicateReportNameExceptionRes(parsedOutput);
406
+ case "ReportLimitReachedException":
407
+ case "com.amazonaws.costandusagereportservice#ReportLimitReachedException":
408
+ throw await de_ReportLimitReachedExceptionRes(parsedOutput);
409
+ default:
410
+ const parsedBody = parsedOutput.body;
411
+ return throwDefaultError({
412
+ output,
413
+ parsedBody,
414
+ errorCode,
415
+ });
416
+ }
417
+ };
418
+ const de_DuplicateReportNameExceptionRes = async (parsedOutput, context) => {
419
+ const body = parsedOutput.body;
420
+ const deserialized = smithyClient._json(body);
421
+ const exception = new DuplicateReportNameException({
422
+ $metadata: deserializeMetadata(parsedOutput),
423
+ ...deserialized,
246
424
  });
247
- Object.setPrototypeOf(this, _InternalErrorException.prototype);
248
- this.Message = opts.Message;
249
- }
250
- };
251
- var ValidationException = class _ValidationException extends CostAndUsageReportServiceServiceException {
252
- static {
253
- __name(this, "ValidationException");
254
- }
255
- name = "ValidationException";
256
- $fault = "client";
257
- /**
258
- * <p>A message to show the detail of the exception.</p>
259
- * @public
260
- */
261
- Message;
262
- /**
263
- * @internal
264
- */
265
- constructor(opts) {
266
- super({
267
- name: "ValidationException",
268
- $fault: "client",
269
- ...opts
425
+ return smithyClient.decorateServiceException(exception, body);
426
+ };
427
+ const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
428
+ const body = parsedOutput.body;
429
+ const deserialized = smithyClient._json(body);
430
+ const exception = new InternalErrorException({
431
+ $metadata: deserializeMetadata(parsedOutput),
432
+ ...deserialized,
270
433
  });
271
- Object.setPrototypeOf(this, _ValidationException.prototype);
272
- this.Message = opts.Message;
273
- }
274
- };
275
- var SchemaElement = {
276
- MANUAL_DISCOUNT_COMPATIBILITY: "MANUAL_DISCOUNT_COMPATIBILITY",
277
- RESOURCES: "RESOURCES",
278
- SPLIT_COST_ALLOCATION_DATA: "SPLIT_COST_ALLOCATION_DATA"
279
- };
280
- var CompressionFormat = {
281
- GZIP: "GZIP",
282
- Parquet: "Parquet",
283
- ZIP: "ZIP"
284
- };
285
- var ReportFormat = {
286
- CSV: "textORcsv",
287
- Parquet: "Parquet"
288
- };
289
- var LastStatus = {
290
- ERROR_NO_BUCKET: "ERROR_NO_BUCKET",
291
- ERROR_PERMISSIONS: "ERROR_PERMISSIONS",
292
- SUCCESS: "SUCCESS"
293
- };
294
- var ReportVersioning = {
295
- CREATE_NEW_REPORT: "CREATE_NEW_REPORT",
296
- OVERWRITE_REPORT: "OVERWRITE_REPORT"
297
- };
298
- var AWSRegion = {
299
- BAHRAIN: "me-south-1",
300
- BEIJING: "cn-north-1",
301
- CANADA_CENTRAL: "ca-central-1",
302
- CAPE_TOWN: "af-south-1",
303
- FRANKFURT: "eu-central-1",
304
- HONG_KONG: "ap-east-1",
305
- HYDERABAD: "ap-south-2",
306
- IRELAND: "eu-west-1",
307
- JAKARTA: "ap-southeast-3",
308
- LONDON: "eu-west-2",
309
- MILANO: "eu-south-1",
310
- MUMBAI: "ap-south-1",
311
- NINGXIA: "cn-northwest-1",
312
- NORTHERN_CALIFORNIA: "us-west-1",
313
- OHIO: "us-east-2",
314
- OREGON: "us-west-2",
315
- OSAKA: "ap-northeast-3",
316
- PARIS: "eu-west-3",
317
- SAO_PAULO: "sa-east-1",
318
- SEOUL: "ap-northeast-2",
319
- SINGAPORE: "ap-southeast-1",
320
- SPAIN: "eu-south-2",
321
- STOCKHOLM: "eu-north-1",
322
- SYDNEY: "ap-southeast-2",
323
- TOKYO: "ap-northeast-1",
324
- UAE: "me-central-1",
325
- US_STANDARD: "us-east-1",
326
- ZURICH: "eu-central-2"
327
- };
328
- var TimeUnit = {
329
- DAILY: "DAILY",
330
- HOURLY: "HOURLY",
331
- MONTHLY: "MONTHLY"
332
- };
333
- var ResourceNotFoundException = class _ResourceNotFoundException extends CostAndUsageReportServiceServiceException {
334
- static {
335
- __name(this, "ResourceNotFoundException");
336
- }
337
- name = "ResourceNotFoundException";
338
- $fault = "client";
339
- /**
340
- * <p>A message to show the detail of the exception.</p>
341
- * @public
342
- */
343
- Message;
344
- /**
345
- * @internal
346
- */
347
- constructor(opts) {
348
- super({
349
- name: "ResourceNotFoundException",
350
- $fault: "client",
351
- ...opts
434
+ return smithyClient.decorateServiceException(exception, body);
435
+ };
436
+ const de_ReportLimitReachedExceptionRes = async (parsedOutput, context) => {
437
+ const body = parsedOutput.body;
438
+ const deserialized = smithyClient._json(body);
439
+ const exception = new ReportLimitReachedException({
440
+ $metadata: deserializeMetadata(parsedOutput),
441
+ ...deserialized,
352
442
  });
353
- Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
354
- this.Message = opts.Message;
355
- }
356
- };
357
- var DuplicateReportNameException = class _DuplicateReportNameException extends CostAndUsageReportServiceServiceException {
358
- static {
359
- __name(this, "DuplicateReportNameException");
360
- }
361
- name = "DuplicateReportNameException";
362
- $fault = "client";
363
- /**
364
- * <p>A message to show the detail of the exception.</p>
365
- * @public
366
- */
367
- Message;
368
- /**
369
- * @internal
370
- */
371
- constructor(opts) {
372
- super({
373
- name: "DuplicateReportNameException",
374
- $fault: "client",
375
- ...opts
443
+ return smithyClient.decorateServiceException(exception, body);
444
+ };
445
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
446
+ const body = parsedOutput.body;
447
+ const deserialized = smithyClient._json(body);
448
+ const exception = new ResourceNotFoundException({
449
+ $metadata: deserializeMetadata(parsedOutput),
450
+ ...deserialized,
376
451
  });
377
- Object.setPrototypeOf(this, _DuplicateReportNameException.prototype);
378
- this.Message = opts.Message;
379
- }
380
- };
381
- var ReportLimitReachedException = class _ReportLimitReachedException extends CostAndUsageReportServiceServiceException {
382
- static {
383
- __name(this, "ReportLimitReachedException");
384
- }
385
- name = "ReportLimitReachedException";
386
- $fault = "client";
387
- /**
388
- * <p>A message to show the detail of the exception.</p>
389
- * @public
390
- */
391
- Message;
392
- /**
393
- * @internal
394
- */
395
- constructor(opts) {
396
- super({
397
- name: "ReportLimitReachedException",
398
- $fault: "client",
399
- ...opts
452
+ return smithyClient.decorateServiceException(exception, body);
453
+ };
454
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
455
+ const body = parsedOutput.body;
456
+ const deserialized = smithyClient._json(body);
457
+ const exception = new ValidationException({
458
+ $metadata: deserializeMetadata(parsedOutput),
459
+ ...deserialized,
400
460
  });
401
- Object.setPrototypeOf(this, _ReportLimitReachedException.prototype);
402
- this.Message = opts.Message;
403
- }
461
+ return smithyClient.decorateServiceException(exception, body);
462
+ };
463
+ const deserializeMetadata = (output) => ({
464
+ httpStatusCode: output.statusCode,
465
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
466
+ extendedRequestId: output.headers["x-amz-id-2"],
467
+ cfId: output.headers["x-amz-cf-id"],
468
+ });
469
+ const throwDefaultError = smithyClient.withBaseException(CostAndUsageReportServiceServiceException);
470
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
471
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
472
+ const contents = {
473
+ protocol,
474
+ hostname,
475
+ port,
476
+ method: "POST",
477
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
478
+ headers,
479
+ };
480
+ if (body !== undefined) {
481
+ contents.body = body;
482
+ }
483
+ return new protocolHttp.HttpRequest(contents);
404
484
  };
405
-
406
- // src/protocols/Aws_json1_1.ts
407
- var se_DeleteReportDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => {
408
- const headers = sharedHeaders("DeleteReportDefinition");
409
- let body;
410
- body = JSON.stringify((0, import_smithy_client._json)(input));
411
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
412
- }, "se_DeleteReportDefinitionCommand");
413
- var se_DescribeReportDefinitionsCommand = /* @__PURE__ */ __name(async (input, context) => {
414
- const headers = sharedHeaders("DescribeReportDefinitions");
415
- let body;
416
- body = JSON.stringify((0, import_smithy_client._json)(input));
417
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
418
- }, "se_DescribeReportDefinitionsCommand");
419
- var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
420
- const headers = sharedHeaders("ListTagsForResource");
421
- let body;
422
- body = JSON.stringify((0, import_smithy_client._json)(input));
423
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
424
- }, "se_ListTagsForResourceCommand");
425
- var se_ModifyReportDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => {
426
- const headers = sharedHeaders("ModifyReportDefinition");
427
- let body;
428
- body = JSON.stringify((0, import_smithy_client._json)(input));
429
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
430
- }, "se_ModifyReportDefinitionCommand");
431
- var se_PutReportDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => {
432
- const headers = sharedHeaders("PutReportDefinition");
433
- let body;
434
- body = JSON.stringify((0, import_smithy_client._json)(input));
435
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
436
- }, "se_PutReportDefinitionCommand");
437
- var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
438
- const headers = sharedHeaders("TagResource");
439
- let body;
440
- body = JSON.stringify((0, import_smithy_client._json)(input));
441
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
442
- }, "se_TagResourceCommand");
443
- var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
444
- const headers = sharedHeaders("UntagResource");
445
- let body;
446
- body = JSON.stringify((0, import_smithy_client._json)(input));
447
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
448
- }, "se_UntagResourceCommand");
449
- var de_DeleteReportDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => {
450
- if (output.statusCode >= 300) {
451
- return de_CommandError(output, context);
452
- }
453
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
454
- let contents = {};
455
- contents = (0, import_smithy_client._json)(data);
456
- const response = {
457
- $metadata: deserializeMetadata(output),
458
- ...contents
459
- };
460
- return response;
461
- }, "de_DeleteReportDefinitionCommand");
462
- var de_DescribeReportDefinitionsCommand = /* @__PURE__ */ __name(async (output, context) => {
463
- if (output.statusCode >= 300) {
464
- return de_CommandError(output, context);
465
- }
466
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
467
- let contents = {};
468
- contents = (0, import_smithy_client._json)(data);
469
- const response = {
470
- $metadata: deserializeMetadata(output),
471
- ...contents
472
- };
473
- return response;
474
- }, "de_DescribeReportDefinitionsCommand");
475
- var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
476
- if (output.statusCode >= 300) {
477
- return de_CommandError(output, context);
478
- }
479
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
480
- let contents = {};
481
- contents = (0, import_smithy_client._json)(data);
482
- const response = {
483
- $metadata: deserializeMetadata(output),
484
- ...contents
485
- };
486
- return response;
487
- }, "de_ListTagsForResourceCommand");
488
- var de_ModifyReportDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => {
489
- if (output.statusCode >= 300) {
490
- return de_CommandError(output, context);
491
- }
492
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
493
- let contents = {};
494
- contents = (0, import_smithy_client._json)(data);
495
- const response = {
496
- $metadata: deserializeMetadata(output),
497
- ...contents
498
- };
499
- return response;
500
- }, "de_ModifyReportDefinitionCommand");
501
- var de_PutReportDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => {
502
- if (output.statusCode >= 300) {
503
- return de_CommandError(output, context);
504
- }
505
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
506
- let contents = {};
507
- contents = (0, import_smithy_client._json)(data);
508
- const response = {
509
- $metadata: deserializeMetadata(output),
510
- ...contents
511
- };
512
- return response;
513
- }, "de_PutReportDefinitionCommand");
514
- var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
515
- if (output.statusCode >= 300) {
516
- return de_CommandError(output, context);
517
- }
518
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
519
- let contents = {};
520
- contents = (0, import_smithy_client._json)(data);
521
- const response = {
522
- $metadata: deserializeMetadata(output),
523
- ...contents
524
- };
525
- return response;
526
- }, "de_TagResourceCommand");
527
- var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
528
- if (output.statusCode >= 300) {
529
- return de_CommandError(output, context);
530
- }
531
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
532
- let contents = {};
533
- contents = (0, import_smithy_client._json)(data);
534
- const response = {
535
- $metadata: deserializeMetadata(output),
536
- ...contents
537
- };
538
- return response;
539
- }, "de_UntagResourceCommand");
540
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
541
- const parsedOutput = {
542
- ...output,
543
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
544
- };
545
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
546
- switch (errorCode) {
547
- case "InternalErrorException":
548
- case "com.amazonaws.costandusagereportservice#InternalErrorException":
549
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
550
- case "ValidationException":
551
- case "com.amazonaws.costandusagereportservice#ValidationException":
552
- throw await de_ValidationExceptionRes(parsedOutput, context);
553
- case "ResourceNotFoundException":
554
- case "com.amazonaws.costandusagereportservice#ResourceNotFoundException":
555
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
556
- case "DuplicateReportNameException":
557
- case "com.amazonaws.costandusagereportservice#DuplicateReportNameException":
558
- throw await de_DuplicateReportNameExceptionRes(parsedOutput, context);
559
- case "ReportLimitReachedException":
560
- case "com.amazonaws.costandusagereportservice#ReportLimitReachedException":
561
- throw await de_ReportLimitReachedExceptionRes(parsedOutput, context);
562
- default:
563
- const parsedBody = parsedOutput.body;
564
- return throwDefaultError({
565
- output,
566
- parsedBody,
567
- errorCode
568
- });
569
- }
570
- }, "de_CommandError");
571
- var de_DuplicateReportNameExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
572
- const body = parsedOutput.body;
573
- const deserialized = (0, import_smithy_client._json)(body);
574
- const exception = new DuplicateReportNameException({
575
- $metadata: deserializeMetadata(parsedOutput),
576
- ...deserialized
577
- });
578
- return (0, import_smithy_client.decorateServiceException)(exception, body);
579
- }, "de_DuplicateReportNameExceptionRes");
580
- var de_InternalErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
581
- const body = parsedOutput.body;
582
- const deserialized = (0, import_smithy_client._json)(body);
583
- const exception = new InternalErrorException({
584
- $metadata: deserializeMetadata(parsedOutput),
585
- ...deserialized
586
- });
587
- return (0, import_smithy_client.decorateServiceException)(exception, body);
588
- }, "de_InternalErrorExceptionRes");
589
- var de_ReportLimitReachedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
590
- const body = parsedOutput.body;
591
- const deserialized = (0, import_smithy_client._json)(body);
592
- const exception = new ReportLimitReachedException({
593
- $metadata: deserializeMetadata(parsedOutput),
594
- ...deserialized
595
- });
596
- return (0, import_smithy_client.decorateServiceException)(exception, body);
597
- }, "de_ReportLimitReachedExceptionRes");
598
- var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
599
- const body = parsedOutput.body;
600
- const deserialized = (0, import_smithy_client._json)(body);
601
- const exception = new ResourceNotFoundException({
602
- $metadata: deserializeMetadata(parsedOutput),
603
- ...deserialized
604
- });
605
- return (0, import_smithy_client.decorateServiceException)(exception, body);
606
- }, "de_ResourceNotFoundExceptionRes");
607
- var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
608
- const body = parsedOutput.body;
609
- const deserialized = (0, import_smithy_client._json)(body);
610
- const exception = new ValidationException({
611
- $metadata: deserializeMetadata(parsedOutput),
612
- ...deserialized
613
- });
614
- return (0, import_smithy_client.decorateServiceException)(exception, body);
615
- }, "de_ValidationExceptionRes");
616
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
617
- httpStatusCode: output.statusCode,
618
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
619
- extendedRequestId: output.headers["x-amz-id-2"],
620
- cfId: output.headers["x-amz-cf-id"]
621
- }), "deserializeMetadata");
622
- var throwDefaultError = (0, import_smithy_client.withBaseException)(CostAndUsageReportServiceServiceException);
623
- var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
624
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
625
- const contents = {
626
- protocol,
627
- hostname,
628
- port,
629
- method: "POST",
630
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
631
- headers
632
- };
633
- if (resolvedHostname !== void 0) {
634
- contents.hostname = resolvedHostname;
635
- }
636
- if (body !== void 0) {
637
- contents.body = body;
638
- }
639
- return new import_protocol_http.HttpRequest(contents);
640
- }, "buildHttpRpcRequest");
641
485
  function sharedHeaders(operation) {
642
- return {
643
- "content-type": "application/x-amz-json-1.1",
644
- "x-amz-target": `AWSOrigamiServiceGatewayService.${operation}`
645
- };
486
+ return {
487
+ "content-type": "application/x-amz-json-1.1",
488
+ "x-amz-target": `AWSOrigamiServiceGatewayService.${operation}`,
489
+ };
646
490
  }
647
- __name(sharedHeaders, "sharedHeaders");
648
-
649
- // src/commands/DeleteReportDefinitionCommand.ts
650
- var DeleteReportDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
651
- return [
652
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
653
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
654
- ];
655
- }).s("AWSOrigamiServiceGatewayService", "DeleteReportDefinition", {}).n("CostAndUsageReportServiceClient", "DeleteReportDefinitionCommand").f(void 0, void 0).ser(se_DeleteReportDefinitionCommand).de(de_DeleteReportDefinitionCommand).build() {
656
- static {
657
- __name(this, "DeleteReportDefinitionCommand");
658
- }
659
- };
660
-
661
- // src/commands/DescribeReportDefinitionsCommand.ts
662
-
663
-
664
-
665
- var DescribeReportDefinitionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
666
- return [
667
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
668
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
669
- ];
670
- }).s("AWSOrigamiServiceGatewayService", "DescribeReportDefinitions", {}).n("CostAndUsageReportServiceClient", "DescribeReportDefinitionsCommand").f(void 0, void 0).ser(se_DescribeReportDefinitionsCommand).de(de_DescribeReportDefinitionsCommand).build() {
671
- static {
672
- __name(this, "DescribeReportDefinitionsCommand");
673
- }
674
- };
675
-
676
- // src/commands/ListTagsForResourceCommand.ts
677
-
678
491
 
492
+ class DeleteReportDefinitionCommand extends smithyClient.Command
493
+ .classBuilder()
494
+ .ep(commonParams)
495
+ .m(function (Command, cs, config, o) {
496
+ return [
497
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
498
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
499
+ ];
500
+ })
501
+ .s("AWSOrigamiServiceGatewayService", "DeleteReportDefinition", {})
502
+ .n("CostAndUsageReportServiceClient", "DeleteReportDefinitionCommand")
503
+ .f(void 0, void 0)
504
+ .ser(se_DeleteReportDefinitionCommand)
505
+ .de(de_DeleteReportDefinitionCommand)
506
+ .build() {
507
+ }
679
508
 
680
- var ListTagsForResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
681
- return [
682
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
683
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
684
- ];
685
- }).s("AWSOrigamiServiceGatewayService", "ListTagsForResource", {}).n("CostAndUsageReportServiceClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {
686
- static {
687
- __name(this, "ListTagsForResourceCommand");
688
- }
689
- };
690
-
691
- // src/commands/ModifyReportDefinitionCommand.ts
692
-
693
-
694
-
695
- var ModifyReportDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
696
- return [
697
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
698
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
699
- ];
700
- }).s("AWSOrigamiServiceGatewayService", "ModifyReportDefinition", {}).n("CostAndUsageReportServiceClient", "ModifyReportDefinitionCommand").f(void 0, void 0).ser(se_ModifyReportDefinitionCommand).de(de_ModifyReportDefinitionCommand).build() {
701
- static {
702
- __name(this, "ModifyReportDefinitionCommand");
703
- }
704
- };
705
-
706
- // src/commands/PutReportDefinitionCommand.ts
707
-
708
-
709
-
710
- var PutReportDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
711
- return [
712
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
713
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
714
- ];
715
- }).s("AWSOrigamiServiceGatewayService", "PutReportDefinition", {}).n("CostAndUsageReportServiceClient", "PutReportDefinitionCommand").f(void 0, void 0).ser(se_PutReportDefinitionCommand).de(de_PutReportDefinitionCommand).build() {
716
- static {
717
- __name(this, "PutReportDefinitionCommand");
718
- }
719
- };
720
-
721
- // src/commands/TagResourceCommand.ts
722
-
509
+ class DescribeReportDefinitionsCommand extends smithyClient.Command
510
+ .classBuilder()
511
+ .ep(commonParams)
512
+ .m(function (Command, cs, config, o) {
513
+ return [
514
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
515
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
516
+ ];
517
+ })
518
+ .s("AWSOrigamiServiceGatewayService", "DescribeReportDefinitions", {})
519
+ .n("CostAndUsageReportServiceClient", "DescribeReportDefinitionsCommand")
520
+ .f(void 0, void 0)
521
+ .ser(se_DescribeReportDefinitionsCommand)
522
+ .de(de_DescribeReportDefinitionsCommand)
523
+ .build() {
524
+ }
723
525
 
526
+ class ListTagsForResourceCommand extends smithyClient.Command
527
+ .classBuilder()
528
+ .ep(commonParams)
529
+ .m(function (Command, cs, config, o) {
530
+ return [
531
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
532
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
533
+ ];
534
+ })
535
+ .s("AWSOrigamiServiceGatewayService", "ListTagsForResource", {})
536
+ .n("CostAndUsageReportServiceClient", "ListTagsForResourceCommand")
537
+ .f(void 0, void 0)
538
+ .ser(se_ListTagsForResourceCommand)
539
+ .de(de_ListTagsForResourceCommand)
540
+ .build() {
541
+ }
724
542
 
725
- var TagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
726
- return [
727
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
728
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
729
- ];
730
- }).s("AWSOrigamiServiceGatewayService", "TagResource", {}).n("CostAndUsageReportServiceClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {
731
- static {
732
- __name(this, "TagResourceCommand");
733
- }
734
- };
543
+ class ModifyReportDefinitionCommand extends smithyClient.Command
544
+ .classBuilder()
545
+ .ep(commonParams)
546
+ .m(function (Command, cs, config, o) {
547
+ return [
548
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
549
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
550
+ ];
551
+ })
552
+ .s("AWSOrigamiServiceGatewayService", "ModifyReportDefinition", {})
553
+ .n("CostAndUsageReportServiceClient", "ModifyReportDefinitionCommand")
554
+ .f(void 0, void 0)
555
+ .ser(se_ModifyReportDefinitionCommand)
556
+ .de(de_ModifyReportDefinitionCommand)
557
+ .build() {
558
+ }
735
559
 
736
- // src/commands/UntagResourceCommand.ts
560
+ class PutReportDefinitionCommand extends smithyClient.Command
561
+ .classBuilder()
562
+ .ep(commonParams)
563
+ .m(function (Command, cs, config, o) {
564
+ return [
565
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
566
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
567
+ ];
568
+ })
569
+ .s("AWSOrigamiServiceGatewayService", "PutReportDefinition", {})
570
+ .n("CostAndUsageReportServiceClient", "PutReportDefinitionCommand")
571
+ .f(void 0, void 0)
572
+ .ser(se_PutReportDefinitionCommand)
573
+ .de(de_PutReportDefinitionCommand)
574
+ .build() {
575
+ }
737
576
 
577
+ class TagResourceCommand extends smithyClient.Command
578
+ .classBuilder()
579
+ .ep(commonParams)
580
+ .m(function (Command, cs, config, o) {
581
+ return [
582
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
583
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
584
+ ];
585
+ })
586
+ .s("AWSOrigamiServiceGatewayService", "TagResource", {})
587
+ .n("CostAndUsageReportServiceClient", "TagResourceCommand")
588
+ .f(void 0, void 0)
589
+ .ser(se_TagResourceCommand)
590
+ .de(de_TagResourceCommand)
591
+ .build() {
592
+ }
738
593
 
594
+ class UntagResourceCommand extends smithyClient.Command
595
+ .classBuilder()
596
+ .ep(commonParams)
597
+ .m(function (Command, cs, config, o) {
598
+ return [
599
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
600
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
601
+ ];
602
+ })
603
+ .s("AWSOrigamiServiceGatewayService", "UntagResource", {})
604
+ .n("CostAndUsageReportServiceClient", "UntagResourceCommand")
605
+ .f(void 0, void 0)
606
+ .ser(se_UntagResourceCommand)
607
+ .de(de_UntagResourceCommand)
608
+ .build() {
609
+ }
739
610
 
740
- var UntagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
741
- return [
742
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
743
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
744
- ];
745
- }).s("AWSOrigamiServiceGatewayService", "UntagResource", {}).n("CostAndUsageReportServiceClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {
746
- static {
747
- __name(this, "UntagResourceCommand");
748
- }
611
+ const commands = {
612
+ DeleteReportDefinitionCommand,
613
+ DescribeReportDefinitionsCommand,
614
+ ListTagsForResourceCommand,
615
+ ModifyReportDefinitionCommand,
616
+ PutReportDefinitionCommand,
617
+ TagResourceCommand,
618
+ UntagResourceCommand,
749
619
  };
620
+ class CostAndUsageReportService extends CostAndUsageReportServiceClient {
621
+ }
622
+ smithyClient.createAggregatedClient(commands, CostAndUsageReportService);
750
623
 
751
- // src/CostAndUsageReportService.ts
752
- var commands = {
753
- DeleteReportDefinitionCommand,
754
- DescribeReportDefinitionsCommand,
755
- ListTagsForResourceCommand,
756
- ModifyReportDefinitionCommand,
757
- PutReportDefinitionCommand,
758
- TagResourceCommand,
759
- UntagResourceCommand
760
- };
761
- var CostAndUsageReportService = class extends CostAndUsageReportServiceClient {
762
- static {
763
- __name(this, "CostAndUsageReportService");
764
- }
765
- };
766
- (0, import_smithy_client.createAggregatedClient)(commands, CostAndUsageReportService);
767
-
768
- // src/pagination/DescribeReportDefinitionsPaginator.ts
769
-
770
- var paginateDescribeReportDefinitions = (0, import_core.createPaginator)(CostAndUsageReportServiceClient, DescribeReportDefinitionsCommand, "NextToken", "NextToken", "MaxResults");
771
- // Annotate the CommonJS export names for ESM import in node:
624
+ const paginateDescribeReportDefinitions = core.createPaginator(CostAndUsageReportServiceClient, DescribeReportDefinitionsCommand, "NextToken", "NextToken", "MaxResults");
772
625
 
773
- 0 && (module.exports = {
774
- CostAndUsageReportServiceServiceException,
775
- __Client,
776
- CostAndUsageReportServiceClient,
777
- CostAndUsageReportService,
778
- $Command,
779
- DeleteReportDefinitionCommand,
780
- DescribeReportDefinitionsCommand,
781
- ListTagsForResourceCommand,
782
- ModifyReportDefinitionCommand,
783
- PutReportDefinitionCommand,
784
- TagResourceCommand,
785
- UntagResourceCommand,
786
- paginateDescribeReportDefinitions,
787
- AdditionalArtifact,
788
- InternalErrorException,
789
- ValidationException,
790
- SchemaElement,
791
- CompressionFormat,
792
- ReportFormat,
793
- LastStatus,
794
- ReportVersioning,
795
- AWSRegion,
796
- TimeUnit,
797
- ResourceNotFoundException,
798
- DuplicateReportNameException,
799
- ReportLimitReachedException
626
+ Object.defineProperty(exports, "$Command", {
627
+ enumerable: true,
628
+ get: function () { return smithyClient.Command; }
800
629
  });
801
-
630
+ Object.defineProperty(exports, "__Client", {
631
+ enumerable: true,
632
+ get: function () { return smithyClient.Client; }
633
+ });
634
+ exports.AWSRegion = AWSRegion;
635
+ exports.AdditionalArtifact = AdditionalArtifact;
636
+ exports.CompressionFormat = CompressionFormat;
637
+ exports.CostAndUsageReportService = CostAndUsageReportService;
638
+ exports.CostAndUsageReportServiceClient = CostAndUsageReportServiceClient;
639
+ exports.CostAndUsageReportServiceServiceException = CostAndUsageReportServiceServiceException;
640
+ exports.DeleteReportDefinitionCommand = DeleteReportDefinitionCommand;
641
+ exports.DescribeReportDefinitionsCommand = DescribeReportDefinitionsCommand;
642
+ exports.DuplicateReportNameException = DuplicateReportNameException;
643
+ exports.InternalErrorException = InternalErrorException;
644
+ exports.LastStatus = LastStatus;
645
+ exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
646
+ exports.ModifyReportDefinitionCommand = ModifyReportDefinitionCommand;
647
+ exports.PutReportDefinitionCommand = PutReportDefinitionCommand;
648
+ exports.ReportFormat = ReportFormat;
649
+ exports.ReportLimitReachedException = ReportLimitReachedException;
650
+ exports.ReportVersioning = ReportVersioning;
651
+ exports.ResourceNotFoundException = ResourceNotFoundException;
652
+ exports.SchemaElement = SchemaElement;
653
+ exports.TagResourceCommand = TagResourceCommand;
654
+ exports.TimeUnit = TimeUnit;
655
+ exports.UntagResourceCommand = UntagResourceCommand;
656
+ exports.ValidationException = ValidationException;
657
+ exports.paginateDescribeReportDefinitions = paginateDescribeReportDefinitions;