@aws-sdk/client-fis 3.637.0 → 3.649.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.
Files changed (35) hide show
  1. package/README.md +16 -0
  2. package/dist-cjs/endpoint/endpointResolver.js +6 -2
  3. package/dist-cjs/index.js +106 -1
  4. package/dist-es/Fis.js +4 -0
  5. package/dist-es/commands/GetSafetyLeverCommand.js +24 -0
  6. package/dist-es/commands/UpdateSafetyLeverStateCommand.js +24 -0
  7. package/dist-es/commands/index.js +2 -0
  8. package/dist-es/endpoint/endpointResolver.js +7 -3
  9. package/dist-es/models/models_0.js +10 -0
  10. package/dist-es/protocols/Aws_restJson1.js +51 -0
  11. package/dist-types/Fis.d.ts +14 -0
  12. package/dist-types/FisClient.d.ts +4 -2
  13. package/dist-types/commands/GetExperimentCommand.d.ts +1 -1
  14. package/dist-types/commands/GetSafetyLeverCommand.d.ts +72 -0
  15. package/dist-types/commands/ListExperimentsCommand.d.ts +1 -1
  16. package/dist-types/commands/StartExperimentCommand.d.ts +1 -1
  17. package/dist-types/commands/StopExperimentCommand.d.ts +1 -1
  18. package/dist-types/commands/UpdateSafetyLeverStateCommand.d.ts +82 -0
  19. package/dist-types/commands/index.d.ts +2 -0
  20. package/dist-types/models/models_0.d.ts +154 -0
  21. package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
  22. package/dist-types/runtimeConfig.browser.d.ts +2 -0
  23. package/dist-types/runtimeConfig.d.ts +2 -0
  24. package/dist-types/runtimeConfig.native.d.ts +2 -0
  25. package/dist-types/ts3.4/Fis.d.ts +34 -0
  26. package/dist-types/ts3.4/FisClient.d.ts +12 -0
  27. package/dist-types/ts3.4/commands/GetSafetyLeverCommand.d.ts +39 -0
  28. package/dist-types/ts3.4/commands/UpdateSafetyLeverStateCommand.d.ts +40 -0
  29. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  30. package/dist-types/ts3.4/models/models_0.d.ts +40 -0
  31. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
  32. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  33. package/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  34. package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  35. package/package.json +35 -35
package/README.md CHANGED
@@ -267,6 +267,14 @@ GetExperimentTemplate
267
267
 
268
268
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/fis/command/GetExperimentTemplateCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-fis/Interface/GetExperimentTemplateCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-fis/Interface/GetExperimentTemplateCommandOutput/)
269
269
 
270
+ </details>
271
+ <details>
272
+ <summary>
273
+ GetSafetyLever
274
+ </summary>
275
+
276
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/fis/command/GetSafetyLeverCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-fis/Interface/GetSafetyLeverCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-fis/Interface/GetSafetyLeverCommandOutput/)
277
+
270
278
  </details>
271
279
  <details>
272
280
  <summary>
@@ -387,6 +395,14 @@ UpdateExperimentTemplate
387
395
 
388
396
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/fis/command/UpdateExperimentTemplateCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-fis/Interface/UpdateExperimentTemplateCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-fis/Interface/UpdateExperimentTemplateCommandOutput/)
389
397
 
398
+ </details>
399
+ <details>
400
+ <summary>
401
+ UpdateSafetyLeverState
402
+ </summary>
403
+
404
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/fis/command/UpdateSafetyLeverStateCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-fis/Interface/UpdateSafetyLeverStateCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-fis/Interface/UpdateSafetyLeverStateCommandOutput/)
405
+
390
406
  </details>
391
407
  <details>
392
408
  <summary>
@@ -4,11 +4,15 @@ exports.defaultEndpointResolver = void 0;
4
4
  const util_endpoints_1 = require("@aws-sdk/util-endpoints");
5
5
  const util_endpoints_2 = require("@smithy/util-endpoints");
6
6
  const ruleset_1 = require("./ruleset");
7
+ const cache = new util_endpoints_2.EndpointCache({
8
+ size: 50,
9
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
10
+ });
7
11
  const defaultEndpointResolver = (endpointParams, context = {}) => {
8
- return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
12
+ return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
9
13
  endpointParams: endpointParams,
10
14
  logger: context.logger,
11
- });
15
+ }));
12
16
  };
13
17
  exports.defaultEndpointResolver = defaultEndpointResolver;
14
18
  util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
