@aws-sdk/client-applicationcostprofiler 3.476.0 → 3.477.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.
@@ -1,92 +1,63 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateReportDefinitionCommand = exports.de_PutReportDefinitionCommand = exports.de_ListReportDefinitionsCommand = exports.de_ImportApplicationUsageCommand = exports.de_GetReportDefinitionCommand = exports.de_DeleteReportDefinitionCommand = exports.se_UpdateReportDefinitionCommand = exports.se_PutReportDefinitionCommand = exports.se_ListReportDefinitionsCommand = exports.se_ImportApplicationUsageCommand = exports.se_GetReportDefinitionCommand = exports.se_DeleteReportDefinitionCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const ApplicationCostProfilerServiceException_1 = require("../models/ApplicationCostProfilerServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const se_DeleteReportDefinitionCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {};
11
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition/{reportId}";
12
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "reportId", () => input.reportId, "{reportId}", false);
11
+ b.bp("/reportDefinition/{reportId}");
12
+ b.p("reportId", () => input.reportId, "{reportId}", false);
13
13
  let body;
14
- return new protocol_http_1.HttpRequest({
15
- protocol,
16
- hostname,
17
- port,
18
- method: "DELETE",
19
- headers,
20
- path: resolvedPath,
21
- body,
22
- });
14
+ b.m("DELETE").h(headers).b(body);
15
+ return b.build();
23
16
  };
24
17
  exports.se_DeleteReportDefinitionCommand = se_DeleteReportDefinitionCommand;
25
18
  const se_GetReportDefinitionCommand = async (input, context) => {
26
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
19
+ const b = (0, core_1.requestBuilder)(input, context);
27
20
  const headers = {};
28
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition/{reportId}";
29
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "reportId", () => input.reportId, "{reportId}", false);
21
+ b.bp("/reportDefinition/{reportId}");
22
+ b.p("reportId", () => input.reportId, "{reportId}", false);
30
23
  let body;
31
- return new protocol_http_1.HttpRequest({
32
- protocol,
33
- hostname,
34
- port,
35
- method: "GET",
36
- headers,
37
- path: resolvedPath,
38
- body,
39
- });
24
+ b.m("GET").h(headers).b(body);
25
+ return b.build();
40
26
  };
41
27
  exports.se_GetReportDefinitionCommand = se_GetReportDefinitionCommand;
42
28
  const se_ImportApplicationUsageCommand = async (input, context) => {
43
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
29
+ const b = (0, core_1.requestBuilder)(input, context);
44
30
  const headers = {
45
31
  "content-type": "application/json",
46
32
  };
47
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/importApplicationUsage";
33
+ b.bp("/importApplicationUsage");
48
34
  let body;
49
35
  body = JSON.stringify((0, smithy_client_1.take)(input, {
50
36
  sourceS3Location: (_) => (0, smithy_client_1._json)(_),
51
37
  }));
52
- return new protocol_http_1.HttpRequest({
53
- protocol,
54
- hostname,
55
- port,
56
- method: "POST",
57
- headers,
58
- path: resolvedPath,
59
- body,
60
- });
38
+ b.m("POST").h(headers).b(body);
39
+ return b.build();
61
40
  };
62
41
  exports.se_ImportApplicationUsageCommand = se_ImportApplicationUsageCommand;
63
42
  const se_ListReportDefinitionsCommand = async (input, context) => {
64
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
43
+ const b = (0, core_1.requestBuilder)(input, context);
65
44
  const headers = {};
66
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition";
45
+ b.bp("/reportDefinition");
67
46
  const query = (0, smithy_client_1.map)({
68
- nextToken: [, input.nextToken],
69
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
47
+ [_nT]: [, input[_nT]],
48
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
70
49
  });
71
50
  let body;
72
- return new protocol_http_1.HttpRequest({
73
- protocol,
74
- hostname,
75
- port,
76
- method: "GET",
77
- headers,
78
- path: resolvedPath,
79
- query,
80
- body,
81
- });
51
+ b.m("GET").h(headers).q(query).b(body);
52
+ return b.build();
82
53
  };
83
54
  exports.se_ListReportDefinitionsCommand = se_ListReportDefinitionsCommand;
