Skip to content

Commit

Permalink
feat(client-drs): Changed existing APIs and added new APIs to support…
Browse files Browse the repository at this point in the history
… using an account-level launch configuration template with AWS Elastic Disaster Recovery.
  • Loading branch information
awstools committed Apr 17, 2023
1 parent 3a4d2cb commit c1349f2
Show file tree
Hide file tree
Showing 13 changed files with 2,185 additions and 115 deletions.
32 changes: 32 additions & 0 deletions clients/client-drs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ CreateExtendedSourceServer

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/classes/createextendedsourceservercommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/createextendedsourceservercommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/createextendedsourceservercommandoutput.html)

</details>
<details>
<summary>
CreateLaunchConfigurationTemplate
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/classes/createlaunchconfigurationtemplatecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/createlaunchconfigurationtemplatecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/createlaunchconfigurationtemplatecommandoutput.html)

</details>
<details>
<summary>
Expand All @@ -229,6 +237,14 @@ DeleteJob

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/classes/deletejobcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/deletejobcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/deletejobcommandoutput.html)

</details>
<details>
<summary>
DeleteLaunchConfigurationTemplate
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/classes/deletelaunchconfigurationtemplatecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/deletelaunchconfigurationtemplatecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/deletelaunchconfigurationtemplatecommandoutput.html)

</details>
<details>
<summary>
Expand Down Expand Up @@ -269,6 +285,14 @@ DescribeJobs

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/classes/describejobscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/describejobscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/describejobscommandoutput.html)

</details>
<details>
<summary>
DescribeLaunchConfigurationTemplates
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/classes/describelaunchconfigurationtemplatescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/describelaunchconfigurationtemplatescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/describelaunchconfigurationtemplatescommandoutput.html)

</details>
<details>
<summary>
Expand Down Expand Up @@ -469,6 +493,14 @@ UpdateLaunchConfiguration

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/classes/updatelaunchconfigurationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/updatelaunchconfigurationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/updatelaunchconfigurationcommandoutput.html)

</details>
<details>
<summary>
UpdateLaunchConfigurationTemplate
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/classes/updatelaunchconfigurationtemplatecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/updatelaunchconfigurationtemplatecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-drs/interfaces/updatelaunchconfigurationtemplatecommandoutput.html)

</details>
<details>
<summary>
Expand Down
152 changes: 152 additions & 0 deletions clients/client-drs/src/Drs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,22 @@ import {
CreateExtendedSourceServerCommandInput,
CreateExtendedSourceServerCommandOutput,
} from "./commands/CreateExtendedSourceServerCommand";
import {
CreateLaunchConfigurationTemplateCommand,
CreateLaunchConfigurationTemplateCommandInput,
CreateLaunchConfigurationTemplateCommandOutput,
} from "./commands/CreateLaunchConfigurationTemplateCommand";
import {
CreateReplicationConfigurationTemplateCommand,
CreateReplicationConfigurationTemplateCommandInput,
CreateReplicationConfigurationTemplateCommandOutput,
} from "./commands/CreateReplicationConfigurationTemplateCommand";
import { DeleteJobCommand, DeleteJobCommandInput, DeleteJobCommandOutput } from "./commands/DeleteJobCommand";
import {
DeleteLaunchConfigurationTemplateCommand,
DeleteLaunchConfigurationTemplateCommandInput,
DeleteLaunchConfigurationTemplateCommandOutput,
} from "./commands/DeleteLaunchConfigurationTemplateCommand";
import {
DeleteRecoveryInstanceCommand,
DeleteRecoveryInstanceCommandInput,
Expand All @@ -37,6 +47,11 @@ import {
DescribeJobsCommandInput,
DescribeJobsCommandOutput,
} from "./commands/DescribeJobsCommand";
import {
DescribeLaunchConfigurationTemplatesCommand,
DescribeLaunchConfigurationTemplatesCommandInput,
DescribeLaunchConfigurationTemplatesCommandOutput,
} from "./commands/DescribeLaunchConfigurationTemplatesCommand";
import {
DescribeRecoveryInstancesCommand,
DescribeRecoveryInstancesCommandInput,
Expand Down Expand Up @@ -158,6 +173,11 @@ import {
UpdateLaunchConfigurationCommandInput,
UpdateLaunchConfigurationCommandOutput,
} from "./commands/UpdateLaunchConfigurationCommand";
import {
UpdateLaunchConfigurationTemplateCommand,
UpdateLaunchConfigurationTemplateCommandInput,
UpdateLaunchConfigurationTemplateCommandOutput,
} from "./commands/UpdateLaunchConfigurationTemplateCommand";
import {
UpdateReplicationConfigurationCommand,
UpdateReplicationConfigurationCommandInput,
Expand Down Expand Up @@ -208,6 +228,39 @@ export class Drs extends DrsClient {
}
}

/**
* @public
* <p>Creates a new Launch Configuration Template.</p>
*/
public createLaunchConfigurationTemplate(
args: CreateLaunchConfigurationTemplateCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateLaunchConfigurationTemplateCommandOutput>;
public createLaunchConfigurationTemplate(
args: CreateLaunchConfigurationTemplateCommandInput,
cb: (err: any, data?: CreateLaunchConfigurationTemplateCommandOutput) => void
): void;
public createLaunchConfigurationTemplate(
args: CreateLaunchConfigurationTemplateCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateLaunchConfigurationTemplateCommandOutput) => void
): void;
public createLaunchConfigurationTemplate(
args: CreateLaunchConfigurationTemplateCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateLaunchConfigurationTemplateCommandOutput) => void),
cb?: (err: any, data?: CreateLaunchConfigurationTemplateCommandOutput) => void
): Promise<CreateLaunchConfigurationTemplateCommandOutput> | void {
const command = new CreateLaunchConfigurationTemplateCommand(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);
}
}

