@aws-sdk/client-transfer 3.185.0 → 3.188.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 (93) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist-cjs/protocols/Aws_json1_1.js +24 -0
  3. package/dist-es/Transfer.js +234 -241
  4. package/dist-es/TransferClient.js +22 -28
  5. package/dist-es/commands/CreateAccessCommand.js +21 -28
  6. package/dist-es/commands/CreateAgreementCommand.js +21 -28
  7. package/dist-es/commands/CreateConnectorCommand.js +21 -28
  8. package/dist-es/commands/CreateProfileCommand.js +21 -28
  9. package/dist-es/commands/CreateServerCommand.js +21 -28
  10. package/dist-es/commands/CreateUserCommand.js +21 -28
  11. package/dist-es/commands/CreateWorkflowCommand.js +21 -28
  12. package/dist-es/commands/DeleteAccessCommand.js +22 -29
  13. package/dist-es/commands/DeleteAgreementCommand.js +22 -29
  14. package/dist-es/commands/DeleteCertificateCommand.js +22 -29
  15. package/dist-es/commands/DeleteConnectorCommand.js +22 -29
  16. package/dist-es/commands/DeleteHostKeyCommand.js +22 -29
  17. package/dist-es/commands/DeleteProfileCommand.js +22 -29
  18. package/dist-es/commands/DeleteServerCommand.js +22 -29
  19. package/dist-es/commands/DeleteSshPublicKeyCommand.js +22 -29
  20. package/dist-es/commands/DeleteUserCommand.js +22 -29
  21. package/dist-es/commands/DeleteWorkflowCommand.js +22 -29
  22. package/dist-es/commands/DescribeAccessCommand.js +21 -28
  23. package/dist-es/commands/DescribeAgreementCommand.js +21 -28
  24. package/dist-es/commands/DescribeCertificateCommand.js +21 -28
  25. package/dist-es/commands/DescribeConnectorCommand.js +21 -28
  26. package/dist-es/commands/DescribeExecutionCommand.js +21 -28
  27. package/dist-es/commands/DescribeHostKeyCommand.js +21 -28
  28. package/dist-es/commands/DescribeProfileCommand.js +21 -28
  29. package/dist-es/commands/DescribeSecurityPolicyCommand.js +21 -28
  30. package/dist-es/commands/DescribeServerCommand.js +21 -28
  31. package/dist-es/commands/DescribeUserCommand.js +21 -28
  32. package/dist-es/commands/DescribeWorkflowCommand.js +21 -28
  33. package/dist-es/commands/ImportCertificateCommand.js +21 -28
  34. package/dist-es/commands/ImportHostKeyCommand.js +21 -28
  35. package/dist-es/commands/ImportSshPublicKeyCommand.js +21 -28
  36. package/dist-es/commands/ListAccessesCommand.js +21 -28
  37. package/dist-es/commands/ListAgreementsCommand.js +21 -28
  38. package/dist-es/commands/ListCertificatesCommand.js +21 -28
  39. package/dist-es/commands/ListConnectorsCommand.js +21 -28
  40. package/dist-es/commands/ListExecutionsCommand.js +21 -28
  41. package/dist-es/commands/ListHostKeysCommand.js +21 -28
  42. package/dist-es/commands/ListProfilesCommand.js +21 -28
  43. package/dist-es/commands/ListSecurityPoliciesCommand.js +21 -28
  44. package/dist-es/commands/ListServersCommand.js +21 -28
  45. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  46. package/dist-es/commands/ListUsersCommand.js +21 -28
  47. package/dist-es/commands/ListWorkflowsCommand.js +21 -28
  48. package/dist-es/commands/SendWorkflowStepStateCommand.js +21 -28
  49. package/dist-es/commands/StartFileTransferCommand.js +21 -28
  50. package/dist-es/commands/StartServerCommand.js +22 -29
  51. package/dist-es/commands/StopServerCommand.js +22 -29
  52. package/dist-es/commands/TagResourceCommand.js +22 -29
  53. package/dist-es/commands/TestIdentityProviderCommand.js +21 -28
  54. package/dist-es/commands/UntagResourceCommand.js +22 -29
  55. package/dist-es/commands/UpdateAccessCommand.js +21 -28
  56. package/dist-es/commands/UpdateAgreementCommand.js +21 -28
  57. package/dist-es/commands/UpdateCertificateCommand.js +21 -28
  58. package/dist-es/commands/UpdateConnectorCommand.js +21 -28
  59. package/dist-es/commands/UpdateHostKeyCommand.js +21 -28
  60. package/dist-es/commands/UpdateProfileCommand.js +21 -28
  61. package/dist-es/commands/UpdateServerCommand.js +21 -28
  62. package/dist-es/commands/UpdateUserCommand.js +21 -28
  63. package/dist-es/endpoints.js +8 -8
  64. package/dist-es/models/TransferServiceException.js +5 -10
  65. package/dist-es/models/models_0.js +572 -263
  66. package/dist-es/pagination/ListAccessesPaginator.js +25 -68
  67. package/dist-es/pagination/ListAgreementsPaginator.js +25 -68
  68. package/dist-es/pagination/ListCertificatesPaginator.js +25 -68
  69. package/dist-es/pagination/ListConnectorsPaginator.js +25 -68
  70. package/dist-es/pagination/ListExecutionsPaginator.js +25 -68
  71. package/dist-es/pagination/ListProfilesPaginator.js +25 -68
  72. package/dist-es/pagination/ListSecurityPoliciesPaginator.js +25 -68
  73. package/dist-es/pagination/ListServersPaginator.js +25 -68
  74. package/dist-es/pagination/ListTagsForResourcePaginator.js +25 -68
  75. package/dist-es/pagination/ListUsersPaginator.js +25 -68
  76. package/dist-es/pagination/ListWorkflowsPaginator.js +25 -68
  77. package/dist-es/protocols/Aws_json1_1.js +3985 -5067
  78. package/dist-es/runtimeConfig.browser.js +26 -12
  79. package/dist-es/runtimeConfig.js +30 -12
  80. package/dist-es/runtimeConfig.native.js +8 -5
  81. package/dist-es/runtimeConfig.shared.js +8 -11
  82. package/dist-es/waiters/waitForServerOffline.js +36 -56
  83. package/dist-es/waiters/waitForServerOnline.js +36 -56
  84. package/dist-types/Transfer.d.ts +10 -8
  85. package/dist-types/commands/CreateConnectorCommand.d.ts +2 -2
  86. package/dist-types/commands/CreateProfileCommand.d.ts +1 -2
  87. package/dist-types/commands/ImportHostKeyCommand.d.ts +2 -1
  88. package/dist-types/commands/ListHostKeysCommand.d.ts +2 -1
  89. package/dist-types/commands/StartFileTransferCommand.d.ts +1 -1
  90. package/dist-types/commands/UpdateHostKeyCommand.d.ts +2 -1
  91. package/dist-types/models/models_0.d.ts +118 -67
  92. package/dist-types/ts3.4/models/models_0.d.ts +2 -1
  93. 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: "2018-11-05",
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 : "Transfer",
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: "2018-11-05",
5
+ disableHostPrefix: config?.disableHostPrefix ?? false,
6
+ logger: config?.logger ?? {},
7
+ regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
8
+ serviceId: config?.serviceId ?? "Transfer",
9
+ urlParser: config?.urlParser ?? parseUrl,
10
+ });
@@ -1,60 +1,40 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
3
2
  import { DescribeServerCommand } from "../commands/DescribeServerCommand";
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 DescribeServerCommand(input))];
11
- case 1:
12
- result_1 = _a.sent();
13
- reason = result_1;
14
- try {
15
- returnComparator = function () {
16
- return result_1.Server.State;
17
- };
18
- if (returnComparator() === "OFFLINE") {
19
- return [2, { state: WaiterState.SUCCESS, reason: reason }];
20
- }
21
- }
22
- catch (e) { }
23
- try {
24
- returnComparator = function () {
25
- return result_1.Server.State;
26
- };
27
- if (returnComparator() === "STOP_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
- return [3, 3];
37
- 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 DescribeServerCommand(input));
7
+ reason = result;
8
+ try {
9
+ const returnComparator = () => {
10
+ return result.Server.State;
11
+ };
12
+ if (returnComparator() === "OFFLINE") {
13
+ return { state: WaiterState.SUCCESS, reason };
14
+ }
38
15
  }
39
- });
40
- }); };
41
- export var waitForServerOffline = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
42
- var serviceDefaults;
43
- return __generator(this, function (_a) {
44
- serviceDefaults = { minDelay: 30, maxDelay: 120 };
45
- return [2, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
46
- });
47
- }); };
48
- export var waitUntilServerOffline = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
49
- var serviceDefaults, result;
50
- return __generator(this, function (_a) {
51
- switch (_a.label) {
52
- case 0:
53
- serviceDefaults = { minDelay: 30, maxDelay: 120 };
54
- return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
55
- case 1:
56
- result = _a.sent();
57
- return [2, checkExceptions(result)];
16
+ catch (e) { }
17
+ try {
18
+ const returnComparator = () => {
19
+ return result.Server.State;
20
+ };
21
+ if (returnComparator() === "STOP_FAILED") {
22
+ return { state: WaiterState.FAILURE, reason };
23
+ }
58
24
  }
59
- });
60
- }); };
25
+ catch (e) { }
26
+ }
27
+ catch (exception) {
28
+ reason = exception;
29
+ }
30
+ return { state: WaiterState.RETRY, reason };
31
+ };
32
+ export const waitForServerOffline = async (params, input) => {
33
+ const serviceDefaults = { minDelay: 30, maxDelay: 120 };
34
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
35
+ };
36
+ export const waitUntilServerOffline = async (params, input) => {
37
+ const serviceDefaults = { minDelay: 30, maxDelay: 120 };
38
+ const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
39
+ return checkExceptions(result);
40
+ };
@@ -1,60 +1,40 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
3
2
  import { DescribeServerCommand } from "../commands/DescribeServerCommand";
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 DescribeServerCommand(input))];
11
- case 1:
12
- result_1 = _a.sent();
13
- reason = result_1;
14
- try {
15
- returnComparator = function () {
16
- return result_1.Server.State;
17
- };
18
- if (returnComparator() === "ONLINE") {
19
- return [2, { state: WaiterState.SUCCESS, reason: reason }];
20
- }
21
- }
22
- catch (e) { }
23
- try {
24
- returnComparator = function () {
25
- return result_1.Server.State;
26
- };
27
- if (returnComparator() === "START_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
- return [3, 3];
37
- 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 DescribeServerCommand(input));
7
+ reason = result;
8
+ try {
9
+ const returnComparator = () => {
10
+ return result.Server.State;
11
+ };
12
+ if (returnComparator() === "ONLINE") {
13
+ return { state: WaiterState.SUCCESS, reason };
14
+ }
38
15
  }
39
- });
40
- }); };
41
- export var waitForServerOnline = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
42
- var serviceDefaults;
43
- return __generator(this, function (_a) {
44
- serviceDefaults = { minDelay: 30, maxDelay: 120 };
45
- return [2, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
46
- });
47
- }); };
48
- export var waitUntilServerOnline = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
49
- var serviceDefaults, result;
50
- return __generator(this, function (_a) {
51
- switch (_a.label) {
52
- case 0:
53
- serviceDefaults = { minDelay: 30, maxDelay: 120 };
54
- return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
55
- case 1:
56
- result = _a.sent();
57
- return [2, checkExceptions(result)];
16
+ catch (e) { }
17
+ try {
18
+ const returnComparator = () => {
19
+ return result.Server.State;
20
+ };
21
+ if (returnComparator() === "START_FAILED") {
22
+ return { state: WaiterState.FAILURE, reason };
23
+ }
58
24
  }
59
- });
60
- }); };
25
+ catch (e) { }
26
+ }
27
+ catch (exception) {
28
+ reason = exception;
29
+ }
30
+ return { state: WaiterState.RETRY, reason };
31
+ };
32
+ export const waitForServerOnline = async (params, input) => {
33
+ const serviceDefaults = { minDelay: 30, maxDelay: 120 };
34
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
35
+ };
36
+ export const waitUntilServerOnline = async (params, input) => {
37
+ const serviceDefaults = { minDelay: 30, maxDelay: 120 };
38
+ const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
39
+ return checkExceptions(result);
40
+ };
@@ -95,15 +95,14 @@ export declare class Transfer extends TransferClient {
95
95
  createAgreement(args: CreateAgreementCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateAgreementCommandOutput) => void): void;