84
55
  const se_PutReportDefinitionCommand = async (input, context) => {
85
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
56
+ const b = (0, core_1.requestBuilder)(input, context);
86
57
  const headers = {
87
58
  "content-type": "application/json",
88
59
  };
89
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition";
60
+ b.bp("/reportDefinition");
90
61
  let body;
91
62
  body = JSON.stringify((0, smithy_client_1.take)(input, {
92
63
  destinationS3Location: (_) => (0, smithy_client_1._json)(_),
@@ -95,24 +66,17 @@ const se_PutReportDefinitionCommand = async (input, context) => {
95
66
  reportFrequency: [],
96
67
  reportId: [],
97
68
  }));
98
- return new protocol_http_1.HttpRequest({
99
- protocol,
100
- hostname,
101
- port,
102
- method: "POST",
103
- headers,
104
- path: resolvedPath,
105
- body,
106
- });
69
+ b.m("POST").h(headers).b(body);
70
+ return b.build();
107
71
  };
108
72
  exports.se_PutReportDefinitionCommand = se_PutReportDefinitionCommand;
109
73
  const se_UpdateReportDefinitionCommand = async (input, context) => {
110
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
74
+ const b = (0, core_1.requestBuilder)(input, context);
111
75
  const headers = {
112
76
  "content-type": "application/json",
113
77
  };
114
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition/{reportId}";
115
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "reportId", () => input.reportId, "{reportId}", false);
78
+ b.bp("/reportDefinition/{reportId}");
79
+ b.p("reportId", () => input.reportId, "{reportId}", false);
116
80
  let body;
117
81
  body = JSON.stringify((0, smithy_client_1.take)(input, {
118
82
  destinationS3Location: (_) => (0, smithy_client_1._json)(_),
@@ -120,15 +84,8 @@ const se_UpdateReportDefinitionCommand = async (input, context) => {
120
84
  reportDescription: [],
121
85
  reportFrequency: [],
122
86
  }));
123
- return new protocol_http_1.HttpRequest({
124
- protocol,
125
- hostname,
126
- port,
127
- method: "PUT",
128
- headers,
129
- path: resolvedPath,
130
- body,
131
- });
87
+ b.m("PUT").h(headers).b(body);
88
+ return b.build();
132
89
  };
133
90
  exports.se_UpdateReportDefinitionCommand = se_UpdateReportDefinitionCommand;
134
91
  const de_DeleteReportDefinitionCommand = async (output, context) => {
@@ -496,6 +453,8 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
496
453
  value !== "" &&
497
454
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
498
455
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
456
+ const _mR = "maxResults";
457
+ const _nT = "nextToken";
499
458
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
500
459
  if (encoded.length) {
501
460
  return JSON.parse(encoded);
@@ -1,85 +1,56 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { ApplicationCostProfilerServiceException as __BaseException } from "../models/ApplicationCostProfilerServiceException";
4
4
  import { AccessDeniedException, InternalServerException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  export const se_DeleteReportDefinitionCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {};
8
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition/{reportId}";
9
- resolvedPath = __resolvedPath(resolvedPath, input, "reportId", () => input.reportId, "{reportId}", false);
8
+ b.bp("/reportDefinition/{reportId}");
9
+ b.p("reportId", () => input.reportId, "{reportId}", false);
10
10
  let body;
11
- return new __HttpRequest({
12
- protocol,
13
- hostname,
14
- port,
15
- method: "DELETE",
16
- headers,
17
- path: resolvedPath,
18
- body,
19
- });
11
+ b.m("DELETE").h(headers).b(body);
12
+ return b.build();
20
13
  };
21
14
  export const se_GetReportDefinitionCommand = async (input, context) => {
22
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
15
+ const b = rb(input, context);
23
16
  const headers = {};
24
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition/{reportId}";
25
- resolvedPath = __resolvedPath(resolvedPath, input, "reportId", () => input.reportId, "{reportId}", false);
17
+ b.bp("/reportDefinition/{reportId}");
18
+ b.p("reportId", () => input.reportId, "{reportId}", false);
26
19
  let body;
27
- return new __HttpRequest({
28
- protocol,
29
- hostname,
30
- port,
31
- method: "GET",
32
- headers,
33
- path: resolvedPath,
34
- body,
35
- });
20
+ b.m("GET").h(headers).b(body);
21
+ return b.build();
36
22
  };
37
23
  export const se_ImportApplicationUsageCommand = async (input, context) => {
38
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const b = rb(input, context);
39
25
  const headers = {
40
26
  "content-type": "application/json",
41
27
  };
42
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/importApplicationUsage";
28
+ b.bp("/importApplicationUsage");
43
29
  let body;
44
30
  body = JSON.stringify(take(input, {
45
31
  sourceS3Location: (_) => _json(_),
46
32
  }));
47
- return new __HttpRequest({
48
- protocol,
49
- hostname,
50
- port,
51
- method: "POST",
52
- headers,
53
- path: resolvedPath,
54
- body,
55
- });
33
+ b.m("POST").h(headers).b(body);
34
+ return b.build();
56
35
  };
57
36
  export const se_ListReportDefinitionsCommand = async (input, context) => {
58
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
37
+ const b = rb(input, context);
59
38
  const headers = {};
60
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition";
39
+ b.bp("/reportDefinition");
61
40
  const query = map({
62
- nextToken: [, input.nextToken],
63
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
41
+ [_nT]: [, input[_nT]],
42
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
64
43
  });
65
44
  let body;
66
- return new __HttpRequest({
67
- protocol,
68
- hostname,
69
- port,
70
- method: "GET",
71
- headers,
72
- path: resolvedPath,
73
- query,
74
- body,
75
- });
45
+ b.m("GET").h(headers).q(query).b(body);
46
+ return b.build();
76
47
  };
77
48
  export const se_PutReportDefinitionCommand = async (input, context) => {
78
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
49
+ const b = rb(input, context);
79
50
  const headers = {
80
51
  "content-type": "application/json",
81
52
  };
82
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition";
53
+ b.bp("/reportDefinition");
83
54
  let body;
84
55
  body = JSON.stringify(take(input, {
85
56
  destinationS3Location: (_) => _json(_),
@@ -88,23 +59,16 @@ export const se_PutReportDefinitionCommand = async (input, context) => {
88
59
  reportFrequency: [],
89
60
  reportId: [],
90
61
  }));
91
- return new __HttpRequest({
92
- protocol,
93
- hostname,
94
- port,
95
- method: "POST",
96
- headers,
97
- path: resolvedPath,
98
- body,
99
- });
62
+ b.m("POST").h(headers).b(body);
63
+ return b.build();
100
64
  };
101
65
  export const se_UpdateReportDefinitionCommand = async (input, context) => {
102
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
66
+ const b = rb(input, context);
103
67
  const headers = {
104
68
  "content-type": "application/json",
105
69
  };
106
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition/{reportId}";
107
- resolvedPath = __resolvedPath(resolvedPath, input, "reportId", () => input.reportId, "{reportId}", false);
70
+ b.bp("/reportDefinition/{reportId}");
71
+ b.p("reportId", () => input.reportId, "{reportId}", false);
108
72
  let body;
109
73
  body = JSON.stringify(take(input, {
110
74
  destinationS3Location: (_) => _json(_),
@@ -112,15 +76,8 @@ export const se_UpdateReportDefinitionCommand = async (input, context) => {
112
76
  reportDescription: [],
113
77
  reportFrequency: [],
114
78
  }));
115
- return new __HttpRequest({
116
- protocol,
117
- hostname,
118
- port,
119
- method: "PUT",
120
- headers,
121
- path: resolvedPath,
122
- body,
123
- });
79
+ b.m("PUT").h(headers).b(body);
80
+ return b.build();
124
81
  };
125
82
  export const de_DeleteReportDefinitionCommand = async (output, context) => {
126
83
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -481,6 +438,8 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
481
438
  value !== "" &&
482
439
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
483
440
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
441
+ const _mR = "maxResults";
442
+ const _nT = "nextToken";
484
443
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
485
444
  if (encoded.length) {
486
445
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-applicationcostprofiler",
3
3
  "description": "AWS SDK for JavaScript Applicationcostprofiler Client for Node.js, Browser and React Native",
4
- "version": "3.476.0",
4
+ "version": "3.477.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.476.0",
24
- "@aws-sdk/core": "3.476.0",
25
- "@aws-sdk/credential-provider-node": "3.476.0",
23
+ "@aws-sdk/client-sts": "3.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
@@ -34,6 +34,7 @@
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",