Skip to content

Commit e09e302

Browse files
author
awstools
committed
feat(client-transfer): This release introduces the ability to have multiple server host keys for any of your Transfer Family servers that use the SFTP protocol.
1 parent 9346a11 commit e09e302

File tree

11 files changed

+1958
-0
lines changed

11 files changed

+1958
-0
lines changed

clients/client-transfer/src/Transfer.ts

+182
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ import {
5252
DeleteConnectorCommandInput,
5353
DeleteConnectorCommandOutput,
5454
} from "./commands/DeleteConnectorCommand";
55+
import {
56+
DeleteHostKeyCommand,
57+
DeleteHostKeyCommandInput,
58+
DeleteHostKeyCommandOutput,
59+
} from "./commands/DeleteHostKeyCommand";
5560
import {
5661
DeleteProfileCommand,
5762
DeleteProfileCommandInput,
@@ -98,6 +103,11 @@ import {
98103
DescribeExecutionCommandInput,
99104
DescribeExecutionCommandOutput,
100105
} from "./commands/DescribeExecutionCommand";
106+
import {
107+
DescribeHostKeyCommand,
108+
DescribeHostKeyCommandInput,
109+
DescribeHostKeyCommandOutput,
110+
} from "./commands/DescribeHostKeyCommand";
101111
import {
102112
DescribeProfileCommand,
103113
DescribeProfileCommandInput,
@@ -128,6 +138,11 @@ import {
128138
ImportCertificateCommandInput,
129139
ImportCertificateCommandOutput,
130140
} from "./commands/ImportCertificateCommand";
141+
import {
142+
ImportHostKeyCommand,
143+
ImportHostKeyCommandInput,
144+
ImportHostKeyCommandOutput,
145+
} from "./commands/ImportHostKeyCommand";
131146
import {
132147
ImportSshPublicKeyCommand,
133148
ImportSshPublicKeyCommandInput,
@@ -158,6 +173,11 @@ import {
158173
ListExecutionsCommandInput,
159174
ListExecutionsCommandOutput,
160175
} from "./commands/ListExecutionsCommand";
176+
import {
177+
ListHostKeysCommand,
178+
ListHostKeysCommandInput,
179+
ListHostKeysCommandOutput,
180+
} from "./commands/ListHostKeysCommand";
161181
import {
162182
ListProfilesCommand,
163183
ListProfilesCommandInput,
@@ -223,6 +243,11 @@ import {
223243
UpdateConnectorCommandInput,
224244
UpdateConnectorCommandOutput,
225245
} from "./commands/UpdateConnectorCommand";
246+
import {
247+
UpdateHostKeyCommand,
248+
UpdateHostKeyCommandInput,
249+
UpdateHostKeyCommandOutput,
250+
} from "./commands/UpdateHostKeyCommand";
226251
import {
227252
UpdateProfileCommand,
228253
UpdateProfileCommandInput,
@@ -613,6 +638,38 @@ export class Transfer extends TransferClient {
613638
}
614639
}
615640

641+
/**
642+
* <p>Deletes the host key that's specified in the <code>HoskKeyId</code> parameter.</p>
643+
*/
644+
public deleteHostKey(
645+
args: DeleteHostKeyCommandInput,
646+
options?: __HttpHandlerOptions
647+
): Promise<DeleteHostKeyCommandOutput>;
648+
public deleteHostKey(
649+
args: DeleteHostKeyCommandInput,
650+
cb: (err: any, data?: DeleteHostKeyCommandOutput) => void
651+
): void;
652+
public deleteHostKey(
653+
args: DeleteHostKeyCommandInput,
654+
options: __HttpHandlerOptions,
655+
cb: (err: any, data?: DeleteHostKeyCommandOutput) => void
656+
): void;
657+
public deleteHostKey(
658+
args: DeleteHostKeyCommandInput,
659+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteHostKeyCommandOutput) => void),
660+
cb?: (err: any, data?: DeleteHostKeyCommandOutput) => void
661+
): Promise<DeleteHostKeyCommandOutput> | void {
662+
const command = new DeleteHostKeyCommand(args);
663+
if (typeof optionsOrCb === "function") {
664+
this.send(command, optionsOrCb);
665+
} else if (typeof cb === "function") {
666+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
667+
this.send(command, optionsOrCb || {}, cb);
668+
} else {
669+
return this.send(command, optionsOrCb);
670+
}
671+
}
672+
616673
/**
617674
* <p>Deletes the profile that's specified in the <code>ProfileId</code> parameter.</p>
618675
*/
@@ -938,6 +995,38 @@ export class Transfer extends TransferClient {
938995
}
939996
}
940997

998+
/**
999+
* <p>Returns the details of the host key that's specified by the <code>HostKeyId</code> and <code>ServerId</code>.</p>
1000+
*/
1001+
public describeHostKey(
1002+
args: DescribeHostKeyCommandInput,
1003+
options?: __HttpHandlerOptions
1004+
): Promise<DescribeHostKeyCommandOutput>;
1005+
public describeHostKey(
1006+
args: DescribeHostKeyCommandInput,
1007+
cb: (err: any, data?: DescribeHostKeyCommandOutput) => void
1008+
): void;
1009+
public describeHostKey(
1010+
args: DescribeHostKeyCommandInput,
1011+
options: __HttpHandlerOptions,
1012+
cb: (err: any, data?: DescribeHostKeyCommandOutput) => void
1013+
): void;
1014+
public describeHostKey(
1015+
args: DescribeHostKeyCommandInput,
1016+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeHostKeyCommandOutput) => void),
1017+
cb?: (err: any, data?: DescribeHostKeyCommandOutput) => void
1018+
): Promise<DescribeHostKeyCommandOutput> | void {
1019+
const command = new DescribeHostKeyCommand(args);
1020+
if (typeof optionsOrCb === "function") {
1021+
this.send(command, optionsOrCb);
1022+
} else if (typeof cb === "function") {
1023+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1024+
this.send(command, optionsOrCb || {}, cb);
1025+
} else {
1026+
return this.send(command, optionsOrCb);
1027+
}
1028+
}
1029+
9411030
/**
9421031
* <p>Returns the details of the profile that's specified by the <code>ProfileId</code>.</p>
9431032
*/
@@ -1141,6 +1230,38 @@ export class Transfer extends TransferClient {
11411230
}
11421231
}
11431232