96
96
  /**
97
97
  * <p>Creates the connector, which captures the parameters for an outbound connection for the
98
- * AS2 protocol. The connector is required for sending files from a
99
- * customer's non Amazon Web Services server. </p>
98
+ * AS2 protocol. The connector is required for sending files to an externally hosted AS2 server.
99
+ * For more details about connectors, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/create-b2b-server.html#configure-as2-connector">Create AS2 connectors</a>.</p>
100
100
  */
101
101
  createConnector(args: CreateConnectorCommandInput, options?: __HttpHandlerOptions): Promise<CreateConnectorCommandOutput>;
102
102
  createConnector(args: CreateConnectorCommandInput, cb: (err: any, data?: CreateConnectorCommandOutput) => void): void;
103
103
  createConnector(args: CreateConnectorCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateConnectorCommandOutput) => void): void;
104
104
  /**
105
- * <p>Creates the profile for the AS2 process. The agreement is between the partner and the AS2
106
- * process.</p>
105
+ * <p>Creates the local or partner profile to use for AS2 transfers.</p>
107
106
  */
108
107
  createProfile(args: CreateProfileCommandInput, options?: __HttpHandlerOptions): Promise<CreateProfileCommandOutput>;
109
108
  createProfile(args: CreateProfileCommandInput, cb: (err: any, data?: CreateProfileCommandOutput) => void): void;
