@aws-sdk/client-codedeploy 3.181.0 → 3.183.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 (83) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +42 -50
  3. package/dist-cjs/models/models_0.js +23 -18
  4. package/dist-cjs/protocols/Aws_json1_1.js +12 -0
  5. package/dist-es/CodeDeploy.js +190 -197
  6. package/dist-es/CodeDeployClient.js +22 -28
  7. package/dist-es/commands/AddTagsToOnPremisesInstancesCommand.js +22 -29
  8. package/dist-es/commands/BatchGetApplicationRevisionsCommand.js +21 -28
  9. package/dist-es/commands/BatchGetApplicationsCommand.js +21 -28
  10. package/dist-es/commands/BatchGetDeploymentGroupsCommand.js +21 -28
  11. package/dist-es/commands/BatchGetDeploymentInstancesCommand.js +21 -28
  12. package/dist-es/commands/BatchGetDeploymentTargetsCommand.js +21 -28
  13. package/dist-es/commands/BatchGetDeploymentsCommand.js +21 -28
  14. package/dist-es/commands/BatchGetOnPremisesInstancesCommand.js +21 -28
  15. package/dist-es/commands/ContinueDeploymentCommand.js +22 -29
  16. package/dist-es/commands/CreateApplicationCommand.js +21 -28
  17. package/dist-es/commands/CreateDeploymentCommand.js +21 -28
  18. package/dist-es/commands/CreateDeploymentConfigCommand.js +21 -28
  19. package/dist-es/commands/CreateDeploymentGroupCommand.js +21 -28
  20. package/dist-es/commands/DeleteApplicationCommand.js +22 -29
  21. package/dist-es/commands/DeleteDeploymentConfigCommand.js +22 -29
  22. package/dist-es/commands/DeleteDeploymentGroupCommand.js +21 -28
  23. package/dist-es/commands/DeleteGitHubAccountTokenCommand.js +21 -28
  24. package/dist-es/commands/DeleteResourcesByExternalIdCommand.js +21 -28
  25. package/dist-es/commands/DeregisterOnPremisesInstanceCommand.js +22 -29
  26. package/dist-es/commands/GetApplicationCommand.js +21 -28
  27. package/dist-es/commands/GetApplicationRevisionCommand.js +21 -28
  28. package/dist-es/commands/GetDeploymentCommand.js +21 -28
  29. package/dist-es/commands/GetDeploymentConfigCommand.js +21 -28
  30. package/dist-es/commands/GetDeploymentGroupCommand.js +21 -28
  31. package/dist-es/commands/GetDeploymentInstanceCommand.js +21 -28
  32. package/dist-es/commands/GetDeploymentTargetCommand.js +21 -28
  33. package/dist-es/commands/GetOnPremisesInstanceCommand.js +21 -28
  34. package/dist-es/commands/ListApplicationRevisionsCommand.js +21 -28
  35. package/dist-es/commands/ListApplicationsCommand.js +21 -28
  36. package/dist-es/commands/ListDeploymentConfigsCommand.js +21 -28
  37. package/dist-es/commands/ListDeploymentGroupsCommand.js +21 -28
  38. package/dist-es/commands/ListDeploymentInstancesCommand.js +21 -28
  39. package/dist-es/commands/ListDeploymentTargetsCommand.js +21 -28
  40. package/dist-es/commands/ListDeploymentsCommand.js +21 -28
  41. package/dist-es/commands/ListGitHubAccountTokenNamesCommand.js +21 -28
  42. package/dist-es/commands/ListOnPremisesInstancesCommand.js +21 -28
  43. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  44. package/dist-es/commands/PutLifecycleEventHookExecutionStatusCommand.js +21 -28
  45. package/dist-es/commands/RegisterApplicationRevisionCommand.js +22 -29
  46. package/dist-es/commands/RegisterOnPremisesInstanceCommand.js +22 -29
  47. package/dist-es/commands/RemoveTagsFromOnPremisesInstancesCommand.js +22 -29
  48. package/dist-es/commands/SkipWaitTimeForInstanceTerminationCommand.js +22 -29
  49. package/dist-es/commands/StopDeploymentCommand.js +21 -28
  50. package/dist-es/commands/TagResourceCommand.js +21 -28
  51. package/dist-es/commands/UntagResourceCommand.js +21 -28
  52. package/dist-es/commands/UpdateApplicationCommand.js +22 -29
  53. package/dist-es/commands/UpdateDeploymentGroupCommand.js +21 -28
  54. package/dist-es/endpoints.js +8 -8
  55. package/dist-es/models/CodeDeployServiceException.js +5 -10
  56. package/dist-es/models/models_0.js +1727 -1447
  57. package/dist-es/pagination/ListApplicationRevisionsPaginator.js +24 -67
  58. package/dist-es/pagination/ListApplicationsPaginator.js +24 -67
  59. package/dist-es/pagination/ListDeploymentConfigsPaginator.js +24 -67
  60. package/dist-es/pagination/ListDeploymentGroupsPaginator.js +24 -67
  61. package/dist-es/pagination/ListDeploymentInstancesPaginator.js +24 -67
  62. package/dist-es/pagination/ListDeploymentsPaginator.js +24 -67
  63. package/dist-es/protocols/Aws_json1_1.js +4823 -5800
  64. package/dist-es/runtimeConfig.browser.js +26 -12
  65. package/dist-es/runtimeConfig.js +30 -12
  66. package/dist-es/runtimeConfig.native.js +8 -5
  67. package/dist-es/runtimeConfig.shared.js +8 -11
  68. package/dist-es/waiters/waitForDeploymentSuccessful.js +45 -65
  69. package/dist-types/CodeDeploy.d.ts +71 -79
  70. package/dist-types/CodeDeployClient.d.ts +42 -49
  71. package/dist-types/commands/BatchGetDeploymentInstancesCommand.d.ts +1 -1
  72. package/dist-types/commands/BatchGetDeploymentTargetsCommand.d.ts +7 -8
  73. package/dist-types/commands/ListApplicationsCommand.d.ts +1 -1
  74. package/dist-types/commands/ListDeploymentConfigsCommand.d.ts +1 -1
  75. package/dist-types/commands/ListDeploymentGroupsCommand.d.ts +2 -2
  76. package/dist-types/commands/ListDeploymentInstancesCommand.d.ts +4 -3
  77. package/dist-types/commands/ListDeploymentsCommand.d.ts +2 -2
  78. package/dist-types/commands/PutLifecycleEventHookExecutionStatusCommand.d.ts +9 -9
  79. package/dist-types/commands/RegisterApplicationRevisionCommand.d.ts +1 -1
  80. package/dist-types/commands/RegisterOnPremisesInstanceCommand.d.ts +1 -2
  81. package/dist-types/models/models_0.d.ts +375 -352
  82. package/dist-types/ts3.4/models/models_0.d.ts +13 -8
  83. package/package.json +34 -34
