@aws-sdk/client-ssm-incidents 3.183.0 → 3.186.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 (50) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist-cjs/protocols/Aws_restJson1.js +2 -2
  3. package/dist-es/SSMIncidents.js +125 -118
  4. package/dist-es/SSMIncidentsClient.js +28 -22
  5. package/dist-es/commands/CreateReplicationSetCommand.js +28 -21
  6. package/dist-es/commands/CreateResponsePlanCommand.js +28 -21
  7. package/dist-es/commands/CreateTimelineEventCommand.js +28 -21
  8. package/dist-es/commands/DeleteIncidentRecordCommand.js +28 -21
  9. package/dist-es/commands/DeleteReplicationSetCommand.js +28 -21
  10. package/dist-es/commands/DeleteResourcePolicyCommand.js +28 -21
  11. package/dist-es/commands/DeleteResponsePlanCommand.js +28 -21
  12. package/dist-es/commands/DeleteTimelineEventCommand.js +28 -21
  13. package/dist-es/commands/GetIncidentRecordCommand.js +28 -21
  14. package/dist-es/commands/GetReplicationSetCommand.js +28 -21
  15. package/dist-es/commands/GetResourcePoliciesCommand.js +28 -21
  16. package/dist-es/commands/GetResponsePlanCommand.js +28 -21
  17. package/dist-es/commands/GetTimelineEventCommand.js +28 -21
  18. package/dist-es/commands/ListIncidentRecordsCommand.js +28 -21
  19. package/dist-es/commands/ListRelatedItemsCommand.js +28 -21
  20. package/dist-es/commands/ListReplicationSetsCommand.js +28 -21
  21. package/dist-es/commands/ListResponsePlansCommand.js +28 -21
  22. package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
  23. package/dist-es/commands/ListTimelineEventsCommand.js +28 -21
  24. package/dist-es/commands/PutResourcePolicyCommand.js +28 -21
  25. package/dist-es/commands/StartIncidentCommand.js +28 -21
  26. package/dist-es/commands/TagResourceCommand.js +28 -21
  27. package/dist-es/commands/UntagResourceCommand.js +28 -21
  28. package/dist-es/commands/UpdateDeletionProtectionCommand.js +28 -21
  29. package/dist-es/commands/UpdateIncidentRecordCommand.js +28 -21
  30. package/dist-es/commands/UpdateRelatedItemsCommand.js +28 -21
  31. package/dist-es/commands/UpdateReplicationSetCommand.js +28 -21
  32. package/dist-es/commands/UpdateResponsePlanCommand.js +28 -21
  33. package/dist-es/commands/UpdateTimelineEventCommand.js +28 -21
  34. package/dist-es/endpoints.js +8 -8
  35. package/dist-es/models/SSMIncidentsServiceException.js +10 -5
  36. package/dist-es/models/models_0.js +223 -389
  37. package/dist-es/pagination/GetResourcePoliciesPaginator.js +68 -25
  38. package/dist-es/pagination/ListIncidentRecordsPaginator.js +68 -25
  39. package/dist-es/pagination/ListRelatedItemsPaginator.js +68 -25
  40. package/dist-es/pagination/ListReplicationSetsPaginator.js +68 -25
  41. package/dist-es/pagination/ListResponsePlansPaginator.js +68 -25
  42. package/dist-es/pagination/ListTimelineEventsPaginator.js +68 -25
  43. package/dist-es/protocols/Aws_restJson1.js +3142 -2327
  44. package/dist-es/runtimeConfig.browser.js +12 -26
  45. package/dist-es/runtimeConfig.js +12 -30
  46. package/dist-es/runtimeConfig.native.js +5 -8
  47. package/dist-es/runtimeConfig.shared.js +11 -8
  48. package/dist-es/waiters/waitForWaitForReplicationSetActive.js +74 -54
  49. package/dist-es/waiters/waitForWaitForReplicationSetDeleted.js +59 -39
  50. package/package.json +34 -34
@@ -1,3 +1,4 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import packageInfo from "../package.json";
2
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
3
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
@@ -11,30 +12,15 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
11
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
12
13
  import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
13
14
  import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