@@ -301,7 +300,8 @@ export declare class Transfer extends TransferClient {
301
300
  importCertificate(args: ImportCertificateCommandInput, cb: (err: any, data?: ImportCertificateCommandOutput) => void): void;
302
301
  importCertificate(args: ImportCertificateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ImportCertificateCommandOutput) => void): void;
303
302
  /**
304
- * <p>Adds a host key to the server specified by the <code>ServerId</code> parameter.</p>
303
+ * <p>Adds a host key to the server that's specified by the <code>ServerId</code>
304
+ * parameter.</p>
305
305
  */
306
306
  importHostKey(args: ImportHostKeyCommandInput, options?: __HttpHandlerOptions): Promise<ImportHostKeyCommandOutput>;
307
307
  importHostKey(args: ImportHostKeyCommandInput, cb: (err: any, data?: ImportHostKeyCommandOutput) => void): void;
@@ -356,7 +356,8 @@ export declare class Transfer extends TransferClient {
356
356
  listExecutions(args: ListExecutionsCommandInput, cb: (err: any, data?: ListExecutionsCommandOutput) => void): void;
357
357
  listExecutions(args: ListExecutionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListExecutionsCommandOutput) => void): void;
358
358
  /**
359
- * <p>Returns a list of host keys for the server specified by the <code>ServerId</code> paramter.</p>
359
+ * <p>Returns a list of host keys for the server that's specified by the <code>ServerId</code>
360
+ * parameter.</p>
360
361
  */