@@ -1,4 +1,3 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import packageInfo from "../package.json";
3
2
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
3
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
@@ -12,15 +11,30 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
12
11
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
12
  import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
14
13
  import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
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 });
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
+ };
26
40
  };
@@ -1,4 +1,3 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import packageInfo from "../package.json";
3
2
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
3
  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";
@@ -15,16 +14,35 @@ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shar
15
14
  import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
15
  import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
17
16
  import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
18
- export var getRuntimeConfig = function (config) {
19
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
+ export const getRuntimeConfig = (config) => {
20
18
  emitWarningIfUnsupportedVersion(process.version);
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 });
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
+ };
30
48
  };
@@ -1,8 +1,11 @@
1
- import { __assign } from "tslib";
2
1
  import { Sha256 } from "@aws-crypto/sha256-js";
3
2
  import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
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 });
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
+ };
8
11
  };
@@ -1,13 +1,10 @@
1
1
  import { parseUrl } from "@aws-sdk/url-parser";
2
2
  import { defaultRegionInfoProvider } from "./endpoints";
3
- export var getRuntimeConfig = function (config) {
4
- var _a, _b, _c, _d, _e;
5
- return ({
6
- apiVersion: "2014-10-06",
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 : "CodeDeploy",
11
- urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : parseUrl,
12
- });
13
- };
3
+ export const getRuntimeConfig = (config) => ({
4
+ apiVersion: "2014-10-06",
5
+ disableHostPrefix: config?.disableHostPrefix ?? false,
6
+ logger: config?.logger ?? {},
7
+ regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
8
+ serviceId: config?.serviceId ?? "CodeDeploy",
9
+ urlParser: config?.urlParser ?? parseUrl,
10
+ });
@@ -1,69 +1,49 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
3
2
  import { GetDeploymentCommand } from "../commands/GetDeploymentCommand";
