Skip to content

Commit

Permalink
feat(client-launch-wizard): This release adds support for describing …
Browse files Browse the repository at this point in the history
…workload deployment specifications, deploying additional workload types, and managing tags for Launch Wizard resources with API operations.
  • Loading branch information
awstools committed May 31, 2024
1 parent da60fe0 commit 5a28a05
Show file tree
Hide file tree
Showing 16 changed files with 1,602 additions and 55 deletions.
32 changes: 32 additions & 0 deletions clients/client-launch-wizard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ GetWorkload

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/launch-wizard/command/GetWorkloadCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-launch-wizard/Interface/GetWorkloadCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-launch-wizard/Interface/GetWorkloadCommandOutput/)

</details>
<details>
<summary>
GetWorkloadDeploymentPattern
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/launch-wizard/command/GetWorkloadDeploymentPatternCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-launch-wizard/Interface/GetWorkloadDeploymentPatternCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-launch-wizard/Interface/GetWorkloadDeploymentPatternCommandOutput/)

</details>
<details>
<summary>
Expand All @@ -253,6 +261,14 @@ ListDeployments

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/launch-wizard/command/ListDeploymentsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-launch-wizard/Interface/ListDeploymentsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-launch-wizard/Interface/ListDeploymentsCommandOutput/)

</details>
<details>
<summary>
ListTagsForResource
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/launch-wizard/command/ListTagsForResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-launch-wizard/Interface/ListTagsForResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-launch-wizard/Interface/ListTagsForResourceCommandOutput/)

</details>
<details>
<summary>
Expand All @@ -270,3 +286,19 @@ ListWorkloads
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/launch-wizard/command/ListWorkloadsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-launch-wizard/Interface/ListWorkloadsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-launch-wizard/Interface/ListWorkloadsCommandOutput/)

</details>
<details>
<summary>
TagResource
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/launch-wizard/command/TagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-launch-wizard/Interface/TagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-launch-wizard/Interface/TagResourceCommandOutput/)

</details>
<details>
<summary>
UntagResource
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/launch-wizard/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-launch-wizard/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-launch-wizard/Interface/UntagResourceCommandOutput/)

</details>
76 changes: 76 additions & 0 deletions clients/client-launch-wizard/src/LaunchWizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ import {
GetDeploymentCommandOutput,
} from "./commands/GetDeploymentCommand";
import { GetWorkloadCommand, GetWorkloadCommandInput, GetWorkloadCommandOutput } from "./commands/GetWorkloadCommand";
import {
GetWorkloadDeploymentPatternCommand,
GetWorkloadDeploymentPatternCommandInput,
GetWorkloadDeploymentPatternCommandOutput,
} from "./commands/GetWorkloadDeploymentPatternCommand";
import {
ListDeploymentEventsCommand,
ListDeploymentEventsCommandInput,
Expand All @@ -28,6 +33,11 @@ import {
ListDeploymentsCommandInput,
ListDeploymentsCommandOutput,
} from "./commands/ListDeploymentsCommand";
import {
ListTagsForResourceCommand,
ListTagsForResourceCommandInput,
ListTagsForResourceCommandOutput,
} from "./commands/ListTagsForResourceCommand";
import {
ListWorkloadDeploymentPatternsCommand,
ListWorkloadDeploymentPatternsCommandInput,
Expand All @@ -38,17 +48,27 @@ import {
ListWorkloadsCommandInput,
ListWorkloadsCommandOutput,
} from "./commands/ListWorkloadsCommand";
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import {
UntagResourceCommand,
UntagResourceCommandInput,
UntagResourceCommandOutput,
} from "./commands/UntagResourceCommand";
import { LaunchWizardClient, LaunchWizardClientConfig } from "./LaunchWizardClient";

const commands = {
CreateDeploymentCommand,
DeleteDeploymentCommand,
GetDeploymentCommand,
GetWorkloadCommand,
GetWorkloadDeploymentPatternCommand,
ListDeploymentEventsCommand,
ListDeploymentsCommand,
ListTagsForResourceCommand,
ListWorkloadDeploymentPatternsCommand,
ListWorkloadsCommand,
TagResourceCommand,
UntagResourceCommand,
};

export interface LaunchWizard {
Expand Down Expand Up @@ -108,6 +128,23 @@ export interface LaunchWizard {
cb: (err: any, data?: GetWorkloadCommandOutput) => void
): void;

/**
* @see {@link GetWorkloadDeploymentPatternCommand}
*/
getWorkloadDeploymentPattern(
args: GetWorkloadDeploymentPatternCommandInput,
options?: __HttpHandlerOptions
): Promise<GetWorkloadDeploymentPatternCommandOutput>;
getWorkloadDeploymentPattern(
args: GetWorkloadDeploymentPatternCommandInput,
cb: (err: any, data?: GetWorkloadDeploymentPatternCommandOutput) => void
): void;
getWorkloadDeploymentPattern(
args: GetWorkloadDeploymentPatternCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetWorkloadDeploymentPatternCommandOutput) => void
): void;

/**
* @see {@link ListDeploymentEventsCommand}
*/
Expand Down Expand Up @@ -140,6 +177,23 @@ export interface LaunchWizard {
cb: (err: any, data?: ListDeploymentsCommandOutput) => void
): void;

/**
* @see {@link ListTagsForResourceCommand}
*/
listTagsForResource(
args: ListTagsForResourceCommandInput,
options?: __HttpHandlerOptions
): Promise<ListTagsForResourceCommandOutput>;
listTagsForResource(
args: ListTagsForResourceCommandInput,
cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
): void;
listTagsForResource(
args: ListTagsForResourceCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
): void;

/**
* @see {@link ListWorkloadDeploymentPatternsCommand}
*/
Expand Down Expand Up @@ -168,6 +222,28 @@ export interface LaunchWizard {
options: __HttpHandlerOptions,
cb: (err: any, data?: ListWorkloadsCommandOutput) => void
): void;

/**
* @see {@link TagResourceCommand}
*/
tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
tagResource(
args: TagResourceCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: TagResourceCommandOutput) => void
): void;

/**
* @see {@link UntagResourceCommand}
*/
untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise<UntagResourceCommandOutput>;
untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
untagResource(
args: UntagResourceCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UntagResourceCommandOutput) => void
): void;
}

