@aws-sdk/client-synthetics 3.51.0 → 3.52.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 CHANGED
@@ -3,6 +3,17 @@
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.52.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.51.0...v3.52.0) (2022-02-18)
7
+
8
+
9
+ ### Features
10
+
11
+ * **clients:** update clients as of 2022/02/18 ([#3335](https://github.com/aws/aws-sdk-js-v3/issues/3335)) ([717b06f](https://github.com/aws/aws-sdk-js-v3/commit/717b06fc43e9876a6f8040147b75ad5da38b1e0f))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.51.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.50.0...v3.51.0) (2022-02-12)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/client-synthetics
@@ -86,6 +86,8 @@ const serializeAws_restJson1DescribeCanariesCommand = async (input, context) =>
86
86
  let body;
87
87
  body = JSON.stringify({
88
88
  ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
89
+ ...(input.Names !== undefined &&
90
+ input.Names !== null && { Names: serializeAws_restJson1DescribeCanariesNameFilter(input.Names, context) }),
89
91
  ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
90
92
  });
91
93
  return new protocol_http_1.HttpRequest({
@@ -108,6 +110,8 @@ const serializeAws_restJson1DescribeCanariesLastRunCommand = async (input, conte
108
110
  let body;
109
111
  body = JSON.stringify({
110
112
  ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
113
+ ...(input.Names !== undefined &&
114
+ input.Names !== null && { Names: serializeAws_restJson1DescribeCanariesLastRunNameFilter(input.Names, context) }),
111
115
  ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
112
116
  });
113
117
  return new protocol_http_1.HttpRequest({
@@ -432,6 +436,14 @@ const deserializeAws_restJson1CreateCanaryCommandError = async (output, context)
432
436
  $metadata: deserializeMetadata(output),
433
437
  };
434
438
  break;
439
+ case "RequestEntityTooLargeException":
440
+ case "com.amazonaws.synthetics#RequestEntityTooLargeException":
441
+ response = {
442
+ ...(await deserializeAws_restJson1RequestEntityTooLargeExceptionResponse(parsedOutput, context)),
443
+ name: errorCode,
444
+ $metadata: deserializeMetadata(output),
445
+ };
446
+ break;
435
447
  case "ValidationException":
436
448
  case "com.amazonaws.synthetics#ValidationException":
437
449
  response = {
@@ -1184,6 +1196,14 @@ const deserializeAws_restJson1UpdateCanaryCommandError = async (output, context)
1184
1196
  $metadata: deserializeMetadata(output),
1185
1197
  };
1186
1198
  break;
1199
+ case "RequestEntityTooLargeException":
1200
+ case "com.amazonaws.synthetics#RequestEntityTooLargeException":
1201
+ response = {
1202
+ ...(await deserializeAws_restJson1RequestEntityTooLargeExceptionResponse(parsedOutput, context)),
1203
+ name: errorCode,
1204
+ $metadata: deserializeMetadata(output),
1205
+ };
1206
+ break;
1187
1207
  case "ResourceNotFoundException":
1188
1208
  case "com.amazonaws.synthetics#ResourceNotFoundException":
1189
1209
  response = {
@@ -1242,6 +1262,19 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
1242
1262
  }
1243
1263
  return contents;
1244
1264
  };
1265
+ const deserializeAws_restJson1RequestEntityTooLargeExceptionResponse = async (parsedOutput, context) => {
1266
+ const contents = {
1267
+ name: "RequestEntityTooLargeException",
1268
+ $fault: "client",
1269
+ $metadata: deserializeMetadata(parsedOutput),
1270
+ Message: undefined,
1271
+ };
1272
+ const data = parsedOutput.body;
1273
+ if (data.Message !== undefined && data.Message !== null) {
1274
+ contents.Message = smithy_client_1.expectString(data.Message);
1275
+ }
1276
+ return contents;
1277
+ };
1245
1278
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
1246
1279
  const contents = {
1247
1280
  name: "ResourceNotFoundException",
@@ -1334,6 +1367,26 @@ const serializeAws_restJson1CanaryScheduleInput = (input, context) => {
1334
1367
  ...(input.Expression !== undefined && input.Expression !== null && { Expression: input.Expression }),
1335
1368
  };
1336
1369
  };
1370
+ const serializeAws_restJson1DescribeCanariesLastRunNameFilter = (input, context) => {
1371
+ return input
1372
+ .filter((e) => e != null)
1373
+ .map((entry) => {
1374
+ if (entry === null) {
1375
+ return null;
1376
+ }
1377
+ return entry;
1378
+ });
1379
+ };
1380
+ const serializeAws_restJson1DescribeCanariesNameFilter = (input, context) => {
1381
+ return input
1382
+ .filter((e) => e != null)
1383
+ .map((entry) => {
1384
+ if (entry === null) {
1385
+ return null;
1386
+ }
1387
+ return entry;
1388
+ });
1389
+ };
1337
1390
  const serializeAws_restJson1EnvironmentVariablesMap = (input, context) => {
1338
1391
  return Object.entries(input).reduce((acc, [key, value]) => {
1339
1392
  if (value === null) {
@@ -83,7 +83,8 @@ export var serializeAws_restJson1DescribeCanariesCommand = function (input, cont
83
83
  "content-type": "application/json",
84
84
  };
85
85
  resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/canaries";
86
- body = JSON.stringify(__assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })));
86
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.Names !== undefined &&
87
+ input.Names !== null && { Names: serializeAws_restJson1DescribeCanariesNameFilter(input.Names, context) })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })));
87
88
  return [2, new __HttpRequest({
88
89
  protocol: protocol,
89
90
  hostname: hostname,
@@ -107,7 +108,8 @@ export var serializeAws_restJson1DescribeCanariesLastRunCommand = function (inpu
107
108
  "content-type": "application/json",
108
109
  };
109
110
  resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/canaries/last-run";
110
- body = JSON.stringify(__assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })));
111
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.Names !== undefined &&
112
+ input.Names !== null && { Names: serializeAws_restJson1DescribeCanariesLastRunNameFilter(input.Names, context) })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })));
111
113
  return [2, new __HttpRequest({
112
114
  protocol: protocol,
113
115
  hostname: hostname,
@@ -447,44 +449,52 @@ export var deserializeAws_restJson1CreateCanaryCommand = function (output, conte
447
449
  });
448
450
  }); };