1233+
/**
1234+
* <p>Adds a host key to the server specified by the <code>ServerId</code> parameter.</p>
1235+
*/
1236+
public importHostKey(
1237+
args: ImportHostKeyCommandInput,
1238+
options?: __HttpHandlerOptions
1239+
): Promise<ImportHostKeyCommandOutput>;
1240+
public importHostKey(
1241+
args: ImportHostKeyCommandInput,
1242+
cb: (err: any, data?: ImportHostKeyCommandOutput) => void
1243+
): void;
1244+
public importHostKey(
1245+
args: ImportHostKeyCommandInput,
1246+
options: __HttpHandlerOptions,
1247+
cb: (err: any, data?: ImportHostKeyCommandOutput) => void
1248+
): void;
1249+
public importHostKey(
1250+
args: ImportHostKeyCommandInput,
1251+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ImportHostKeyCommandOutput) => void),
1252+
cb?: (err: any, data?: ImportHostKeyCommandOutput) => void
1253+
): Promise<ImportHostKeyCommandOutput> | void {
1254+
const command = new ImportHostKeyCommand(args);
1255+
if (typeof optionsOrCb === "function") {
1256+
this.send(command, optionsOrCb);
1257+
} else if (typeof cb === "function") {
1258+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1259+
this.send(command, optionsOrCb || {}, cb);
1260+
} else {
1261+
return this.send(command, optionsOrCb);
1262+
}
1263+
}
1264+
11441265
/**
11451266
* <p>Adds a Secure Shell (SSH) public key to a user account identified by a
11461267
* <code>UserName</code> value assigned to the specific file transfer protocol-enabled server,
@@ -1343,6 +1464,35 @@ export class Transfer extends TransferClient {
13431464
}
13441465
}
13451466

1467+
/**
1468+
* <p>Returns a list of host keys for the server specified by the <code>ServerId</code> paramter.</p>
1469+
*/
1470+
public listHostKeys(
1471+
args: ListHostKeysCommandInput,
1472+
options?: __HttpHandlerOptions
1473+
): Promise<ListHostKeysCommandOutput>;
1474+
public listHostKeys(args: ListHostKeysCommandInput, cb: (err: any, data?: ListHostKeysCommandOutput) => void): void;
1475+
public listHostKeys(
1476+
args: ListHostKeysCommandInput,
1477+
options: __HttpHandlerOptions,
1478+
cb: (err: any, data?: ListHostKeysCommandOutput) => void
1479+
): void;
1480+
public listHostKeys(
1481+
args: ListHostKeysCommandInput,
1482+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListHostKeysCommandOutput) => void),
1483+
cb?: (err: any, data?: ListHostKeysCommandOutput) => void
1484+
): Promise<ListHostKeysCommandOutput> | void {
1485+
const command = new ListHostKeysCommand(args);
1486+
if (typeof optionsOrCb === "function") {
1487+
this.send(command, optionsOrCb);
1488+
} else if (typeof cb === "function") {
1489+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1490+
this.send(command, optionsOrCb || {}, cb);
1491+
} else {
1492+
return this.send(command, optionsOrCb);
1493+
}
1494+
}
1495+
13461496
/**
13471497
* <p>Returns a list of the profiles for your system. If you want to limit the results to a
13481498
* certain number, supply a value for the <code>MaxResults</code> parameter. If you ran the
@@ -1934,6 +2084,38 @@ export class Transfer extends TransferClient {
19342084
}
19352085
}
19362086

2087+
/**
2088+
* <p>Updates the description for the host key specified by the specified by the <code>ServerId</code> and <code>HostKeyId</code> parameters.</p>
2089+
*/
2090+
public updateHostKey(
2091+
args: UpdateHostKeyCommandInput,
2092+
options?: __HttpHandlerOptions
2093+
): Promise<UpdateHostKeyCommandOutput>;
2094+
public updateHostKey(
2095+
args: UpdateHostKeyCommandInput,
2096+
cb: (err: any, data?: UpdateHostKeyCommandOutput) => void
2097+
): void;
2098+
public updateHostKey(
2099+
args: UpdateHostKeyCommandInput,
2100+
options: __HttpHandlerOptions,
2101+
cb: (err: any, data?: UpdateHostKeyCommandOutput) => void
2102+
): void;
2103+
public updateHostKey(
2104+
args: UpdateHostKeyCommandInput,
2105+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateHostKeyCommandOutput) => void),
2106+
cb?: (err: any, data?: UpdateHostKeyCommandOutput) => void
2107+
): Promise<UpdateHostKeyCommandOutput> | void {
2108+
const command = new UpdateHostKeyCommand(args);
2109+
if (typeof optionsOrCb === "function") {
2110+
this.send(command, optionsOrCb);
2111+
} else if (typeof cb === "function") {
2112+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2113+
this.send(command, optionsOrCb || {}, cb);
2114+
} else {
2115+
return this.send(command, optionsOrCb);
2116+
}
2117+
}
2118+
19372119
/**
19382120
* <p>Updates some of the parameters for an existing profile. Provide the <code>ProfileId</code>
19392121
* for the profile that you want to update, along with the new values for the parameters to

clients/client-transfer/src/TransferClient.ts

+15
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import { DeleteAccessCommandInput, DeleteAccessCommandOutput } from "./commands/
6464
import { DeleteAgreementCommandInput, DeleteAgreementCommandOutput } from "./commands/DeleteAgreementCommand";
6565
import { DeleteCertificateCommandInput, DeleteCertificateCommandOutput } from "./commands/DeleteCertificateCommand";
6666
import { DeleteConnectorCommandInput, DeleteConnectorCommandOutput } from "./commands/DeleteConnectorCommand";
67+
import { DeleteHostKeyCommandInput, DeleteHostKeyCommandOutput } from "./commands/DeleteHostKeyCommand";
6768
import { DeleteProfileCommandInput, DeleteProfileCommandOutput } from "./commands/DeleteProfileCommand";
6869
import { DeleteServerCommandInput, DeleteServerCommandOutput } from "./commands/DeleteServerCommand";
6970
import { DeleteSshPublicKeyCommandInput, DeleteSshPublicKeyCommandOutput } from "./commands/DeleteSshPublicKeyCommand";
@@ -77,6 +78,7 @@ import {
7778
} from "./commands/DescribeCertificateCommand";
7879
import { DescribeConnectorCommandInput, DescribeConnectorCommandOutput } from "./commands/DescribeConnectorCommand";
7980
import { DescribeExecutionCommandInput, DescribeExecutionCommandOutput } from "./commands/DescribeExecutionCommand";
81+
import { DescribeHostKeyCommandInput, DescribeHostKeyCommandOutput } from "./commands/DescribeHostKeyCommand";
8082
import { DescribeProfileCommandInput, DescribeProfileCommandOutput } from "./commands/DescribeProfileCommand";
8183
import {
8284
DescribeSecurityPolicyCommandInput,
@@ -86,12 +88,14 @@ import { DescribeServerCommandInput, DescribeServerCommandOutput } from "./comma
8688
import { DescribeUserCommandInput, DescribeUserCommandOutput } from "./commands/DescribeUserCommand";
8789
import { DescribeWorkflowCommandInput, DescribeWorkflowCommandOutput } from "./commands/DescribeWorkflowCommand";
8890
import { ImportCertificateCommandInput, ImportCertificateCommandOutput } from "./commands/ImportCertificateCommand";
91+
import { ImportHostKeyCommandInput, ImportHostKeyCommandOutput } from "./commands/ImportHostKeyCommand";
8992
import { ImportSshPublicKeyCommandInput, ImportSshPublicKeyCommandOutput } from "./commands/ImportSshPublicKeyCommand";
9093
import { ListAccessesCommandInput, ListAccessesCommandOutput } from "./commands/ListAccessesCommand";
9194
import { ListAgreementsCommandInput, ListAgreementsCommandOutput } from "./commands/ListAgreementsCommand";
9295
import { ListCertificatesCommandInput, ListCertificatesCommandOutput } from "./commands/ListCertificatesCommand";
9396
import { ListConnectorsCommandInput, ListConnectorsCommandOutput } from "./commands/ListConnectorsCommand";
9497
import { ListExecutionsCommandInput, ListExecutionsCommandOutput } from "./commands/ListExecutionsCommand";
98+
import { ListHostKeysCommandInput, ListHostKeysCommandOutput } from "./commands/ListHostKeysCommand";
9599
import { ListProfilesCommandInput, ListProfilesCommandOutput } from "./commands/ListProfilesCommand";
96100
import {
97101
ListSecurityPoliciesCommandInput,
@@ -121,6 +125,7 @@ import { UpdateAccessCommandInput, UpdateAccessCommandOutput } from "./commands/
121125
import { UpdateAgreementCommandInput, UpdateAgreementCommandOutput } from "./commands/UpdateAgreementCommand";
122126
import { UpdateCertificateCommandInput, UpdateCertificateCommandOutput } from "./commands/UpdateCertificateCommand";
123127
import { UpdateConnectorCommandInput, UpdateConnectorCommandOutput } from "./commands/UpdateConnectorCommand";
128+
import { UpdateHostKeyCommandInput, UpdateHostKeyCommandOutput } from "./commands/UpdateHostKeyCommand";
124129
import { UpdateProfileCommandInput, UpdateProfileCommandOutput } from "./commands/UpdateProfileCommand";
125130
import { UpdateServerCommandInput, UpdateServerCommandOutput } from "./commands/UpdateServerCommand";
126131
import { UpdateUserCommandInput, UpdateUserCommandOutput } from "./commands/UpdateUserCommand";
@@ -138,6 +143,7 @@ export type ServiceInputTypes =
138143
| DeleteAgreementCommandInput
139144
| DeleteCertificateCommandInput
140145
| DeleteConnectorCommandInput
146+
| DeleteHostKeyCommandInput
141147
| DeleteProfileCommandInput
142148
| DeleteServerCommandInput
143149
| DeleteSshPublicKeyCommandInput
@@ -148,18 +154,21 @@ export type ServiceInputTypes =
148154
| DescribeCertificateCommandInput
149155
| DescribeConnectorCommandInput
150156
| DescribeExecutionCommandInput
157+
| DescribeHostKeyCommandInput
151158
| DescribeProfileCommandInput
152159
| DescribeSecurityPolicyCommandInput
153160
| DescribeServerCommandInput
154161
| DescribeUserCommandInput
155162
| DescribeWorkflowCommandInput
156163
| ImportCertificateCommandInput
164+
| ImportHostKeyCommandInput
157165
| ImportSshPublicKeyCommandInput
158166
| ListAccessesCommandInput
159167
| ListAgreementsCommandInput
160168
| ListCertificatesCommandInput
161169
| ListConnectorsCommandInput
162170
| ListExecutionsCommandInput
171+
| ListHostKeysCommandInput
163172
| ListProfilesCommandInput
164173
| ListSecurityPoliciesCommandInput
165174
| ListServersCommandInput
@@ -177,6 +186,7 @@ export type ServiceInputTypes =
177186
| UpdateAgreementCommandInput
178187
| UpdateCertificateCommandInput
179188
| UpdateConnectorCommandInput
189+
| UpdateHostKeyCommandInput
180190
| UpdateProfileCommandInput
181191
| UpdateServerCommandInput
182192
| UpdateUserCommandInput;
@@ -193,6 +203,7 @@ export type ServiceOutputTypes =
193203
| DeleteAgreementCommandOutput
194204
| DeleteCertificateCommandOutput
195205
| DeleteConnectorCommandOutput
206+
| DeleteHostKeyCommandOutput
196207
| DeleteProfileCommandOutput
197208
| DeleteServerCommandOutput
198209
| DeleteSshPublicKeyCommandOutput
@@ -203,18 +214,21 @@ export type ServiceOutputTypes =
203214
| DescribeCertificateCommandOutput
204215
| DescribeConnectorCommandOutput
205216
| DescribeExecutionCommandOutput
217+
| DescribeHostKeyCommandOutput
206218
| DescribeProfileCommandOutput
207219
| DescribeSecurityPolicyCommandOutput
208220
| DescribeServerCommandOutput
209221
| DescribeUserCommandOutput
210222
| DescribeWorkflowCommandOutput
211223
| ImportCertificateCommandOutput
224+
| ImportHostKeyCommandOutput
212225
| ImportSshPublicKeyCommandOutput
213226
| ListAccessesCommandOutput
214227
| ListAgreementsCommandOutput
215228
| ListCertificatesCommandOutput
216229
| ListConnectorsCommandOutput
217230
| ListExecutionsCommandOutput
231+
| ListHostKeysCommandOutput
218232
| ListProfilesCommandOutput
219233
| ListSecurityPoliciesCommandOutput
220234
| ListServersCommandOutput
@@ -232,6 +246,7 @@ export type ServiceOutputTypes =
232246
| UpdateAgreementCommandOutput
233247
| UpdateCertificateCommandOutput
234248
| UpdateConnectorCommandOutput
249+
| UpdateHostKeyCommandOutput
235250
| UpdateProfileCommandOutput
236251
| UpdateServerCommandOutput
237252
| UpdateUserCommandOutput;

0 commit comments

Comments
 (0)