/**
* @public
* <p>Creates a new ReplicationConfigurationTemplate.</p>
Expand Down Expand Up @@ -270,6 +323,39 @@ export class Drs extends DrsClient {
}
}

/**
* @public
* <p>Deletes a single Launch Configuration Template by ID.</p>
*/
public deleteLaunchConfigurationTemplate(
args: DeleteLaunchConfigurationTemplateCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteLaunchConfigurationTemplateCommandOutput>;
public deleteLaunchConfigurationTemplate(
args: DeleteLaunchConfigurationTemplateCommandInput,
cb: (err: any, data?: DeleteLaunchConfigurationTemplateCommandOutput) => void
): void;
public deleteLaunchConfigurationTemplate(
args: DeleteLaunchConfigurationTemplateCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteLaunchConfigurationTemplateCommandOutput) => void
): void;
public deleteLaunchConfigurationTemplate(
args: DeleteLaunchConfigurationTemplateCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteLaunchConfigurationTemplateCommandOutput) => void),
cb?: (err: any, data?: DeleteLaunchConfigurationTemplateCommandOutput) => void
): Promise<DeleteLaunchConfigurationTemplateCommandOutput> | void {
const command = new DeleteLaunchConfigurationTemplateCommand(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);
}
}

/**
* @public
* <p>Deletes a single Recovery Instance by ID. This deletes the Recovery Instance resource from Elastic Disaster Recovery. The Recovery Instance must be disconnected first in order to delete it.</p>
Expand Down Expand Up @@ -434,6 +520,39 @@ export class Drs extends DrsClient {
}
}

/**
* @public
* <p>Lists all Launch Configuration Templates, filtered by Launch Configuration Template IDs</p>
*/
public describeLaunchConfigurationTemplates(
args: DescribeLaunchConfigurationTemplatesCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeLaunchConfigurationTemplatesCommandOutput>;
public describeLaunchConfigurationTemplates(
args: DescribeLaunchConfigurationTemplatesCommandInput,
cb: (err: any, data?: DescribeLaunchConfigurationTemplatesCommandOutput) => void
): void;
public describeLaunchConfigurationTemplates(
args: DescribeLaunchConfigurationTemplatesCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeLaunchConfigurationTemplatesCommandOutput) => void
): void;
public describeLaunchConfigurationTemplates(
args: DescribeLaunchConfigurationTemplatesCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeLaunchConfigurationTemplatesCommandOutput) => void),
cb?: (err: any, data?: DescribeLaunchConfigurationTemplatesCommandOutput) => void
): Promise<DescribeLaunchConfigurationTemplatesCommandOutput> | void {
const command = new DescribeLaunchConfigurationTemplatesCommand(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);
}
}

/**
* @public
* <p>Lists all Recovery Instances or multiple Recovery Instances by ID.</p>
Expand Down Expand Up @@ -1264,6 +1383,39 @@ export class Drs extends DrsClient {
}
}

/**
* @public
* <p>Updates an existing Launch Configuration Template by ID.</p>
*/
public updateLaunchConfigurationTemplate(
args: UpdateLaunchConfigurationTemplateCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdateLaunchConfigurationTemplateCommandOutput>;
public updateLaunchConfigurationTemplate(
args: UpdateLaunchConfigurationTemplateCommandInput,
cb: (err: any, data?: UpdateLaunchConfigurationTemplateCommandOutput) => void
): void;
public updateLaunchConfigurationTemplate(
args: UpdateLaunchConfigurationTemplateCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateLaunchConfigurationTemplateCommandOutput) => void
): void;
public updateLaunchConfigurationTemplate(
args: UpdateLaunchConfigurationTemplateCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateLaunchConfigurationTemplateCommandOutput) => void),
cb?: (err: any, data?: UpdateLaunchConfigurationTemplateCommandOutput) => void
): Promise<UpdateLaunchConfigurationTemplateCommandOutput> | void {
const command = new UpdateLaunchConfigurationTemplateCommand(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);
}
}