449
451
  var deserializeAws_restJson1CreateCanaryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
450
- var parsedOutput, _a, response, errorCode, _b, _c, _d, parsedBody, message;
451
- var _e;
452
- return __generator(this, function (_f) {
453
- switch (_f.label) {
452
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
453
+ var _f;
454
+ return __generator(this, function (_g) {
455
+ switch (_g.label) {
454
456
  case 0:
455
457
  _a = [__assign({}, output)];
456
- _e = {};
458
+ _f = {};
457
459
  return [4, parseBody(output.body, context)];
458
460
  case 1:
459
- parsedOutput = __assign.apply(void 0, _a.concat([(_e.body = _f.sent(), _e)]));
461
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
460
462
  errorCode = "UnknownError";
461
463
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
462
464
  _b = errorCode;
463
465
  switch (_b) {
464
466
  case "InternalServerException": return [3, 2];
465
467
  case "com.amazonaws.synthetics#InternalServerException": return [3, 2];
466
- case "ValidationException": return [3, 4];
467
- case "com.amazonaws.synthetics#ValidationException": return [3, 4];
468
+ case "RequestEntityTooLargeException": return [3, 4];
469
+ case "com.amazonaws.synthetics#RequestEntityTooLargeException": return [3, 4];
470
+ case "ValidationException": return [3, 6];
471
+ case "com.amazonaws.synthetics#ValidationException": return [3, 6];
468
472
  }
469
- return [3, 6];
473
+ return [3, 8];
470
474
  case 2:
471
475
  _c = [{}];
472
476
  return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
473
477
  case 3:
474
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
475
- return [3, 7];
478
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
479
+ return [3, 9];
476
480
  case 4:
477
481
  _d = [{}];
478
- return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
482
+ return [4, deserializeAws_restJson1RequestEntityTooLargeExceptionResponse(parsedOutput, context)];
479
483
  case 5:
480
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
481
- return [3, 7];
484
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
485
+ return [3, 9];
482
486
  case 6:
487
+ _e = [{}];
488
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
489
+ case 7:
490
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
491
+ return [3, 9];
492
+ case 8:
483
493
  parsedBody = parsedOutput.body;
484
494
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
485
495
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
486
- _f.label = 7;
487
- case 7:
496
+ _g.label = 9;
497
+ case 9:
488
498
  message = response.message || response.Message || errorCode;
489
499
  response.message = message;
490
500
  delete response.Message;
@@ -1347,16 +1357,16 @@ export var deserializeAws_restJson1UpdateCanaryCommand = function (output, conte
1347
1357
  });
1348
1358
  }); };
1349
1359
  var deserializeAws_restJson1UpdateCanaryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1350
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
1351
- var _g;
1352
- return __generator(this, function (_h) {
1353
- switch (_h.label) {
1360
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
1361
+ var _h;
1362
+ return __generator(this, function (_j) {
1363
+ switch (_j.label) {
1354
1364
  case 0:
1355
1365
  _a = [__assign({}, output)];
1356
- _g = {};
1366
+ _h = {};
1357
1367
  return [4, parseBody(output.body, context)];
1358
1368
  case 1:
1359
- parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
1369
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
1360
1370
  errorCode = "UnknownError";
1361
1371
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1362
1372
  _b = errorCode;
@@ -1365,42 +1375,50 @@ var deserializeAws_restJson1UpdateCanaryCommandError = function (output, context
1365
1375
  case "com.amazonaws.synthetics#ConflictException": return [3, 2];
1366
1376
  case "InternalServerException": return [3, 4];
1367
1377
  case "com.amazonaws.synthetics#InternalServerException": return [3, 4];
1368
- case "ResourceNotFoundException": return [3, 6];
1369
- case "com.amazonaws.synthetics#ResourceNotFoundException": return [3, 6];
1370
- case "ValidationException": return [3, 8];
1371
- case "com.amazonaws.synthetics#ValidationException": return [3, 8];
1378
+ case "RequestEntityTooLargeException": return [3, 6];
1379
+ case "com.amazonaws.synthetics#RequestEntityTooLargeException": return [3, 6];
1380
+ case "ResourceNotFoundException": return [3, 8];
1381
+ case "com.amazonaws.synthetics#ResourceNotFoundException": return [3, 8];
1382
+ case "ValidationException": return [3, 10];
1383
+ case "com.amazonaws.synthetics#ValidationException": return [3, 10];
1372
1384
  }
1373
- return [3, 10];
1385
+ return [3, 12];
1374
1386
  case 2:
1375
1387
  _c = [{}];
1376
1388
  return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
1377
1389
  case 3:
1378
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1379
- return [3, 11];
1390
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1391
+ return [3, 13];
1380
1392
  case 4:
1381
1393
  _d = [{}];
1382
1394
  return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1383
1395
  case 5:
1384
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1385
- return [3, 11];
1396
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1397
+ return [3, 13];
1386
1398
  case 6:
1387
1399
  _e = [{}];
1388
- return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1400
+ return [4, deserializeAws_restJson1RequestEntityTooLargeExceptionResponse(parsedOutput, context)];
1389
1401
  case 7:
1390
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1391
- return [3, 11];
1402
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1403
+ return [3, 13];
1392
1404
  case 8:
1393
1405
  _f = [{}];
1394
- return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1406
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1395
1407
  case 9:
1396
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1397
- return [3, 11];
1408
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1409
+ return [3, 13];
1398
1410
  case 10:
1411
+ _g = [{}];
1412
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1413
+ case 11:
1414
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1415
+ return [3, 13];
1416
+ case 12:
1399
1417
  parsedBody = parsedOutput.body;
1400
1418
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
1401
1419
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1402
- _h.label = 11;
1403
- case 11:
1420
+ _j.label = 13;
1421
+ case 13:
1404
1422
  message = response.message || response.Message || errorCode;
1405
1423
  response.message = message;
1406
1424
  delete response.Message;
@@ -1440,6 +1458,22 @@ var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOu
1440
1458
  return [2, contents];
1441
1459
  });
1442
1460
  }); };
1461
+ var deserializeAws_restJson1RequestEntityTooLargeExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1462
+ var contents, data;
1463
+ return __generator(this, function (_a) {
1464
+ contents = {
1465
+ name: "RequestEntityTooLargeException",
1466
+ $fault: "client",
1467
+ $metadata: deserializeMetadata(parsedOutput),
1468
+ Message: undefined,
1469
+ };
1470
+ data = parsedOutput.body;
1471
+ if (data.Message !== undefined && data.Message !== null) {
1472
+ contents.Message = __expectString(data.Message);
1473
+ }
1474
+ return [2, contents];
1475
+ });
1476
+ }); };
1443
1477
  var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1444