4
- var checkState = function (client, input) { return __awaiter(void 0, void 0, void 0, function () {
5
- var reason, result_1, 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 GetDeploymentCommand(input))];
11
- case 1:
12
- result_1 = _a.sent();
13
- reason = result_1;
14
- try {
15
- returnComparator = function () {
16
- return result_1.deploymentInfo.status;
17
- };
18
- if (returnComparator() === "Succeeded") {
19
- return [2, { state: WaiterState.SUCCESS, reason: reason }];
20
- }
21
- }
22
- catch (e) { }
23
- try {
24
- returnComparator = function () {
25
- return result_1.deploymentInfo.status;
26
- };
27
- if (returnComparator() === "Failed") {
28
- return [2, { state: WaiterState.FAILURE, reason: reason }];
29
- }
30
- }
31
- catch (e) { }
32
- try {
33
- returnComparator = function () {
34
- return result_1.deploymentInfo.status;
35
- };
36
- if (returnComparator() === "Stopped") {
37
- return [2, { state: WaiterState.FAILURE, reason: reason }];
38
- }
39
- }
40
- catch (e) { }
41
- return [3, 3];
42
- case 2:
43
- exception_1 = _a.sent();
44
- reason = exception_1;
45
- return [3, 3];
46
- case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
3
+ const checkState = async (client, input) => {
4
+ let reason;
5
+ try {
6
+ const result = await client.send(new GetDeploymentCommand(input));
7
+ reason = result;
8
+ try {
9
+ const returnComparator = () => {
10
+ return result.deploymentInfo.status;
11
+ };
12
+ if (returnComparator() === "Succeeded") {
13
+ return { state: WaiterState.SUCCESS, reason };
14
+ }
47
15
  }
48
- });
49
- }); };
50
- export var waitForDeploymentSuccessful = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
51
- var serviceDefaults;
52
- return __generator(this, function (_a) {
53
- serviceDefaults = { minDelay: 15, maxDelay: 120 };
54
- return [2, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
55
- });
56
- }); };
57
- export var waitUntilDeploymentSuccessful = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
58
- var serviceDefaults, result;
59
- return __generator(this, function (_a) {
60
- switch (_a.label) {
61
- case 0:
62
- serviceDefaults = { minDelay: 15, maxDelay: 120 };
63
- return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
64
- case 1:
65
- result = _a.sent();
66
- return [2, checkExceptions(result)];
16
+ catch (e) { }
17
+ try {
18
+ const returnComparator = () => {
19
+ return result.deploymentInfo.status;
20
+ };
21
+ if (returnComparator() === "Failed") {
22
+ return { state: WaiterState.FAILURE, reason };
23
+ }
67
24
  }
68
- });
69
- }); };
25
+ catch (e) { }
26
+ try {
27
+ const returnComparator = () => {
28
+ return result.deploymentInfo.status;
29
+ };
30
+ if (returnComparator() === "Stopped") {
31
+ return { state: WaiterState.FAILURE, reason };
32
+ }
33
+ }
34
+ catch (e) { }
35
+ }
36
+ catch (exception) {
37
+ reason = exception;
38
+ }
39
+ return { state: WaiterState.RETRY, reason };
40
+ };
41
+ export const waitForDeploymentSuccessful = async (params, input) => {
42
+ const serviceDefaults = { minDelay: 15, maxDelay: 120 };
43
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
44
+ };
45
+ export const waitUntilDeploymentSuccessful = async (params, input) => {
46
+ const serviceDefaults = { minDelay: 15, maxDelay: 120 };
47
+ const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
48
+ return checkExceptions(result);
49
+ };
@@ -48,30 +48,29 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./command
48
48
  import { UpdateApplicationCommandInput, UpdateApplicationCommandOutput } from "./commands/UpdateApplicationCommand";
