Skip to content

Commit e55f648

Browse files
author
awstools
committed
feat(client-redshift-serverless): Adds support for the ListManagedWorkgroups API to get an overview of existing managed workgroups.
1 parent 500786a commit e55f648

14 files changed

+588
-28
lines changed

clients/client-redshift-serverless/README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ underlying resources based on workload demands. Amazon Redshift Serverless adjus
1414
performance and simplified operations for even the most demanding and volatile workloads. Amazon Redshift Serverless lets you
1515
focus on using your data to acquire new insights for your business and customers.
1616
</p>
17-
<p>
18-
To learn more about Amazon Redshift Serverless,
19-
see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-whatis.html">What is Amazon Redshift Serverless</a>.
20-
</p>
17+
<p> To learn more about Amazon Redshift Serverless, see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-whatis.html">What is Amazon Redshift Serverless?</a>.</p>
2118

2219
## Installing
2320

@@ -461,6 +458,14 @@ ListEndpointAccess
461458

462459
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/redshift-serverless/command/ListEndpointAccessCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift-serverless/Interface/ListEndpointAccessCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift-serverless/Interface/ListEndpointAccessCommandOutput/)
463460

461+
</details>
462+
<details>
463+
<summary>
464+
ListManagedWorkgroups
465+
</summary>
466+
467+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/redshift-serverless/command/ListManagedWorkgroupsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift-serverless/Interface/ListManagedWorkgroupsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift-serverless/Interface/ListManagedWorkgroupsCommandOutput/)
468+
464469
</details>
465470
<details>
466471
<summary>

