@aws-sdk/client-pricing 3.489.0 → 3.495.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/Pricing.js +1 -21
- package/dist-cjs/PricingClient.js +1 -43
- package/dist-cjs/commands/DescribeServicesCommand.js +1 -28
- package/dist-cjs/commands/GetAttributeValuesCommand.js +1 -28
- package/dist-cjs/commands/GetPriceListFileUrlCommand.js +1 -28
- package/dist-cjs/commands/GetProductsCommand.js +1 -28
- package/dist-cjs/commands/ListPriceListsCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -8
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +808 -11
- package/dist-cjs/models/PricingServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -91
- package/dist-cjs/pagination/DescribeServicesPaginator.js +1 -7
- package/dist-cjs/pagination/GetAttributeValuesPaginator.js +1 -7
- package/dist-cjs/pagination/GetProductsPaginator.js +1 -7
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListPriceListsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -8
- package/dist-cjs/protocols/Aws_json1_1.js +1 -418
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PricingServiceException = exports.__ServiceException = void 0;
|
|
4
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
|
6
|
-
class PricingServiceException extends smithy_client_1.ServiceException {
|
|
7
|
-
constructor(options) {
|
|
8
|
-
super(options);
|
|
9
|
-
Object.setPrototypeOf(this, PricingServiceException.prototype);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.PricingServiceException = PricingServiceException;
|
|
1
|
+
module.exports = require("../index.js");
|
package/dist-cjs/models/index.js
CHANGED
|
@@ -1,91 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FilterType = exports.NotFoundException = exports.InvalidParameterException = exports.InvalidNextTokenException = exports.InternalErrorException = exports.ExpiredNextTokenException = exports.AccessDeniedException = void 0;
|
|
4
|
-
const PricingServiceException_1 = require("./PricingServiceException");
|
|
5
|
-
class AccessDeniedException extends PricingServiceException_1.PricingServiceException {
|
|
6
|
-
constructor(opts) {
|
|
7
|
-
super({
|
|
8
|
-
name: "AccessDeniedException",
|
|
9
|
-
$fault: "client",
|
|
10
|
-
...opts,
|
|
11
|
-
});
|
|
12
|
-
this.name = "AccessDeniedException";
|
|
13
|
-
this.$fault = "client";
|
|
14
|
-
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
15
|
-
this.Message = opts.Message;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.AccessDeniedException = AccessDeniedException;
|
|
19
|
-
class ExpiredNextTokenException extends PricingServiceException_1.PricingServiceException {
|
|
20
|
-
constructor(opts) {
|
|
21
|
-
super({
|
|
22
|
-
name: "ExpiredNextTokenException",
|
|
23
|
-
$fault: "client",
|
|
24
|
-
...opts,
|
|
25
|
-
});
|
|
26
|
-
this.name = "ExpiredNextTokenException";
|
|
27
|
-
this.$fault = "client";
|
|
28
|
-
Object.setPrototypeOf(this, ExpiredNextTokenException.prototype);
|
|
29
|
-
this.Message = opts.Message;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.ExpiredNextTokenException = ExpiredNextTokenException;
|
|
33
|
-
class InternalErrorException extends PricingServiceException_1.PricingServiceException {
|
|
34
|
-
constructor(opts) {
|
|
35
|
-
super({
|
|
36
|
-
name: "InternalErrorException",
|
|
37
|
-
$fault: "server",
|
|
38
|
-
...opts,
|
|
39
|
-
});
|
|
40
|
-
this.name = "InternalErrorException";
|
|
41
|
-
this.$fault = "server";
|
|
42
|
-
Object.setPrototypeOf(this, InternalErrorException.prototype);
|
|
43
|
-
this.Message = opts.Message;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.InternalErrorException = InternalErrorException;
|
|
47
|
-
class InvalidNextTokenException extends PricingServiceException_1.PricingServiceException {
|
|
48
|
-
constructor(opts) {
|
|
49
|
-
super({
|
|
50
|
-
name: "InvalidNextTokenException",
|
|
51
|
-
$fault: "client",
|
|
52
|
-
...opts,
|
|
53
|
-
});
|
|
54
|
-
this.name = "InvalidNextTokenException";
|
|
55
|
-
this.$fault = "client";
|
|
56
|
-
Object.setPrototypeOf(this, InvalidNextTokenException.prototype);
|
|
57
|
-
this.Message = opts.Message;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
exports.InvalidNextTokenException = InvalidNextTokenException;
|
|
61
|
-
class InvalidParameterException extends PricingServiceException_1.PricingServiceException {
|
|
62
|
-
constructor(opts) {
|
|
63
|
-
super({
|
|
64
|
-
name: "InvalidParameterException",
|
|
65
|
-
$fault: "client",
|
|
66
|
-
...opts,
|
|
67
|
-
});
|
|
68
|
-
this.name = "InvalidParameterException";
|
|
69
|
-
this.$fault = "client";
|
|
70
|
-
Object.setPrototypeOf(this, InvalidParameterException.prototype);
|
|
71
|
-
this.Message = opts.Message;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
exports.InvalidParameterException = InvalidParameterException;
|
|
75
|
-
class NotFoundException extends PricingServiceException_1.PricingServiceException {
|
|
76
|
-
constructor(opts) {
|
|
77
|
-
super({
|
|
78
|
-
name: "NotFoundException",
|
|
79
|
-
$fault: "client",
|
|
80
|
-
...opts,
|
|
81
|
-
});
|
|
82
|
-
this.name = "NotFoundException";
|
|
83
|
-
this.$fault = "client";
|
|
84
|
-
Object.setPrototypeOf(this, NotFoundException.prototype);
|
|
85
|
-
this.Message = opts.Message;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
exports.NotFoundException = NotFoundException;
|
|
89
|
-
exports.FilterType = {
|
|
90
|
-
TERM_MATCH: "TERM_MATCH",
|
|
91
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.paginateDescribeServices = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const DescribeServicesCommand_1 = require("../commands/DescribeServicesCommand");
|
|
6
|
-
const PricingClient_1 = require("../PricingClient");
|
|
7
|
-
exports.paginateDescribeServices = (0, core_1.createPaginator)(PricingClient_1.PricingClient, DescribeServicesCommand_1.DescribeServicesCommand, "NextToken", "NextToken", "MaxResults");
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.paginateGetAttributeValues = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const GetAttributeValuesCommand_1 = require("../commands/GetAttributeValuesCommand");
|
|
6
|
-
const PricingClient_1 = require("../PricingClient");
|
|
7
|
-
exports.paginateGetAttributeValues = (0, core_1.createPaginator)(PricingClient_1.PricingClient, GetAttributeValuesCommand_1.GetAttributeValuesCommand, "NextToken", "NextToken", "MaxResults");
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.paginateGetProducts = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const GetProductsCommand_1 = require("../commands/GetProductsCommand");
|
|
6
|
-
const PricingClient_1 = require("../PricingClient");
|
|
7
|
-
exports.paginateGetProducts = (0, core_1.createPaginator)(PricingClient_1.PricingClient, GetProductsCommand_1.GetProductsCommand, "NextToken", "NextToken", "MaxResults");
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.paginateListPriceLists = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const ListPriceListsCommand_1 = require("../commands/ListPriceListsCommand");
|
|
6
|
-
const PricingClient_1 = require("../PricingClient");
|
|
7
|
-
exports.paginateListPriceLists = (0, core_1.createPaginator)(PricingClient_1.PricingClient, ListPriceListsCommand_1.ListPriceListsCommand, "NextToken", "NextToken", "MaxResults");
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./DescribeServicesPaginator"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./GetAttributeValuesPaginator"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./GetProductsPaginator"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./Interfaces"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./ListPriceListsPaginator"), exports);
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,418 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_ListPriceListsCommand = exports.de_GetProductsCommand = exports.de_GetPriceListFileUrlCommand = exports.de_GetAttributeValuesCommand = exports.de_DescribeServicesCommand = exports.se_ListPriceListsCommand = exports.se_GetProductsCommand = exports.se_GetPriceListFileUrlCommand = exports.se_GetAttributeValuesCommand = exports.se_DescribeServicesCommand = void 0;
|
|
4
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const models_0_1 = require("../models/models_0");
|
|
7
|
-
const PricingServiceException_1 = require("../models/PricingServiceException");
|
|
8
|
-
const se_DescribeServicesCommand = async (input, context) => {
|
|
9
|
-
const headers = sharedHeaders("DescribeServices");
|
|
10
|
-
let body;
|
|
11
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
12
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
-
};
|
|
14
|
-
exports.se_DescribeServicesCommand = se_DescribeServicesCommand;
|
|
15
|
-
const se_GetAttributeValuesCommand = async (input, context) => {
|
|
16
|
-
const headers = sharedHeaders("GetAttributeValues");
|
|
17
|
-
let body;
|
|
18
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
19
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
20
|
-
};
|
|
21
|
-
exports.se_GetAttributeValuesCommand = se_GetAttributeValuesCommand;
|
|
22
|
-
const se_GetPriceListFileUrlCommand = async (input, context) => {
|
|
23
|
-
const headers = sharedHeaders("GetPriceListFileUrl");
|
|
24
|
-
let body;
|
|
25
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
26
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
27
|
-
};
|
|
28
|
-
exports.se_GetPriceListFileUrlCommand = se_GetPriceListFileUrlCommand;
|
|
29
|
-
const se_GetProductsCommand = async (input, context) => {
|
|
30
|
-
const headers = sharedHeaders("GetProducts");
|
|
31
|
-
let body;
|
|
32
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
33
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
34
|
-
};
|
|
35
|
-
exports.se_GetProductsCommand = se_GetProductsCommand;
|
|
36
|
-
const se_ListPriceListsCommand = async (input, context) => {
|
|
37
|
-
const headers = sharedHeaders("ListPriceLists");
|
|
38
|
-
let body;
|
|
39
|
-
body = JSON.stringify(se_ListPriceListsRequest(input, context));
|
|
40
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
|
-
};
|
|
42
|
-
exports.se_ListPriceListsCommand = se_ListPriceListsCommand;
|
|
43
|
-
const de_DescribeServicesCommand = async (output, context) => {
|
|
44
|
-
if (output.statusCode >= 300) {
|
|
45
|
-
return de_DescribeServicesCommandError(output, context);
|
|
46
|
-
}
|
|
47
|
-
const data = await parseBody(output.body, context);
|
|
48
|
-
let contents = {};
|
|
49
|
-
contents = (0, smithy_client_1._json)(data);
|
|
50
|
-
const response = {
|
|
51
|
-
$metadata: deserializeMetadata(output),
|
|
52
|
-
...contents,
|
|
53
|
-
};
|
|
54
|
-
return response;
|
|
55
|
-
};
|
|
56
|
-
exports.de_DescribeServicesCommand = de_DescribeServicesCommand;
|
|
57
|
-
const de_DescribeServicesCommandError = async (output, context) => {
|
|
58
|
-
const parsedOutput = {
|
|
59
|
-
...output,
|
|
60
|
-
body: await parseErrorBody(output.body, context),
|
|
61
|
-
};
|
|
62
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
63
|
-
switch (errorCode) {
|
|
64
|
-
case "ExpiredNextTokenException":
|
|
65
|
-
case "com.amazonaws.pricing#ExpiredNextTokenException":
|
|
66
|
-
throw await de_ExpiredNextTokenExceptionRes(parsedOutput, context);
|
|
67
|
-
case "InternalErrorException":
|
|
68
|
-
case "com.amazonaws.pricing#InternalErrorException":
|
|
69
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
70
|
-
case "InvalidNextTokenException":
|
|
71
|
-
case "com.amazonaws.pricing#InvalidNextTokenException":
|
|
72
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
73
|
-
case "InvalidParameterException":
|
|
74
|
-
case "com.amazonaws.pricing#InvalidParameterException":
|
|
75
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
76
|
-
case "NotFoundException":
|
|
77
|
-
case "com.amazonaws.pricing#NotFoundException":
|
|
78
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
79
|
-
default:
|
|
80
|
-
const parsedBody = parsedOutput.body;
|
|
81
|
-
return throwDefaultError({
|
|
82
|
-
output,
|
|
83
|
-
parsedBody,
|
|
84
|
-
errorCode,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
const de_GetAttributeValuesCommand = async (output, context) => {
|
|
89
|
-
if (output.statusCode >= 300) {
|
|
90
|
-
return de_GetAttributeValuesCommandError(output, context);
|
|
91
|
-
}
|
|
92
|
-
const data = await parseBody(output.body, context);
|
|
93
|
-
let contents = {};
|
|
94
|
-
contents = (0, smithy_client_1._json)(data);
|
|
95
|
-
const response = {
|
|
96
|
-
$metadata: deserializeMetadata(output),
|
|
97
|
-
...contents,
|
|
98
|
-
};
|
|
99
|
-
return response;
|
|
100
|
-
};
|
|
101
|
-
exports.de_GetAttributeValuesCommand = de_GetAttributeValuesCommand;
|
|
102
|
-
const de_GetAttributeValuesCommandError = async (output, context) => {
|
|
103
|
-
const parsedOutput = {
|
|
104
|
-
...output,
|
|
105
|
-
body: await parseErrorBody(output.body, context),
|
|
106
|
-
};
|
|
107
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
108
|
-
switch (errorCode) {
|
|
109
|
-
case "ExpiredNextTokenException":
|
|
110
|
-
case "com.amazonaws.pricing#ExpiredNextTokenException":
|
|
111
|
-
throw await de_ExpiredNextTokenExceptionRes(parsedOutput, context);
|
|
112
|
-
case "InternalErrorException":
|
|
113
|
-
case "com.amazonaws.pricing#InternalErrorException":
|
|
114
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
115
|
-
case "InvalidNextTokenException":
|
|
116
|
-
case "com.amazonaws.pricing#InvalidNextTokenException":
|
|
117
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
118
|
-
case "InvalidParameterException":
|
|
119
|
-
case "com.amazonaws.pricing#InvalidParameterException":
|
|
120
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
121
|
-
case "NotFoundException":
|
|
122
|
-
case "com.amazonaws.pricing#NotFoundException":
|
|
123
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
124
|
-
default:
|
|
125
|
-
const parsedBody = parsedOutput.body;
|
|
126
|
-
return throwDefaultError({
|
|
127
|
-
output,
|
|
128
|
-
parsedBody,
|
|
129
|
-
errorCode,
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
const de_GetPriceListFileUrlCommand = async (output, context) => {
|
|
134
|
-
if (output.statusCode >= 300) {
|
|
135
|
-
return de_GetPriceListFileUrlCommandError(output, context);
|
|
136
|
-
}
|
|
137
|
-
const data = await parseBody(output.body, context);
|
|
138
|
-
let contents = {};
|
|
139
|
-
contents = (0, smithy_client_1._json)(data);
|
|
140
|
-
const response = {
|
|
141
|
-
$metadata: deserializeMetadata(output),
|
|
142
|
-
...contents,
|
|
143
|
-
};
|
|
144
|
-
return response;
|
|
145
|
-
};
|
|
146
|
-
exports.de_GetPriceListFileUrlCommand = de_GetPriceListFileUrlCommand;
|
|
147
|
-
const de_GetPriceListFileUrlCommandError = async (output, context) => {
|
|
148
|
-
const parsedOutput = {
|
|
149
|
-
...output,
|
|
150
|
-
body: await parseErrorBody(output.body, context),
|
|
151
|
-
};
|
|
152
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
153
|
-
switch (errorCode) {
|
|
154
|
-
case "AccessDeniedException":
|
|
155
|
-
case "com.amazonaws.pricing#AccessDeniedException":
|
|
156
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
157
|
-
case "InternalErrorException":
|
|
158
|
-
case "com.amazonaws.pricing#InternalErrorException":
|
|
159
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
160
|
-
case "InvalidParameterException":
|
|
161
|
-
case "com.amazonaws.pricing#InvalidParameterException":
|
|
162
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
163
|
-
case "NotFoundException":
|
|
164
|
-
case "com.amazonaws.pricing#NotFoundException":
|
|
165
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
166
|
-
default:
|
|
167
|
-
const parsedBody = parsedOutput.body;
|
|
168
|
-
return throwDefaultError({
|
|
169
|
-
output,
|
|
170
|
-
parsedBody,
|
|
171
|
-
errorCode,
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
const de_GetProductsCommand = async (output, context) => {
|
|
176
|
-
if (output.statusCode >= 300) {
|
|
177
|
-
return de_GetProductsCommandError(output, context);
|
|
178
|
-
}
|
|
179
|
-
const data = await parseBody(output.body, context);
|
|
180
|
-
let contents = {};
|
|
181
|
-
contents = de_GetProductsResponse(data, context);
|
|
182
|
-
const response = {
|
|
183
|
-
$metadata: deserializeMetadata(output),
|
|
184
|
-
...contents,
|
|
185
|
-
};
|
|
186
|
-
return response;
|
|
187
|
-
};
|
|
188
|
-
exports.de_GetProductsCommand = de_GetProductsCommand;
|
|
189
|
-
const de_GetProductsCommandError = async (output, context) => {
|
|
190
|
-
const parsedOutput = {
|
|
191
|
-
...output,
|
|
192
|
-
body: await parseErrorBody(output.body, context),
|
|
193
|
-
};
|
|
194
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
195
|
-
switch (errorCode) {
|
|
196
|
-
case "ExpiredNextTokenException":
|
|
197
|
-
case "com.amazonaws.pricing#ExpiredNextTokenException":
|
|
198
|
-
throw await de_ExpiredNextTokenExceptionRes(parsedOutput, context);
|
|
199
|
-
case "InternalErrorException":
|
|
200
|
-
case "com.amazonaws.pricing#InternalErrorException":
|
|
201
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
202
|
-
case "InvalidNextTokenException":
|
|
203
|
-
case "com.amazonaws.pricing#InvalidNextTokenException":
|
|
204
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
205
|
-
case "InvalidParameterException":
|
|
206
|
-
case "com.amazonaws.pricing#InvalidParameterException":
|
|
207
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
208
|
-
case "NotFoundException":
|
|
209
|
-
case "com.amazonaws.pricing#NotFoundException":
|
|
210
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
211
|
-
default:
|
|
212
|
-
const parsedBody = parsedOutput.body;
|
|
213
|
-
return throwDefaultError({
|
|
214
|
-
output,
|
|
215
|
-
parsedBody,
|
|
216
|
-
errorCode,
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
const de_ListPriceListsCommand = async (output, context) => {
|
|
221
|
-
if (output.statusCode >= 300) {
|
|
222
|
-
return de_ListPriceListsCommandError(output, context);
|
|
223
|
-
}
|
|
224
|
-
const data = await parseBody(output.body, context);
|
|
225
|
-
let contents = {};
|
|
226
|
-
contents = (0, smithy_client_1._json)(data);
|
|
227
|
-
const response = {
|
|
228
|
-
$metadata: deserializeMetadata(output),
|
|
229
|
-
...contents,
|
|
230
|
-
};
|
|
231
|
-
return response;
|
|
232
|
-
};
|
|
233
|
-
exports.de_ListPriceListsCommand = de_ListPriceListsCommand;
|
|
234
|
-
const de_ListPriceListsCommandError = async (output, context) => {
|
|
235
|
-
const parsedOutput = {
|
|
236
|
-
...output,
|
|
237
|
-
body: await parseErrorBody(output.body, context),
|
|
238
|
-
};
|
|
239
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
240
|
-
switch (errorCode) {
|
|
241
|
-
case "AccessDeniedException":
|
|
242
|
-
case "com.amazonaws.pricing#AccessDeniedException":
|
|
243
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
244
|
-
case "ExpiredNextTokenException":
|
|
245
|
-
case "com.amazonaws.pricing#ExpiredNextTokenException":
|
|
246
|
-
throw await de_ExpiredNextTokenExceptionRes(parsedOutput, context);
|
|
247
|
-
case "InternalErrorException":
|
|
248
|
-
case "com.amazonaws.pricing#InternalErrorException":
|
|
249
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
250
|
-
case "InvalidNextTokenException":
|
|
251
|
-
case "com.amazonaws.pricing#InvalidNextTokenException":
|
|
252
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
253
|
-
case "InvalidParameterException":
|
|
254
|
-
case "com.amazonaws.pricing#InvalidParameterException":
|
|
255
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
256
|
-
case "NotFoundException":
|
|
257
|
-
case "com.amazonaws.pricing#NotFoundException":
|
|
258
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
259
|
-
default:
|
|
260
|
-
const parsedBody = parsedOutput.body;
|
|
261
|
-
return throwDefaultError({
|
|
262
|
-
output,
|
|
263
|
-
parsedBody,
|
|
264
|
-
errorCode,
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
269
|
-
const body = parsedOutput.body;
|
|
270
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
271
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
272
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
273
|
-
...deserialized,
|
|
274
|
-
});
|
|
275
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
276
|
-
};
|
|
277
|
-
const de_ExpiredNextTokenExceptionRes = async (parsedOutput, context) => {
|
|
278
|
-
const body = parsedOutput.body;
|
|
279
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
280
|
-
const exception = new models_0_1.ExpiredNextTokenException({
|
|
281
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
282
|
-
...deserialized,
|
|
283
|
-
});
|
|
284
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
285
|
-
};
|
|
286
|
-
const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
|
|
287
|
-
const body = parsedOutput.body;
|
|
288
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
289
|
-
const exception = new models_0_1.InternalErrorException({
|
|
290
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
291
|
-
...deserialized,
|
|
292
|
-
});
|
|
293
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
294
|
-
};
|
|
295
|
-
const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
|
|
296
|
-
const body = parsedOutput.body;
|
|
297
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
298
|
-
const exception = new models_0_1.InvalidNextTokenException({
|
|
299
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
300
|
-
...deserialized,
|
|
301
|
-
});
|
|
302
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
303
|
-
};
|
|
304
|
-
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
305
|
-
const body = parsedOutput.body;
|
|
306
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
307
|
-
const exception = new models_0_1.InvalidParameterException({
|
|
308
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
309
|
-
...deserialized,
|
|
310
|
-
});
|
|
311
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
312
|
-
};
|
|
313
|
-
const de_NotFoundExceptionRes = async (parsedOutput, context) => {
|
|
314
|
-
const body = parsedOutput.body;
|
|
315
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
316
|
-
const exception = new models_0_1.NotFoundException({
|
|
317
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
318
|
-
...deserialized,
|
|
319
|
-
});
|
|
320
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
321
|
-
};
|
|
322
|
-
const se_ListPriceListsRequest = (input, context) => {
|
|
323
|
-
return (0, smithy_client_1.take)(input, {
|
|
324
|
-
CurrencyCode: [],
|
|
325
|
-
EffectiveDate: (_) => Math.round(_.getTime() / 1000),
|
|
326
|
-
MaxResults: [],
|
|
327
|
-
NextToken: [],
|
|
328
|
-
RegionCode: [],
|
|
329
|
-
ServiceCode: [],
|
|
330
|
-
});
|
|
331
|
-
};
|
|
332
|
-
const de_GetProductsResponse = (output, context) => {
|
|
333
|
-
return (0, smithy_client_1.take)(output, {
|
|
334
|
-
FormatVersion: smithy_client_1.expectString,
|
|
335
|
-
NextToken: smithy_client_1.expectString,
|
|
336
|
-
PriceList: (_) => de_PriceListJsonItems(_, context),
|
|
337
|
-
});
|
|
338
|
-
};
|
|
339
|
-
const de_PriceListJsonItems = (output, context) => {
|
|
340
|
-
const retVal = (output || [])
|
|
341
|
-
.filter((e) => e != null)
|
|
342
|
-
.map((entry) => {
|
|
343
|
-
return new smithy_client_1.LazyJsonString(entry);
|
|
344
|
-
});
|
|
345
|
-
return retVal;
|
|
346
|
-
};
|
|
347
|
-
const deserializeMetadata = (output) => ({
|
|
348
|
-
httpStatusCode: output.statusCode,
|
|
349
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
350
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
351
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
352
|
-
});
|
|
353
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
354
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(PricingServiceException_1.PricingServiceException);
|
|
355
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
356
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
357
|
-
const contents = {
|
|
358
|
-
protocol,
|
|
359
|
-
hostname,
|
|
360
|
-
port,
|
|
361
|
-
method: "POST",
|
|
362
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
363
|
-
headers,
|
|
364
|
-
};
|
|
365
|
-
if (resolvedHostname !== undefined) {
|
|
366
|
-
contents.hostname = resolvedHostname;
|
|
367
|
-
}
|
|
368
|
-
if (body !== undefined) {
|
|
369
|
-
contents.body = body;
|
|
370
|
-
}
|
|
371
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
372
|
-
};
|
|
373
|
-
function sharedHeaders(operation) {
|
|
374
|
-
return {
|
|
375
|
-
"content-type": "application/x-amz-json-1.1",
|
|
376
|
-
"x-amz-target": `AWSPriceListService.${operation}`,
|
|
377
|
-
};
|
|
378
|
-
}
|
|
379
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
380
|
-
if (encoded.length) {
|
|
381
|
-
return JSON.parse(encoded);
|
|
382
|
-
}
|
|
383
|
-
return {};
|
|
384
|
-
});
|
|
385
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
386
|
-
const value = await parseBody(errorBody, context);
|
|
387
|
-
value.message = value.message ?? value.Message;
|
|
388
|
-
return value;
|
|
389
|
-
};
|
|
390
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
391
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
392
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
393
|
-
let cleanValue = rawValue;
|
|
394
|
-
if (typeof cleanValue === "number") {
|
|
395
|
-
cleanValue = cleanValue.toString();
|
|
396
|
-
}
|
|
397
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
398
|
-
cleanValue = cleanValue.split(",")[0];
|
|
399
|
-
}
|
|
400
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
401
|
-
cleanValue = cleanValue.split(":")[0];
|
|
402
|
-
}
|
|
403
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
404
|
-
cleanValue = cleanValue.split("#")[1];
|
|
405
|
-
}
|
|
406
|
-
return cleanValue;
|
|
407
|
-
};
|
|
408
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
409
|
-
if (headerKey !== undefined) {
|
|
410
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
411
|
-
}
|
|
412
|
-
if (data.code !== undefined) {
|
|
413
|
-
return sanitizeErrorCode(data.code);
|
|
414
|
-
}
|
|
415
|
-
if (data["__type"] !== undefined) {
|
|
416
|
-
return sanitizeErrorCode(data["__type"]);
|
|
417
|
-
}
|
|
418
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveRuntimeExtensions = void 0;
|
|
4
|
-
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const asPartial = (t) => t;
|
|
8
|
-
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
9
|
-
const extensionConfiguration = {
|
|
10
|
-
...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
11
|
-
...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
12
|
-
...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
|
13
|
-
};
|
|
14
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
15
|
-
return {
|
|
16
|
-
...runtimeConfig,
|
|
17
|
-
...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
18
|
-
...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
19
|
-
...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
|
1
|
+
module.exports = require("./index.js");
|