361
362
  listHostKeys(args: ListHostKeysCommandInput, options?: __HttpHandlerOptions): Promise<ListHostKeysCommandOutput>;
362
363
  listHostKeys(args: ListHostKeysCommandInput, cb: (err: any, data?: ListHostKeysCommandOutput) => void): void;
@@ -415,7 +416,7 @@ export declare class Transfer extends TransferClient {
415
416
  sendWorkflowStepState(args: SendWorkflowStepStateCommandInput, cb: (err: any, data?: SendWorkflowStepStateCommandOutput) => void): void;
416
417
  sendWorkflowStepState(args: SendWorkflowStepStateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SendWorkflowStepStateCommandOutput) => void): void;
417
418
  /**
418
- * <p>Begins an outbound file transfer. You specify the <code>ConnectorId</code> and the file
419
+ * <p>Begins an outbound file transfer to a remote AS2 server. You specify the <code>ConnectorId</code> and the file
419
420
  * paths for where to send the files. </p>
420
421
  */
421
422
  startFileTransfer(args: StartFileTransferCommandInput, options?: __HttpHandlerOptions): Promise<StartFileTransferCommandOutput>;
@@ -547,7 +548,8 @@ export declare class Transfer extends TransferClient {
547
548
  updateConnector(args: UpdateConnectorCommandInput, cb: (err: any, data?: UpdateConnectorCommandOutput) => void): void;
548
549
  updateConnector(args: UpdateConnectorCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateConnectorCommandOutput) => void): void;