clients/client-redshift-serverless/src/RedshiftServerless.ts

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ import {
153153
ListEndpointAccessCommandInput,
154154
ListEndpointAccessCommandOutput,
155155
} from "./commands/ListEndpointAccessCommand";
156+
import {
157+
ListManagedWorkgroupsCommand,
158+
ListManagedWorkgroupsCommandInput,
159+
ListManagedWorkgroupsCommandOutput,
160+
} from "./commands/ListManagedWorkgroupsCommand";
156161
import {
157162
ListNamespacesCommand,
158163
ListNamespacesCommandInput,
@@ -303,6 +308,7 @@ const commands = {
303308
GetWorkgroupCommand,
304309
ListCustomDomainAssociationsCommand,
305310
ListEndpointAccessCommand,
311+
ListManagedWorkgroupsCommand,
306312
ListNamespacesCommand,
307313
ListRecoveryPointsCommand,
308314
ListScheduledActionsCommand,
@@ -816,6 +822,24 @@ export interface RedshiftServerless {
816822
cb: (err: any, data?: ListEndpointAccessCommandOutput) => void
817823
): void;
818824

825+
/**
826+
* @see {@link ListManagedWorkgroupsCommand}
827+
*/
828+
listManagedWorkgroups(): Promise<ListManagedWorkgroupsCommandOutput>;
829+
listManagedWorkgroups(
830+
args: ListManagedWorkgroupsCommandInput,
831+
options?: __HttpHandlerOptions
832+
): Promise<ListManagedWorkgroupsCommandOutput>;
833+
listManagedWorkgroups(
834+
args: ListManagedWorkgroupsCommandInput,
835+
cb: (err: any, data?: ListManagedWorkgroupsCommandOutput) => void
836+
): void;
837+
listManagedWorkgroups(
838+
args: ListManagedWorkgroupsCommandInput,
839+
options: __HttpHandlerOptions,
840+
cb: (err: any, data?: ListManagedWorkgroupsCommandOutput) => void
841+
): void;
842+
819843
/**
820844
* @see {@link ListNamespacesCommand}
821845
*/
@@ -1201,15 +1225,12 @@ export interface RedshiftServerless {
12011225
* <p>This is an interface reference for Amazon Redshift Serverless.
12021226
* It contains documentation for one of the programming or command line interfaces you can use to manage Amazon Redshift Serverless.
12031227
* </p>
1204-
* <p>Amazon Redshift Serverless automatically provisions data warehouse capacity and intelligently scales the
1228+
* <p>Amazon Redshift Serverless automatically provisions data warehouse capacity and intelligently scales the
12051229
* underlying resources based on workload demands. Amazon Redshift Serverless adjusts capacity in seconds to deliver consistently high
12061230
* performance and simplified operations for even the most demanding and volatile workloads. Amazon Redshift Serverless lets you
12071231
* focus on using your data to acquire new insights for your business and customers.
12081232
* </p>
1209-
* <p>
1210-
* To learn more about Amazon Redshift Serverless,
1211-
* see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-whatis.html">What is Amazon Redshift Serverless</a>.
1212-
* </p>
1233+
* <p> To learn more about Amazon Redshift Serverless, see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-whatis.html">What is Amazon Redshift Serverless?</a>.</p>
12131234
* @public
12141235
*/
12151236
export class RedshiftServerless extends RedshiftServerlessClient implements RedshiftServerless {}

clients/client-redshift-serverless/src/RedshiftServerlessClient.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ import {
123123
ListCustomDomainAssociationsCommandOutput,
124124
} from "./commands/ListCustomDomainAssociationsCommand";
125125
import { ListEndpointAccessCommandInput, ListEndpointAccessCommandOutput } from "./commands/ListEndpointAccessCommand";
126+
import {
127+
ListManagedWorkgroupsCommandInput,
128+
ListManagedWorkgroupsCommandOutput,
129+
} from "./commands/ListManagedWorkgroupsCommand";
126130
import { ListNamespacesCommandInput, ListNamespacesCommandOutput } from "./commands/ListNamespacesCommand";
127131
import { ListRecoveryPointsCommandInput, ListRecoveryPointsCommandOutput } from "./commands/ListRecoveryPointsCommand";
128132
import {
@@ -229,6 +233,7 @@ export type ServiceInputTypes =
229233
| GetWorkgroupCommandInput
230234
| ListCustomDomainAssociationsCommandInput
231235
| ListEndpointAccessCommandInput
236+
| ListManagedWorkgroupsCommandInput
232237
| ListNamespacesCommandInput
233238
| ListRecoveryPointsCommandInput
234239
| ListScheduledActionsCommandInput
@@ -289,6 +294,7 @@ export type ServiceOutputTypes =
289294
| GetWorkgroupCommandOutput
290295
| ListCustomDomainAssociationsCommandOutput
291296
| ListEndpointAccessCommandOutput
297+
| ListManagedWorkgroupsCommandOutput
292298
| ListNamespacesCommandOutput
293299
| ListRecoveryPointsCommandOutput
294300
| ListScheduledActionsCommandOutput
@@ -489,15 +495,12 @@ export interface RedshiftServerlessClientResolvedConfig extends RedshiftServerle
489495
* <p>This is an interface reference for Amazon Redshift Serverless.
490496
* It contains documentation for one of the programming or command line interfaces you can use to manage Amazon Redshift Serverless.
491497
* </p>
492-
* <p>Amazon Redshift Serverless automatically provisions data warehouse capacity and intelligently scales the
498+
* <p>Amazon Redshift Serverless automatically provisions data warehouse capacity and intelligently scales the
493499
* underlying resources based on workload demands. Amazon Redshift Serverless adjusts capacity in seconds to deliver consistently high
494500
* performance and simplified operations for even the most demanding and volatile workloads. Amazon Redshift Serverless lets you
495501
* focus on using your data to acquire new insights for your business and customers.
496502
* </p>
497-
* <p>
498-
* To learn more about Amazon Redshift Serverless,
499-
* see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-whatis.html">What is Amazon Redshift Serverless</a>.
500-
* </p>
503+
* <p> To learn more about Amazon Redshift Serverless, see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-whatis.html">What is Amazon Redshift Serverless?</a>.</p>
501504
* @public
502505
*/
503506
export class RedshiftServerlessClient extends __Client<

clients/client-redshift-serverless/src/commands/CreateWorkgroupCommand.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,23 @@ export interface CreateWorkgroupCommandOutput extends CreateWorkgroupResponse, _
3333

3434
/**
3535
* <p>Creates an workgroup in Amazon Redshift Serverless.</p>
36+
* <p>VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that
37+
* you own in a Region from reaching or being reached from the internet through internet
38+
* gateways and egress-only internet gateways. If a workgroup is in an account with VPC BPA
39+
* turned on, the following capabilities are blocked: </p>
40+
* <ul>
41+
* <li>
42+
* <p>Creating a public access workgroup</p>
43+
* </li>
44+
* <li>
45+
* <p>Modifying a private workgroup to public</p>
46+
* </li>
47+
* <li>
48+
* <p>Adding a subnet with VPC BPA turned on to the workgroup when the workgroup is
49+
* public</p>
50+
* </li>
51+
* </ul>
52+
* <p>For more information about VPC BPA, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/security-vpc-bpa.html">Block public access to VPCs and subnets</a> in the <i>Amazon VPC User Guide</i>.</p>
3653
* @example
3754
* Use a bare-bones client and the command you need to make an API call.
3855
* ```javascript

clients/client-redshift-serverless/src/commands/GetCredentialsCommand.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,9 @@ export interface GetCredentialsCommandOutput extends GetCredentialsResponse, __M
4040
* temporary authorization to log in to Amazon Redshift Serverless.</p>
4141
* <p>By default, the temporary credentials expire in 900 seconds.
4242
* You can optionally specify a duration between 900 seconds (15 minutes) and 3600 seconds (60 minutes).</p>
43-
*
4443
* <p>The Identity and Access Management (IAM) user or role that runs
4544
* GetCredentials must have an IAM policy attached that allows access to all
4645
* necessary actions and resources.</p>
47-
*
4846
* <p>If the <code>DbName</code> parameter is specified, the IAM policy must
4947
* allow access to the resource dbname for the specified database name.</p>
5048
* @example
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { ListManagedWorkgroupsRequest, ListManagedWorkgroupsResponse } from "../models/models_0";
9+
import { de_ListManagedWorkgroupsCommand, se_ListManagedWorkgroupsCommand } from "../protocols/Aws_json1_1";
10+
import {
11+
RedshiftServerlessClientResolvedConfig,
12+
ServiceInputTypes,
13+
ServiceOutputTypes,
14+
} from "../RedshiftServerlessClient";
15+
16+
/**
17+
* @public
18+
*/
19+
export type { __MetadataBearer };
20+
export { $Command };
21+
/**
22+
* @public
23+
*
24+
* The input for {@link ListManagedWorkgroupsCommand}.
25+
*/
26+
export interface ListManagedWorkgroupsCommandInput extends ListManagedWorkgroupsRequest {}
27+
/**
28+
* @public
29+
*
30+
* The output of {@link ListManagedWorkgroupsCommand}.
31+
*/
32+
export interface ListManagedWorkgroupsCommandOutput extends ListManagedWorkgroupsResponse, __MetadataBearer {}
33+
34+
/**
35+
* <p>Returns information about a list of specified managed workgroups in your account.</p>
36+
* @example
37+
* Use a bare-bones client and the command you need to make an API call.
38+
* ```javascript
39+
* import { RedshiftServerlessClient, ListManagedWorkgroupsCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
40+
* // const { RedshiftServerlessClient, ListManagedWorkgroupsCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
41+
* const client = new RedshiftServerlessClient(config);
42+
* const input = { // ListManagedWorkgroupsRequest
43+
* sourceArn: "STRING_VALUE",
44+
* nextToken: "STRING_VALUE",
45+
* maxResults: Number("int"),
46+
* };
47+
* const command = new ListManagedWorkgroupsCommand(input);
48+
* const response = await client.send(command);
49+
* // { // ListManagedWorkgroupsResponse
50+
* // nextToken: "STRING_VALUE",
51+
* // managedWorkgroups: [ // ManagedWorkgroups
52+
* // { // ManagedWorkgroupListItem
53+
* // managedWorkgroupName: "STRING_VALUE",
54+
* // managedWorkgroupId: "STRING_VALUE",
55+
* // sourceArn: "STRING_VALUE",
56+
* // status: "CREATING" || "DELETING" || "MODIFYING" || "AVAILABLE" || "NOT_AVAILABLE",
57+
* // creationDate: new Date("TIMESTAMP"),
58+
* // },
59+
* // ],
60+
* // };
61+
*
62+
* ```
63+
*
64+
* @param ListManagedWorkgroupsCommandInput - {@link ListManagedWorkgroupsCommandInput}
65+
* @returns {@link ListManagedWorkgroupsCommandOutput}
66+
* @see {@link ListManagedWorkgroupsCommandInput} for command's `input` shape.
67+
* @see {@link ListManagedWorkgroupsCommandOutput} for command's `response` shape.
68+
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
69+
*
70+
* @throws {@link AccessDeniedException} (client fault)
71+
* <p>You do not have sufficient access to perform this action.</p>
72+
*
73+
* @throws {@link InternalServerException} (server fault)
74+
* <p>The request processing has failed because of an unknown error, exception or failure.</p>
75+
*
76+
* @throws {@link RedshiftServerlessServiceException}
77+
* <p>Base exception class for all service exceptions from RedshiftServerless service.</p>
78+
*
79+
* @public
80+
*/
81+
export class ListManagedWorkgroupsCommand extends $Command
82+
.classBuilder<
83+
ListManagedWorkgroupsCommandInput,
84+
ListManagedWorkgroupsCommandOutput,
85+
RedshiftServerlessClientResolvedConfig,
86+
ServiceInputTypes,
87+
ServiceOutputTypes
88+
>()
89+
.ep(commonParams)
90+
.m(function (this: any, Command: any, cs: any, config: RedshiftServerlessClientResolvedConfig, o: any) {
91+
return [
92+
getSerdePlugin(config, this.serialize, this.deserialize),
93+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
94+
];
95+
})
96+
.s("RedshiftServerless", "ListManagedWorkgroups", {})
97+
.n("RedshiftServerlessClient", "ListManagedWorkgroupsCommand")
98+
.f(void 0, void 0)
99+
.ser(se_ListManagedWorkgroupsCommand)
100+
.de(de_ListManagedWorkgroupsCommand)
101+
.build() {
102+
/** @internal type navigation helper, not in runtime. */
103+
protected declare static __types: {
104+
api: {
105+
input: ListManagedWorkgroupsRequest;
106+
output: ListManagedWorkgroupsResponse;
107+
};
108+
sdk: {
109+
input: ListManagedWorkgroupsCommandInput;
110+
output: ListManagedWorkgroupsCommandOutput;
111+
};
112+
};
113+
}

clients/client-redshift-serverless/src/commands/UpdateWorkgroupCommand.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,24 @@ export interface UpdateWorkgroupCommandOutput extends UpdateWorkgroupResponse, _
3434
/**
3535
* <p>Updates a workgroup with the specified configuration settings. You can't update multiple parameters in one request. For example,
3636
* you can update <code>baseCapacity</code> or <code>port</code> in a single request, but you can't update both in the same request.</p>
37+
* <p>VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that
38+
* you own in a Region from reaching or being reached from the internet through internet
39+
* gateways and egress-only internet gateways. If a workgroup is in an account with VPC BPA
40+
* turned on, the following capabilities are blocked: </p>
41+
* <ul>
42+
* <li>
43+
* <p>Creating a public access workgroup</p>
44+
* </li>
45+
* <li>
46+
* <p>Modifying a private workgroup to public</p>
47+
* </li>
48+
* <li>
49+
* <p>Adding a subnet with VPC BPA turned on to the workgroup when the workgroup is
50+
* public</p>
51+
* </li>
52+
* </ul>
53+
* <p>For more information about VPC BPA, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/security-vpc-bpa.html">Block public access to VPCs and
54+
* subnets</a> in the <i>Amazon VPC User Guide</i>.</p>
3755
* @example
3856
* Use a bare-bones client and the command you need to make an API call.
3957
* ```javascript

clients/client-redshift-serverless/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export * from "./GetUsageLimitCommand";
3030
export * from "./GetWorkgroupCommand";
3131
export * from "./ListCustomDomainAssociationsCommand";
3232
export * from "./ListEndpointAccessCommand";
33+
export * from "./ListManagedWorkgroupsCommand";
3334
export * from "./ListNamespacesCommand";
3435
export * from "./ListRecoveryPointsCommand";
3536
export * from "./ListScheduledActionsCommand";

clients/client-redshift-serverless/src/index.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44
* <p>This is an interface reference for Amazon Redshift Serverless.
55
* It contains documentation for one of the programming or command line interfaces you can use to manage Amazon Redshift Serverless.
66
* </p>
7-
* <p>Amazon Redshift Serverless automatically provisions data warehouse capacity and intelligently scales the
7+
* <p>Amazon Redshift Serverless automatically provisions data warehouse capacity and intelligently scales the
88
* underlying resources based on workload demands. Amazon Redshift Serverless adjusts capacity in seconds to deliver consistently high
99
* performance and simplified operations for even the most demanding and volatile workloads. Amazon Redshift Serverless lets you
1010
* focus on using your data to acquire new insights for your business and customers.
1111
* </p>
12-
* <p>
13-
* To learn more about Amazon Redshift Serverless,
14-
* see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-whatis.html">What is Amazon Redshift Serverless</a>.
15-
* </p>
12+
* <p> To learn more about Amazon Redshift Serverless, see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-whatis.html">What is Amazon Redshift Serverless?</a>.</p>
1613
*
1714
* @packageDocumentation
1815
*/

0 commit comments

Comments
 (0)