/**
Expand Down
22 changes: 20 additions & 2 deletions clients/client-launch-wizard/src/LaunchWizardClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,26 @@ import { CreateDeploymentCommandInput, CreateDeploymentCommandOutput } from "./c
import { DeleteDeploymentCommandInput, DeleteDeploymentCommandOutput } from "./commands/DeleteDeploymentCommand";
import { GetDeploymentCommandInput, GetDeploymentCommandOutput } from "./commands/GetDeploymentCommand";
import { GetWorkloadCommandInput, GetWorkloadCommandOutput } from "./commands/GetWorkloadCommand";
import {
GetWorkloadDeploymentPatternCommandInput,
GetWorkloadDeploymentPatternCommandOutput,
} from "./commands/GetWorkloadDeploymentPatternCommand";
import {
ListDeploymentEventsCommandInput,
ListDeploymentEventsCommandOutput,
} from "./commands/ListDeploymentEventsCommand";
import { ListDeploymentsCommandInput, ListDeploymentsCommandOutput } from "./commands/ListDeploymentsCommand";
import {
ListTagsForResourceCommandInput,
ListTagsForResourceCommandOutput,
} from "./commands/ListTagsForResourceCommand";
import {
ListWorkloadDeploymentPatternsCommandInput,
ListWorkloadDeploymentPatternsCommandOutput,
} from "./commands/ListWorkloadDeploymentPatternsCommand";
import { ListWorkloadsCommandInput, ListWorkloadsCommandOutput } from "./commands/ListWorkloadsCommand";
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
import {
ClientInputEndpointParameters,
ClientResolvedEndpointParameters,
Expand All @@ -86,10 +96,14 @@ export type ServiceInputTypes =
| DeleteDeploymentCommandInput
| GetDeploymentCommandInput
| GetWorkloadCommandInput
| GetWorkloadDeploymentPatternCommandInput
| ListDeploymentEventsCommandInput
| ListDeploymentsCommandInput
| ListTagsForResourceCommandInput
| ListWorkloadDeploymentPatternsCommandInput
| ListWorkloadsCommandInput;
| ListWorkloadsCommandInput
| TagResourceCommandInput
| UntagResourceCommandInput;

/**
* @public
Expand All @@ -99,10 +113,14 @@ export type ServiceOutputTypes =
| DeleteDeploymentCommandOutput
| GetDeploymentCommandOutput
| GetWorkloadCommandOutput
| GetWorkloadDeploymentPatternCommandOutput
| ListDeploymentEventsCommandOutput
| ListDeploymentsCommandOutput
| ListTagsForResourceCommandOutput
| ListWorkloadDeploymentPatternsCommandOutput
| ListWorkloadsCommandOutput;
| ListWorkloadsCommandOutput
| TagResourceCommandOutput
| UntagResourceCommandOutput;

/**
* @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ export interface CreateDeploymentCommandOutput extends CreateDeploymentOutput, _
* "<keys>": "STRING_VALUE",
* },
* dryRun: true || false,
* tags: { // Tags
* "<keys>": "STRING_VALUE",
* },
* };
* const command = new CreateDeploymentCommand(input);
* const response = await client.send(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ export interface DeleteDeploymentCommandOutput extends DeleteDeploymentOutput, _
* <p>An internal error has occurred. Retry your request, but if the problem persists, contact
* us with details by posting a question on <a href="https://repost.aws/">re:Post</a>.</p>
*
* @throws {@link ResourceLimitException} (client fault)
* <p>You have exceeded an Launch Wizard resource limit. For example, you might have too many
* deployments in progress.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified workload or deployment resource can't be found.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export interface GetDeploymentCommandOutput extends GetDeploymentOutput, __Metad
* // },
* // resourceGroup: "STRING_VALUE",
* // deletedAt: new Date("TIMESTAMP"),
* // tags: { // Tags
* // "<keys>": "STRING_VALUE",
* // },
* // deploymentArn: "STRING_VALUE",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { LaunchWizardClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LaunchWizardClient";
import { GetWorkloadDeploymentPatternInput, GetWorkloadDeploymentPatternOutput } from "../models/models_0";
import {
de_GetWorkloadDeploymentPatternCommand,
se_GetWorkloadDeploymentPatternCommand,
} from "../protocols/Aws_restJson1";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link GetWorkloadDeploymentPatternCommand}.
*/
export interface GetWorkloadDeploymentPatternCommandInput extends GetWorkloadDeploymentPatternInput {}
/**
* @public
*
* The output of {@link GetWorkloadDeploymentPatternCommand}.
*/
export interface GetWorkloadDeploymentPatternCommandOutput
extends GetWorkloadDeploymentPatternOutput,
__MetadataBearer {}

