Skip to content

Commit

Permalink
feat(client-transfer): This release introduces the ability to have mu…
Browse files Browse the repository at this point in the history
…ltiple server host keys for any of your Transfer Family servers that use the SFTP protocol.
  • Loading branch information
awstools committed Sep 13, 2022
1 parent 9346a11 commit e09e302
Show file tree
Hide file tree
Showing 11 changed files with 1,958 additions and 0 deletions.
182 changes: 182 additions & 0 deletions clients/client-transfer/src/Transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ import {
DeleteConnectorCommandInput,
DeleteConnectorCommandOutput,
} from "./commands/DeleteConnectorCommand";
import {
DeleteHostKeyCommand,
DeleteHostKeyCommandInput,
DeleteHostKeyCommandOutput,
} from "./commands/DeleteHostKeyCommand";
import {
DeleteProfileCommand,
DeleteProfileCommandInput,
Expand Down Expand Up @@ -98,6 +103,11 @@ import {
DescribeExecutionCommandInput,
DescribeExecutionCommandOutput,
} from "./commands/DescribeExecutionCommand";
import {
DescribeHostKeyCommand,
DescribeHostKeyCommandInput,
DescribeHostKeyCommandOutput,
} from "./commands/DescribeHostKeyCommand";
import {
DescribeProfileCommand,
DescribeProfileCommandInput,
Expand Down Expand Up @@ -128,6 +138,11 @@ import {
ImportCertificateCommandInput,
ImportCertificateCommandOutput,
} from "./commands/ImportCertificateCommand";
import {
ImportHostKeyCommand,
ImportHostKeyCommandInput,
ImportHostKeyCommandOutput,
} from "./commands/ImportHostKeyCommand";
import {
ImportSshPublicKeyCommand,
ImportSshPublicKeyCommandInput,
Expand Down Expand Up @@ -158,6 +173,11 @@ import {
ListExecutionsCommandInput,
ListExecutionsCommandOutput,
} from "./commands/ListExecutionsCommand";
import {
ListHostKeysCommand,
ListHostKeysCommandInput,
ListHostKeysCommandOutput,
} from "./commands/ListHostKeysCommand";
import {
ListProfilesCommand,
ListProfilesCommandInput,
Expand Down Expand Up @@ -223,6 +243,11 @@ import {
UpdateConnectorCommandInput,
UpdateConnectorCommandOutput,
} from "./commands/UpdateConnectorCommand";
import {
UpdateHostKeyCommand,
UpdateHostKeyCommandInput,
UpdateHostKeyCommandOutput,
} from "./commands/UpdateHostKeyCommand";
import {
UpdateProfileCommand,
UpdateProfileCommandInput,
Expand Down Expand Up @@ -613,6 +638,38 @@ export class Transfer extends TransferClient {
}
}

/**
* <p>Deletes the host key that's specified in the <code>HoskKeyId</code> parameter.</p>
*/
public deleteHostKey(
args: DeleteHostKeyCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteHostKeyCommandOutput>;
public deleteHostKey(
args: DeleteHostKeyCommandInput,
cb: (err: any, data?: DeleteHostKeyCommandOutput) => void
): void;
public deleteHostKey(
args: DeleteHostKeyCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteHostKeyCommandOutput) => void
): void;
public deleteHostKey(
args: DeleteHostKeyCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteHostKeyCommandOutput) => void),
cb?: (err: any, data?: DeleteHostKeyCommandOutput) => void
): Promise<DeleteHostKeyCommandOutput> | void {
const command = new DeleteHostKeyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Deletes the profile that's specified in the <code>ProfileId</code> parameter.</p>
*/
Expand Down Expand Up @@ -938,6 +995,38 @@ export class Transfer extends TransferClient {
}
}

/**
* <p>Returns the details of the host key that's specified by the <code>HostKeyId</code> and <code>ServerId</code>.</p>
*/
public describeHostKey(
args: DescribeHostKeyCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeHostKeyCommandOutput>;
public describeHostKey(
args: DescribeHostKeyCommandInput,
cb: (err: any, data?: DescribeHostKeyCommandOutput) => void
): void;
public describeHostKey(
args: DescribeHostKeyCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeHostKeyCommandOutput) => void
): void;
public describeHostKey(
args: DescribeHostKeyCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeHostKeyCommandOutput) => void),
cb?: (err: any, data?: DescribeHostKeyCommandOutput) => void
): Promise<DescribeHostKeyCommandOutput> | void {
const command = new DescribeHostKeyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Returns the details of the profile that's specified by the <code>ProfileId</code>.</p>
*/
Expand Down Expand Up @@ -1141,6 +1230,38 @@ export class Transfer extends TransferClient {
}
}

