@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.
- package/CHANGELOG.md +19 -0
- package/dist-cjs/protocols/Aws_json1_1.js +24 -0
- package/dist-es/Transfer.js +234 -241
- package/dist-es/TransferClient.js +22 -28
- package/dist-es/commands/CreateAccessCommand.js +21 -28
- package/dist-es/commands/CreateAgreementCommand.js +21 -28
- package/dist-es/commands/CreateConnectorCommand.js +21 -28
- package/dist-es/commands/CreateProfileCommand.js +21 -28
- package/dist-es/commands/CreateServerCommand.js +21 -28
- package/dist-es/commands/CreateUserCommand.js +21 -28
- package/dist-es/commands/CreateWorkflowCommand.js +21 -28
- package/dist-es/commands/DeleteAccessCommand.js +22 -29
- package/dist-es/commands/DeleteAgreementCommand.js +22 -29
- package/dist-es/commands/DeleteCertificateCommand.js +22 -29
- package/dist-es/commands/DeleteConnectorCommand.js +22 -29
- package/dist-es/commands/DeleteHostKeyCommand.js +22 -29
- package/dist-es/commands/DeleteProfileCommand.js +22 -29
- package/dist-es/commands/DeleteServerCommand.js +22 -29
- package/dist-es/commands/DeleteSshPublicKeyCommand.js +22 -29
- package/dist-es/commands/DeleteUserCommand.js +22 -29
- package/dist-es/commands/DeleteWorkflowCommand.js +22 -29
- package/dist-es/commands/DescribeAccessCommand.js +21 -28
- package/dist-es/commands/DescribeAgreementCommand.js +21 -28
- package/dist-es/commands/DescribeCertificateCommand.js +21 -28
- package/dist-es/commands/DescribeConnectorCommand.js +21 -28
- package/dist-es/commands/DescribeExecutionCommand.js +21 -28
- package/dist-es/commands/DescribeHostKeyCommand.js +21 -28
- package/dist-es/commands/DescribeProfileCommand.js +21 -28
- package/dist-es/commands/DescribeSecurityPolicyCommand.js +21 -28
- package/dist-es/commands/DescribeServerCommand.js +21 -28
- package/dist-es/commands/DescribeUserCommand.js +21 -28
- package/dist-es/commands/DescribeWorkflowCommand.js +21 -28
- package/dist-es/commands/ImportCertificateCommand.js +21 -28
- package/dist-es/commands/ImportHostKeyCommand.js +21 -28
- package/dist-es/commands/ImportSshPublicKeyCommand.js +21 -28
- package/dist-es/commands/ListAccessesCommand.js +21 -28
- package/dist-es/commands/ListAgreementsCommand.js +21 -28
- package/dist-es/commands/ListCertificatesCommand.js +21 -28
- package/dist-es/commands/ListConnectorsCommand.js +21 -28
- package/dist-es/commands/ListExecutionsCommand.js +21 -28
- package/dist-es/commands/ListHostKeysCommand.js +21 -28
- package/dist-es/commands/ListProfilesCommand.js +21 -28
- package/dist-es/commands/ListSecurityPoliciesCommand.js +21 -28
- package/dist-es/commands/ListServersCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/ListUsersCommand.js +21 -28
- package/dist-es/commands/ListWorkflowsCommand.js +21 -28
- package/dist-es/commands/SendWorkflowStepStateCommand.js +21 -28
- package/dist-es/commands/StartFileTransferCommand.js +21 -28
- package/dist-es/commands/StartServerCommand.js +22 -29
- package/dist-es/commands/StopServerCommand.js +22 -29
- package/dist-es/commands/TagResourceCommand.js +22 -29
- package/dist-es/commands/TestIdentityProviderCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +22 -29
- package/dist-es/commands/UpdateAccessCommand.js +21 -28
- package/dist-es/commands/UpdateAgreementCommand.js +21 -28
- package/dist-es/commands/UpdateCertificateCommand.js +21 -28
- package/dist-es/commands/UpdateConnectorCommand.js +21 -28
- package/dist-es/commands/UpdateHostKeyCommand.js +21 -28
- package/dist-es/commands/UpdateProfileCommand.js +21 -28
- package/dist-es/commands/UpdateServerCommand.js +21 -28
- package/dist-es/commands/UpdateUserCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/TransferServiceException.js +5 -10
- package/dist-es/models/models_0.js +572 -263
- package/dist-es/pagination/ListAccessesPaginator.js +25 -68
- package/dist-es/pagination/ListAgreementsPaginator.js +25 -68
- package/dist-es/pagination/ListCertificatesPaginator.js +25 -68
- package/dist-es/pagination/ListConnectorsPaginator.js +25 -68
- package/dist-es/pagination/ListExecutionsPaginator.js +25 -68
- package/dist-es/pagination/ListProfilesPaginator.js +25 -68
- package/dist-es/pagination/ListSecurityPoliciesPaginator.js +25 -68
- package/dist-es/pagination/ListServersPaginator.js +25 -68
- package/dist-es/pagination/ListTagsForResourcePaginator.js +25 -68
- package/dist-es/pagination/ListUsersPaginator.js +25 -68
- package/dist-es/pagination/ListWorkflowsPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_1.js +3985 -5067
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/dist-es/waiters/waitForServerOffline.js +36 -56
- package/dist-es/waiters/waitForServerOnline.js +36 -56
- package/dist-types/Transfer.d.ts +10 -8
- package/dist-types/commands/CreateConnectorCommand.d.ts +2 -2
- package/dist-types/commands/CreateProfileCommand.d.ts +1 -2
- package/dist-types/commands/ImportHostKeyCommand.d.ts +2 -1
- package/dist-types/commands/ListHostKeysCommand.d.ts +2 -1
- package/dist-types/commands/StartFileTransferCommand.d.ts +1 -1
- package/dist-types/commands/UpdateHostKeyCommand.d.ts +2 -1
- package/dist-types/models/models_0.d.ts +118 -67
- package/dist-types/ts3.4/models/models_0.d.ts +2 -1
- 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
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -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
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
+
};
|
package/dist-types/Transfer.d.ts
CHANGED
|
@@ -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
|
|
99
|
-
*
|
|
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
|
|
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>
|
|
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>
|
|
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
|
|
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
|
|
12
|
-
*
|
|
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
|
|
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>
|
|
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>
|
|
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
|
|
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
|