Skip to content

Commit

Permalink
feat(client-database-migration-service): Adding new API describe-engi…
Browse files Browse the repository at this point in the history
…ne-versions which provides information about the lifecycle of a replication instance's version.
  • Loading branch information
awstools committed Aug 1, 2023
1 parent 3eca91f commit dac6d12
Show file tree
Hide file tree
Showing 9 changed files with 463 additions and 19 deletions.
8 changes: 8 additions & 0 deletions clients/client-database-migration-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,14 @@ DescribeEndpointTypes

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-database-migration-service/classes/describeendpointtypescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-database-migration-service/interfaces/describeendpointtypescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-database-migration-service/interfaces/describeendpointtypescommandoutput.html)

</details>
<details>
<summary>
DescribeEngineVersions
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-database-migration-service/classes/describeengineversionscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-database-migration-service/interfaces/describeengineversionscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-database-migration-service/interfaces/describeengineversionscommandoutput.html)

</details>
<details>
<summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ import {
DescribeEndpointTypesCommandInput,
DescribeEndpointTypesCommandOutput,
} from "./commands/DescribeEndpointTypesCommand";
import {
DescribeEngineVersionsCommand,
DescribeEngineVersionsCommandInput,
DescribeEngineVersionsCommandOutput,
} from "./commands/DescribeEngineVersionsCommand";
import {
DescribeEventCategoriesCommand,
DescribeEventCategoriesCommandInput,
Expand Down Expand Up @@ -424,6 +429,7 @@ const commands = {
DescribeEndpointsCommand,
DescribeEndpointSettingsCommand,
DescribeEndpointTypesCommand,
DescribeEngineVersionsCommand,
DescribeEventCategoriesCommand,
DescribeEventsCommand,
DescribeEventSubscriptionsCommand,
Expand Down Expand Up @@ -963,6 +969,23 @@ export interface DatabaseMigrationService {
cb: (err: any, data?: DescribeEndpointTypesCommandOutput) => void
): void;

/**
* @see {@link DescribeEngineVersionsCommand}
*/
describeEngineVersions(
args: DescribeEngineVersionsCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeEngineVersionsCommandOutput>;
describeEngineVersions(
args: DescribeEngineVersionsCommandInput,
cb: (err: any, data?: DescribeEngineVersionsCommandOutput) => void
): void;
describeEngineVersions(
args: DescribeEngineVersionsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeEngineVersionsCommandOutput) => void
): void;

/**
* @see {@link DescribeEventCategoriesCommand}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ import {
DescribeEndpointTypesCommandInput,
DescribeEndpointTypesCommandOutput,
} from "./commands/DescribeEndpointTypesCommand";
import {
DescribeEngineVersionsCommandInput,
DescribeEngineVersionsCommandOutput,
} from "./commands/DescribeEngineVersionsCommand";
import {
DescribeEventCategoriesCommandInput,
DescribeEventCategoriesCommandOutput,
Expand Down Expand Up @@ -359,6 +363,7 @@ export type ServiceInputTypes =
| DescribeEndpointSettingsCommandInput
| DescribeEndpointTypesCommandInput
| DescribeEndpointsCommandInput
| DescribeEngineVersionsCommandInput
| DescribeEventCategoriesCommandInput
| DescribeEventSubscriptionsCommandInput
| DescribeEventsCommandInput
Expand Down Expand Up @@ -442,6 +447,7 @@ export type ServiceOutputTypes =
| DescribeEndpointSettingsCommandOutput
| DescribeEndpointTypesCommandOutput
| DescribeEndpointsCommandOutput
| DescribeEngineVersionsCommandOutput
| DescribeEventCategoriesCommandOutput
| DescribeEventSubscriptionsCommandOutput
| DescribeEventsCommandOutput
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Command as $Command } from "@smithy/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@smithy/types";

import {
DatabaseMigrationServiceClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../DatabaseMigrationServiceClient";
import { DescribeEngineVersionsMessage, DescribeEngineVersionsResponse } from "../models/models_0";
import { de_DescribeEngineVersionsCommand, se_DescribeEngineVersionsCommand } from "../protocols/Aws_json1_1";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link DescribeEngineVersionsCommand}.
*/
export interface DescribeEngineVersionsCommandInput extends DescribeEngineVersionsMessage {}
/**
* @public
*
* The output of {@link DescribeEngineVersionsCommand}.
*/
export interface DescribeEngineVersionsCommandOutput extends DescribeEngineVersionsResponse, __MetadataBearer {}

/**
* @public
* <p>Returns information about the replication instance versions used in the project.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { DatabaseMigrationServiceClient, DescribeEngineVersionsCommand } from "@aws-sdk/client-database-migration-service"; // ES Modules import
* // const { DatabaseMigrationServiceClient, DescribeEngineVersionsCommand } = require("@aws-sdk/client-database-migration-service"); // CommonJS import
* const client = new DatabaseMigrationServiceClient(config);
* const input = { // DescribeEngineVersionsMessage
* MaxRecords: Number("int"),
* Marker: "STRING_VALUE",
* };
* const command = new DescribeEngineVersionsCommand(input);
* const response = await client.send(command);
* // { // DescribeEngineVersionsResponse
* // EngineVersions: [ // EngineVersionList
* // { // EngineVersion
* // Version: "STRING_VALUE",
* // Lifecycle: "STRING_VALUE",
* // ReleaseStatus: "beta" || "prod",
* // LaunchDate: new Date("TIMESTAMP"),
* // AutoUpgradeDate: new Date("TIMESTAMP"),
* // DeprecationDate: new Date("TIMESTAMP"),
* // ForceUpgradeDate: new Date("TIMESTAMP"),
* // AvailableUpgrades: [ // AvailableUpgradesList
* // "STRING_VALUE",
* // ],
* // },
* // ],
* // Marker: "STRING_VALUE",
* // };
*
* ```
*
* @param DescribeEngineVersionsCommandInput - {@link DescribeEngineVersionsCommandInput}
* @returns {@link DescribeEngineVersionsCommandOutput}
* @see {@link DescribeEngineVersionsCommandInput} for command's `input` shape.
* @see {@link DescribeEngineVersionsCommandOutput} for command's `response` shape.
* @see {@link DatabaseMigrationServiceClientResolvedConfig | config} for DatabaseMigrationServiceClient's `config` shape.
*
* @throws {@link DatabaseMigrationServiceServiceException}
* <p>Base exception class for all service exceptions from DatabaseMigrationService service.</p>
*
*/
export class DescribeEngineVersionsCommand extends $Command<
DescribeEngineVersionsCommandInput,
DescribeEngineVersionsCommandOutput,
DatabaseMigrationServiceClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

/**
* @public
*/
constructor(readonly input: DescribeEngineVersionsCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: DatabaseMigrationServiceClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<DescribeEngineVersionsCommandInput, DescribeEngineVersionsCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(
getEndpointPlugin(configuration, DescribeEngineVersionsCommand.getEndpointParameterInstructions())
);

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "DatabaseMigrationServiceClient";
const commandName = "DescribeEngineVersionsCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

/**
* @internal
*/
private serialize(input: DescribeEngineVersionsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return se_DescribeEngineVersionsCommand(input, context);
}

/**
* @internal
*/
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DescribeEngineVersionsCommandOutput> {
return de_DescribeEngineVersionsCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export * from "./DescribeConnectionsCommand";
export * from "./DescribeEndpointSettingsCommand";
export * from "./DescribeEndpointTypesCommand";
export * from "./DescribeEndpointsCommand";
export * from "./DescribeEngineVersionsCommand";
export * from "./DescribeEventCategoriesCommand";
export * from "./DescribeEventSubscriptionsCommand";
export * from "./DescribeEventsCommand";
Expand Down
Loading

0 comments on commit dac6d12

Please sign in to comment.