49
49
  import { UpdateDeploymentGroupCommandInput, UpdateDeploymentGroupCommandOutput } from "./commands/UpdateDeploymentGroupCommand";
50
50
  /**
51
- * <fullname>AWS CodeDeploy</fullname>
52
- * <p>AWS CodeDeploy is a deployment service that automates application deployments to
53
- * Amazon EC2 instances, on-premises instances running in your own facility, serverless AWS
54
- * Lambda functions, or applications in an Amazon ECS service.</p>
51
+ * <p>CodeDeploy is a deployment service that automates application deployments
52
+ * to Amazon EC2 instances, on-premises instances running in your own facility,
53
+ * serverless Lambda functions, or applications in an Amazon ECS
54
+ * service.</p>
55
55
  * <p>You can deploy a nearly unlimited variety of application content, such as an updated
56
- * Lambda function, updated applications in an Amazon ECS service, code, web and
57
- * configuration files, executables, packages, scripts, multimedia files, and so on. AWS
58
- * CodeDeploy can deploy application content stored in Amazon S3 buckets, GitHub
59
- * repositories, or Bitbucket repositories. You do not need to make changes to your
60
- * existing code before you can use AWS CodeDeploy.</p>
61
- * <p>AWS CodeDeploy makes it easier for you to rapidly release new features, helps you
62
- * avoid downtime during application deployment, and handles the complexity of updating
56
+ * Lambda function, updated applications in an Amazon ECS service,
57
+ * code, web and configuration files, executables, packages, scripts, multimedia files, and
58
+ * so on. CodeDeploy can deploy application content stored in Amazon S3
59
+ * buckets, GitHub repositories, or Bitbucket repositories. You do not need to make changes
60
+ * to your existing code before you can use CodeDeploy.</p>
61
+ * <p>CodeDeploy makes it easier for you to rapidly release new features, helps
62
+ * you avoid downtime during application deployment, and handles the complexity of updating
63
63
  * your applications, without many of the risks associated with error-prone manual
64
64
  * deployments.</p>
65
65
  * <p>
66
- * <b>AWS CodeDeploy Components</b>
66
+ * <b>CodeDeploy Components</b>
67
67
  * </p>
68
- * <p>Use the information in this guide to help you work with the following AWS CodeDeploy
69
- * components:</p>
68
+ * <p>Use the information in this guide to help you work with the following CodeDeploy components:</p>
70
69
  * <ul>
71
70
  * <li>
72
71
  * <p>
73
72
  * <b>Application</b>: A name that uniquely identifies
74
- * the application you want to deploy. AWS CodeDeploy uses this name, which
73
+ * the application you want to deploy. CodeDeploy uses this name, which
75
74
  * functions as a container, to ensure the correct combination of revision,
76
75
  * deployment configuration, and deployment group are referenced during a
77
76
  * deployment.</p>
@@ -79,72 +78,66 @@ import { UpdateDeploymentGroupCommandInput, UpdateDeploymentGroupCommandOutput }
79
78
  * <li>
80
79
  * <p>
81
80
  * <b>Deployment group</b>: A set of individual
82
- * instances, CodeDeploy Lambda deployment configuration settings, or an Amazon ECS
83
- * service and network details. A Lambda deployment group specifies how to route
84
- * traffic to a new version of a Lambda function. An Amazon ECS deployment group
85
- * specifies the service created in Amazon ECS to deploy, a load balancer, and a
86
- * listener to reroute production traffic to an updated containerized application.
87
- * An EC2/On-premises deployment group contains individually tagged instances,
88
- * Amazon EC2 instances in Amazon EC2 Auto Scaling groups, or both. All deployment
89
- * groups can specify optional trigger, alarm, and rollback settings.</p>
81
+ * instances, CodeDeploy
82
+ * Lambda deployment configuration settings, or an Amazon ECS
83
+ * service and network details. A Lambda deployment group specifies how
84
+ * to route traffic to a new version of a Lambda function. An Amazon ECS deployment group specifies the service created in Amazon ECS to deploy, a load balancer, and a listener to reroute production
85
+ * traffic to an updated containerized application. An Amazon EC2/On-premises deployment group contains individually tagged instances, Amazon EC2 instances in Amazon EC2 Auto Scaling groups, or both. All
86
+ * deployment groups can specify optional trigger, alarm, and rollback
87
+ * settings.</p>
90
88
  * </li>
91
89
  * <li>
92
90
  * <p>
93
91
  * <b>Deployment configuration</b>: A set of deployment
94
- * rules and deployment success and failure conditions used by AWS CodeDeploy
95
- * during a deployment.</p>
92
+ * rules and deployment success and failure conditions used by CodeDeploy during a deployment.</p>
96
93
  * </li>
97
94
  * <li>
98
95
  * <p>
99
96
  * <b>Deployment</b>: The process and the components used
100
- * when updating a Lambda function, a containerized application in an Amazon ECS
101
- * service, or of installing content on one or more instances. </p>
97
+ * when updating a Lambda function, a containerized application in an
98
+ * Amazon ECS service, or of installing content on one or more
99
+ * instances. </p>
102
100
  * </li>
103
101
  * <li>
104
102
  * <p>
105
- * <b>Application revisions</b>: For an AWS Lambda
106
- * deployment, this is an AppSpec file that specifies the Lambda function to be
107
- * updated and one or more functions to validate deployment lifecycle events. For
108
- * an Amazon ECS deployment, this is an AppSpec file that specifies the Amazon ECS
109
- * task definition, container, and port where production traffic is rerouted. For
110
- * an EC2/On-premises deployment, this is an archive file that contains source
111
- * content—source code, webpages, executable files, and deployment scripts—along
112
- * with an AppSpec file. Revisions are stored in Amazon S3 buckets or GitHub
113
- * repositories. For Amazon S3, a revision is uniquely identified by its Amazon S3
114
- * object key and its ETag, version, or both. For GitHub, a revision is uniquely
103
+ * <b>Application revisions</b>: For an Lambda deployment, this is an AppSpec file that specifies the
104
+ * Lambda function to be updated and one or more functions to
105
+ * validate deployment lifecycle events. For an Amazon ECS deployment, this
106
+ * is an AppSpec file that specifies the Amazon ECS task definition,
107
+ * container, and port where production traffic is rerouted. For an EC2/On-premises
108
+ * deployment, this is an archive file that contains source content—source code,
109
+ * webpages, executable files, and deployment scripts—along with an AppSpec file.
110
+ * Revisions are stored in Amazon S3 buckets or GitHub repositories. For
111
+ * Amazon S3, a revision is uniquely identified by its Amazon S3 object key and its ETag, version, or both. For GitHub, a revision is uniquely
115
112
  * identified by its commit ID.</p>
116
113
  * </li>
117
114
  * </ul>
118
115
  * <p>This guide also contains information to help you get details about the instances in
119
- * your deployments, to make on-premises instances available for AWS CodeDeploy
120
- * deployments, to get details about a Lambda function deployment, and to get details about
121
- * Amazon ECS service deployments.</p>
116
+ * your deployments, to make on-premises instances available for CodeDeploy
117
+ * deployments, to get details about a Lambda function deployment, and to get
118
+ * details about Amazon ECS service deployments.</p>
122
119
  * <p>
123
- * <b>AWS CodeDeploy Information Resources</b>
120
+ * <b>CodeDeploy Information Resources</b>
124
121
  * </p>
125
122
  * <ul>
126
123
  * <li>
127
124
  * <p>
128
- * <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide">AWS CodeDeploy
129
- * User Guide</a>
125
+ * <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide">CodeDeploy User Guide</a>
130
126
  * </p>
131
127
  * </li>
132
128
  * <li>
133
129
  * <p>
134
- * <a href="https://docs.aws.amazon.com/codedeploy/latest/APIReference/">AWS
135
- * CodeDeploy API Reference Guide</a>
130
+ * <a href="https://docs.aws.amazon.com/codedeploy/latest/APIReference/">CodeDeploy API Reference Guide</a>
136
131
  * </p>
137
132
  * </li>
138
133
  * <li>
139
134
  * <p>
140
- * <a href="https://docs.aws.amazon.com/cli/latest/reference/deploy/index.html">AWS
141
- * CLI Reference for AWS CodeDeploy</a>
135
+ * <a href="https://docs.aws.amazon.com/cli/latest/reference/deploy/index.html">CLI Reference for CodeDeploy</a>
142
136
  * </p>
143
137
  * </li>
144
138
  * <li>
145
139
  * <p>
146
- * <a href="https://forums.aws.amazon.com/forum.jspa?forumID=179">AWS CodeDeploy
147
- * Developer Forum</a>
140
+ * <a href="https://forums.aws.amazon.com/forum.jspa?forumID=179">CodeDeploy Developer Forum</a>
148
141
  * </p>
149
142
  * </li>
150
143
  * </ul>
@@ -184,7 +177,7 @@ export declare class CodeDeploy extends CodeDeployClient {
184
177
  * instead. </p>
185
178
  * </note>
186
179
  * <p> Returns an array of one or more instances associated with a deployment. This method
187
- * works with EC2/On-premises and AWS Lambda compute platforms. The newer
180
+ * works with EC2/On-premises and Lambda compute platforms. The newer
188
181
  * <code>BatchGetDeploymentTargets</code> works with all compute platforms. The maximum
189
182
  * number of instances that can be returned is 25.</p>
190
183
  */