14
- export const getRuntimeConfig = (config) => {
15
- const defaultsMode = resolveDefaultsModeConfig(config);
16
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
17
- const clientSharedValues = getSharedRuntimeConfig(config);
18
- return {
19
- ...clientSharedValues,
20
- ...config,
21
- runtime: "browser",
22
- defaultsMode,
23
- base64Decoder: config?.base64Decoder ?? fromBase64,
24
- base64Encoder: config?.base64Encoder ?? toBase64,
25
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
26
- credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
- defaultUserAgentProvider: config?.defaultUserAgentProvider ??
28
- defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
29
- maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
30
- region: config?.region ?? invalidProvider("Region is missing"),
31
- requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
32
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
33
- sha256: config?.sha256 ?? Sha256,
34
- streamCollector: config?.streamCollector ?? streamCollector,
35
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
36
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
37
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
38
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
39
- };
15
+ export var getRuntimeConfig = function (config) {
16
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
+ var defaultsMode = resolveDefaultsModeConfig(config);
18
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
19
+ var clientSharedValues = getSharedRuntimeConfig(config);
20
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
21
+ switch (_a.label) {
22
+ case 0: return [4, defaultConfigProvider()];
23
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
24
+ }
25
+ }); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
40
26
  };
@@ -1,3 +1,4 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import packageInfo from "../package.json";
2
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
3
4
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
@@ -14,35 +15,16 @@ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shar
14
15
  import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
15
16
  import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
16
17
  import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
17
- export const getRuntimeConfig = (config) => {
18
+ export var getRuntimeConfig = function (config) {
19
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18
20
  emitWarningIfUnsupportedVersion(process.version);
19
- const defaultsMode = resolveDefaultsModeConfig(config);
20
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
21
- const clientSharedValues = getSharedRuntimeConfig(config);
22
- return {
23
- ...clientSharedValues,
24
- ...config,
25
- runtime: "node",
26
- defaultsMode,
27
- base64Decoder: config?.base64Decoder ?? fromBase64,
28
- base64Encoder: config?.base64Encoder ?? toBase64,
29
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
30
- credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
31
- defaultUserAgentProvider: config?.defaultUserAgentProvider ??
32
- defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
33
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
34
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
35
- requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
36
- retryMode: config?.retryMode ??
37
- loadNodeConfig({
38
- ...NODE_RETRY_MODE_CONFIG_OPTIONS,
39
- default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
40
- }),
41
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
42
- streamCollector: config?.streamCollector ?? streamCollector,
43
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
44
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
45
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
46
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
47
- };
21
+ var defaultsMode = resolveDefaultsModeConfig(config);
22
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
23
+ var clientSharedValues = getSharedRuntimeConfig(config);
24
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
25
+ switch (_a.label) {
26
+ case 0: return [4, defaultConfigProvider()];
27
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
28
+ }
29
+ }); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
48
30
  };
@@ -1,11 +1,8 @@
1
+ import { __assign } from "tslib";
1
2
  import { Sha256 } from "@aws-crypto/sha256-js";
2
3
  import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
