-
Notifications
You must be signed in to change notification settings - Fork 583
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-redshift-serverless): Adds support for the ListManagedWor…
…kgroups API to get an overview of existing managed workgroups.
- Loading branch information
awstools
committed
Dec 3, 2024
1 parent
500786a
commit e55f648
Showing
14 changed files
with
588 additions
and
28 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
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
113 changes: 113 additions & 0 deletions
113
clients/client-redshift-serverless/src/commands/ListManagedWorkgroupsCommand.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,113 @@ | ||
// 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 { ListManagedWorkgroupsRequest, ListManagedWorkgroupsResponse } from "../models/models_0"; | ||
import { de_ListManagedWorkgroupsCommand, se_ListManagedWorkgroupsCommand } from "../protocols/Aws_json1_1"; | ||
import { | ||
RedshiftServerlessClientResolvedConfig, | ||
ServiceInputTypes, | ||
ServiceOutputTypes, | ||
} from "../RedshiftServerlessClient"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
export type { __MetadataBearer }; | ||
export { $Command }; | ||
/** | ||
* @public | ||
* | ||
* The input for {@link ListManagedWorkgroupsCommand}. | ||
*/ | ||
export interface ListManagedWorkgroupsCommandInput extends ListManagedWorkgroupsRequest {} | ||
/** | ||
* @public | ||
* | ||
* The output of {@link ListManagedWorkgroupsCommand}. | ||
*/ | ||
export interface ListManagedWorkgroupsCommandOutput extends ListManagedWorkgroupsResponse, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Returns information about a list of specified managed workgroups in your account.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { RedshiftServerlessClient, ListManagedWorkgroupsCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import | ||
* // const { RedshiftServerlessClient, ListManagedWorkgroupsCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import | ||
* const client = new RedshiftServerlessClient(config); | ||
* const input = { // ListManagedWorkgroupsRequest | ||
* sourceArn: "STRING_VALUE", | ||
* nextToken: "STRING_VALUE", | ||
* maxResults: Number("int"), | ||
* }; | ||
* const command = new ListManagedWorkgroupsCommand(input); | ||
* const response = await client.send(command); | ||
* // { // ListManagedWorkgroupsResponse | ||
* // nextToken: "STRING_VALUE", | ||
* // managedWorkgroups: [ // ManagedWorkgroups | ||
* // { // ManagedWorkgroupListItem | ||
* // managedWorkgroupName: "STRING_VALUE", | ||
* // managedWorkgroupId: "STRING_VALUE", | ||
* // sourceArn: "STRING_VALUE", | ||
* // status: "CREATING" || "DELETING" || "MODIFYING" || "AVAILABLE" || "NOT_AVAILABLE", | ||
* // creationDate: new Date("TIMESTAMP"), | ||
* // }, | ||
* // ], | ||
* // }; | ||
* | ||
* ``` | ||
* | ||
* @param ListManagedWorkgroupsCommandInput - {@link ListManagedWorkgroupsCommandInput} | ||
* @returns {@link ListManagedWorkgroupsCommandOutput} | ||
* @see {@link ListManagedWorkgroupsCommandInput} for command's `input` shape. | ||
* @see {@link ListManagedWorkgroupsCommandOutput} for command's `response` shape. | ||
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape. | ||
* | ||
* @throws {@link AccessDeniedException} (client fault) | ||
* <p>You do not have sufficient access to perform this action.</p> | ||
* | ||
* @throws {@link InternalServerException} (server fault) | ||
* <p>The request processing has failed because of an unknown error, exception or failure.</p> | ||
* | ||
* @throws {@link RedshiftServerlessServiceException} | ||
* <p>Base exception class for all service exceptions from RedshiftServerless service.</p> | ||
* | ||
* @public | ||
*/ | ||
export class ListManagedWorkgroupsCommand extends $Command | ||
.classBuilder< | ||
ListManagedWorkgroupsCommandInput, | ||
ListManagedWorkgroupsCommandOutput, | ||
RedshiftServerlessClientResolvedConfig, | ||
ServiceInputTypes, | ||
ServiceOutputTypes | ||
>() | ||
.ep(commonParams) | ||
.m(function (this: any, Command: any, cs: any, config: RedshiftServerlessClientResolvedConfig, o: any) { | ||
return [ | ||
getSerdePlugin(config, this.serialize, this.deserialize), | ||
getEndpointPlugin(config, Command.getEndpointParameterInstructions()), | ||
]; | ||
}) | ||
.s("RedshiftServerless", "ListManagedWorkgroups", {}) | ||
.n("RedshiftServerlessClient", "ListManagedWorkgroupsCommand") | ||
.f(void 0, void 0) | ||
.ser(se_ListManagedWorkgroupsCommand) | ||
.de(de_ListManagedWorkgroupsCommand) | ||
.build() { | ||
/** @internal type navigation helper, not in runtime. */ | ||
protected declare static __types: { | ||
api: { | ||
input: ListManagedWorkgroupsRequest; | ||
output: ListManagedWorkgroupsResponse; | ||
}; | ||
sdk: { | ||
input: ListManagedWorkgroupsCommandInput; | ||
output: ListManagedWorkgroupsCommandOutput; | ||
}; | ||
}; | ||
} |
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
Oops, something went wrong.