@@ -208,23 +201,22 @@ export declare class CodeDeploy extends CodeDeployClient {
208
201
  * <ul>
209
202
  * <li>
210
203
  * <p>
211
- * <b>EC2/On-premises</b>: Information about EC2 instance
212
- * targets. </p>
204
+ * <b>EC2/On-premises</b>: Information about Amazon EC2 instance targets. </p>
213
205
  * </li>
214
206
  * <li>
215
207
  * <p>
216
- * <b>AWS Lambda</b>: Information about Lambda functions
217
- * targets. </p>
208
+ * <b>Lambda</b>: Information about
209
+ * Lambda functions targets. </p>
218
210
  * </li>
219
211
  * <li>
220
212
  * <p>
221
- * <b>Amazon ECS</b>: Information about Amazon ECS
222
- * service targets. </p>
213
+ * <b>Amazon ECS</b>: Information about Amazon ECS service targets. </p>
223
214
  * </li>
224
215
  * <li>
225
216
  * <p>
226
- * <b>CloudFormation</b>: Information about targets of
227
- * blue/green deployments initiated by a CloudFormation stack update.</p>
217
+ * <b>CloudFormation</b>: Information about
218
+ * targets of blue/green deployments initiated by a CloudFormation stack
219
+ * update.</p>
228
220
  * </li>
229
221
  * </ul>
230
222
  */
@@ -375,20 +367,20 @@ export declare class CodeDeploy extends CodeDeployClient {
375
367
  listApplicationRevisions(args: ListApplicationRevisionsCommandInput, cb: (err: any, data?: ListApplicationRevisionsCommandOutput) => void): void;
376
368
  listApplicationRevisions(args: ListApplicationRevisionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListApplicationRevisionsCommandOutput) => void): void;
377
369
  /**
378
- * <p>Lists the applications registered with the IAM user or AWS account.</p>
370
+ * <p>Lists the applications registered with the IAM user or Amazon Web Services account.</p>
379
371
  */
380
372
  listApplications(args: ListApplicationsCommandInput, options?: __HttpHandlerOptions): Promise<ListApplicationsCommandOutput>;
381
373
  listApplications(args: ListApplicationsCommandInput, cb: (err: any, data?: ListApplicationsCommandOutput) => void): void;
382
374
  listApplications(args: ListApplicationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListApplicationsCommandOutput) => void): void;