3
- export const getRuntimeConfig = (config) => {
4
- const browserDefaults = getBrowserRuntimeConfig(config);
5
- return {
6
- ...browserDefaults,
7
- ...config,
8
- runtime: "react-native",
9
- sha256: config?.sha256 ?? Sha256,
10
- };
4
+ export var getRuntimeConfig = function (config) {
5
+ var _a;
6
+ var browserDefaults = getBrowserRuntimeConfig(config);
7
+ return __assign(__assign(__assign({}, browserDefaults), config), { runtime: "react-native", sha256: (_a = config === null || config === void 0 ? void 0 : config.sha256) !== null && _a !== void 0 ? _a : Sha256 });
11
8
  };
@@ -1,10 +1,13 @@
1
1
  import { parseUrl } from "@aws-sdk/url-parser";
2
2
  import { defaultRegionInfoProvider } from "./endpoints";
3
- export const getRuntimeConfig = (config) => ({
4
- apiVersion: "2018-05-10",
5
- disableHostPrefix: config?.disableHostPrefix ?? false,
6
- logger: config?.logger ?? {},
7
- regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
8
- serviceId: config?.serviceId ?? "SSM Incidents",
9
- urlParser: config?.urlParser ?? parseUrl,
10
- });
3
+ export var getRuntimeConfig = function (config) {
4
+ var _a, _b, _c, _d, _e;
5
+ return ({
6
+ apiVersion: "2018-05-10",
7
+ disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,
8
+ logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {},
9
+ regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : defaultRegionInfoProvider,
10
+ serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "SSM Incidents",
11
+ urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : parseUrl,
12
+ });
13
+ };
@@ -1,58 +1,78 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
2
3
  import { GetReplicationSetCommand } from "../commands/GetReplicationSetCommand";
3
- const checkState = async (client, input) => {
4
- let reason;
5
- try {
6
- const result = await client.send(new GetReplicationSetCommand(input));
7
- reason = result;
8
- try {
9
- const returnComparator = () => {
10
- return result.replicationSet.status;
11
- };
12
- if (returnComparator() === "ACTIVE") {
13
- return { state: WaiterState.SUCCESS, reason };
14
- }
4
+ var checkState = function (client, input) { return __awaiter(void 0, void 0, void 0, function () {
5
+ var reason, result_1, returnComparator, returnComparator, returnComparator, returnComparator, exception_1;
6
+ return __generator(this, function (_a) {
7
+ switch (_a.label) {
8
+ case 0:
9
+ _a.trys.push([0, 2, , 3]);
10
+ return [4, client.send(new GetReplicationSetCommand(input))];
11
+ case 1:
12
+ result_1 = _a.sent();
13
+ reason = result_1;
14
+ try {
15
+ returnComparator = function () {
16
+ return result_1.replicationSet.status;
17
+ };
18
+ if (returnComparator() === "ACTIVE") {
19
+ return [2, { state: WaiterState.SUCCESS, reason: reason }];
20
+ }
21
+ }
22
+ catch (e) { }
23
+ try {
24
+ returnComparator = function () {
25
+ return result_1.replicationSet.status;
26
+ };
27
+ if (returnComparator() === "CREATING") {
28
+ return [2, { state: WaiterState.RETRY, reason: reason }];
29
+ }
30
+ }
31
+ catch (e) { }
32
+ try {
33
+ returnComparator = function () {
34
+ return result_1.replicationSet.status;
35
+ };
36
+ if (returnComparator() === "UPDATING") {
37
+ return [2, { state: WaiterState.RETRY, reason: reason }];
38
+ }
39
+ }
40
+ catch (e) { }
41
+ try {
42
+ returnComparator = function () {
43
+ return result_1.replicationSet.status;
44
+ };
45
+ if (returnComparator() === "FAILED") {
46
+ return [2, { state: WaiterState.FAILURE, reason: reason }];
47
+ }
48
+ }
49
+ catch (e) { }
50
+ return [3, 3];
51
+ case 2:
52
+ exception_1 = _a.sent();
53
+ reason = exception_1;
54
+ return [3, 3];
55
+ case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
15
56
  }
16
- catch (e) { }
17
- try {
18
- const returnComparator = () => {
19
- return result.replicationSet.status;
20
- };
21
- if (returnComparator() === "CREATING") {
22
- return { state: WaiterState.RETRY, reason };
23
- }
57
+ });
58
+ }); };
59
+ export var waitForWaitForReplicationSetActive = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
60
+ var serviceDefaults;
61
+ return __generator(this, function (_a) {
62
+ serviceDefaults = { minDelay: 30, maxDelay: 30 };
63
+ return [2, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
64
+ });
65
+ }); };
66
+ export var waitUntilWaitForReplicationSetActive = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
67
+ var serviceDefaults, result;
68
+ return __generator(this, function (_a) {
69
+ switch (_a.label) {
70
+ case 0:
71
+ serviceDefaults = { minDelay: 30, maxDelay: 30 };
72
+ return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
73
+ case 1:
74
+ result = _a.sent();
75
+ return [2, checkExceptions(result)];
24
76
  }
25
- catch (e) { }
26
- try {
27
- const returnComparator = () => {
28
- return result.replicationSet.status;
29
- };
30
- if (returnComparator() === "UPDATING") {
31
- return { state: WaiterState.RETRY, reason };
32
- }
33
- }
34
- catch (e) { }
35
- try {
36
- const returnComparator = () => {
37
- return result.replicationSet.status;
38
- };
39
- if (returnComparator() === "FAILED") {
40
- return { state: WaiterState.FAILURE, reason };
41
- }
42
- }
43
- catch (e) { }
44
- }
45
- catch (exception) {
46
- reason = exception;
47
- }
48
- return { state: WaiterState.RETRY, reason };
49
- };
50
- export const waitForWaitForReplicationSetActive = async (params, input) => {
51
- const serviceDefaults = { minDelay: 30, maxDelay: 30 };
52
- return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
53
- };
54
- export const waitUntilWaitForReplicationSetActive = async (params, input) => {
55
- const serviceDefaults = { minDelay: 30, maxDelay: 30 };
56
- const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
57
- return checkExceptions(result);
58
- };
77
+ });
78
+ }); };
@@ -1,43 +1,63 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
2
3
  import { GetReplicationSetCommand } from "../commands/GetReplicationSetCommand";
