-
Notifications
You must be signed in to change notification settings - Fork 575
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-database-migration-service): Adding new API describe-engi…
…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
Showing
9 changed files
with
463 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
161 changes: 161 additions & 0 deletions
161
clients/client-database-migration-service/src/commands/DescribeEngineVersionsCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.