549
550
  /**
550
- * <p>Updates the description for the host key specified by the specified by the <code>ServerId</code> and <code>HostKeyId</code> parameters.</p>
551
+ * <p>Updates the description for the host key that's specified by the <code>ServerId</code> and
552
+ * <code>HostKeyId</code> parameters.</p>
551
553
  */
552
554
  updateHostKey(args: UpdateHostKeyCommandInput, options?: __HttpHandlerOptions): Promise<UpdateHostKeyCommandOutput>;
553
555
  updateHostKey(args: UpdateHostKeyCommandInput, cb: (err: any, data?: UpdateHostKeyCommandOutput) => void): void;
@@ -8,8 +8,8 @@ export interface CreateConnectorCommandOutput extends CreateConnectorResponse, _
8
8
  }
9
9
  /**
10
10
  * <p>Creates the connector, which captures the parameters for an outbound connection for the
11
- * AS2 protocol. The connector is required for sending files from a
12
- * customer's non Amazon Web Services server. </p>
11
+ * AS2 protocol. The connector is required for sending files to an externally hosted AS2 server.
12
+ * For more details about connectors, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/create-b2b-server.html#configure-as2-connector">Create AS2 connectors</a>.</p>
13
13
  * @example
14
14
  * Use a bare-bones client and the command you need to make an API call.
15
15
  * ```javascript
@@ -7,8 +7,7 @@ export interface CreateProfileCommandInput extends CreateProfileRequest {
7
7
  export interface CreateProfileCommandOutput extends CreateProfileResponse, __MetadataBearer {
8
8
  }
9
9
  /**
10
- * <p>Creates the profile for the AS2 process. The agreement is between the partner and the AS2
11
- * process.</p>
10
+ * <p>Creates the local or partner profile to use for AS2 transfers.</p>
12
11
  * @example
13
12
  * Use a bare-bones client and the command you need to make an API call.
14
13
  * ```javascript
@@ -7,7 +7,8 @@ export interface ImportHostKeyCommandInput extends ImportHostKeyRequest {
7
7
  export interface ImportHostKeyCommandOutput extends ImportHostKeyResponse, __MetadataBearer {
8
8
  }
9
9
  /**
10
- * <p>Adds a host key to the server specified by the <code>ServerId</code> parameter.</p>
10
+ * <p>Adds a host key to the server that's specified by the <code>ServerId</code>
11
+ * parameter.</p>
11
12
  * @example
12
13
  * Use a bare-bones client and the command you need to make an API call.
13
14
  * ```javascript
@@ -7,7 +7,8 @@ export interface ListHostKeysCommandInput extends ListHostKeysRequest {
7
7
  export interface ListHostKeysCommandOutput extends ListHostKeysResponse, __MetadataBearer {
8
8
  }
9
9
  /**
10
- * <p>Returns a list of host keys for the server specified by the <code>ServerId</code> paramter.</p>
10
+ * <p>Returns a list of host keys for the server that's specified by the <code>ServerId</code>
11
+ * parameter.</p>
11
12
  * @example
12
13
  * Use a bare-bones client and the command you need to make an API call.
13
14
  * ```javascript
@@ -7,7 +7,7 @@ export interface StartFileTransferCommandInput extends StartFileTransferRequest
7
7
  export interface StartFileTransferCommandOutput extends StartFileTransferResponse, __MetadataBearer {
8
8
  }
9
9
  /**
10
- * <p>Begins an outbound file transfer. You specify the <code>ConnectorId</code> and the file
10
+ * <p>Begins an outbound file transfer to a remote AS2 server. You specify the <code>ConnectorId</code> and the file
11
11
  * paths for where to send the files. </p>
12
12
  * @example
13
13
  * Use a bare-bones client and the command you need to make an API call.
@@ -7,7 +7,8 @@ export interface UpdateHostKeyCommandInput extends UpdateHostKeyRequest {
7
7
  export interface UpdateHostKeyCommandOutput extends UpdateHostKeyResponse, __MetadataBearer {
8
8
  }
9
9
  /**
10
- * <p>Updates the description for the host key specified by the specified by the <code>ServerId</code> and <code>HostKeyId</code> parameters.</p>
10
+ * <p>Updates the description for the host key that's specified by the <code>ServerId</code> and
11
+ * <code>HostKeyId</code> parameters.</p>
11
12
  * @example
12
13
  * Use a bare-bones client and the command you need to make an API call.
13
14
  * ```javascript