3
- const checkState = async (client, input) => {
4
- let reason;
5
- try {
6
- const result = await client.send(new GetReplicationSetCommand(input));
7
- reason = result;
8
- try {
9
- const returnComparator = () => {
10
- return result.replicationSet.status;
11
- };
12
- if (returnComparator() === "DELETING") {
13
- return { state: WaiterState.RETRY, reason };
14
- }
4
+ var checkState = function (client, input) { return __awaiter(void 0, void 0, void 0, function () {
5
+ var reason, result_1, returnComparator, returnComparator, exception_1;
6
+ return __generator(this, function (_a) {
7
+ switch (_a.label) {
8
+ case 0:
9
+ _a.trys.push([0, 2, , 3]);
10
+ return [4, client.send(new GetReplicationSetCommand(input))];
11
+ case 1:
12
+ result_1 = _a.sent();
13
+ reason = result_1;
14
+ try {
15
+ returnComparator = function () {
16
+ return result_1.replicationSet.status;
17
+ };
18
+ if (returnComparator() === "DELETING") {
19
+ return [2, { state: WaiterState.RETRY, reason: reason }];
20
+ }
21
+ }
22
+ catch (e) { }
23
+ try {
24
+ returnComparator = function () {
25
+ return result_1.replicationSet.status;
26
+ };
27
+ if (returnComparator() === "FAILED") {
28
+ return [2, { state: WaiterState.FAILURE, reason: reason }];
29
+ }
30
+ }
31
+ catch (e) { }
32
+ return [3, 3];
33
+ case 2:
34
+ exception_1 = _a.sent();
35
+ reason = exception_1;
36
+ if (exception_1.name && exception_1.name == "ResourceNotFoundException") {
37
+ return [2, { state: WaiterState.SUCCESS, reason: reason }];
38
+ }
39
+ return [3, 3];
40
+ case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
15
41
  }
16
- catch (e) { }
17
- try {
18
- const returnComparator = () => {
19
- return result.replicationSet.status;
20
- };
21
- if (returnComparator() === "FAILED") {
22
- return { state: WaiterState.FAILURE, reason };
23
- }
42
+ });
43
+ }); };
44
+ export var waitForWaitForReplicationSetDeleted = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
45
+ var serviceDefaults;
46
+ return __generator(this, function (_a) {
47
+ serviceDefaults = { minDelay: 30, maxDelay: 30 };
48
+ return [2, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
49
+ });
50
+ }); };
51
+ export var waitUntilWaitForReplicationSetDeleted = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
52
+ var serviceDefaults, result;
53
+ return __generator(this, function (_a) {
54
+ switch (_a.label) {
55
+ case 0:
56
+ serviceDefaults = { minDelay: 30, maxDelay: 30 };
57
+ return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
58
+ case 1:
59
+ result = _a.sent();
60
+ return [2, checkExceptions(result)];
24
61
  }
25
- catch (e) { }
26
- }
27
- catch (exception) {
28
- reason = exception;
29
- if (exception.name && exception.name == "ResourceNotFoundException") {
30
- return { state: WaiterState.SUCCESS, reason };
31
- }
32
- }
33
- return { state: WaiterState.RETRY, reason };
34
- };
35
- export const waitForWaitForReplicationSetDeleted = async (params, input) => {
36
- const serviceDefaults = { minDelay: 30, maxDelay: 30 };
37
- return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
38
- };
39
- export const waitUntilWaitForReplicationSetDeleted = async (params, input) => {
40
- const serviceDefaults = { minDelay: 30, maxDelay: 30 };
41
- const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
42
- return checkExceptions(result);
43
- };
62
+ });
63
+ }); };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-ssm-incidents",
3
3
  "description": "AWS SDK for JavaScript Ssm Incidents Client for Node.js, Browser and React Native",
