@aws-sdk/client-pi 3.50.0 → 3.53.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/CHANGELOG.md +27 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/PIServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +44 -1
- package/dist-cjs/protocols/Aws_json1_1.js +73 -193
- package/dist-es/index.js +1 -0
- package/dist-es/models/PIServiceException.js +12 -0
- package/dist-es/models/models_0.js +41 -1
- package/dist-es/protocols/Aws_json1_1.js +140 -212
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/PIServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +23 -10
- package/dist-types/ts3.4/PI.d.ts +35 -0
- package/dist-types/ts3.4/PIClient.d.ts +79 -0
- package/dist-types/ts3.4/commands/DescribeDimensionKeysCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDimensionKeyDetailsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetResourceMetadataCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetResourceMetricsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListAvailableResourceDimensionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListAvailableResourceMetricsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +6 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/PIServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +386 -0
- package/dist-types/ts3.4/pagination/DescribeDimensionKeysPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/GetResourceMetricsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListAvailableResourceDimensionsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListAvailableResourceMetricsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +5 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +20 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
- package/package.json +33 -33
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.53.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.52.0...v3.53.0) (2022-02-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **clients:** generate service exceptions as classes ([#3267](https://github.com/aws/aws-sdk-js-v3/issues/3267)) ([ca64fee](https://github.com/aws/aws-sdk-js-v3/commit/ca64feed3351c394c07dc26b782a5760a396a074))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.52.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.51.0...v3.52.0) (2022-02-18)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @aws-sdk/client-pi
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [3.51.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.50.0...v3.51.0) (2022-02-12)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @aws-sdk/client-pi
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [3.50.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.49.0...v3.50.0) (2022-02-08)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @aws-sdk/client-pi
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PIServiceException = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
tslib_1.__exportStar(require("./PI"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./PIClient"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./commands"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./models"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./pagination"), exports);
|
|
10
|
+
var PIServiceException_1 = require("./models/PIServiceException");
|
|
11
|
+
Object.defineProperty(exports, "PIServiceException", { enumerable: true, get: function () { return PIServiceException_1.PIServiceException; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PIServiceException = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
|
+
class PIServiceException extends smithy_client_1.ServiceException {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super(options);
|
|
8
|
+
Object.setPrototypeOf(this, PIServiceException.prototype);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.PIServiceException = PIServiceException;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListAvailableResourceMetricsResponse = exports.ResponseResourceMetric = exports.ListAvailableResourceMetricsRequest = exports.ListAvailableResourceDimensionsResponse = exports.MetricDimensionGroups = exports.ListAvailableResourceDimensionsRequest = exports.GetResourceMetricsResponse = exports.MetricKeyDataPoints = exports.ResponseResourceMetricKey = exports.GetResourceMetricsRequest = exports.MetricQuery = exports.GetResourceMetadataResponse = exports.GetResourceMetadataRequest = exports.GetDimensionKeyDetailsResponse = exports.GetDimensionKeyDetailsRequest = exports.FeatureMetadata = exports.FeatureStatus = exports.DimensionKeyDetail = exports.DimensionGroupDetail = exports.DimensionDetail = exports.DetailStatus = exports.DescribeDimensionKeysResponse = exports.ResponsePartitionKey = exports.DimensionKeyDescription = exports.DescribeDimensionKeysRequest = exports.ServiceType = exports.DimensionGroup = exports.DataPoint = void 0;
|
|
3
|
+
exports.ListAvailableResourceMetricsResponse = exports.ResponseResourceMetric = exports.ListAvailableResourceMetricsRequest = exports.ListAvailableResourceDimensionsResponse = exports.MetricDimensionGroups = exports.ListAvailableResourceDimensionsRequest = exports.GetResourceMetricsResponse = exports.MetricKeyDataPoints = exports.ResponseResourceMetricKey = exports.GetResourceMetricsRequest = exports.MetricQuery = exports.GetResourceMetadataResponse = exports.GetResourceMetadataRequest = exports.GetDimensionKeyDetailsResponse = exports.GetDimensionKeyDetailsRequest = exports.FeatureMetadata = exports.FeatureStatus = exports.DimensionKeyDetail = exports.DimensionGroupDetail = exports.DimensionDetail = exports.DetailStatus = exports.NotAuthorizedException = exports.InvalidArgumentException = exports.InternalServiceError = exports.DescribeDimensionKeysResponse = exports.ResponsePartitionKey = exports.DimensionKeyDescription = exports.DescribeDimensionKeysRequest = exports.ServiceType = exports.DimensionGroup = exports.DataPoint = void 0;
|
|
4
|
+
const PIServiceException_1 = require("./PIServiceException");
|
|
4
5
|
var DataPoint;
|
|
5
6
|
(function (DataPoint) {
|
|
6
7
|
DataPoint.filterSensitiveLog = (obj) => ({
|
|
@@ -42,6 +43,48 @@ var DescribeDimensionKeysResponse;
|
|
|
42
43
|
...obj,
|
|
43
44
|
});
|
|
44
45
|
})(DescribeDimensionKeysResponse = exports.DescribeDimensionKeysResponse || (exports.DescribeDimensionKeysResponse = {}));
|
|
46
|
+
class InternalServiceError extends PIServiceException_1.PIServiceException {
|
|
47
|
+
constructor(opts) {
|
|
48
|
+
super({
|
|
49
|
+
name: "InternalServiceError",
|
|
50
|
+
$fault: "server",
|
|
51
|
+
...opts,
|
|
52
|
+
});
|
|
53
|
+
this.name = "InternalServiceError";
|
|
54
|
+
this.$fault = "server";
|
|
55
|
+
Object.setPrototypeOf(this, InternalServiceError.prototype);
|
|
56
|
+
this.Message = opts.Message;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.InternalServiceError = InternalServiceError;
|
|
60
|
+
class InvalidArgumentException extends PIServiceException_1.PIServiceException {
|
|
61
|
+
constructor(opts) {
|
|
62
|
+
super({
|
|
63
|
+
name: "InvalidArgumentException",
|
|
64
|
+
$fault: "client",
|
|
65
|
+
...opts,
|
|
66
|
+
});
|
|
67
|
+
this.name = "InvalidArgumentException";
|
|
68
|
+
this.$fault = "client";
|
|
69
|
+
Object.setPrototypeOf(this, InvalidArgumentException.prototype);
|
|
70
|
+
this.Message = opts.Message;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.InvalidArgumentException = InvalidArgumentException;
|
|
74
|
+
class NotAuthorizedException extends PIServiceException_1.PIServiceException {
|
|
75
|
+
constructor(opts) {
|
|
76
|
+
super({
|
|
77
|
+
name: "NotAuthorizedException",
|
|
78
|
+
$fault: "client",
|
|
79
|
+
...opts,
|
|
80
|
+
});
|
|
81
|
+
this.name = "NotAuthorizedException";
|
|
82
|
+
this.$fault = "client";
|
|
83
|
+
Object.setPrototypeOf(this, NotAuthorizedException.prototype);
|
|
84
|
+
this.Message = opts.Message;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.NotAuthorizedException = NotAuthorizedException;
|
|
45
88
|
var DetailStatus;
|
|
46
89
|
(function (DetailStatus) {
|
|
47
90
|
DetailStatus["AVAILABLE"] = "AVAILABLE";
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deserializeAws_json1_1ListAvailableResourceMetricsCommand = exports.deserializeAws_json1_1ListAvailableResourceDimensionsCommand = exports.deserializeAws_json1_1GetResourceMetricsCommand = exports.deserializeAws_json1_1GetResourceMetadataCommand = exports.deserializeAws_json1_1GetDimensionKeyDetailsCommand = exports.deserializeAws_json1_1DescribeDimensionKeysCommand = exports.serializeAws_json1_1ListAvailableResourceMetricsCommand = exports.serializeAws_json1_1ListAvailableResourceDimensionsCommand = exports.serializeAws_json1_1GetResourceMetricsCommand = exports.serializeAws_json1_1GetResourceMetadataCommand = exports.serializeAws_json1_1GetDimensionKeyDetailsCommand = exports.serializeAws_json1_1DescribeDimensionKeysCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const PIServiceException_1 = require("../models/PIServiceException");
|
|
6
8
|
const serializeAws_json1_1DescribeDimensionKeysCommand = async (input, context) => {
|
|
7
9
|
const headers = {
|
|
8
10
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -88,43 +90,22 @@ const deserializeAws_json1_1DescribeDimensionKeysCommandError = async (output, c
|
|
|
88
90
|
switch (errorCode) {
|
|
89
91
|
case "InternalServiceError":
|
|
90
92
|
case "com.amazonaws.pi#InternalServiceError":
|
|
91
|
-
|
|
92
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
93
|
-
name: errorCode,
|
|
94
|
-
$metadata: deserializeMetadata(output),
|
|
95
|
-
};
|
|
96
|
-
break;
|
|
93
|
+
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
97
94
|
case "InvalidArgumentException":
|
|
98
95
|
case "com.amazonaws.pi#InvalidArgumentException":
|
|
99
|
-
|
|
100
|
-
...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
101
|
-
name: errorCode,
|
|
102
|
-
$metadata: deserializeMetadata(output),
|
|
103
|
-
};
|
|
104
|
-
break;
|
|
96
|
+
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
105
97
|
case "NotAuthorizedException":
|
|
106
98
|
case "com.amazonaws.pi#NotAuthorizedException":
|
|
107
|
-
|
|
108
|
-
...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)),
|
|
109
|
-
name: errorCode,
|
|
110
|
-
$metadata: deserializeMetadata(output),
|
|
111
|
-
};
|
|
112
|
-
break;
|
|
99
|
+
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
113
100
|
default:
|
|
114
101
|
const parsedBody = parsedOutput.body;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
...parsedBody,
|
|
118
|
-
name: `${errorCode}`,
|
|
119
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
102
|
+
response = new PIServiceException_1.PIServiceException({
|
|
103
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
120
104
|
$fault: "client",
|
|
121
105
|
$metadata: deserializeMetadata(output),
|
|
122
|
-
};
|
|
106
|
+
});
|
|
107
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
123
108
|
}
|
|
124
|
-
const message = response.message || response.Message || errorCode;
|
|
125
|
-
response.message = message;
|
|
126
|
-
delete response.Message;
|
|
127
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
128
109
|
};
|
|
129
110
|
const deserializeAws_json1_1GetDimensionKeyDetailsCommand = async (output, context) => {
|
|
130
111
|
if (output.statusCode >= 300) {
|
|
@@ -151,43 +132,22 @@ const deserializeAws_json1_1GetDimensionKeyDetailsCommandError = async (output,
|
|
|
151
132
|
switch (errorCode) {
|
|
152
133
|
case "InternalServiceError":
|
|
153
134
|
case "com.amazonaws.pi#InternalServiceError":
|
|
154
|
-
|
|
155
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
156
|
-
name: errorCode,
|
|
157
|
-
$metadata: deserializeMetadata(output),
|
|
158
|
-
};
|
|
159
|
-
break;
|
|
135
|
+
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
160
136
|
case "InvalidArgumentException":
|
|
161
137
|
case "com.amazonaws.pi#InvalidArgumentException":
|
|
162
|
-
|
|
163
|
-
...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
164
|
-
name: errorCode,
|
|
165
|
-
$metadata: deserializeMetadata(output),
|
|
166
|
-
};
|
|
167
|
-
break;
|
|
138
|
+
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
168
139
|
case "NotAuthorizedException":
|
|
169
140
|
case "com.amazonaws.pi#NotAuthorizedException":
|
|
170
|
-
|
|
171
|
-
...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)),
|
|
172
|
-
name: errorCode,
|
|
173
|
-
$metadata: deserializeMetadata(output),
|
|
174
|
-
};
|
|
175
|
-
break;
|
|
141
|
+
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
176
142
|
default:
|
|
177
143
|
const parsedBody = parsedOutput.body;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
...parsedBody,
|
|
181
|
-
name: `${errorCode}`,
|
|
182
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
144
|
+
response = new PIServiceException_1.PIServiceException({
|
|
145
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
183
146
|
$fault: "client",
|
|
184
147
|
$metadata: deserializeMetadata(output),
|
|
185
|
-
};
|
|
148
|
+
});
|
|
149
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
186
150
|
}
|
|
187
|
-
const message = response.message || response.Message || errorCode;
|
|
188
|
-
response.message = message;
|
|
189
|
-
delete response.Message;
|
|
190
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
191
151
|
};
|
|
192
152
|
const deserializeAws_json1_1GetResourceMetadataCommand = async (output, context) => {
|
|
193
153
|
if (output.statusCode >= 300) {
|
|
@@ -214,43 +174,22 @@ const deserializeAws_json1_1GetResourceMetadataCommandError = async (output, con
|
|
|
214
174
|
switch (errorCode) {
|
|
215
175
|
case "InternalServiceError":
|
|
216
176
|
case "com.amazonaws.pi#InternalServiceError":
|
|
217
|
-
|
|
218
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
219
|
-
name: errorCode,
|
|
220
|
-
$metadata: deserializeMetadata(output),
|
|
221
|
-
};
|
|
222
|
-
break;
|
|
177
|
+
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
223
178
|
case "InvalidArgumentException":
|
|
224
179
|
case "com.amazonaws.pi#InvalidArgumentException":
|
|
225
|
-
|
|
226
|
-
...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
227
|
-
name: errorCode,
|
|
228
|
-
$metadata: deserializeMetadata(output),
|
|
229
|
-
};
|
|
230
|
-
break;
|
|
180
|
+
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
231
181
|
case "NotAuthorizedException":
|
|
232
182
|
case "com.amazonaws.pi#NotAuthorizedException":
|
|
233
|
-
|
|
234
|
-
...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)),
|
|
235
|
-
name: errorCode,
|
|
236
|
-
$metadata: deserializeMetadata(output),
|
|
237
|
-
};
|
|
238
|
-
break;
|
|
183
|
+
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
239
184
|
default:
|
|
240
185
|
const parsedBody = parsedOutput.body;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
...parsedBody,
|
|
244
|
-
name: `${errorCode}`,
|
|
245
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
186
|
+
response = new PIServiceException_1.PIServiceException({
|
|
187
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
246
188
|
$fault: "client",
|
|
247
189
|
$metadata: deserializeMetadata(output),
|
|
248
|
-
};
|
|
190
|
+
});
|
|
191
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
249
192
|
}
|
|
250
|
-
const message = response.message || response.Message || errorCode;
|
|
251
|
-
response.message = message;
|
|
252
|
-
delete response.Message;
|
|
253
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
254
193
|
};
|
|
255
194
|
const deserializeAws_json1_1GetResourceMetricsCommand = async (output, context) => {
|
|
256
195
|
if (output.statusCode >= 300) {
|
|
@@ -277,43 +216,22 @@ const deserializeAws_json1_1GetResourceMetricsCommandError = async (output, cont
|
|
|
277
216
|
switch (errorCode) {
|
|
278
217
|
case "InternalServiceError":
|
|
279
218
|
case "com.amazonaws.pi#InternalServiceError":
|
|
280
|
-
|
|
281
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
282
|
-
name: errorCode,
|
|
283
|
-
$metadata: deserializeMetadata(output),
|
|
284
|
-
};
|
|
285
|
-
break;
|
|
219
|
+
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
286
220
|
case "InvalidArgumentException":
|
|
287
221
|
case "com.amazonaws.pi#InvalidArgumentException":
|
|
288
|
-
|
|
289
|
-
...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
290
|
-
name: errorCode,
|
|
291
|
-
$metadata: deserializeMetadata(output),
|
|
292
|
-
};
|
|
293
|
-
break;
|
|
222
|
+
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
294
223
|
case "NotAuthorizedException":
|
|
295
224
|
case "com.amazonaws.pi#NotAuthorizedException":
|
|
296
|
-
|
|
297
|
-
...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)),
|
|
298
|
-
name: errorCode,
|
|
299
|
-
$metadata: deserializeMetadata(output),
|
|
300
|
-
};
|
|
301
|
-
break;
|
|
225
|
+
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
302
226
|
default:
|
|
303
227
|
const parsedBody = parsedOutput.body;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
...parsedBody,
|
|
307
|
-
name: `${errorCode}`,
|
|
308
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
228
|
+
response = new PIServiceException_1.PIServiceException({
|
|
229
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
309
230
|
$fault: "client",
|
|
310
231
|
$metadata: deserializeMetadata(output),
|
|
311
|
-
};
|
|
232
|
+
});
|
|
233
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
312
234
|
}
|
|
313
|
-
const message = response.message || response.Message || errorCode;
|
|
314
|
-
response.message = message;
|
|
315
|
-
delete response.Message;
|
|
316
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
317
235
|
};
|
|
318
236
|
const deserializeAws_json1_1ListAvailableResourceDimensionsCommand = async (output, context) => {
|
|
319
237
|
if (output.statusCode >= 300) {
|
|
@@ -340,43 +258,22 @@ const deserializeAws_json1_1ListAvailableResourceDimensionsCommandError = async
|
|
|
340
258
|
switch (errorCode) {
|
|
341
259
|
case "InternalServiceError":
|
|
342
260
|
case "com.amazonaws.pi#InternalServiceError":
|
|
343
|
-
|
|
344
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
345
|
-
name: errorCode,
|
|
346
|
-
$metadata: deserializeMetadata(output),
|
|
347
|
-
};
|
|
348
|
-
break;
|
|
261
|
+
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
349
262
|
case "InvalidArgumentException":
|
|
350
263
|
case "com.amazonaws.pi#InvalidArgumentException":
|
|
351
|
-
|
|
352
|
-
...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
353
|
-
name: errorCode,
|
|
354
|
-
$metadata: deserializeMetadata(output),
|
|
355
|
-
};
|
|
356
|
-
break;
|
|
264
|
+
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
357
265
|
case "NotAuthorizedException":
|
|
358
266
|
case "com.amazonaws.pi#NotAuthorizedException":
|
|
359
|
-
|
|
360
|
-
...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)),
|
|
361
|
-
name: errorCode,
|
|
362
|
-
$metadata: deserializeMetadata(output),
|
|
363
|
-
};
|
|
364
|
-
break;
|
|
267
|
+
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
365
268
|
default:
|
|
366
269
|
const parsedBody = parsedOutput.body;
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
...parsedBody,
|
|
370
|
-
name: `${errorCode}`,
|
|
371
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
270
|
+
response = new PIServiceException_1.PIServiceException({
|
|
271
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
372
272
|
$fault: "client",
|
|
373
273
|
$metadata: deserializeMetadata(output),
|
|
374
|
-
};
|
|
274
|
+
});
|
|
275
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
375
276
|
}
|
|
376
|
-
const message = response.message || response.Message || errorCode;
|
|
377
|
-
response.message = message;
|
|
378
|
-
delete response.Message;
|
|
379
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
380
277
|
};
|
|
381
278
|
const deserializeAws_json1_1ListAvailableResourceMetricsCommand = async (output, context) => {
|
|
382
279
|
if (output.statusCode >= 300) {
|
|
@@ -403,76 +300,49 @@ const deserializeAws_json1_1ListAvailableResourceMetricsCommandError = async (ou
|
|
|
403
300
|
switch (errorCode) {
|
|
404
301
|
case "InternalServiceError":
|
|
405
302
|
case "com.amazonaws.pi#InternalServiceError":
|
|
406
|
-
|
|
407
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
408
|
-
name: errorCode,
|
|
409
|
-
$metadata: deserializeMetadata(output),
|
|
410
|
-
};
|
|
411
|
-
break;
|
|
303
|
+
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
412
304
|
case "InvalidArgumentException":
|
|
413
305
|
case "com.amazonaws.pi#InvalidArgumentException":
|
|
414
|
-
|
|
415
|
-
...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
416
|
-
name: errorCode,
|
|
417
|
-
$metadata: deserializeMetadata(output),
|
|
418
|
-
};
|
|
419
|
-
break;
|
|
306
|
+
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
420
307
|
case "NotAuthorizedException":
|
|
421
308
|
case "com.amazonaws.pi#NotAuthorizedException":
|
|
422
|
-
|
|
423
|
-
...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)),
|
|
424
|
-
name: errorCode,
|
|
425
|
-
$metadata: deserializeMetadata(output),
|
|
426
|
-
};
|
|
427
|
-
break;
|
|
309
|
+
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
428
310
|
default:
|
|
429
311
|
const parsedBody = parsedOutput.body;
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
...parsedBody,
|
|
433
|
-
name: `${errorCode}`,
|
|
434
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
312
|
+
response = new PIServiceException_1.PIServiceException({
|
|
313
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
435
314
|
$fault: "client",
|
|
436
315
|
$metadata: deserializeMetadata(output),
|
|
437
|
-
};
|
|
316
|
+
});
|
|
317
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
438
318
|
}
|
|
439
|
-
const message = response.message || response.Message || errorCode;
|
|
440
|
-
response.message = message;
|
|
441
|
-
delete response.Message;
|
|
442
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
443
319
|
};
|
|
444
320
|
const deserializeAws_json1_1InternalServiceErrorResponse = async (parsedOutput, context) => {
|
|
445
321
|
const body = parsedOutput.body;
|
|
446
322
|
const deserialized = deserializeAws_json1_1InternalServiceError(body, context);
|
|
447
|
-
const
|
|
448
|
-
name: "InternalServiceError",
|
|
449
|
-
$fault: "server",
|
|
323
|
+
const exception = new models_0_1.InternalServiceError({
|
|
450
324
|
$metadata: deserializeMetadata(parsedOutput),
|
|
451
325
|
...deserialized,
|
|
452
|
-
};
|
|
453
|
-
return
|
|
326
|
+
});
|
|
327
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
454
328
|
};
|
|
455
329
|
const deserializeAws_json1_1InvalidArgumentExceptionResponse = async (parsedOutput, context) => {
|
|
456
330
|
const body = parsedOutput.body;
|
|
457
331
|
const deserialized = deserializeAws_json1_1InvalidArgumentException(body, context);
|
|
458
|
-
const
|
|
459
|
-
name: "InvalidArgumentException",
|
|
460
|
-
$fault: "client",
|
|
332
|
+
const exception = new models_0_1.InvalidArgumentException({
|
|
461
333
|
$metadata: deserializeMetadata(parsedOutput),
|
|
462
334
|
...deserialized,
|
|
463
|
-
};
|
|
464
|
-
return
|
|
335
|
+
});
|
|
336
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
465
337
|
};
|
|
466
338
|
const deserializeAws_json1_1NotAuthorizedExceptionResponse = async (parsedOutput, context) => {
|
|
467
339
|
const body = parsedOutput.body;
|
|
468
340
|
const deserialized = deserializeAws_json1_1NotAuthorizedException(body, context);
|
|
469
|
-
const
|
|
470
|
-
name: "NotAuthorizedException",
|
|
471
|
-
$fault: "client",
|
|
341
|
+
const exception = new models_0_1.NotAuthorizedException({
|
|
472
342
|
$metadata: deserializeMetadata(parsedOutput),
|
|
473
343
|
...deserialized,
|
|
474
|
-
};
|
|
475
|
-
return
|
|
344
|
+
});
|
|
345
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
476
346
|
};
|
|
477
347
|
const serializeAws_json1_1AdditionalMetricsList = (input, context) => {
|
|
478
348
|
return input
|
|
@@ -664,7 +534,7 @@ const deserializeAws_json1_1DataPoint = (output, context) => {
|
|
|
664
534
|
};
|
|
665
535
|
};
|
|
666
536
|
const deserializeAws_json1_1DataPointsList = (output, context) => {
|
|
667
|
-
|
|
537
|
+
const retVal = (output || [])
|
|
668
538
|
.filter((e) => e != null)
|
|
669
539
|
.map((entry) => {
|
|
670
540
|
if (entry === null) {
|
|
@@ -672,6 +542,7 @@ const deserializeAws_json1_1DataPointsList = (output, context) => {
|
|
|
672
542
|
}
|
|
673
543
|
return deserializeAws_json1_1DataPoint(entry, context);
|
|
674
544
|
});
|
|
545
|
+
return retVal;
|
|
675
546
|
};
|
|
676
547
|
const deserializeAws_json1_1DescribeDimensionKeysResponse = (output, context) => {
|
|
677
548
|
return {
|
|
@@ -696,7 +567,7 @@ const deserializeAws_json1_1DimensionDetail = (output, context) => {
|
|
|
696
567
|
};
|
|
697
568
|
};
|
|
698
569
|
const deserializeAws_json1_1DimensionDetailList = (output, context) => {
|
|
699
|
-
|
|
570
|
+
const retVal = (output || [])
|
|
700
571
|
.filter((e) => e != null)
|
|
701
572
|
.map((entry) => {
|
|
702
573
|
if (entry === null) {
|
|
@@ -704,6 +575,7 @@ const deserializeAws_json1_1DimensionDetailList = (output, context) => {
|
|
|
704
575
|
}
|
|
705
576
|
return deserializeAws_json1_1DimensionDetail(entry, context);
|
|
706
577
|
});
|
|
578
|
+
return retVal;
|
|
707
579
|
};
|
|
708
580
|
const deserializeAws_json1_1DimensionGroupDetail = (output, context) => {
|
|
709
581
|
return {
|
|
@@ -714,7 +586,7 @@ const deserializeAws_json1_1DimensionGroupDetail = (output, context) => {
|
|
|
714
586
|
};
|
|
715
587
|
};
|
|
716
588
|
const deserializeAws_json1_1DimensionGroupDetailList = (output, context) => {
|
|
717
|
-
|
|
589
|
+
const retVal = (output || [])
|
|
718
590
|
.filter((e) => e != null)
|
|
719
591
|
.map((entry) => {
|
|
720
592
|
if (entry === null) {
|
|
@@ -722,6 +594,7 @@ const deserializeAws_json1_1DimensionGroupDetailList = (output, context) => {
|
|
|
722
594
|
}
|
|
723
595
|
return deserializeAws_json1_1DimensionGroupDetail(entry, context);
|
|
724
596
|
});
|
|
597
|
+
return retVal;
|
|
725
598
|
};
|
|
726
599
|
const deserializeAws_json1_1DimensionKeyDescription = (output, context) => {
|
|
727
600
|
return {
|
|
@@ -738,7 +611,7 @@ const deserializeAws_json1_1DimensionKeyDescription = (output, context) => {
|
|
|
738
611
|
};
|
|
739
612
|
};
|
|
740
613
|
const deserializeAws_json1_1DimensionKeyDescriptionList = (output, context) => {
|
|
741
|
-
|
|
614
|
+
const retVal = (output || [])
|
|
742
615
|
.filter((e) => e != null)
|
|
743
616
|
.map((entry) => {
|
|
744
617
|
if (entry === null) {
|
|
@@ -746,6 +619,7 @@ const deserializeAws_json1_1DimensionKeyDescriptionList = (output, context) => {
|
|
|
746
619
|
}
|
|
747
620
|
return deserializeAws_json1_1DimensionKeyDescription(entry, context);
|
|
748
621
|
});
|
|
622
|
+
return retVal;
|
|
749
623
|
};
|
|
750
624
|
const deserializeAws_json1_1DimensionKeyDetail = (output, context) => {
|
|
751
625
|
return {
|
|
@@ -755,7 +629,7 @@ const deserializeAws_json1_1DimensionKeyDetail = (output, context) => {
|
|
|
755
629
|
};
|
|
756
630
|
};
|
|
757
631
|
const deserializeAws_json1_1DimensionKeyDetailList = (output, context) => {
|
|
758
|
-
|
|
632
|
+
const retVal = (output || [])
|
|
759
633
|
.filter((e) => e != null)
|
|
760
634
|
.map((entry) => {
|
|
761
635
|
if (entry === null) {
|
|
@@ -763,6 +637,7 @@ const deserializeAws_json1_1DimensionKeyDetailList = (output, context) => {
|
|
|
763
637
|
}
|
|
764
638
|
return deserializeAws_json1_1DimensionKeyDetail(entry, context);
|
|
765
639
|
});
|
|
640
|
+
return retVal;
|
|
766
641
|
};
|
|
767
642
|
const deserializeAws_json1_1DimensionMap = (output, context) => {
|
|
768
643
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
@@ -856,7 +731,7 @@ const deserializeAws_json1_1MetricDimensionGroups = (output, context) => {
|
|
|
856
731
|
};
|
|
857
732
|
};
|
|
858
733
|
const deserializeAws_json1_1MetricDimensionsList = (output, context) => {
|
|
859
|
-
|
|
734
|
+
const retVal = (output || [])
|
|
860
735
|
.filter((e) => e != null)
|
|
861
736
|
.map((entry) => {
|
|
862
737
|
if (entry === null) {
|
|
@@ -864,6 +739,7 @@ const deserializeAws_json1_1MetricDimensionsList = (output, context) => {
|
|
|
864
739
|
}
|
|
865
740
|
return deserializeAws_json1_1MetricDimensionGroups(entry, context);
|
|
866
741
|
});
|
|
742
|
+
return retVal;
|
|
867
743
|
};
|
|
868
744
|
const deserializeAws_json1_1MetricKeyDataPoints = (output, context) => {
|
|
869
745
|
return {
|
|
@@ -876,7 +752,7 @@ const deserializeAws_json1_1MetricKeyDataPoints = (output, context) => {
|
|
|
876
752
|
};
|
|
877
753
|
};
|
|
878
754
|
const deserializeAws_json1_1MetricKeyDataPointsList = (output, context) => {
|
|
879
|
-
|
|
755
|
+
const retVal = (output || [])
|
|
880
756
|
.filter((e) => e != null)
|
|
881
757
|
.map((entry) => {
|
|
882
758
|
if (entry === null) {
|
|
@@ -884,9 +760,10 @@ const deserializeAws_json1_1MetricKeyDataPointsList = (output, context) => {
|
|
|
884
760
|
}
|
|
885
761
|
return deserializeAws_json1_1MetricKeyDataPoints(entry, context);
|
|
886
762
|
});
|
|
763
|
+
return retVal;
|
|
887
764
|
};
|
|
888
765
|
const deserializeAws_json1_1MetricValuesList = (output, context) => {
|
|
889
|
-
|
|
766
|
+
const retVal = (output || [])
|
|
890
767
|
.filter((e) => e != null)
|
|
891
768
|
.map((entry) => {
|
|
892
769
|
if (entry === null) {
|
|
@@ -894,6 +771,7 @@ const deserializeAws_json1_1MetricValuesList = (output, context) => {
|
|
|
894
771
|
}
|
|
895
772
|
return smithy_client_1.limitedParseDouble(entry);
|
|
896
773
|
});
|
|
774
|
+
return retVal;
|
|
897
775
|
};
|
|
898
776
|
const deserializeAws_json1_1NotAuthorizedException = (output, context) => {
|
|
899
777
|
return {
|
|
@@ -908,7 +786,7 @@ const deserializeAws_json1_1ResponsePartitionKey = (output, context) => {
|
|
|
908
786
|
};
|
|
909
787
|
};
|
|
910
788
|
const deserializeAws_json1_1ResponsePartitionKeyList = (output, context) => {
|
|
911
|
-
|
|
789
|
+
const retVal = (output || [])
|
|
912
790
|
.filter((e) => e != null)
|
|
913
791
|
.map((entry) => {
|
|
914
792
|
if (entry === null) {
|
|
@@ -916,6 +794,7 @@ const deserializeAws_json1_1ResponsePartitionKeyList = (output, context) => {
|
|
|
916
794
|
}
|
|
917
795
|
return deserializeAws_json1_1ResponsePartitionKey(entry, context);
|
|
918
796
|
});
|
|
797
|
+
return retVal;
|
|
919
798
|
};
|
|
920
799
|
const deserializeAws_json1_1ResponseResourceMetric = (output, context) => {
|
|
921
800
|
return {
|
|
@@ -933,7 +812,7 @@ const deserializeAws_json1_1ResponseResourceMetricKey = (output, context) => {
|
|
|
933
812
|
};
|
|
934
813
|
};
|
|
935
814
|
const deserializeAws_json1_1ResponseResourceMetricList = (output, context) => {
|
|
936
|
-
|
|
815
|
+
const retVal = (output || [])
|
|
937
816
|
.filter((e) => e != null)
|
|
938
817
|
.map((entry) => {
|
|
939
818
|
if (entry === null) {
|
|
@@ -941,6 +820,7 @@ const deserializeAws_json1_1ResponseResourceMetricList = (output, context) => {
|
|
|
941
820
|
}
|
|
942
821
|
return deserializeAws_json1_1ResponseResourceMetric(entry, context);
|
|
943
822
|
});
|
|
823
|
+
return retVal;
|
|
944
824
|
};
|
|
945
825
|
const deserializeMetadata = (output) => {
|
|
946
826
|
var _a;
|
package/dist-es/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
|
|
3
|
+
var PIServiceException = (function (_super) {
|
|
4
|
+
__extends(PIServiceException, _super);
|
|
5
|
+
function PIServiceException(options) {
|
|
6
|
+
var _this = _super.call(this, options) || this;
|
|
7
|
+
Object.setPrototypeOf(_this, PIServiceException.prototype);
|
|
8
|
+
return _this;
|
|
9
|
+
}
|
|
10
|
+
return PIServiceException;
|
|
11
|
+
}(__ServiceException));
|
|
12
|
+
export { PIServiceException };
|