package/dist-cjs/index.js CHANGED
@@ -38,6 +38,7 @@ __export(src_exports, {
38
38
  GetExperimentCommand: () => GetExperimentCommand,
39
39
  GetExperimentTargetAccountConfigurationCommand: () => GetExperimentTargetAccountConfigurationCommand,
40
40
  GetExperimentTemplateCommand: () => GetExperimentTemplateCommand,
41
+ GetSafetyLeverCommand: () => GetSafetyLeverCommand,
41
42
  GetTargetAccountConfigurationCommand: () => GetTargetAccountConfigurationCommand,
42
43
  GetTargetResourceTypeCommand: () => GetTargetResourceTypeCommand,
43
44
  ListActionsCommand: () => ListActionsCommand,
@@ -49,12 +50,15 @@ __export(src_exports, {
49
50
  ListTargetAccountConfigurationsCommand: () => ListTargetAccountConfigurationsCommand,
50
51
  ListTargetResourceTypesCommand: () => ListTargetResourceTypesCommand,
51
52
  ResourceNotFoundException: () => ResourceNotFoundException,
53
+ SafetyLeverStatus: () => SafetyLeverStatus,
54
+ SafetyLeverStatusInput: () => SafetyLeverStatusInput,
52
55
  ServiceQuotaExceededException: () => ServiceQuotaExceededException,
53
56
  StartExperimentCommand: () => StartExperimentCommand,
54
57
  StopExperimentCommand: () => StopExperimentCommand,
55
58
  TagResourceCommand: () => TagResourceCommand,
56
59
  UntagResourceCommand: () => UntagResourceCommand,
57
60
  UpdateExperimentTemplateCommand: () => UpdateExperimentTemplateCommand,
61
+ UpdateSafetyLeverStateCommand: () => UpdateSafetyLeverStateCommand,
58
62
  UpdateTargetAccountConfigurationCommand: () => UpdateTargetAccountConfigurationCommand,
59
63
  ValidationException: () => ValidationException,
60
64
  __Client: () => import_smithy_client.Client,
@@ -325,6 +329,7 @@ var ExperimentActionStatus = {
325
329
  stopping: "stopping"
326
330
  };
327
331
  var ExperimentStatus = {
332
+ cancelled: "cancelled",
328
333
  completed: "completed",
329
334
  failed: "failed",
330
335
  initiating: "initiating",
@@ -333,6 +338,15 @@ var ExperimentStatus = {
333
338
  stopped: "stopped",
334
339
  stopping: "stopping"
335
340
  };
341
+ var SafetyLeverStatus = {
342
+ DISENGAGED: "disengaged",
343
+ ENGAGED: "engaged",
344
+ ENGAGING: "engaging"
345
+ };
346
+ var SafetyLeverStatusInput = {
347
+ DISENGAGED: "disengaged",
348
+ ENGAGED: "engaged"
349
+ };
336
350
 
337
351
  // src/protocols/Aws_restJson1.ts
338
352
  var se_CreateExperimentTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {
@@ -433,6 +447,15 @@ var se_GetExperimentTemplateCommand = /* @__PURE__ */ __name(async (input, conte
433
447
  b.m("GET").h(headers).b(body);
434
448
  return b.build();
435
449
  }, "se_GetExperimentTemplateCommand");
450
+ var se_GetSafetyLeverCommand = /* @__PURE__ */ __name(async (input, context) => {
451
+ const b = (0, import_core.requestBuilder)(input, context);
452
+ const headers = {};
453
+ b.bp("/safetyLevers/{id}");
454
+ b.p("id", () => input.id, "{id}", false);
455
+ let body;
456
+ b.m("GET").h(headers).b(body);
457
+ return b.build();
458
+ }, "se_GetSafetyLeverCommand");
436
459
  var se_GetTargetAccountConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
437
460
  const b = (0, import_core.requestBuilder)(input, context);
438
461
  const headers = {};
@@ -626,6 +649,22 @@ var se_UpdateExperimentTemplateCommand = /* @__PURE__ */ __name(async (input, co
626
649
  b.m("PATCH").h(headers).b(body);
627
650
  return b.build();
628
651
  }, "se_UpdateExperimentTemplateCommand");
652
+ var se_UpdateSafetyLeverStateCommand = /* @__PURE__ */ __name(async (input, context) => {
653
+ const b = (0, import_core.requestBuilder)(input, context);
654
+ const headers = {
655
+ "content-type": "application/json"
656
+ };
657
+ b.bp("/safetyLevers/{id}/state");
658
+ b.p("id", () => input.id, "{id}", false);
659
+ let body;
660
+ body = JSON.stringify(
661
+ (0, import_smithy_client.take)(input, {
662
+ state: (_) => (0, import_smithy_client._json)(_)
663
+ })
664
+ );
665
+ b.m("PATCH").h(headers).b(body);
666
+ return b.build();
667
+ }, "se_UpdateSafetyLeverStateCommand");
629
668
  var se_UpdateTargetAccountConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
630
669
  const b = (0, import_core.requestBuilder)(input, context);
631
670
  const headers = {
@@ -756,6 +795,20 @@ var de_GetExperimentTemplateCommand = /* @__PURE__ */ __name(async (output, cont
756
795
  Object.assign(contents, doc);
757
796
  return contents;
758
797
  }, "de_GetExperimentTemplateCommand");
798
+ var de_GetSafetyLeverCommand = /* @__PURE__ */ __name(async (output, context) => {
799
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
800
+ return de_CommandError(output, context);
801
+ }
802
+ const contents = (0, import_smithy_client.map)({
803
+ $metadata: deserializeMetadata(output)
804
+ });
805
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
806
+ const doc = (0, import_smithy_client.take)(data, {
807
+ safetyLever: import_smithy_client._json
808
+ });
809
+ Object.assign(contents, doc);
810
+ return contents;
811
+ }, "de_GetSafetyLeverCommand");
759
812
  var de_GetTargetAccountConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
760
813
  if (output.statusCode !== 200 && output.statusCode >= 300) {
761
814
  return de_CommandError(output, context);
@@ -965,6 +1018,20 @@ var de_UpdateExperimentTemplateCommand = /* @__PURE__ */ __name(async (output, c
965
1018
  Object.assign(contents, doc);
966
1019
  return contents;
967
1020
  }, "de_UpdateExperimentTemplateCommand");
1021
+ var de_UpdateSafetyLeverStateCommand = /* @__PURE__ */ __name(async (output, context) => {
1022
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1023
+ return de_CommandError(output, context);
1024
+ }
1025
+ const contents = (0, import_smithy_client.map)({
1026
+ $metadata: deserializeMetadata(output)
1027
+ });
1028
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1029
+ const doc = (0, import_smithy_client.take)(data, {
1030
+ safetyLever: import_smithy_client._json
1031
+ });
1032
+ Object.assign(contents, doc);
1033
+ return contents;
1034
+ }, "de_UpdateSafetyLeverStateCommand");
968
1035
  var de_UpdateTargetAccountConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
969
1036
  if (output.statusCode !== 200 && output.statusCode >= 300) {
970
1037
  return de_CommandError(output, context);
@@ -1287,6 +1354,22 @@ var _GetExperimentTemplateCommand = class _GetExperimentTemplateCommand extends
1287
1354
  __name(_GetExperimentTemplateCommand, "GetExperimentTemplateCommand");
1288
1355
  var GetExperimentTemplateCommand = _GetExperimentTemplateCommand;
1289
1356
 
1357
+ // src/commands/GetSafetyLeverCommand.ts
1358
+
1359
+
1360
+
1361
+ var _GetSafetyLeverCommand = class _GetSafetyLeverCommand extends import_smithy_client.Command.classBuilder().ep({
1362
+ ...commonParams
1363
+ }).m(function(Command, cs, config, o) {
1364
+ return [
1365
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1366
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1367
+ ];
1368
+ }).s("FaultInjectionSimulator", "GetSafetyLever", {}).n("FisClient", "GetSafetyLeverCommand").f(void 0, void 0).ser(se_GetSafetyLeverCommand).de(de_GetSafetyLeverCommand).build() {
1369
+ };
1370
+ __name(_GetSafetyLeverCommand, "GetSafetyLeverCommand");
1371
+ var GetSafetyLeverCommand = _GetSafetyLeverCommand;
1372
+
1290
1373
  // src/commands/GetTargetAccountConfigurationCommand.ts
1291
1374
 
1292
1375
 
@@ -1527,6 +1610,22 @@ var _UpdateExperimentTemplateCommand = class _UpdateExperimentTemplateCommand ex
1527
1610
  __name(_UpdateExperimentTemplateCommand, "UpdateExperimentTemplateCommand");
1528
1611
  var UpdateExperimentTemplateCommand = _UpdateExperimentTemplateCommand;
1529
1612
 
1613
+ // src/commands/UpdateSafetyLeverStateCommand.ts
1614
+
1615
+
1616
+
1617
+ var _UpdateSafetyLeverStateCommand = class _UpdateSafetyLeverStateCommand extends import_smithy_client.Command.classBuilder().ep({
1618
+ ...commonParams
1619
+ }).m(function(Command, cs, config, o) {
1620
+ return [
1621
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1622
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1623
+ ];
1624
+ }).s("FaultInjectionSimulator", "UpdateSafetyLeverState", {}).n("FisClient", "UpdateSafetyLeverStateCommand").f(void 0, void 0).ser(se_UpdateSafetyLeverStateCommand).de(de_UpdateSafetyLeverStateCommand).build() {
1625
+ };
1626
+ __name(_UpdateSafetyLeverStateCommand, "UpdateSafetyLeverStateCommand");
1627
+ var UpdateSafetyLeverStateCommand = _UpdateSafetyLeverStateCommand;
1628
+
1530
1629
  // src/commands/UpdateTargetAccountConfigurationCommand.ts
1531
1630
 
1532
1631
 
@@ -1553,6 +1652,7 @@ var commands = {
1553
1652
  GetExperimentCommand,
1554
1653
  GetExperimentTargetAccountConfigurationCommand,
1555
1654
  GetExperimentTemplateCommand,
1655
+ GetSafetyLeverCommand,
1556
1656
  GetTargetAccountConfigurationCommand,
1557
1657
  GetTargetResourceTypeCommand,
1558
1658
  ListActionsCommand,
@@ -1568,6 +1668,7 @@ var commands = {
1568
1668
  TagResourceCommand,
1569
1669
  UntagResourceCommand,
1570
1670
  UpdateExperimentTemplateCommand,
1671
+ UpdateSafetyLeverStateCommand,
1571
1672
  UpdateTargetAccountConfigurationCommand
1572
1673
  };
1573
1674
  var _Fis = class _Fis extends FisClient {
@@ -1615,6 +1716,7 @@ var paginateListTargetResourceTypes = (0, import_core.createPaginator)(FisClient
1615
1716
  GetExperimentCommand,
1616
1717
  GetExperimentTargetAccountConfigurationCommand,
1617
1718
  GetExperimentTemplateCommand,
1719
+ GetSafetyLeverCommand,
1618
1720
  GetTargetAccountConfigurationCommand,
1619
1721
  GetTargetResourceTypeCommand,
1620
1722
  ListActionsCommand,
@@ -1630,6 +1732,7 @@ var paginateListTargetResourceTypes = (0, import_core.createPaginator)(FisClient
1630
1732
  TagResourceCommand,
1631
1733
  UntagResourceCommand,
1632
1734
  UpdateExperimentTemplateCommand,
1735
+ UpdateSafetyLeverStateCommand,
1633
1736
  UpdateTargetAccountConfigurationCommand,
1634
1737
  paginateListActions,
1635
1738
  paginateListExperimentResolvedTargets,
@@ -1645,6 +1748,8 @@ var paginateListTargetResourceTypes = (0, import_core.createPaginator)(FisClient
1645
1748
  ServiceQuotaExceededException,
1646
1749
  ValidationException,
1647
1750
  ExperimentActionStatus,
1648
- ExperimentStatus
1751
+ ExperimentStatus,
1752
+ SafetyLeverStatus,
1753
+ SafetyLeverStatusInput
1649
1754
  });
1650
1755
 
package/dist-es/Fis.js CHANGED
@@ -7,6 +7,7 @@ import { GetActionCommand } from "./commands/GetActionCommand";
7
7
  import { GetExperimentCommand, } from "./commands/GetExperimentCommand";
8
8
  import { GetExperimentTargetAccountConfigurationCommand, } from "./commands/GetExperimentTargetAccountConfigurationCommand";
9
9
  import { GetExperimentTemplateCommand, } from "./commands/GetExperimentTemplateCommand";
10
+ import { GetSafetyLeverCommand, } from "./commands/GetSafetyLeverCommand";
10
11
  import { GetTargetAccountConfigurationCommand, } from "./commands/GetTargetAccountConfigurationCommand";
11
12
  import { GetTargetResourceTypeCommand, } from "./commands/GetTargetResourceTypeCommand";
12
13
  import { ListActionsCommand } from "./commands/ListActionsCommand";
@@ -22,6 +23,7 @@ import { StopExperimentCommand, } from "./commands/StopExperimentCommand";
22
23
  import { TagResourceCommand } from "./commands/TagResourceCommand";
23
24
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
24
25
  import { UpdateExperimentTemplateCommand, } from "./commands/UpdateExperimentTemplateCommand";
26
+ import { UpdateSafetyLeverStateCommand, } from "./commands/UpdateSafetyLeverStateCommand";
25
27
  import { UpdateTargetAccountConfigurationCommand, } from "./commands/UpdateTargetAccountConfigurationCommand";
26
28
  import { FisClient } from "./FisClient";
27
29
  const commands = {
@@ -33,6 +35,7 @@ const commands = {
33
35
  GetExperimentCommand,
34
36
  GetExperimentTargetAccountConfigurationCommand,
35
37
  GetExperimentTemplateCommand,
38
+ GetSafetyLeverCommand,
36
39
  GetTargetAccountConfigurationCommand,
37
40
  GetTargetResourceTypeCommand,
38
41
  ListActionsCommand,
@@ -48,6 +51,7 @@ const commands = {
48
51
  TagResourceCommand,
49
52
  UntagResourceCommand,
50
53
  UpdateExperimentTemplateCommand,
54
+ UpdateSafetyLeverStateCommand,
51
55
  UpdateTargetAccountConfigurationCommand,
52
56
  };
53
57
  export class Fis extends FisClient {
@@ -0,0 +1,24 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_GetSafetyLeverCommand, se_GetSafetyLeverCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class GetSafetyLeverCommand extends $Command
8
+ .classBuilder()
9
+ .ep({
10
+ ...commonParams,
11
+ })
12
+ .m(function (Command, cs, config, o) {
13
+ return [
14
+ getSerdePlugin(config, this.serialize, this.deserialize),
15
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
16
+ ];
17
+ })
18
+ .s("FaultInjectionSimulator", "GetSafetyLever", {})
19
+ .n("FisClient", "GetSafetyLeverCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_GetSafetyLeverCommand)
22
+ .de(de_GetSafetyLeverCommand)
23
+ .build() {
24
+ }
@@ -0,0 +1,24 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_UpdateSafetyLeverStateCommand, se_UpdateSafetyLeverStateCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class UpdateSafetyLeverStateCommand extends $Command
8
+ .classBuilder()
9
+ .ep({
10
+ ...commonParams,
11
+ })
12
+ .m(function (Command, cs, config, o) {
13
+ return [
14
+ getSerdePlugin(config, this.serialize, this.deserialize),
15
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
16
+ ];
17
+ })
18
+ .s("FaultInjectionSimulator", "UpdateSafetyLeverState", {})
19
+ .n("FisClient", "UpdateSafetyLeverStateCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_UpdateSafetyLeverStateCommand)
22
+ .de(de_UpdateSafetyLeverStateCommand)
23
+ .build() {
24
+ }
@@ -6,6 +6,7 @@ export * from "./GetActionCommand";
6
6
  export * from "./GetExperimentCommand";
7
7
  export * from "./GetExperimentTargetAccountConfigurationCommand";
8
8
  export * from "./GetExperimentTemplateCommand";
9
+ export * from "./GetSafetyLeverCommand";
9
10
  export * from "./GetTargetAccountConfigurationCommand";
10
11
  export * from "./GetTargetResourceTypeCommand";
11
12
  export * from "./ListActionsCommand";
@@ -21,4 +22,5 @@ export * from "./StopExperimentCommand";
21
22
  export * from "./TagResourceCommand";
22
23
  export * from "./UntagResourceCommand";
23
24
  export * from "./UpdateExperimentTemplateCommand";
25
+ export * from "./UpdateSafetyLeverStateCommand";
24
26
  export * from "./UpdateTargetAccountConfigurationCommand";
@@ -1,10 +1,14 @@
1
1
  import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
2
- import { customEndpointFunctions, resolveEndpoint } from "@smithy/util-endpoints";
2
+ import { customEndpointFunctions, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
3
3
  import { ruleSet } from "./ruleset";
4
+ const cache = new EndpointCache({
5
+ size: 50,
6
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
7
+ });
4
8
  export const defaultEndpointResolver = (endpointParams, context = {}) => {
5
- return resolveEndpoint(ruleSet, {
9
+ return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
6
10
  endpointParams: endpointParams,
7
11
  logger: context.logger,
8
- });
12
+ }));
9
13
  };
10
14
  customEndpointFunctions.aws = awsEndpointFunctions;
@@ -71,6 +71,7 @@ export const ExperimentActionStatus = {
71
71
  stopping: "stopping",
72
72
  };
73
73
  export const ExperimentStatus = {
74
+ cancelled: "cancelled",
74
75
  completed: "completed",
75
76
  failed: "failed",
76
77
  initiating: "initiating",
@@ -79,3 +80,12 @@ export const ExperimentStatus = {
79
80
  stopped: "stopped",
80
81
  stopping: "stopping",
81
82
  };
83
+ export const SafetyLeverStatus = {
84
+ DISENGAGED: "disengaged",
85
+ ENGAGED: "engaged",
86
+ ENGAGING: "engaging",
87
+ };
88
+ export const SafetyLeverStatusInput = {
89
+ DISENGAGED: "disengaged",
90
+ ENGAGED: "engaged",
91
+ };
@@ -98,6 +98,15 @@ export const se_GetExperimentTemplateCommand = async (input, context) => {
98
98
  b.m("GET").h(headers).b(body);
99
99
  return b.build();
100
100
  };
101
+ export const se_GetSafetyLeverCommand = async (input, context) => {
102
+ const b = rb(input, context);
103
+ const headers = {};
104
+ b.bp("/safetyLevers/{id}");
105
+ b.p("id", () => input.id, "{id}", false);
106
+ let body;
107
+ b.m("GET").h(headers).b(body);
108
+ return b.build();
109
+ };
101
110
  export const se_GetTargetAccountConfigurationCommand = async (input, context) => {
102
111
  const b = rb(input, context);
103
112
  const headers = {};
@@ -285,6 +294,20 @@ export const se_UpdateExperimentTemplateCommand = async (input, context) => {
285
294
  b.m("PATCH").h(headers).b(body);
286
295
  return b.build();
287
296
  };
297
+ export const se_UpdateSafetyLeverStateCommand = async (input, context) => {
298
+ const b = rb(input, context);
299
+ const headers = {
300
+ "content-type": "application/json",
301
+ };
302
+ b.bp("/safetyLevers/{id}/state");
303
+ b.p("id", () => input.id, "{id}", false);
304
+ let body;
305
+ body = JSON.stringify(take(input, {
306
+ state: (_) => _json(_),
307
+ }));
308
+ b.m("PATCH").h(headers).b(body);
309
+ return b.build();
310
+ };
288
311
  export const se_UpdateTargetAccountConfigurationCommand = async (input, context) => {
289
312
  const b = rb(input, context);
290
313
  const headers = {
@@ -413,6 +436,20 @@ export const de_GetExperimentTemplateCommand = async (output, context) => {
413
436
  Object.assign(contents, doc);
414
437
  return contents;
415
438
  };
439
+ export const de_GetSafetyLeverCommand = async (output, context) => {
440
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
441
+ return de_CommandError(output, context);
442
+ }
443
+ const contents = map({
444
+ $metadata: deserializeMetadata(output),
445
+ });
446
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
447
+ const doc = take(data, {
448
+ safetyLever: _json,
449
+ });
450
+ Object.assign(contents, doc);
451
+ return contents;
452
+ };
416
453
  export const de_GetTargetAccountConfigurationCommand = async (output, context) => {
417
454
  if (output.statusCode !== 200 && output.statusCode >= 300) {
418
455
  return de_CommandError(output, context);
@@ -622,6 +659,20 @@ export const de_UpdateExperimentTemplateCommand = async (output, context) => {
622
659
  Object.assign(contents, doc);
623
660
  return contents;
624
661
  };
662
+ export const de_UpdateSafetyLeverStateCommand = async (output, context) => {
663
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
664
+ return de_CommandError(output, context);
665
+ }
666
+ const contents = map({
667
+ $metadata: deserializeMetadata(output),
668
+ });
669
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
670
+ const doc = take(data, {
671
+ safetyLever: _json,
672
+ });
673
+ Object.assign(contents, doc);
674
+ return contents;
675
+ };
625
676
  export const de_UpdateTargetAccountConfigurationCommand = async (output, context) => {
626
677
  if (output.statusCode !== 200 && output.statusCode >= 300) {
627
678
  return de_CommandError(output, context);
@@ -7,6 +7,7 @@ import { GetActionCommandInput, GetActionCommandOutput } from "./commands/GetAct
7
7
  import { GetExperimentCommandInput, GetExperimentCommandOutput } from "./commands/GetExperimentCommand";
8
8
  import { GetExperimentTargetAccountConfigurationCommandInput, GetExperimentTargetAccountConfigurationCommandOutput } from "./commands/GetExperimentTargetAccountConfigurationCommand";
9
9
  import { GetExperimentTemplateCommandInput, GetExperimentTemplateCommandOutput } from "./commands/GetExperimentTemplateCommand";
10
+ import { GetSafetyLeverCommandInput, GetSafetyLeverCommandOutput } from "./commands/GetSafetyLeverCommand";
10
11
  import { GetTargetAccountConfigurationCommandInput, GetTargetAccountConfigurationCommandOutput } from "./commands/GetTargetAccountConfigurationCommand";
11
12
  import { GetTargetResourceTypeCommandInput, GetTargetResourceTypeCommandOutput } from "./commands/GetTargetResourceTypeCommand";
12
13
  import { ListActionsCommandInput, ListActionsCommandOutput } from "./commands/ListActionsCommand";
@@ -22,6 +23,7 @@ import { StopExperimentCommandInput, StopExperimentCommandOutput } from "./comma
22
23
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
23
24
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
24
25
  import { UpdateExperimentTemplateCommandInput, UpdateExperimentTemplateCommandOutput } from "./commands/UpdateExperimentTemplateCommand";
26
+ import { UpdateSafetyLeverStateCommandInput, UpdateSafetyLeverStateCommandOutput } from "./commands/UpdateSafetyLeverStateCommand";
25
27
  import { UpdateTargetAccountConfigurationCommandInput, UpdateTargetAccountConfigurationCommandOutput } from "./commands/UpdateTargetAccountConfigurationCommand";
26
28
  import { FisClient } from "./FisClient";
27
29
  export interface Fis {
@@ -73,6 +75,12 @@ export interface Fis {
73
75
  getExperimentTemplate(args: GetExperimentTemplateCommandInput, options?: __HttpHandlerOptions): Promise<GetExperimentTemplateCommandOutput>;
74
76
  getExperimentTemplate(args: GetExperimentTemplateCommandInput, cb: (err: any, data?: GetExperimentTemplateCommandOutput) => void): void;
75
77
  getExperimentTemplate(args: GetExperimentTemplateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetExperimentTemplateCommandOutput) => void): void;
78
+ /**
79
+ * @see {@link GetSafetyLeverCommand}
80
+ */
81
+ getSafetyLever(args: GetSafetyLeverCommandInput, options?: __HttpHandlerOptions): Promise<GetSafetyLeverCommandOutput>;
82
+ getSafetyLever(args: GetSafetyLeverCommandInput, cb: (err: any, data?: GetSafetyLeverCommandOutput) => void): void;
83
+ getSafetyLever(args: GetSafetyLeverCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetSafetyLeverCommandOutput) => void): void;
76
84
  /**
77
85
  * @see {@link GetTargetAccountConfigurationCommand}
78
86
  */
@@ -167,6 +175,12 @@ export interface Fis {
167
175
  updateExperimentTemplate(args: UpdateExperimentTemplateCommandInput, options?: __HttpHandlerOptions): Promise<UpdateExperimentTemplateCommandOutput>;
168
176
  updateExperimentTemplate(args: UpdateExperimentTemplateCommandInput, cb: (err: any, data?: UpdateExperimentTemplateCommandOutput) => void): void;
169
177
  updateExperimentTemplate(args: UpdateExperimentTemplateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateExperimentTemplateCommandOutput) => void): void;
178
+ /**
179
+ * @see {@link UpdateSafetyLeverStateCommand}
180
+ */
181
+ updateSafetyLeverState(args: UpdateSafetyLeverStateCommandInput, options?: __HttpHandlerOptions): Promise<UpdateSafetyLeverStateCommandOutput>;
182
+ updateSafetyLeverState(args: UpdateSafetyLeverStateCommandInput, cb: (err: any, data?: UpdateSafetyLeverStateCommandOutput) => void): void;
183
+ updateSafetyLeverState(args: UpdateSafetyLeverStateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateSafetyLeverStateCommandOutput) => void): void;
170
184
  /**
171
185
  * @see {@link UpdateTargetAccountConfigurationCommand}
172
186
  */
@@ -15,6 +15,7 @@ import { GetActionCommandInput, GetActionCommandOutput } from "./commands/GetAct
15
15
  import { GetExperimentCommandInput, GetExperimentCommandOutput } from "./commands/GetExperimentCommand";
16
16
  import { GetExperimentTargetAccountConfigurationCommandInput, GetExperimentTargetAccountConfigurationCommandOutput } from "./commands/GetExperimentTargetAccountConfigurationCommand";
17
17
  import { GetExperimentTemplateCommandInput, GetExperimentTemplateCommandOutput } from "./commands/GetExperimentTemplateCommand";
18
+ import { GetSafetyLeverCommandInput, GetSafetyLeverCommandOutput } from "./commands/GetSafetyLeverCommand";
18
19
  import { GetTargetAccountConfigurationCommandInput, GetTargetAccountConfigurationCommandOutput } from "./commands/GetTargetAccountConfigurationCommand";
19
20
  import { GetTargetResourceTypeCommandInput, GetTargetResourceTypeCommandOutput } from "./commands/GetTargetResourceTypeCommand";
20
21
  import { ListActionsCommandInput, ListActionsCommandOutput } from "./commands/ListActionsCommand";
@@ -30,6 +31,7 @@ import { StopExperimentCommandInput, StopExperimentCommandOutput } from "./comma
30
31
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
31
32
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
32
33
  import { UpdateExperimentTemplateCommandInput, UpdateExperimentTemplateCommandOutput } from "./commands/UpdateExperimentTemplateCommand";
34
+ import { UpdateSafetyLeverStateCommandInput, UpdateSafetyLeverStateCommandOutput } from "./commands/UpdateSafetyLeverStateCommand";
33
35
  import { UpdateTargetAccountConfigurationCommandInput, UpdateTargetAccountConfigurationCommandOutput } from "./commands/UpdateTargetAccountConfigurationCommand";
34
36
  import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
35
37
  import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
@@ -37,11 +39,11 @@ export { __Client };
37
39
  /**
38
40
  * @public
39
41
  */
40
- export type ServiceInputTypes = CreateExperimentTemplateCommandInput | CreateTargetAccountConfigurationCommandInput | DeleteExperimentTemplateCommandInput | DeleteTargetAccountConfigurationCommandInput | GetActionCommandInput | GetExperimentCommandInput | GetExperimentTargetAccountConfigurationCommandInput | GetExperimentTemplateCommandInput | GetTargetAccountConfigurationCommandInput | GetTargetResourceTypeCommandInput | ListActionsCommandInput | ListExperimentResolvedTargetsCommandInput | ListExperimentTargetAccountConfigurationsCommandInput | ListExperimentTemplatesCommandInput | ListExperimentsCommandInput | ListTagsForResourceCommandInput | ListTargetAccountConfigurationsCommandInput | ListTargetResourceTypesCommandInput | StartExperimentCommandInput | StopExperimentCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateExperimentTemplateCommandInput | UpdateTargetAccountConfigurationCommandInput;
42
+ export type ServiceInputTypes = CreateExperimentTemplateCommandInput | CreateTargetAccountConfigurationCommandInput | DeleteExperimentTemplateCommandInput | DeleteTargetAccountConfigurationCommandInput | GetActionCommandInput | GetExperimentCommandInput | GetExperimentTargetAccountConfigurationCommandInput | GetExperimentTemplateCommandInput | GetSafetyLeverCommandInput | GetTargetAccountConfigurationCommandInput | GetTargetResourceTypeCommandInput | ListActionsCommandInput | ListExperimentResolvedTargetsCommandInput | ListExperimentTargetAccountConfigurationsCommandInput | ListExperimentTemplatesCommandInput | ListExperimentsCommandInput | ListTagsForResourceCommandInput | ListTargetAccountConfigurationsCommandInput | ListTargetResourceTypesCommandInput | StartExperimentCommandInput | StopExperimentCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateExperimentTemplateCommandInput | UpdateSafetyLeverStateCommandInput | UpdateTargetAccountConfigurationCommandInput;
41
43
  /**
42
44
  * @public
43
45
  */
44
- export type ServiceOutputTypes = CreateExperimentTemplateCommandOutput | CreateTargetAccountConfigurationCommandOutput | DeleteExperimentTemplateCommandOutput | DeleteTargetAccountConfigurationCommandOutput | GetActionCommandOutput | GetExperimentCommandOutput | GetExperimentTargetAccountConfigurationCommandOutput | GetExperimentTemplateCommandOutput | GetTargetAccountConfigurationCommandOutput | GetTargetResourceTypeCommandOutput | ListActionsCommandOutput | ListExperimentResolvedTargetsCommandOutput | ListExperimentTargetAccountConfigurationsCommandOutput | ListExperimentTemplatesCommandOutput | ListExperimentsCommandOutput | ListTagsForResourceCommandOutput | ListTargetAccountConfigurationsCommandOutput | ListTargetResourceTypesCommandOutput | StartExperimentCommandOutput | StopExperimentCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateExperimentTemplateCommandOutput | UpdateTargetAccountConfigurationCommandOutput;
46
+ export type ServiceOutputTypes = CreateExperimentTemplateCommandOutput | CreateTargetAccountConfigurationCommandOutput | DeleteExperimentTemplateCommandOutput | DeleteTargetAccountConfigurationCommandOutput | GetActionCommandOutput | GetExperimentCommandOutput | GetExperimentTargetAccountConfigurationCommandOutput | GetExperimentTemplateCommandOutput | GetSafetyLeverCommandOutput | GetTargetAccountConfigurationCommandOutput | GetTargetResourceTypeCommandOutput | ListActionsCommandOutput | ListExperimentResolvedTargetsCommandOutput | ListExperimentTargetAccountConfigurationsCommandOutput | ListExperimentTemplatesCommandOutput | ListExperimentsCommandOutput | ListTagsForResourceCommandOutput | ListTargetAccountConfigurationsCommandOutput | ListTargetResourceTypesCommandOutput | StartExperimentCommandOutput | StopExperimentCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateExperimentTemplateCommandOutput | UpdateSafetyLeverStateCommandOutput | UpdateTargetAccountConfigurationCommandOutput;
45
47
  /**
46
48
  * @public
47
49
  */
@@ -46,7 +46,7 @@ declare const GetExperimentCommand_base: {
46
46
  * // experimentTemplateId: "STRING_VALUE",
47
47
  * // roleArn: "STRING_VALUE",
48
48
  * // state: { // ExperimentState
49
- * // status: "pending" || "initiating" || "running" || "completed" || "stopping" || "stopped" || "failed",
49
+ * // status: "pending" || "initiating" || "running" || "completed" || "stopping" || "stopped" || "failed" || "cancelled",
50
50
  * // reason: "STRING_VALUE",
51
51
  * // error: { // ExperimentError
52
52
  * // accountId: "STRING_VALUE",
@@ -0,0 +1,72 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { FisClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FisClient";
4
+ import { GetSafetyLeverRequest, GetSafetyLeverResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link GetSafetyLeverCommand}.
14
+ */
15
+ export interface GetSafetyLeverCommandInput extends GetSafetyLeverRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetSafetyLeverCommand}.
21
+ */
22
+ export interface GetSafetyLeverCommandOutput extends GetSafetyLeverResponse, __MetadataBearer {
23
+ }
24
+ declare const GetSafetyLeverCommand_base: {
25
+ new (input: GetSafetyLeverCommandInput): import("@smithy/smithy-client").CommandImpl<GetSafetyLeverCommandInput, GetSafetyLeverCommandOutput, FisClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: GetSafetyLeverCommandInput): import("@smithy/smithy-client").CommandImpl<GetSafetyLeverCommandInput, GetSafetyLeverCommandOutput, FisClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>
31
+ * Gets information about the specified safety lever.
32
+ * </p>
33
+ * @example
34
+ * Use a bare-bones client and the command you need to make an API call.
35
+ * ```javascript
36
+ * import { FisClient, GetSafetyLeverCommand } from "@aws-sdk/client-fis"; // ES Modules import
37
+ * // const { FisClient, GetSafetyLeverCommand } = require("@aws-sdk/client-fis"); // CommonJS import
38
+ * const client = new FisClient(config);
39
+ * const input = { // GetSafetyLeverRequest
40
+ * id: "STRING_VALUE", // required
41
+ * };
42
+ * const command = new GetSafetyLeverCommand(input);
43
+ * const response = await client.send(command);
44
+ * // { // GetSafetyLeverResponse
45
+ * // safetyLever: { // SafetyLever
46
+ * // id: "STRING_VALUE",
47
+ * // arn: "STRING_VALUE",
48
+ * // state: { // SafetyLeverState
49
+ * // status: "disengaged" || "engaged" || "engaging",
50
+ * // reason: "STRING_VALUE",
51
+ * // },
52
+ * // },
53
+ * // };
54
+ *
55
+ * ```
56
+ *
57
+ * @param GetSafetyLeverCommandInput - {@link GetSafetyLeverCommandInput}
58
+ * @returns {@link GetSafetyLeverCommandOutput}
59
+ * @see {@link GetSafetyLeverCommandInput} for command's `input` shape.
60
+ * @see {@link GetSafetyLeverCommandOutput} for command's `response` shape.
61
+ * @see {@link FisClientResolvedConfig | config} for FisClient's `config` shape.
62
+ *
63
+ * @throws {@link ResourceNotFoundException} (client fault)
64
+ * <p>The specified resource cannot be found.</p>
65
+ *
66
+ * @throws {@link FisServiceException}
67
+ * <p>Base exception class for all service exceptions from Fis service.</p>
68
+ *
69
+ * @public
70
+ */
71
+ export declare class GetSafetyLeverCommand extends GetSafetyLeverCommand_base {
72
+ }
@@ -48,7 +48,7 @@ declare const ListExperimentsCommand_base: {
48
48
  * // arn: "STRING_VALUE",
49
49
  * // experimentTemplateId: "STRING_VALUE",
50
50
  * // state: { // ExperimentState
51
- * // status: "pending" || "initiating" || "running" || "completed" || "stopping" || "stopped" || "failed",
51
+ * // status: "pending" || "initiating" || "running" || "completed" || "stopping" || "stopped" || "failed" || "cancelled",
52
52
  * // reason: "STRING_VALUE",
53
53
  * // error: { // ExperimentError
54
54
  * // accountId: "STRING_VALUE",