4
- "version": "3.183.0",
4
+ "version": "3.186.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",
@@ -19,43 +19,43 @@
19
19
  "dependencies": {
20
20
  "@aws-crypto/sha256-browser": "2.0.0",
21
21
  "@aws-crypto/sha256-js": "2.0.0",
22
- "@aws-sdk/client-sts": "3.183.0",
23
- "@aws-sdk/config-resolver": "3.183.0",
24
- "@aws-sdk/credential-provider-node": "3.183.0",
25
- "@aws-sdk/fetch-http-handler": "3.183.0",
26
- "@aws-sdk/hash-node": "3.183.0",
27
- "@aws-sdk/invalid-dependency": "3.183.0",
28
- "@aws-sdk/middleware-content-length": "3.183.0",
29
- "@aws-sdk/middleware-host-header": "3.183.0",
30
- "@aws-sdk/middleware-logger": "3.183.0",
31
- "@aws-sdk/middleware-recursion-detection": "3.183.0",
32
- "@aws-sdk/middleware-retry": "3.183.0",
33
- "@aws-sdk/middleware-serde": "3.183.0",
34
- "@aws-sdk/middleware-signing": "3.183.0",
35
- "@aws-sdk/middleware-stack": "3.183.0",
36
- "@aws-sdk/middleware-user-agent": "3.183.0",
37
- "@aws-sdk/node-config-provider": "3.183.0",
38
- "@aws-sdk/node-http-handler": "3.183.0",
39
- "@aws-sdk/protocol-http": "3.183.0",
40
- "@aws-sdk/smithy-client": "3.183.0",
41
- "@aws-sdk/types": "3.183.0",
42
- "@aws-sdk/url-parser": "3.183.0",
43
- "@aws-sdk/util-base64-browser": "3.183.0",
44
- "@aws-sdk/util-base64-node": "3.183.0",
45
- "@aws-sdk/util-body-length-browser": "3.183.0",
46
- "@aws-sdk/util-body-length-node": "3.183.0",
47
- "@aws-sdk/util-defaults-mode-browser": "3.183.0",
48
- "@aws-sdk/util-defaults-mode-node": "3.183.0",
49
- "@aws-sdk/util-user-agent-browser": "3.183.0",
50
- "@aws-sdk/util-user-agent-node": "3.183.0",
51
- "@aws-sdk/util-utf8-browser": "3.183.0",
52
- "@aws-sdk/util-utf8-node": "3.183.0",
53
- "@aws-sdk/util-waiter": "3.183.0",
22
+ "@aws-sdk/client-sts": "3.186.0",
23
+ "@aws-sdk/config-resolver": "3.186.0",
24
+ "@aws-sdk/credential-provider-node": "3.186.0",
25
+ "@aws-sdk/fetch-http-handler": "3.186.0",
26
+ "@aws-sdk/hash-node": "3.186.0",
27
+ "@aws-sdk/invalid-dependency": "3.186.0",
28
+ "@aws-sdk/middleware-content-length": "3.186.0",
29
+ "@aws-sdk/middleware-host-header": "3.186.0",
30
+ "@aws-sdk/middleware-logger": "3.186.0",
31
+ "@aws-sdk/middleware-recursion-detection": "3.186.0",
32
+ "@aws-sdk/middleware-retry": "3.186.0",
33
+ "@aws-sdk/middleware-serde": "3.186.0",
34
+ "@aws-sdk/middleware-signing": "3.186.0",
35
+ "@aws-sdk/middleware-stack": "3.186.0",
36
+ "@aws-sdk/middleware-user-agent": "3.186.0",
37
+ "@aws-sdk/node-config-provider": "3.186.0",
38
+ "@aws-sdk/node-http-handler": "3.186.0",
39
+ "@aws-sdk/protocol-http": "3.186.0",
40
+ "@aws-sdk/smithy-client": "3.186.0",
41
+ "@aws-sdk/types": "3.186.0",
42
+ "@aws-sdk/url-parser": "3.186.0",
43
+ "@aws-sdk/util-base64-browser": "3.186.0",
44
+ "@aws-sdk/util-base64-node": "3.186.0",
45
+ "@aws-sdk/util-body-length-browser": "3.186.0",
46
+ "@aws-sdk/util-body-length-node": "3.186.0",
47
+ "@aws-sdk/util-defaults-mode-browser": "3.186.0",
48
+ "@aws-sdk/util-defaults-mode-node": "3.186.0",
49
+ "@aws-sdk/util-user-agent-browser": "3.186.0",
50
+ "@aws-sdk/util-user-agent-node": "3.186.0",
51
+ "@aws-sdk/util-utf8-browser": "3.186.0",
52
+ "@aws-sdk/util-utf8-node": "3.186.0",
53
+ "@aws-sdk/util-waiter": "3.186.0",
54
54
  "tslib": "^2.3.1",
55
55
  "uuid": "^8.3.2"
56
56
  },
57
57
  "devDependencies": {
58
- "@aws-sdk/service-client-documentation-generator": "3.183.0",
58
+ "@aws-sdk/service-client-documentation-generator": "3.186.0",
59
59
  "@tsconfig/recommended": "1.0.1",
60
60
  "@types/node": "^12.7.5",
61
61
  "@types/uuid": "^8.3.0",