1478
  var contents, data;
1445
1479
  return __generator(this, function (_a) {
@@ -1519,6 +1553,26 @@ var serializeAws_restJson1CanaryScheduleInput = function (input, context) {
1519
1553
  return __assign(__assign({}, (input.DurationInSeconds !== undefined &&
1520
1554
  input.DurationInSeconds !== null && { DurationInSeconds: input.DurationInSeconds })), (input.Expression !== undefined && input.Expression !== null && { Expression: input.Expression }));
1521
1555
  };
1556
+ var serializeAws_restJson1DescribeCanariesLastRunNameFilter = function (input, context) {
1557
+ return input
1558
+ .filter(function (e) { return e != null; })
1559
+ .map(function (entry) {
1560
+ if (entry === null) {
1561
+ return null;
1562
+ }
1563
+ return entry;
1564
+ });
1565
+ };
1566
+ var serializeAws_restJson1DescribeCanariesNameFilter = function (input, context) {
1567
+ return input
1568
+ .filter(function (e) { return e != null; })
1569
+ .map(function (entry) {
1570
+ if (entry === null) {
1571
+ return null;
1572
+ }
1573
+ return entry;
1574
+ });
1575
+ };
1522
1576
  var serializeAws_restJson1EnvironmentVariablesMap = function (input, context) {
1523
1577
  return Object.entries(input).reduce(function (acc, _a) {
1524
1578
  var _b;
@@ -94,16 +94,29 @@ export declare class Synthetics extends SyntheticsClient {
94
94
  /**
95
95
  * <p>This operation returns a list of the canaries in your account, along with full details
96
96
  * about each canary.</p>
97
- * <p>This operation does not have resource-level authorization, so if a user is able to use
98
- * <code>DescribeCanaries</code>, the user can see all of the canaries in the account. A
99
- * deny policy can only be used to restrict access to all canaries. It cannot be used on
100
- * specific resources. </p>
97
+ * <p>This operation supports resource-level authorization using an IAM policy and
98
+ * the <code>Names</code> parameter. If you specify the <code>Names</code> parameter, the operation is successful only if you have authorization to view
99
+ * all the canaries that you specify in your request. If you do not have permission to view any of
100
+ * the canaries, the request fails with a 403 response.</p>
101
+ * <p>You are required to use the <code>Names</code> parameter if you are logged on to a user or role that has an
102
+ * IAM policy that restricts which canaries that you are allowed to view. For more information,
103
+ * see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Restricted.html">
104
+ * Limiting a user to viewing specific canaries</a>.</p>
101
105
  */
102
106
  describeCanaries(args: DescribeCanariesCommandInput, options?: __HttpHandlerOptions): Promise<DescribeCanariesCommandOutput>;
103
107
  describeCanaries(args: DescribeCanariesCommandInput, cb: (err: any, data?: DescribeCanariesCommandOutput) => void): void;
104
108
  describeCanaries(args: DescribeCanariesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeCanariesCommandOutput) => void): void;
105
109
  /**
106
110
  * <p>Use this operation to see information from the most recent run of each canary that you have created.</p>
111
+ *
112
+ * <p>This operation supports resource-level authorization using an IAM policy and
113
+ * the <code>Names</code> parameter. If you specify the <code>Names</code> parameter, the operation is successful only if you have authorization to view
114
+ * all the canaries that you specify in your request. If you do not have permission to view any of
115
+ * the canaries, the request fails with a 403 response.</p>
116
+ * <p>You are required to use the <code>Names</code> parameter if you are logged on to a user or role that has an
117
+ * IAM policy that restricts which canaries that you are allowed to view. For more information,
118
+ * see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Restricted.html">
119
+ * Limiting a user to viewing specific canaries</a>.</p>
107
120
  */
108
121
  describeCanariesLastRun(args: DescribeCanariesLastRunCommandInput, options?: __HttpHandlerOptions): Promise<DescribeCanariesLastRunCommandOutput>;
109
122
  describeCanariesLastRun(args: DescribeCanariesLastRunCommandInput, cb: (err: any, data?: DescribeCanariesLastRunCommandOutput) => void): void;
@@ -9,10 +9,14 @@ export interface DescribeCanariesCommandOutput extends DescribeCanariesResponse,
9
9
  /**
10
10
  * <p>This operation returns a list of the canaries in your account, along with full details
11
11
  * about each canary.</p>
12
- * <p>This operation does not have resource-level authorization, so if a user is able to use
13
- * <code>DescribeCanaries</code>, the user can see all of the canaries in the account. A
14
- * deny policy can only be used to restrict access to all canaries. It cannot be used on
15
- * specific resources. </p>
12
+ * <p>This operation supports resource-level authorization using an IAM policy and
13
+ * the <code>Names</code> parameter. If you specify the <code>Names</code> parameter, the operation is successful only if you have authorization to view
14
+ * all the canaries that you specify in your request. If you do not have permission to view any of
15
+ * the canaries, the request fails with a 403 response.</p>
16
+ * <p>You are required to use the <code>Names</code> parameter if you are logged on to a user or role that has an
17
+ * IAM policy that restricts which canaries that you are allowed to view. For more information,
18
+ * see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Restricted.html">
19
+ * Limiting a user to viewing specific canaries</a>.</p>
16
20
  * @example
17
21
  * Use a bare-bones client and the command you need to make an API call.
18
22
  * ```javascript
@@ -8,6 +8,15 @@ export interface DescribeCanariesLastRunCommandOutput extends DescribeCanariesLa
8
8
  }
9
9
  /**
10
10
  * <p>Use this operation to see information from the most recent run of each canary that you have created.</p>
11
+ *
12
+ * <p>This operation supports resource-level authorization using an IAM policy and
13
+ * the <code>Names</code> parameter. If you specify the <code>Names</code> parameter, the operation is successful only if you have authorization to view
14
+ * all the canaries that you specify in your request. If you do not have permission to view any of
15
+ * the canaries, the request fails with a 403 response.</p>
16
+ * <p>You are required to use the <code>Names</code> parameter if you are logged on to a user or role that has an
17
+ * IAM policy that restricts which canaries that you are allowed to view. For more information,
18
+ * see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Restricted.html">
19
+ * Limiting a user to viewing specific canaries</a>.</p>
11
20
  * @example
12
21
  * Use a bare-bones client and the command you need to make an API call.
13
22
  * ```javascript
@@ -503,7 +503,9 @@ export interface CanaryCodeInput {
503
503
  /**
504
504
  * <p>If you input your canary script directly into the canary instead of referring to an S3
505
505
  * location, the value of this parameter is the base64-encoded contents of the .zip file that
506
- * contains the script. It must be smaller than 256 Kb.</p>
506
+ * contains the script. It must be smaller than 225 Kb.</p>
507
+ * <p>For large canary scripts, we recommend that you use an S3 location instead of inputting it
508
+ * directly with this parameter.</p>
507
509
  */
508
510
  ZipFile?: Uint8Array;
509
511
  /**
@@ -772,6 +774,14 @@ export interface InternalServerException extends __SmithyException, $MetadataBea
772
774
  $fault: "server";
773
775
  Message?: string;
774
776
  }
777
+ /**
778
+ * <p>One of the input resources is larger than is allowed.</p>
779
+ */
780
+ export interface RequestEntityTooLargeException extends __SmithyException, $MetadataBearer {
781
+ name: "RequestEntityTooLargeException";
782
+ $fault: "client";
783
+ Message?: string;
784
+ }
775
785
  /**
776
786
  * <p>A parameter could not be validated.</p>
777
787
  */
@@ -820,6 +830,18 @@ export interface DescribeCanariesRequest {
820
830
  * the <code>DescribeCanaries</code> operation. If you omit this parameter, the default of 100 is used.</p>
821
831
  */
822
832
  MaxResults?: number;
833
+ /**
834
+ * <p>Use this parameter to return only canaries that match the names that you specify here. You can
835
+ * specify as many as five canary names.</p>
836
+ * <p>If you specify this parameter, the operation is successful only if you have authorization to view
837
+ * all the canaries that you specify in your request. If you do not have permission to view any of
838
+ * the canaries, the request fails with a 403 response.</p>
839
+ * <p>You are required to use this parameter if you are logged on to a user or role that has an
840
+ * IAM policy that restricts which canaries that you are allowed to view. For more information,
841
+ * see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Restricted.html">
842
+ * Limiting a user to viewing specific canaries</a>.</p>
843
+ */
844
+ Names?: string[];
823
845
  }
824
846
  export declare namespace DescribeCanariesRequest {
825
847
  /**
@@ -858,6 +880,18 @@ export interface DescribeCanariesLastRunRequest {
858
880
  * the <code>DescribeLastRun</code> operation. If you omit this parameter, the default of 100 is used.</p>
859
881
  */
860
882
  MaxResults?: number;
883
+ /**
884
+ * <p>Use this parameter to return only canaries that match the names that you specify here. You can
885
+ * specify as many as five canary names.</p>
886
+ * <p>If you specify this parameter, the operation is successful only if you have authorization to view
887
+ * all the canaries that you specify in your request. If you do not have permission to view any of
888
+ * the canaries, the request fails with a 403 response.</p>
889
+ * <p>You are required to use the <code>Names</code> parameter if you are logged on to a user or role that has an
890
+ * IAM policy that restricts which canaries that you are allowed to view. For more information,
891
+ * see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Restricted.html">
892
+ * Limiting a user to viewing specific canaries</a>.</p>
893
+ */
894
+ Names?: string[];
861
895
  }
862
896
  export declare namespace DescribeCanariesLastRunRequest {
863
897
  /**
@@ -357,6 +357,12 @@ export interface InternalServerException extends __SmithyException, $MetadataBea
357
357
  Message?: string;
358
358
  }
359
359
 
360
+ export interface RequestEntityTooLargeException extends __SmithyException, $MetadataBearer {
361
+ name: "RequestEntityTooLargeException";
362
+ $fault: "client";
363
+ Message?: string;
364
+ }
365
+
360
366
  export interface ValidationException extends __SmithyException, $MetadataBearer {
361
367
  name: "ValidationException";
362
368
  $fault: "client";
@@ -387,6 +393,8 @@ export interface DescribeCanariesRequest {
387
393
  NextToken?: string;
388
394
 
389
395
  MaxResults?: number;
396
+
397
+ Names?: string[];
390
398
  }
391
399
  export declare namespace DescribeCanariesRequest {
392
400
 
@@ -407,6 +415,8 @@ export interface DescribeCanariesLastRunRequest {
407
415
  NextToken?: string;
408
416
 
409
417
  MaxResults?: number;
418
+
419
+ Names?: string[];
410
420
  }
411
421
  export declare namespace DescribeCanariesLastRunRequest {
412
422
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-synthetics",
3
3
  "description": "AWS SDK for JavaScript Synthetics Client for Node.js, Browser and React Native",
4
- "version": "3.51.0",
4
+ "version": "3.52.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -9,7 +9,7 @@
9
9
  "build:es": "tsc -p tsconfig.es.json",
10
10
  "build:types": "tsc -p tsconfig.types.json",
11
11
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
12
- "clean": "rimraf ./dist-*"
12
+ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo"
13
13
  },
14
14
  "main": "./dist-cjs/index.js",
15
15
  "types": "./dist-types/index.d.ts",
@@ -18,40 +18,40 @@
18
18
  "dependencies": {
19
19
  "@aws-crypto/sha256-browser": "2.0.0",
20
20
  "@aws-crypto/sha256-js": "2.0.0",
21
- "@aws-sdk/client-sts": "3.51.0",
22
- "@aws-sdk/config-resolver": "3.51.0",
23
- "@aws-sdk/credential-provider-node": "3.51.0",
24
- "@aws-sdk/fetch-http-handler": "3.50.0",
25
- "@aws-sdk/hash-node": "3.50.0",
26
- "@aws-sdk/invalid-dependency": "3.50.0",
27
- "@aws-sdk/middleware-content-length": "3.50.0",
28
- "@aws-sdk/middleware-host-header": "3.50.0",
29
- "@aws-sdk/middleware-logger": "3.50.0",
30
- "@aws-sdk/middleware-retry": "3.51.0",
31
- "@aws-sdk/middleware-serde": "3.50.0",
32
- "@aws-sdk/middleware-signing": "3.50.0",
33
- "@aws-sdk/middleware-stack": "3.50.0",
34
- "@aws-sdk/middleware-user-agent": "3.50.0",
35
- "@aws-sdk/node-config-provider": "3.51.0",
36
- "@aws-sdk/node-http-handler": "3.50.0",
37
- "@aws-sdk/protocol-http": "3.50.0",
38
- "@aws-sdk/smithy-client": "3.50.0",
39
- "@aws-sdk/types": "3.50.0",
40
- "@aws-sdk/url-parser": "3.50.0",
41
- "@aws-sdk/util-base64-browser": "3.49.0",
42
- "@aws-sdk/util-base64-node": "3.49.0",
43
- "@aws-sdk/util-body-length-browser": "3.49.0",
44
- "@aws-sdk/util-body-length-node": "3.49.0",
45
- "@aws-sdk/util-defaults-mode-browser": "3.50.0",
46
- "@aws-sdk/util-defaults-mode-node": "3.51.0",
47
- "@aws-sdk/util-user-agent-browser": "3.50.0",
48
- "@aws-sdk/util-user-agent-node": "3.51.0",
49
- "@aws-sdk/util-utf8-browser": "3.49.0",
50
- "@aws-sdk/util-utf8-node": "3.49.0",
21
+ "@aws-sdk/client-sts": "3.52.0",
22
+ "@aws-sdk/config-resolver": "3.52.0",
23
+ "@aws-sdk/credential-provider-node": "3.52.0",
24
+ "@aws-sdk/fetch-http-handler": "3.52.0",
25
+ "@aws-sdk/hash-node": "3.52.0",
26
+ "@aws-sdk/invalid-dependency": "3.52.0",
27
+ "@aws-sdk/middleware-content-length": "3.52.0",
28
+ "@aws-sdk/middleware-host-header": "3.52.0",
29
+ "@aws-sdk/middleware-logger": "3.52.0",
30
+ "@aws-sdk/middleware-retry": "3.52.0",
31
+ "@aws-sdk/middleware-serde": "3.52.0",
32
+ "@aws-sdk/middleware-signing": "3.52.0",
33
+ "@aws-sdk/middleware-stack": "3.52.0",
34
+ "@aws-sdk/middleware-user-agent": "3.52.0",
35
+ "@aws-sdk/node-config-provider": "3.52.0",
36
+ "@aws-sdk/node-http-handler": "3.52.0",
37
+ "@aws-sdk/protocol-http": "3.52.0",
38
+ "@aws-sdk/smithy-client": "3.52.0",
39
+ "@aws-sdk/types": "3.52.0",
40
+ "@aws-sdk/url-parser": "3.52.0",
41
+ "@aws-sdk/util-base64-browser": "3.52.0",
42
+ "@aws-sdk/util-base64-node": "3.52.0",
43
+ "@aws-sdk/util-body-length-browser": "3.52.0",
44
+ "@aws-sdk/util-body-length-node": "3.52.0",
45
+ "@aws-sdk/util-defaults-mode-browser": "3.52.0",
46
+ "@aws-sdk/util-defaults-mode-node": "3.52.0",
47
+ "@aws-sdk/util-user-agent-browser": "3.52.0",
48
+ "@aws-sdk/util-user-agent-node": "3.52.0",
49
+ "@aws-sdk/util-utf8-browser": "3.52.0",
50
+ "@aws-sdk/util-utf8-node": "3.52.0",
51
51
  "tslib": "^2.3.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@aws-sdk/service-client-documentation-generator": "3.49.0",
54
+ "@aws-sdk/service-client-documentation-generator": "3.52.0",
55
55
  "@tsconfig/recommended": "1.0.1",
56
56
  "@types/node": "^12.7.5",
57
57
  "concurrently": "7.0.0",