/**
* @public
* <p>Allows you to update a ReplicationConfiguration by Source Server ID.</p>
Expand Down
24 changes: 24 additions & 0 deletions clients/client-drs/src/DrsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,19 @@ import {
CreateExtendedSourceServerCommandInput,
CreateExtendedSourceServerCommandOutput,
} from "./commands/CreateExtendedSourceServerCommand";
import {
CreateLaunchConfigurationTemplateCommandInput,
CreateLaunchConfigurationTemplateCommandOutput,
} from "./commands/CreateLaunchConfigurationTemplateCommand";
import {
CreateReplicationConfigurationTemplateCommandInput,
CreateReplicationConfigurationTemplateCommandOutput,
} from "./commands/CreateReplicationConfigurationTemplateCommand";
import { DeleteJobCommandInput, DeleteJobCommandOutput } from "./commands/DeleteJobCommand";
import {
DeleteLaunchConfigurationTemplateCommandInput,
DeleteLaunchConfigurationTemplateCommandOutput,
} from "./commands/DeleteLaunchConfigurationTemplateCommand";
import {
DeleteRecoveryInstanceCommandInput,
DeleteRecoveryInstanceCommandOutput,
Expand All @@ -72,6 +80,10 @@ import {
DescribeJobLogItemsCommandOutput,
} from "./commands/DescribeJobLogItemsCommand";
import { DescribeJobsCommandInput, DescribeJobsCommandOutput } from "./commands/DescribeJobsCommand";
import {
DescribeLaunchConfigurationTemplatesCommandInput,
DescribeLaunchConfigurationTemplatesCommandOutput,
} from "./commands/DescribeLaunchConfigurationTemplatesCommand";
import {
DescribeRecoveryInstancesCommandInput,
DescribeRecoveryInstancesCommandOutput,
Expand Down Expand Up @@ -148,6 +160,10 @@ import {
UpdateLaunchConfigurationCommandInput,
UpdateLaunchConfigurationCommandOutput,
} from "./commands/UpdateLaunchConfigurationCommand";
import {
UpdateLaunchConfigurationTemplateCommandInput,
UpdateLaunchConfigurationTemplateCommandOutput,
} from "./commands/UpdateLaunchConfigurationTemplateCommand";
import {
UpdateReplicationConfigurationCommandInput,
UpdateReplicationConfigurationCommandOutput,
Expand All @@ -169,13 +185,16 @@ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
*/
export type ServiceInputTypes =
| CreateExtendedSourceServerCommandInput
| CreateLaunchConfigurationTemplateCommandInput
| CreateReplicationConfigurationTemplateCommandInput
| DeleteJobCommandInput
| DeleteLaunchConfigurationTemplateCommandInput
| DeleteRecoveryInstanceCommandInput
| DeleteReplicationConfigurationTemplateCommandInput
| DeleteSourceServerCommandInput
| DescribeJobLogItemsCommandInput
| DescribeJobsCommandInput
| DescribeLaunchConfigurationTemplatesCommandInput
| DescribeRecoveryInstancesCommandInput
| DescribeRecoverySnapshotsCommandInput
| DescribeReplicationConfigurationTemplatesCommandInput
Expand All @@ -201,6 +220,7 @@ export type ServiceInputTypes =
| UntagResourceCommandInput
| UpdateFailbackReplicationConfigurationCommandInput
| UpdateLaunchConfigurationCommandInput
| UpdateLaunchConfigurationTemplateCommandInput
| UpdateReplicationConfigurationCommandInput
| UpdateReplicationConfigurationTemplateCommandInput;

Expand All @@ -209,13 +229,16 @@ export type ServiceInputTypes =
*/
export type ServiceOutputTypes =
| CreateExtendedSourceServerCommandOutput
| CreateLaunchConfigurationTemplateCommandOutput
| CreateReplicationConfigurationTemplateCommandOutput
| DeleteJobCommandOutput
| DeleteLaunchConfigurationTemplateCommandOutput
| DeleteRecoveryInstanceCommandOutput
| DeleteReplicationConfigurationTemplateCommandOutput
| DeleteSourceServerCommandOutput
| DescribeJobLogItemsCommandOutput
| DescribeJobsCommandOutput
| DescribeLaunchConfigurationTemplatesCommandOutput
| DescribeRecoveryInstancesCommandOutput
| DescribeRecoverySnapshotsCommandOutput
| DescribeReplicationConfigurationTemplatesCommandOutput
Expand All @@ -241,6 +264,7 @@ export type ServiceOutputTypes =
| UntagResourceCommandOutput
| UpdateFailbackReplicationConfigurationCommandOutput
| UpdateLaunchConfigurationCommandOutput
| UpdateLaunchConfigurationTemplateCommandOutput
| UpdateReplicationConfigurationCommandOutput
| UpdateReplicationConfigurationTemplateCommandOutput;

Expand Down
Loading

0 comments on commit c1349f2

Please sign in to comment.