/**
* <p>Adds a host key to the server specified by the <code>ServerId</code> parameter.</p>
*/
public importHostKey(
args: ImportHostKeyCommandInput,
options?: __HttpHandlerOptions
): Promise<ImportHostKeyCommandOutput>;
public importHostKey(
args: ImportHostKeyCommandInput,
cb: (err: any, data?: ImportHostKeyCommandOutput) => void
): void;
public importHostKey(
args: ImportHostKeyCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ImportHostKeyCommandOutput) => void
): void;
public importHostKey(
args: ImportHostKeyCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ImportHostKeyCommandOutput) => void),
cb?: (err: any, data?: ImportHostKeyCommandOutput) => void
): Promise<ImportHostKeyCommandOutput> | void {
const command = new ImportHostKeyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Adds a Secure Shell (SSH) public key to a user account identified by a
* <code>UserName</code> value assigned to the specific file transfer protocol-enabled server,
Expand Down Expand Up @@ -1343,6 +1464,35 @@ export class Transfer extends TransferClient {
}
}

/**
* <p>Returns a list of host keys for the server specified by the <code>ServerId</code> paramter.</p>
*/
public listHostKeys(
args: ListHostKeysCommandInput,
options?: __HttpHandlerOptions
): Promise<ListHostKeysCommandOutput>;
public listHostKeys(args: ListHostKeysCommandInput, cb: (err: any, data?: ListHostKeysCommandOutput) => void): void;
public listHostKeys(
args: ListHostKeysCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListHostKeysCommandOutput) => void
): void;
public listHostKeys(
args: ListHostKeysCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListHostKeysCommandOutput) => void),
cb?: (err: any, data?: ListHostKeysCommandOutput) => void
): Promise<ListHostKeysCommandOutput> | void {
const command = new ListHostKeysCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Returns a list of the profiles for your system. If you want to limit the results to a
* certain number, supply a value for the <code>MaxResults</code> parameter. If you ran the
Expand Down Expand Up @@ -1934,6 +2084,38 @@ export class Transfer extends TransferClient {
}
}