/**
* <p>Returns details for a given workload and deployment pattern, including the available
* specifications. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloads.html">ListWorkloads</a>
* operation to discover the available workload names and the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloadDeploymentPatterns.html">ListWorkloadDeploymentPatterns</a> operation to discover the available deployment
* pattern names of a given workload.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { LaunchWizardClient, GetWorkloadDeploymentPatternCommand } from "@aws-sdk/client-launch-wizard"; // ES Modules import
* // const { LaunchWizardClient, GetWorkloadDeploymentPatternCommand } = require("@aws-sdk/client-launch-wizard"); // CommonJS import
* const client = new LaunchWizardClient(config);
* const input = { // GetWorkloadDeploymentPatternInput
* workloadName: "STRING_VALUE", // required
* deploymentPatternName: "STRING_VALUE", // required
* };
* const command = new GetWorkloadDeploymentPatternCommand(input);
* const response = await client.send(command);
* // { // GetWorkloadDeploymentPatternOutput
* // workloadDeploymentPattern: { // WorkloadDeploymentPatternData
* // workloadName: "STRING_VALUE",
* // deploymentPatternName: "STRING_VALUE",
* // workloadVersionName: "STRING_VALUE",
* // displayName: "STRING_VALUE",
* // description: "STRING_VALUE",
* // status: "ACTIVE" || "INACTIVE" || "DISABLED" || "DELETED",
* // statusMessage: "STRING_VALUE",
* // specifications: [ // DeploymentSpecificationsData
* // { // DeploymentSpecificationsField
* // name: "STRING_VALUE",
* // description: "STRING_VALUE",
* // allowedValues: [ // AllowedValues
* // "STRING_VALUE",
* // ],
* // required: "STRING_VALUE",
* // conditionals: [ // SpecificationsConditionalData
* // { // DeploymentConditionalField
* // name: "STRING_VALUE",
* // value: "STRING_VALUE",
* // comparator: "STRING_VALUE",
* // },
* // ],
* // },
* // ],
* // },
* // };
*
* ```
*
* @param GetWorkloadDeploymentPatternCommandInput - {@link GetWorkloadDeploymentPatternCommandInput}
* @returns {@link GetWorkloadDeploymentPatternCommandOutput}
* @see {@link GetWorkloadDeploymentPatternCommandInput} for command's `input` shape.
* @see {@link GetWorkloadDeploymentPatternCommandOutput} for command's `response` shape.
* @see {@link LaunchWizardClientResolvedConfig | config} for LaunchWizardClient's `config` shape.
*
* @throws {@link InternalServerException} (server fault)
* <p>An internal error has occurred. Retry your request, but if the problem persists, contact
* us with details by posting a question on <a href="https://repost.aws/">re:Post</a>.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified workload or deployment resource can't be found.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
*
* @throws {@link LaunchWizardServiceException}
* <p>Base exception class for all service exceptions from LaunchWizard service.</p>
*
* @public
*/
export class GetWorkloadDeploymentPatternCommand extends $Command
.classBuilder<
GetWorkloadDeploymentPatternCommandInput,
GetWorkloadDeploymentPatternCommandOutput,
LaunchWizardClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: LaunchWizardClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("LaunchWizard", "GetWorkloadDeploymentPattern", {})
.n("LaunchWizardClient", "GetWorkloadDeploymentPatternCommand")
.f(void 0, void 0)
.ser(se_GetWorkloadDeploymentPatternCommand)
.de(de_GetWorkloadDeploymentPatternCommand)
.build() {}
Loading

0 comments on commit 5a28a05

Please sign in to comment.