383
375
  /**
384
- * <p>Lists the deployment configurations with the IAM user or AWS account.</p>
376
+ * <p>Lists the deployment configurations with the IAM user or Amazon Web Services account.</p>
385
377
  */
386
378
  listDeploymentConfigs(args: ListDeploymentConfigsCommandInput, options?: __HttpHandlerOptions): Promise<ListDeploymentConfigsCommandOutput>;
387
379
  listDeploymentConfigs(args: ListDeploymentConfigsCommandInput, cb: (err: any, data?: ListDeploymentConfigsCommandOutput) => void): void;
388
380
  listDeploymentConfigs(args: ListDeploymentConfigsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListDeploymentConfigsCommandOutput) => void): void;
389
381
  /**
390
- * <p>Lists the deployment groups for an application registered with the IAM user or AWS
391
- * account.</p>
382
+ * <p>Lists the deployment groups for an application registered with the IAM
383
+ * user or Amazon Web Services account.</p>
392
384
  */
393
385
  listDeploymentGroups(args: ListDeploymentGroupsCommandInput, options?: __HttpHandlerOptions): Promise<ListDeploymentGroupsCommandOutput>;
394
386
  listDeploymentGroups(args: ListDeploymentGroupsCommandInput, cb: (err: any, data?: ListDeploymentGroupsCommandOutput) => void): void;