/**
* <p>Updates the description for the host key specified by the specified by the <code>ServerId</code> and <code>HostKeyId</code> parameters.</p>
*/
public updateHostKey(
args: UpdateHostKeyCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdateHostKeyCommandOutput>;
public updateHostKey(
args: UpdateHostKeyCommandInput,
cb: (err: any, data?: UpdateHostKeyCommandOutput) => void
): void;
public updateHostKey(
args: UpdateHostKeyCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateHostKeyCommandOutput) => void
): void;
public updateHostKey(
args: UpdateHostKeyCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateHostKeyCommandOutput) => void),
cb?: (err: any, data?: UpdateHostKeyCommandOutput) => void
): Promise<UpdateHostKeyCommandOutput> | void {
const command = new UpdateHostKeyCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Updates some of the parameters for an existing profile. Provide the <code>ProfileId</code>
* for the profile that you want to update, along with the new values for the parameters to
Expand Down
15 changes: 15 additions & 0 deletions clients/client-transfer/src/TransferClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import { DeleteAccessCommandInput, DeleteAccessCommandOutput } from "./commands/
import { DeleteAgreementCommandInput, DeleteAgreementCommandOutput } from "./commands/DeleteAgreementCommand";
import { DeleteCertificateCommandInput, DeleteCertificateCommandOutput } from "./commands/DeleteCertificateCommand";
import { DeleteConnectorCommandInput, DeleteConnectorCommandOutput } from "./commands/DeleteConnectorCommand";
import { DeleteHostKeyCommandInput, DeleteHostKeyCommandOutput } from "./commands/DeleteHostKeyCommand";
import { DeleteProfileCommandInput, DeleteProfileCommandOutput } from "./commands/DeleteProfileCommand";
import { DeleteServerCommandInput, DeleteServerCommandOutput } from "./commands/DeleteServerCommand";
import { DeleteSshPublicKeyCommandInput, DeleteSshPublicKeyCommandOutput } from "./commands/DeleteSshPublicKeyCommand";
Expand All @@ -77,6 +78,7 @@ import {
} from "./commands/DescribeCertificateCommand";
import { DescribeConnectorCommandInput, DescribeConnectorCommandOutput } from "./commands/DescribeConnectorCommand";
import { DescribeExecutionCommandInput, DescribeExecutionCommandOutput } from "./commands/DescribeExecutionCommand";
import { DescribeHostKeyCommandInput, DescribeHostKeyCommandOutput } from "./commands/DescribeHostKeyCommand";
import { DescribeProfileCommandInput, DescribeProfileCommandOutput } from "./commands/DescribeProfileCommand";
import {
DescribeSecurityPolicyCommandInput,
Expand All @@ -86,12 +88,14 @@ import { DescribeServerCommandInput, DescribeServerCommandOutput } from "./comma
import { DescribeUserCommandInput, DescribeUserCommandOutput } from "./commands/DescribeUserCommand";
import { DescribeWorkflowCommandInput, DescribeWorkflowCommandOutput } from "./commands/DescribeWorkflowCommand";
import { ImportCertificateCommandInput, ImportCertificateCommandOutput } from "./commands/ImportCertificateCommand";
import { ImportHostKeyCommandInput, ImportHostKeyCommandOutput } from "./commands/ImportHostKeyCommand";
import { ImportSshPublicKeyCommandInput, ImportSshPublicKeyCommandOutput } from "./commands/ImportSshPublicKeyCommand";
import { ListAccessesCommandInput, ListAccessesCommandOutput } from "./commands/ListAccessesCommand";
import { ListAgreementsCommandInput, ListAgreementsCommandOutput } from "./commands/ListAgreementsCommand";
import { ListCertificatesCommandInput, ListCertificatesCommandOutput } from "./commands/ListCertificatesCommand";
import { ListConnectorsCommandInput, ListConnectorsCommandOutput } from "./commands/ListConnectorsCommand";
import { ListExecutionsCommandInput, ListExecutionsCommandOutput } from "./commands/ListExecutionsCommand";
import { ListHostKeysCommandInput, ListHostKeysCommandOutput } from "./commands/ListHostKeysCommand";
import { ListProfilesCommandInput, ListProfilesCommandOutput } from "./commands/ListProfilesCommand";
import {
ListSecurityPoliciesCommandInput,
Expand Down Expand Up @@ -121,6 +125,7 @@ import { UpdateAccessCommandInput, UpdateAccessCommandOutput } from "./commands/
import { UpdateAgreementCommandInput, UpdateAgreementCommandOutput } from "./commands/UpdateAgreementCommand";
import { UpdateCertificateCommandInput, UpdateCertificateCommandOutput } from "./commands/UpdateCertificateCommand";
import { UpdateConnectorCommandInput, UpdateConnectorCommandOutput } from "./commands/UpdateConnectorCommand";
import { UpdateHostKeyCommandInput, UpdateHostKeyCommandOutput } from "./commands/UpdateHostKeyCommand";
import { UpdateProfileCommandInput, UpdateProfileCommandOutput } from "./commands/UpdateProfileCommand";
import { UpdateServerCommandInput, UpdateServerCommandOutput } from "./commands/UpdateServerCommand";
import { UpdateUserCommandInput, UpdateUserCommandOutput } from "./commands/UpdateUserCommand";
Expand All @@ -138,6 +143,7 @@ export type ServiceInputTypes =
| DeleteAgreementCommandInput
| DeleteCertificateCommandInput
| DeleteConnectorCommandInput
| DeleteHostKeyCommandInput
| DeleteProfileCommandInput
| DeleteServerCommandInput
| DeleteSshPublicKeyCommandInput
Expand All @@ -148,18 +154,21 @@ export type ServiceInputTypes =
| DescribeCertificateCommandInput
| DescribeConnectorCommandInput
| DescribeExecutionCommandInput
| DescribeHostKeyCommandInput
| DescribeProfileCommandInput
| DescribeSecurityPolicyCommandInput
| DescribeServerCommandInput
| DescribeUserCommandInput
| DescribeWorkflowCommandInput
| ImportCertificateCommandInput
| ImportHostKeyCommandInput
| ImportSshPublicKeyCommandInput
| ListAccessesCommandInput
| ListAgreementsCommandInput
| ListCertificatesCommandInput
| ListConnectorsCommandInput
| ListExecutionsCommandInput
| ListHostKeysCommandInput
| ListProfilesCommandInput
| ListSecurityPoliciesCommandInput
| ListServersCommandInput
Expand All @@ -177,6 +186,7 @@ export type ServiceInputTypes =
| UpdateAgreementCommandInput
| UpdateCertificateCommandInput
| UpdateConnectorCommandInput
| UpdateHostKeyCommandInput
| UpdateProfileCommandInput
| UpdateServerCommandInput
| UpdateUserCommandInput;
Expand All @@ -193,6 +203,7 @@ export type ServiceOutputTypes =
| DeleteAgreementCommandOutput
| DeleteCertificateCommandOutput
| DeleteConnectorCommandOutput
| DeleteHostKeyCommandOutput
| DeleteProfileCommandOutput
| DeleteServerCommandOutput
| DeleteSshPublicKeyCommandOutput
Expand All @@ -203,18 +214,21 @@ export type ServiceOutputTypes =
| DescribeCertificateCommandOutput
| DescribeConnectorCommandOutput
| DescribeExecutionCommandOutput
| DescribeHostKeyCommandOutput
| DescribeProfileCommandOutput
| DescribeSecurityPolicyCommandOutput
| DescribeServerCommandOutput
| DescribeUserCommandOutput
| DescribeWorkflowCommandOutput
| ImportCertificateCommandOutput
| ImportHostKeyCommandOutput
| ImportSshPublicKeyCommandOutput
| ListAccessesCommandOutput
| ListAgreementsCommandOutput
| ListCertificatesCommandOutput
| ListConnectorsCommandOutput
| ListExecutionsCommandOutput
| ListHostKeysCommandOutput
| ListProfilesCommandOutput
| ListSecurityPoliciesCommandOutput
| ListServersCommandOutput
Expand All @@ -232,6 +246,7 @@ export type ServiceOutputTypes =
| UpdateAgreementCommandOutput
| UpdateCertificateCommandOutput
| UpdateConnectorCommandOutput
| UpdateHostKeyCommandOutput
| UpdateProfileCommandOutput
| UpdateServerCommandOutput
| UpdateUserCommandOutput;
Expand Down
Loading

0 comments on commit e09e302

Please sign in to comment.