@aws-sdk/client-pi 3.46.0 → 3.48.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 +38 -0
- package/README.md +18 -13
- package/dist-cjs/PI.js +45 -0
- package/dist-cjs/commands/GetResourceMetadataCommand.js +36 -0
- package/dist-cjs/commands/ListAvailableResourceDimensionsCommand.js +36 -0
- package/dist-cjs/commands/ListAvailableResourceMetricsCommand.js +36 -0
- package/dist-cjs/commands/index.js +3 -0
- package/dist-cjs/index.js +1 -0
- package/dist-cjs/models/models_0.js +77 -19
- package/dist-cjs/pagination/DescribeDimensionKeysPaginator.js +35 -0
- package/dist-cjs/pagination/GetResourceMetricsPaginator.js +35 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListAvailableResourceDimensionsPaginator.js +35 -0
- package/dist-cjs/pagination/ListAvailableResourceMetricsPaginator.js +35 -0
- package/dist-cjs/pagination/index.js +8 -0
- package/dist-cjs/protocols/Aws_json1_1.js +402 -1
- package/dist-cjs/runtimeConfig.browser.js +7 -2
- package/dist-cjs/runtimeConfig.js +10 -2
- package/dist-es/PI.js +45 -0
- package/dist-es/commands/GetResourceMetadataCommand.js +39 -0
- package/dist-es/commands/ListAvailableResourceDimensionsCommand.js +39 -0
- package/dist-es/commands/ListAvailableResourceMetricsCommand.js +39 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/index.js +1 -0
- package/dist-es/models/models_0.js +54 -12
- package/dist-es/pagination/DescribeDimensionKeysPaginator.js +74 -0
- package/dist-es/pagination/GetResourceMetricsPaginator.js +74 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListAvailableResourceDimensionsPaginator.js +74 -0
- package/dist-es/pagination/ListAvailableResourceMetricsPaginator.js +74 -0
- package/dist-es/pagination/index.js +5 -0
- package/dist-es/protocols/Aws_json1_1.js +414 -1
- package/dist-es/runtimeConfig.browser.js +12 -3
- package/dist-es/runtimeConfig.js +13 -4
- package/dist-types/PI.d.ts +48 -18
- package/dist-types/PIClient.d.ts +27 -15
- package/dist-types/commands/DescribeDimensionKeysCommand.d.ts +2 -2
- package/dist-types/commands/GetDimensionKeyDetailsCommand.d.ts +5 -4
- package/dist-types/commands/GetResourceMetadataCommand.d.ts +37 -0
- package/dist-types/commands/ListAvailableResourceDimensionsCommand.d.ts +35 -0
- package/dist-types/commands/ListAvailableResourceMetricsCommand.d.ts +36 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +413 -101
- package/dist-types/pagination/DescribeDimensionKeysPaginator.d.ts +4 -0
- package/dist-types/pagination/GetResourceMetricsPaginator.d.ts +4 -0
- package/dist-types/pagination/Interfaces.d.ts +6 -0
- package/dist-types/pagination/ListAvailableResourceDimensionsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListAvailableResourceMetricsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +5 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
- package/dist-types/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/runtimeConfig.d.ts +4 -3
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/PI.d.ts +15 -0
- package/dist-types/ts3.4/PIClient.d.ts +8 -3
- package/dist-types/ts3.4/commands/GetResourceMetadataCommand.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 +3 -0
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +142 -12
- 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 +9 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +35 -35
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_json1_1GetResourceMetricsCommand = exports.deserializeAws_json1_1GetDimensionKeyDetailsCommand = exports.deserializeAws_json1_1DescribeDimensionKeysCommand = exports.serializeAws_json1_1GetResourceMetricsCommand = exports.serializeAws_json1_1GetDimensionKeyDetailsCommand = exports.serializeAws_json1_1DescribeDimensionKeysCommand = void 0;
|
|
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
6
|
const serializeAws_json1_1DescribeDimensionKeysCommand = async (input, context) => {
|
|
@@ -23,6 +23,16 @@ const serializeAws_json1_1GetDimensionKeyDetailsCommand = async (input, context)
|
|
|
23
23
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
24
24
|
};
|
|
25
25
|
exports.serializeAws_json1_1GetDimensionKeyDetailsCommand = serializeAws_json1_1GetDimensionKeyDetailsCommand;
|
|
26
|
+
const serializeAws_json1_1GetResourceMetadataCommand = async (input, context) => {
|
|
27
|
+
const headers = {
|
|
28
|
+
"content-type": "application/x-amz-json-1.1",
|
|
29
|
+
"x-amz-target": "PerformanceInsightsv20180227.GetResourceMetadata",
|
|
30
|
+
};
|
|
31
|
+
let body;
|
|
32
|
+
body = JSON.stringify(serializeAws_json1_1GetResourceMetadataRequest(input, context));
|
|
33
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
34
|
+
};
|
|
35
|
+
exports.serializeAws_json1_1GetResourceMetadataCommand = serializeAws_json1_1GetResourceMetadataCommand;
|
|
26
36
|
const serializeAws_json1_1GetResourceMetricsCommand = async (input, context) => {
|
|
27
37
|
const headers = {
|
|
28
38
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -33,6 +43,26 @@ const serializeAws_json1_1GetResourceMetricsCommand = async (input, context) =>
|
|
|
33
43
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
34
44
|
};
|
|
35
45
|
exports.serializeAws_json1_1GetResourceMetricsCommand = serializeAws_json1_1GetResourceMetricsCommand;
|
|
46
|
+
const serializeAws_json1_1ListAvailableResourceDimensionsCommand = async (input, context) => {
|
|
47
|
+
const headers = {
|
|
48
|
+
"content-type": "application/x-amz-json-1.1",
|
|
49
|
+
"x-amz-target": "PerformanceInsightsv20180227.ListAvailableResourceDimensions",
|
|
50
|
+
};
|
|
51
|
+
let body;
|
|
52
|
+
body = JSON.stringify(serializeAws_json1_1ListAvailableResourceDimensionsRequest(input, context));
|
|
53
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
54
|
+
};
|
|
55
|
+
exports.serializeAws_json1_1ListAvailableResourceDimensionsCommand = serializeAws_json1_1ListAvailableResourceDimensionsCommand;
|
|
56
|
+
const serializeAws_json1_1ListAvailableResourceMetricsCommand = async (input, context) => {
|
|
57
|
+
const headers = {
|
|
58
|
+
"content-type": "application/x-amz-json-1.1",
|
|
59
|
+
"x-amz-target": "PerformanceInsightsv20180227.ListAvailableResourceMetrics",
|
|
60
|
+
};
|
|
61
|
+
let body;
|
|
62
|
+
body = JSON.stringify(serializeAws_json1_1ListAvailableResourceMetricsRequest(input, context));
|
|
63
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
64
|
+
};
|
|
65
|
+
exports.serializeAws_json1_1ListAvailableResourceMetricsCommand = serializeAws_json1_1ListAvailableResourceMetricsCommand;
|
|
36
66
|
const deserializeAws_json1_1DescribeDimensionKeysCommand = async (output, context) => {
|
|
37
67
|
if (output.statusCode >= 300) {
|
|
38
68
|
return deserializeAws_json1_1DescribeDimensionKeysCommandError(output, context);
|
|
@@ -159,6 +189,69 @@ const deserializeAws_json1_1GetDimensionKeyDetailsCommandError = async (output,
|
|
|
159
189
|
delete response.Message;
|
|
160
190
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
161
191
|
};
|
|
192
|
+
const deserializeAws_json1_1GetResourceMetadataCommand = async (output, context) => {
|
|
193
|
+
if (output.statusCode >= 300) {
|
|
194
|
+
return deserializeAws_json1_1GetResourceMetadataCommandError(output, context);
|
|
195
|
+
}
|
|
196
|
+
const data = await parseBody(output.body, context);
|
|
197
|
+
let contents = {};
|
|
198
|
+
contents = deserializeAws_json1_1GetResourceMetadataResponse(data, context);
|
|
199
|
+
const response = {
|
|
200
|
+
$metadata: deserializeMetadata(output),
|
|
201
|
+
...contents,
|
|
202
|
+
};
|
|
203
|
+
return Promise.resolve(response);
|
|
204
|
+
};
|
|
205
|
+
exports.deserializeAws_json1_1GetResourceMetadataCommand = deserializeAws_json1_1GetResourceMetadataCommand;
|
|
206
|
+
const deserializeAws_json1_1GetResourceMetadataCommandError = async (output, context) => {
|
|
207
|
+
const parsedOutput = {
|
|
208
|
+
...output,
|
|
209
|
+
body: await parseBody(output.body, context),
|
|
210
|
+
};
|
|
211
|
+
let response;
|
|
212
|
+
let errorCode = "UnknownError";
|
|
213
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
214
|
+
switch (errorCode) {
|
|
215
|
+
case "InternalServiceError":
|
|
216
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
217
|
+
response = {
|
|
218
|
+
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
219
|
+
name: errorCode,
|
|
220
|
+
$metadata: deserializeMetadata(output),
|
|
221
|
+
};
|
|
222
|
+
break;
|
|
223
|
+
case "InvalidArgumentException":
|
|
224
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
225
|
+
response = {
|
|
226
|
+
...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
227
|
+
name: errorCode,
|
|
228
|
+
$metadata: deserializeMetadata(output),
|
|
229
|
+
};
|
|
230
|
+
break;
|
|
231
|
+
case "NotAuthorizedException":
|
|
232
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
233
|
+
response = {
|
|
234
|
+
...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)),
|
|
235
|
+
name: errorCode,
|
|
236
|
+
$metadata: deserializeMetadata(output),
|
|
237
|
+
};
|
|
238
|
+
break;
|
|
239
|
+
default:
|
|
240
|
+
const parsedBody = parsedOutput.body;
|
|
241
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
242
|
+
response = {
|
|
243
|
+
...parsedBody,
|
|
244
|
+
name: `${errorCode}`,
|
|
245
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
246
|
+
$fault: "client",
|
|
247
|
+
$metadata: deserializeMetadata(output),
|
|
248
|
+
};
|
|
249
|
+
}
|
|
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
|
+
};
|
|
162
255
|
const deserializeAws_json1_1GetResourceMetricsCommand = async (output, context) => {
|
|
163
256
|
if (output.statusCode >= 300) {
|
|
164
257
|
return deserializeAws_json1_1GetResourceMetricsCommandError(output, context);
|
|
@@ -222,6 +315,132 @@ const deserializeAws_json1_1GetResourceMetricsCommandError = async (output, cont
|
|
|
222
315
|
delete response.Message;
|
|
223
316
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
224
317
|
};
|
|
318
|
+
const deserializeAws_json1_1ListAvailableResourceDimensionsCommand = async (output, context) => {
|
|
319
|
+
if (output.statusCode >= 300) {
|
|
320
|
+
return deserializeAws_json1_1ListAvailableResourceDimensionsCommandError(output, context);
|
|
321
|
+
}
|
|
322
|
+
const data = await parseBody(output.body, context);
|
|
323
|
+
let contents = {};
|
|
324
|
+
contents = deserializeAws_json1_1ListAvailableResourceDimensionsResponse(data, context);
|
|
325
|
+
const response = {
|
|
326
|
+
$metadata: deserializeMetadata(output),
|
|
327
|
+
...contents,
|
|
328
|
+
};
|
|
329
|
+
return Promise.resolve(response);
|
|
330
|
+
};
|
|
331
|
+
exports.deserializeAws_json1_1ListAvailableResourceDimensionsCommand = deserializeAws_json1_1ListAvailableResourceDimensionsCommand;
|
|
332
|
+
const deserializeAws_json1_1ListAvailableResourceDimensionsCommandError = async (output, context) => {
|
|
333
|
+
const parsedOutput = {
|
|
334
|
+
...output,
|
|
335
|
+
body: await parseBody(output.body, context),
|
|
336
|
+
};
|
|
337
|
+
let response;
|
|
338
|
+
let errorCode = "UnknownError";
|
|
339
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
340
|
+
switch (errorCode) {
|
|
341
|
+
case "InternalServiceError":
|
|
342
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
343
|
+
response = {
|
|
344
|
+
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
345
|
+
name: errorCode,
|
|
346
|
+
$metadata: deserializeMetadata(output),
|
|
347
|
+
};
|
|
348
|
+
break;
|
|
349
|
+
case "InvalidArgumentException":
|
|
350
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
351
|
+
response = {
|
|
352
|
+
...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
353
|
+
name: errorCode,
|
|
354
|
+
$metadata: deserializeMetadata(output),
|
|
355
|
+
};
|
|
356
|
+
break;
|
|
357
|
+
case "NotAuthorizedException":
|
|
358
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
359
|
+
response = {
|
|
360
|
+
...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)),
|
|
361
|
+
name: errorCode,
|
|
362
|
+
$metadata: deserializeMetadata(output),
|
|
363
|
+
};
|
|
364
|
+
break;
|
|
365
|
+
default:
|
|
366
|
+
const parsedBody = parsedOutput.body;
|
|
367
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
368
|
+
response = {
|
|
369
|
+
...parsedBody,
|
|
370
|
+
name: `${errorCode}`,
|
|
371
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
372
|
+
$fault: "client",
|
|
373
|
+
$metadata: deserializeMetadata(output),
|
|
374
|
+
};
|
|
375
|
+
}
|
|
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
|
+
};
|
|
381
|
+
const deserializeAws_json1_1ListAvailableResourceMetricsCommand = async (output, context) => {
|
|
382
|
+
if (output.statusCode >= 300) {
|
|
383
|
+
return deserializeAws_json1_1ListAvailableResourceMetricsCommandError(output, context);
|
|
384
|
+
}
|
|
385
|
+
const data = await parseBody(output.body, context);
|
|
386
|
+
let contents = {};
|
|
387
|
+
contents = deserializeAws_json1_1ListAvailableResourceMetricsResponse(data, context);
|
|
388
|
+
const response = {
|
|
389
|
+
$metadata: deserializeMetadata(output),
|
|
390
|
+
...contents,
|
|
391
|
+
};
|
|
392
|
+
return Promise.resolve(response);
|
|
393
|
+
};
|
|
394
|
+
exports.deserializeAws_json1_1ListAvailableResourceMetricsCommand = deserializeAws_json1_1ListAvailableResourceMetricsCommand;
|
|
395
|
+
const deserializeAws_json1_1ListAvailableResourceMetricsCommandError = async (output, context) => {
|
|
396
|
+
const parsedOutput = {
|
|
397
|
+
...output,
|
|
398
|
+
body: await parseBody(output.body, context),
|
|
399
|
+
};
|
|
400
|
+
let response;
|
|
401
|
+
let errorCode = "UnknownError";
|
|
402
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
403
|
+
switch (errorCode) {
|
|
404
|
+
case "InternalServiceError":
|
|
405
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
406
|
+
response = {
|
|
407
|
+
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
408
|
+
name: errorCode,
|
|
409
|
+
$metadata: deserializeMetadata(output),
|
|
410
|
+
};
|
|
411
|
+
break;
|
|
412
|
+
case "InvalidArgumentException":
|
|
413
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
414
|
+
response = {
|
|
415
|
+
...(await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
416
|
+
name: errorCode,
|
|
417
|
+
$metadata: deserializeMetadata(output),
|
|
418
|
+
};
|
|
419
|
+
break;
|
|
420
|
+
case "NotAuthorizedException":
|
|
421
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
422
|
+
response = {
|
|
423
|
+
...(await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)),
|
|
424
|
+
name: errorCode,
|
|
425
|
+
$metadata: deserializeMetadata(output),
|
|
426
|
+
};
|
|
427
|
+
break;
|
|
428
|
+
default:
|
|
429
|
+
const parsedBody = parsedOutput.body;
|
|
430
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
431
|
+
response = {
|
|
432
|
+
...parsedBody,
|
|
433
|
+
name: `${errorCode}`,
|
|
434
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
435
|
+
$fault: "client",
|
|
436
|
+
$metadata: deserializeMetadata(output),
|
|
437
|
+
};
|
|
438
|
+
}
|
|
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
|
+
};
|
|
225
444
|
const deserializeAws_json1_1InternalServiceErrorResponse = async (parsedOutput, context) => {
|
|
226
445
|
const body = parsedOutput.body;
|
|
227
446
|
const deserialized = deserializeAws_json1_1InternalServiceError(body, context);
|
|
@@ -255,8 +474,22 @@ const deserializeAws_json1_1NotAuthorizedExceptionResponse = async (parsedOutput
|
|
|
255
474
|
};
|
|
256
475
|
return contents;
|
|
257
476
|
};
|
|
477
|
+
const serializeAws_json1_1AdditionalMetricsList = (input, context) => {
|
|
478
|
+
return input
|
|
479
|
+
.filter((e) => e != null)
|
|
480
|
+
.map((entry) => {
|
|
481
|
+
if (entry === null) {
|
|
482
|
+
return null;
|
|
483
|
+
}
|
|
484
|
+
return entry;
|
|
485
|
+
});
|
|
486
|
+
};
|
|
258
487
|
const serializeAws_json1_1DescribeDimensionKeysRequest = (input, context) => {
|
|
259
488
|
return {
|
|
489
|
+
...(input.AdditionalMetrics !== undefined &&
|
|
490
|
+
input.AdditionalMetrics !== null && {
|
|
491
|
+
AdditionalMetrics: serializeAws_json1_1AdditionalMetricsList(input.AdditionalMetrics, context),
|
|
492
|
+
}),
|
|
260
493
|
...(input.EndTime !== undefined &&
|
|
261
494
|
input.EndTime !== null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
|
|
262
495
|
...(input.Filter !== undefined &&
|
|
@@ -284,6 +517,16 @@ const serializeAws_json1_1DimensionGroup = (input, context) => {
|
|
|
284
517
|
...(input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }),
|
|
285
518
|
};
|
|
286
519
|
};
|
|
520
|
+
const serializeAws_json1_1DimensionsMetricList = (input, context) => {
|
|
521
|
+
return input
|
|
522
|
+
.filter((e) => e != null)
|
|
523
|
+
.map((entry) => {
|
|
524
|
+
if (entry === null) {
|
|
525
|
+
return null;
|
|
526
|
+
}
|
|
527
|
+
return entry;
|
|
528
|
+
});
|
|
529
|
+
};
|
|
287
530
|
const serializeAws_json1_1GetDimensionKeyDetailsRequest = (input, context) => {
|
|
288
531
|
return {
|
|
289
532
|
...(input.Group !== undefined && input.Group !== null && { Group: input.Group }),
|
|
@@ -297,6 +540,12 @@ const serializeAws_json1_1GetDimensionKeyDetailsRequest = (input, context) => {
|
|
|
297
540
|
...(input.ServiceType !== undefined && input.ServiceType !== null && { ServiceType: input.ServiceType }),
|
|
298
541
|
};
|
|
299
542
|
};
|
|
543
|
+
const serializeAws_json1_1GetResourceMetadataRequest = (input, context) => {
|
|
544
|
+
return {
|
|
545
|
+
...(input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier }),
|
|
546
|
+
...(input.ServiceType !== undefined && input.ServiceType !== null && { ServiceType: input.ServiceType }),
|
|
547
|
+
};
|
|
548
|
+
};
|
|
300
549
|
const serializeAws_json1_1GetResourceMetricsRequest = (input, context) => {
|
|
301
550
|
return {
|
|
302
551
|
...(input.EndTime !== undefined &&
|
|
@@ -315,6 +564,26 @@ const serializeAws_json1_1GetResourceMetricsRequest = (input, context) => {
|
|
|
315
564
|
input.StartTime !== null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
|
|
316
565
|
};
|
|
317
566
|
};
|
|
567
|
+
const serializeAws_json1_1ListAvailableResourceDimensionsRequest = (input, context) => {
|
|
568
|
+
return {
|
|
569
|
+
...(input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier }),
|
|
570
|
+
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
571
|
+
...(input.Metrics !== undefined &&
|
|
572
|
+
input.Metrics !== null && { Metrics: serializeAws_json1_1DimensionsMetricList(input.Metrics, context) }),
|
|
573
|
+
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
574
|
+
...(input.ServiceType !== undefined && input.ServiceType !== null && { ServiceType: input.ServiceType }),
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
const serializeAws_json1_1ListAvailableResourceMetricsRequest = (input, context) => {
|
|
578
|
+
return {
|
|
579
|
+
...(input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier }),
|
|
580
|
+
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
581
|
+
...(input.MetricTypes !== undefined &&
|
|
582
|
+
input.MetricTypes !== null && { MetricTypes: serializeAws_json1_1MetricTypeList(input.MetricTypes, context) }),
|
|
583
|
+
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
584
|
+
...(input.ServiceType !== undefined && input.ServiceType !== null && { ServiceType: input.ServiceType }),
|
|
585
|
+
};
|
|
586
|
+
};
|
|
318
587
|
const serializeAws_json1_1MetricQuery = (input, context) => {
|
|
319
588
|
return {
|
|
320
589
|
...(input.Filter !== undefined &&
|
|
@@ -345,6 +614,16 @@ const serializeAws_json1_1MetricQueryList = (input, context) => {
|
|
|
345
614
|
return serializeAws_json1_1MetricQuery(entry, context);
|
|
346
615
|
});
|
|
347
616
|
};
|
|
617
|
+
const serializeAws_json1_1MetricTypeList = (input, context) => {
|
|
618
|
+
return input
|
|
619
|
+
.filter((e) => e != null)
|
|
620
|
+
.map((entry) => {
|
|
621
|
+
if (entry === null) {
|
|
622
|
+
return null;
|
|
623
|
+
}
|
|
624
|
+
return entry;
|
|
625
|
+
});
|
|
626
|
+
};
|
|
348
627
|
const serializeAws_json1_1RequestedDimensionList = (input, context) => {
|
|
349
628
|
return input
|
|
350
629
|
.filter((e) => e != null)
|
|
@@ -365,6 +644,17 @@ const serializeAws_json1_1RequestStringList = (input, context) => {
|
|
|
365
644
|
return entry;
|
|
366
645
|
});
|
|
367
646
|
};
|
|
647
|
+
const deserializeAws_json1_1AdditionalMetricsMap = (output, context) => {
|
|
648
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
649
|
+
if (value === null) {
|
|
650
|
+
return acc;
|
|
651
|
+
}
|
|
652
|
+
return {
|
|
653
|
+
...acc,
|
|
654
|
+
[key]: smithy_client_1.limitedParseDouble(value),
|
|
655
|
+
};
|
|
656
|
+
}, {});
|
|
657
|
+
};
|
|
368
658
|
const deserializeAws_json1_1DataPoint = (output, context) => {
|
|
369
659
|
return {
|
|
370
660
|
Timestamp: output.Timestamp !== undefined && output.Timestamp !== null
|
|
@@ -400,8 +690,44 @@ const deserializeAws_json1_1DescribeDimensionKeysResponse = (output, context) =>
|
|
|
400
690
|
: undefined,
|
|
401
691
|
};
|
|
402
692
|
};
|
|
693
|
+
const deserializeAws_json1_1DimensionDetail = (output, context) => {
|
|
694
|
+
return {
|
|
695
|
+
Identifier: smithy_client_1.expectString(output.Identifier),
|
|
696
|
+
};
|
|
697
|
+
};
|
|
698
|
+
const deserializeAws_json1_1DimensionDetailList = (output, context) => {
|
|
699
|
+
return (output || [])
|
|
700
|
+
.filter((e) => e != null)
|
|
701
|
+
.map((entry) => {
|
|
702
|
+
if (entry === null) {
|
|
703
|
+
return null;
|
|
704
|
+
}
|
|
705
|
+
return deserializeAws_json1_1DimensionDetail(entry, context);
|
|
706
|
+
});
|
|
707
|
+
};
|
|
708
|
+
const deserializeAws_json1_1DimensionGroupDetail = (output, context) => {
|
|
709
|
+
return {
|
|
710
|
+
Dimensions: output.Dimensions !== undefined && output.Dimensions !== null
|
|
711
|
+
? deserializeAws_json1_1DimensionDetailList(output.Dimensions, context)
|
|
712
|
+
: undefined,
|
|
713
|
+
Group: smithy_client_1.expectString(output.Group),
|
|
714
|
+
};
|
|
715
|
+
};
|
|
716
|
+
const deserializeAws_json1_1DimensionGroupDetailList = (output, context) => {
|
|
717
|
+
return (output || [])
|
|
718
|
+
.filter((e) => e != null)
|
|
719
|
+
.map((entry) => {
|
|
720
|
+
if (entry === null) {
|
|
721
|
+
return null;
|
|
722
|
+
}
|
|
723
|
+
return deserializeAws_json1_1DimensionGroupDetail(entry, context);
|
|
724
|
+
});
|
|
725
|
+
};
|
|
403
726
|
const deserializeAws_json1_1DimensionKeyDescription = (output, context) => {
|
|
404
727
|
return {
|
|
728
|
+
AdditionalMetrics: output.AdditionalMetrics !== undefined && output.AdditionalMetrics !== null
|
|
729
|
+
? deserializeAws_json1_1AdditionalMetricsMap(output.AdditionalMetrics, context)
|
|
730
|
+
: undefined,
|
|
405
731
|
Dimensions: output.Dimensions !== undefined && output.Dimensions !== null
|
|
406
732
|
? deserializeAws_json1_1DimensionMap(output.Dimensions, context)
|
|
407
733
|
: undefined,
|
|
@@ -449,6 +775,22 @@ const deserializeAws_json1_1DimensionMap = (output, context) => {
|
|
|
449
775
|
};
|
|
450
776
|
}, {});
|
|
451
777
|
};
|
|
778
|
+
const deserializeAws_json1_1FeatureMetadata = (output, context) => {
|
|
779
|
+
return {
|
|
780
|
+
Status: smithy_client_1.expectString(output.Status),
|
|
781
|
+
};
|
|
782
|
+
};
|
|
783
|
+
const deserializeAws_json1_1FeatureMetadataMap = (output, context) => {
|
|
784
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
785
|
+
if (value === null) {
|
|
786
|
+
return acc;
|
|
787
|
+
}
|
|
788
|
+
return {
|
|
789
|
+
...acc,
|
|
790
|
+
[key]: deserializeAws_json1_1FeatureMetadata(value, context),
|
|
791
|
+
};
|
|
792
|
+
}, {});
|
|
793
|
+
};
|
|
452
794
|
const deserializeAws_json1_1GetDimensionKeyDetailsResponse = (output, context) => {
|
|
453
795
|
return {
|
|
454
796
|
Dimensions: output.Dimensions !== undefined && output.Dimensions !== null
|
|
@@ -456,6 +798,14 @@ const deserializeAws_json1_1GetDimensionKeyDetailsResponse = (output, context) =
|
|
|
456
798
|
: undefined,
|
|
457
799
|
};
|
|
458
800
|
};
|
|
801
|
+
const deserializeAws_json1_1GetResourceMetadataResponse = (output, context) => {
|
|
802
|
+
return {
|
|
803
|
+
Features: output.Features !== undefined && output.Features !== null
|
|
804
|
+
? deserializeAws_json1_1FeatureMetadataMap(output.Features, context)
|
|
805
|
+
: undefined,
|
|
806
|
+
Identifier: smithy_client_1.expectString(output.Identifier),
|
|
807
|
+
};
|
|
808
|
+
};
|
|
459
809
|
const deserializeAws_json1_1GetResourceMetricsResponse = (output, context) => {
|
|
460
810
|
return {
|
|
461
811
|
AlignedEndTime: output.AlignedEndTime !== undefined && output.AlignedEndTime !== null
|
|
@@ -481,6 +831,40 @@ const deserializeAws_json1_1InvalidArgumentException = (output, context) => {
|
|
|
481
831
|
Message: smithy_client_1.expectString(output.Message),
|
|
482
832
|
};
|
|
483
833
|
};
|
|
834
|
+
const deserializeAws_json1_1ListAvailableResourceDimensionsResponse = (output, context) => {
|
|
835
|
+
return {
|
|
836
|
+
MetricDimensions: output.MetricDimensions !== undefined && output.MetricDimensions !== null
|
|
837
|
+
? deserializeAws_json1_1MetricDimensionsList(output.MetricDimensions, context)
|
|
838
|
+
: undefined,
|
|
839
|
+
NextToken: smithy_client_1.expectString(output.NextToken),
|
|
840
|
+
};
|
|
841
|
+
};
|
|
842
|
+
const deserializeAws_json1_1ListAvailableResourceMetricsResponse = (output, context) => {
|
|
843
|
+
return {
|
|
844
|
+
Metrics: output.Metrics !== undefined && output.Metrics !== null
|
|
845
|
+
? deserializeAws_json1_1ResponseResourceMetricList(output.Metrics, context)
|
|
846
|
+
: undefined,
|
|
847
|
+
NextToken: smithy_client_1.expectString(output.NextToken),
|
|
848
|
+
};
|
|
849
|
+
};
|
|
850
|
+
const deserializeAws_json1_1MetricDimensionGroups = (output, context) => {
|
|
851
|
+
return {
|
|
852
|
+
Groups: output.Groups !== undefined && output.Groups !== null
|
|
853
|
+
? deserializeAws_json1_1DimensionGroupDetailList(output.Groups, context)
|
|
854
|
+
: undefined,
|
|
855
|
+
Metric: smithy_client_1.expectString(output.Metric),
|
|
856
|
+
};
|
|
857
|
+
};
|
|
858
|
+
const deserializeAws_json1_1MetricDimensionsList = (output, context) => {
|
|
859
|
+
return (output || [])
|
|
860
|
+
.filter((e) => e != null)
|
|
861
|
+
.map((entry) => {
|
|
862
|
+
if (entry === null) {
|
|
863
|
+
return null;
|
|
864
|
+
}
|
|
865
|
+
return deserializeAws_json1_1MetricDimensionGroups(entry, context);
|
|
866
|
+
});
|
|
867
|
+
};
|
|
484
868
|
const deserializeAws_json1_1MetricKeyDataPoints = (output, context) => {
|
|
485
869
|
return {
|
|
486
870
|
DataPoints: output.DataPoints !== undefined && output.DataPoints !== null
|
|
@@ -533,6 +917,13 @@ const deserializeAws_json1_1ResponsePartitionKeyList = (output, context) => {
|
|
|
533
917
|
return deserializeAws_json1_1ResponsePartitionKey(entry, context);
|
|
534
918
|
});
|
|
535
919
|
};
|
|
920
|
+
const deserializeAws_json1_1ResponseResourceMetric = (output, context) => {
|
|
921
|
+
return {
|
|
922
|
+
Description: smithy_client_1.expectString(output.Description),
|
|
923
|
+
Metric: smithy_client_1.expectString(output.Metric),
|
|
924
|
+
Unit: smithy_client_1.expectString(output.Unit),
|
|
925
|
+
};
|
|
926
|
+
};
|
|
536
927
|
const deserializeAws_json1_1ResponseResourceMetricKey = (output, context) => {
|
|
537
928
|
return {
|
|
538
929
|
Dimensions: output.Dimensions !== undefined && output.Dimensions !== null
|
|
@@ -541,6 +932,16 @@ const deserializeAws_json1_1ResponseResourceMetricKey = (output, context) => {
|
|
|
541
932
|
Metric: smithy_client_1.expectString(output.Metric),
|
|
542
933
|
};
|
|
543
934
|
};
|
|
935
|
+
const deserializeAws_json1_1ResponseResourceMetricList = (output, context) => {
|
|
936
|
+
return (output || [])
|
|
937
|
+
.filter((e) => e != null)
|
|
938
|
+
.map((entry) => {
|
|
939
|
+
if (entry === null) {
|
|
940
|
+
return null;
|
|
941
|
+
}
|
|
942
|
+
return deserializeAws_json1_1ResponseResourceMetric(entry, context);
|
|
943
|
+
});
|
|
944
|
+
};
|
|
544
945
|
const deserializeMetadata = (output) => {
|
|
545
946
|
var _a;
|
|
546
947
|
return ({
|
|
@@ -13,13 +13,18 @@ const util_body_length_browser_1 = require("@aws-sdk/util-body-length-browser");
|
|
|
13
13
|
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
|
14
14
|
const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
|
|
15
15
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
16
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
17
|
+
const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
|
|
16
18
|
const getRuntimeConfig = (config) => {
|
|
17
19
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
20
|
+
const defaultsMode = util_defaults_mode_browser_1.resolveDefaultsModeConfig(config);
|
|
21
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
18
22
|
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
|
|
19
23
|
return {
|
|
20
24
|
...clientSharedValues,
|
|
21
25
|
...config,
|
|
22
26
|
runtime: "browser",
|
|
27
|
+
defaultsMode,
|
|
23
28
|
base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_browser_1.fromBase64,
|
|
24
29
|
base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_browser_1.toBase64,
|
|
25
30
|
bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_browser_1.calculateBodyLength,
|
|
@@ -27,8 +32,8 @@ const getRuntimeConfig = (config) => {
|
|
|
27
32
|
defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_browser_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
28
33
|
maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
29
34
|
region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalid_dependency_1.invalidProvider("Region is missing"),
|
|
30
|
-
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(),
|
|
31
|
-
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (() =>
|
|
35
|
+
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
|
|
36
|
+
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
|
|
32
37
|
sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : sha256_browser_1.Sha256,
|
|
33
38
|
streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : fetch_http_handler_1.streamCollector,
|
|
34
39
|
useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
@@ -15,13 +15,18 @@ const util_body_length_node_1 = require("@aws-sdk/util-body-length-node");
|
|
|
15
15
|
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
16
16
|
const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
|
|
17
17
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
18
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
19
|
+
const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
|
|
18
20
|
const getRuntimeConfig = (config) => {
|
|
19
21
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
22
|
+
const defaultsMode = util_defaults_mode_node_1.resolveDefaultsModeConfig(config);
|
|
23
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
20
24
|
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
|
|
21
25
|
return {
|
|
22
26
|
...clientSharedValues,
|
|
23
27
|
...config,
|
|
24
28
|
runtime: "node",
|
|
29
|
+
defaultsMode,
|
|
25
30
|
base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
|
|
26
31
|
base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
|
|
27
32
|
bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
|
|
@@ -29,8 +34,11 @@ const getRuntimeConfig = (config) => {
|
|
|
29
34
|
defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
30
35
|
maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
31
36
|
region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
32
|
-
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),
|
|
33
|
-
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(
|
|
37
|
+
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
|
|
38
|
+
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig({
|
|
39
|
+
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
40
|
+
default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
|
|
41
|
+
}),
|
|
34
42
|
sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
|
|
35
43
|
streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
|
|
36
44
|
useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
package/dist-es/PI.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
2
|
import { DescribeDimensionKeysCommand, } from "./commands/DescribeDimensionKeysCommand";
|
|
3
3
|
import { GetDimensionKeyDetailsCommand, } from "./commands/GetDimensionKeyDetailsCommand";
|
|
4
|
+
import { GetResourceMetadataCommand, } from "./commands/GetResourceMetadataCommand";
|
|
4
5
|
import { GetResourceMetricsCommand, } from "./commands/GetResourceMetricsCommand";
|
|
6
|
+
import { ListAvailableResourceDimensionsCommand, } from "./commands/ListAvailableResourceDimensionsCommand";
|
|
7
|
+
import { ListAvailableResourceMetricsCommand, } from "./commands/ListAvailableResourceMetricsCommand";
|
|
5
8
|
import { PIClient } from "./PIClient";
|
|
6
9
|
var PI = (function (_super) {
|
|
7
10
|
__extends(PI, _super);
|
|
@@ -36,6 +39,20 @@ var PI = (function (_super) {
|
|
|
36
39
|
return this.send(command, optionsOrCb);
|
|
37
40
|
}
|
|
38
41
|
};
|
|
42
|
+
PI.prototype.getResourceMetadata = function (args, optionsOrCb, cb) {
|
|
43
|
+
var command = new GetResourceMetadataCommand(args);
|
|
44
|
+
if (typeof optionsOrCb === "function") {
|
|
45
|
+
this.send(command, optionsOrCb);
|
|
46
|
+
}
|
|
47
|
+
else if (typeof cb === "function") {
|
|
48
|
+
if (typeof optionsOrCb !== "object")
|
|
49
|
+
throw new Error("Expect http options but get " + typeof optionsOrCb);
|
|
50
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
return this.send(command, optionsOrCb);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
39
56
|
PI.prototype.getResourceMetrics = function (args, optionsOrCb, cb) {
|
|
40
57
|
var command = new GetResourceMetricsCommand(args);
|
|
41
58
|
if (typeof optionsOrCb === "function") {
|
|
@@ -50,6 +67,34 @@ var PI = (function (_super) {
|
|
|
50
67
|
return this.send(command, optionsOrCb);
|
|
51
68
|
}
|
|
52
69
|
};
|
|
70
|
+
PI.prototype.listAvailableResourceDimensions = function (args, optionsOrCb, cb) {
|
|
71
|
+
var command = new ListAvailableResourceDimensionsCommand(args);
|
|
72
|
+
if (typeof optionsOrCb === "function") {
|
|
73
|
+
this.send(command, optionsOrCb);
|
|
74
|
+
}
|
|
75
|
+
else if (typeof cb === "function") {
|
|
76
|
+
if (typeof optionsOrCb !== "object")
|
|
77
|
+
throw new Error("Expect http options but get " + typeof optionsOrCb);
|
|
78
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
return this.send(command, optionsOrCb);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
PI.prototype.listAvailableResourceMetrics = function (args, optionsOrCb, cb) {
|
|
85
|
+
var command = new ListAvailableResourceMetricsCommand(args);
|
|
86
|
+
if (typeof optionsOrCb === "function") {
|
|
87
|
+
this.send(command, optionsOrCb);
|
|
88
|
+
}
|
|
89
|
+
else if (typeof cb === "function") {
|
|
90
|
+
if (typeof optionsOrCb !== "object")
|
|
91
|
+
throw new Error("Expect http options but get " + typeof optionsOrCb);
|
|
92
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
return this.send(command, optionsOrCb);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
53
98
|
return PI;
|
|
54
99
|
}(PIClient));
|
|
55
100
|
export { PI };
|