@@ -399,17 +391,18 @@ export declare class CodeDeploy extends CodeDeployClient {
399
391
  * <note>
400
392
  * <p> The newer <code>BatchGetDeploymentTargets</code> should be used instead because
401
393
  * it works with all compute types. <code>ListDeploymentInstances</code> throws an
402
- * exception if it is used with a compute platform other than EC2/On-premises or AWS
403
- * Lambda. </p>
394
+ * exception if it is used with a compute platform other than EC2/On-premises or
395
+ * Lambda. </p>
404
396
  * </note>
405
- * <p> Lists the instance for a deployment associated with the IAM user or AWS account. </p>
397
+ * <p> Lists the instance for a deployment associated with the IAM user or
398
+ * Amazon Web Services account. </p>
406
399
  */
407
400
  listDeploymentInstances(args: ListDeploymentInstancesCommandInput, options?: __HttpHandlerOptions): Promise<ListDeploymentInstancesCommandOutput>;
408
401
  listDeploymentInstances(args: ListDeploymentInstancesCommandInput, cb: (err: any, data?: ListDeploymentInstancesCommandOutput) => void): void;
409
402
  listDeploymentInstances(args: ListDeploymentInstancesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListDeploymentInstancesCommandOutput) => void): void;
410
403
  /**
411
- * <p>Lists the deployments in a deployment group for an application registered with the IAM
412
- * user or AWS account.</p>
404
+ * <p>Lists the deployments in a deployment group for an application registered with the
405
+ * IAM user or Amazon Web Services account.</p>
413
406
  */
414
407
  listDeployments(args: ListDeploymentsCommandInput, options?: __HttpHandlerOptions): Promise<ListDeploymentsCommandOutput>;
415
408
  listDeployments(args: ListDeploymentsCommandInput, cb: (err: any, data?: ListDeploymentsCommandOutput) => void): void;
@@ -443,21 +436,21 @@ export declare class CodeDeploy extends CodeDeployClient {
443
436
  listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
444
437
  listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
445
438
  /**
446
- * <p> Sets the result of a Lambda validation function. The function validates lifecycle
447
- * hooks during a deployment that uses the AWS Lambda or Amazon ECS compute platform. For
448
- * AWS Lambda deployments, the available lifecycle hooks are
449
- * <code>BeforeAllowTraffic</code> and <code>AfterAllowTraffic</code>. For Amazon ECS
450
- * deployments, the available lifecycle hooks are <code>BeforeInstall</code>,
451
- * <code>AfterInstall</code>, <code>AfterAllowTestTraffic</code>,
452
- * <code>BeforeAllowTraffic</code>, and <code>AfterAllowTraffic</code>. Lambda
453
- * validation functions return <code>Succeeded</code> or <code>Failed</code>. For more
454
- * information, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-lambda">AppSpec 'hooks' Section for an AWS Lambda Deployment </a> and <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-ecs">AppSpec 'hooks' Section for an Amazon ECS Deployment</a>.</p>
439
+ * <p> Sets the result of a Lambda validation function. The function validates
440
+ * lifecycle hooks during a deployment that uses the Lambda or Amazon ECS compute platform. For Lambda deployments, the available
441
+ * lifecycle hooks are <code>BeforeAllowTraffic</code> and <code>AfterAllowTraffic</code>.
442
+ * For Amazon ECS deployments, the available lifecycle hooks are
443
+ * <code>BeforeInstall</code>, <code>AfterInstall</code>,
444
+ * <code>AfterAllowTestTraffic</code>, <code>BeforeAllowTraffic</code>, and
445
+ * <code>AfterAllowTraffic</code>. Lambda validation functions return
446
+ * <code>Succeeded</code> or <code>Failed</code>. For more information, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-lambda">AppSpec 'hooks' Section for an Lambda Deployment </a> and
447
+ * <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-ecs">AppSpec 'hooks' Section for an Amazon ECS Deployment</a>.</p>
455
448
  */
456
449
  putLifecycleEventHookExecutionStatus(args: PutLifecycleEventHookExecutionStatusCommandInput, options?: __HttpHandlerOptions): Promise<PutLifecycleEventHookExecutionStatusCommandOutput>;
457
450
  putLifecycleEventHookExecutionStatus(args: PutLifecycleEventHookExecutionStatusCommandInput, cb: (err: any, data?: PutLifecycleEventHookExecutionStatusCommandOutput) => void): void;
458
451
  putLifecycleEventHookExecutionStatus(args: PutLifecycleEventHookExecutionStatusCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutLifecycleEventHookExecutionStatusCommandOutput) => void): void;
459
452
  /**
460
- * <p>Registers with AWS CodeDeploy a revision for the specified application.</p>
453
+ * <p>Registers with CodeDeploy a revision for the specified application.</p>
461
454
  */
462
455
  registerApplicationRevision(args: RegisterApplicationRevisionCommandInput, options?: __HttpHandlerOptions): Promise<RegisterApplicationRevisionCommandOutput>;
463
456
  registerApplicationRevision(args: RegisterApplicationRevisionCommandInput, cb: (err: any, data?: RegisterApplicationRevisionCommandOutput) => void): void;
@@ -465,8 +458,7 @@ export declare class CodeDeploy extends CodeDeployClient {
465
458
  /**
466
459
  * <p>Registers an on-premises instance.</p>
467
460
  * <note>
468
- * <p>Only one IAM ARN (an IAM session ARN or IAM user ARN) is supported in the request.
469
- * You cannot use both.</p>
461
+ * <p>Only one IAM ARN (an IAM session ARN or IAM user ARN) is supported in the request. You cannot use both.</p>
470
462
  * </note>
471
463
  */
472
464
  registerOnPremisesInstance(args: RegisterOnPremisesInstanceCommandInput, options?: __HttpHandlerOptions): Promise<RegisterOnPremisesInstanceCommandOutput>;