Skip to content

Commit

Permalink
feat(client-redshift-serverless): Adds support for the ListManagedWor…
Browse files Browse the repository at this point in the history
…kgroups API to get an overview of existing managed workgroups.
  • Loading branch information
awstools committed Dec 3, 2024
1 parent 500786a commit e55f648
Show file tree
Hide file tree
Showing 14 changed files with 588 additions and 28 deletions.
13 changes: 9 additions & 4 deletions clients/client-redshift-serverless/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ underlying resources based on workload demands. Amazon Redshift Serverless adjus
performance and simplified operations for even the most demanding and volatile workloads. Amazon Redshift Serverless lets you
focus on using your data to acquire new insights for your business and customers.
</p>
<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>
<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>

## Installing

Expand Down Expand Up @@ -461,6 +458,14 @@ ListEndpointAccess

[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/)

</details>
<details>
<summary>
ListManagedWorkgroups
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
31 changes: 26 additions & 5 deletions clients/client-redshift-serverless/src/RedshiftServerless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ import {
ListEndpointAccessCommandInput,
ListEndpointAccessCommandOutput,
} from "./commands/ListEndpointAccessCommand";
import {
ListManagedWorkgroupsCommand,
ListManagedWorkgroupsCommandInput,
ListManagedWorkgroupsCommandOutput,
} from "./commands/ListManagedWorkgroupsCommand";
import {
ListNamespacesCommand,
ListNamespacesCommandInput,
Expand Down Expand Up @@ -303,6 +308,7 @@ const commands = {
GetWorkgroupCommand,
ListCustomDomainAssociationsCommand,
ListEndpointAccessCommand,
ListManagedWorkgroupsCommand,
ListNamespacesCommand,
ListRecoveryPointsCommand,
ListScheduledActionsCommand,
Expand Down Expand Up @@ -816,6 +822,24 @@ export interface RedshiftServerless {
cb: (err: any, data?: ListEndpointAccessCommandOutput) => void
): void;

/**
* @see {@link ListManagedWorkgroupsCommand}
*/
listManagedWorkgroups(): Promise<ListManagedWorkgroupsCommandOutput>;
listManagedWorkgroups(
args: ListManagedWorkgroupsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListManagedWorkgroupsCommandOutput>;
listManagedWorkgroups(
args: ListManagedWorkgroupsCommandInput,
cb: (err: any, data?: ListManagedWorkgroupsCommandOutput) => void
): void;
listManagedWorkgroups(
args: ListManagedWorkgroupsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListManagedWorkgroupsCommandOutput) => void
): void;

/**
* @see {@link ListNamespacesCommand}
*/
Expand Down Expand Up @@ -1201,15 +1225,12 @@ export interface RedshiftServerless {
* <p>This is an interface reference for Amazon Redshift Serverless.
* It contains documentation for one of the programming or command line interfaces you can use to manage Amazon Redshift Serverless.
* </p>
* <p>Amazon Redshift Serverless automatically provisions data warehouse capacity and intelligently scales the
* <p>Amazon Redshift Serverless automatically provisions data warehouse capacity and intelligently scales the
* underlying resources based on workload demands. Amazon Redshift Serverless adjusts capacity in seconds to deliver consistently high
* performance and simplified operations for even the most demanding and volatile workloads. Amazon Redshift Serverless lets you
* focus on using your data to acquire new insights for your business and customers.
* </p>
* <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>
* <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>
* @public
*/
export class RedshiftServerless extends RedshiftServerlessClient implements RedshiftServerless {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ import {
ListCustomDomainAssociationsCommandOutput,
} from "./commands/ListCustomDomainAssociationsCommand";
import { ListEndpointAccessCommandInput, ListEndpointAccessCommandOutput } from "./commands/ListEndpointAccessCommand";
import {
ListManagedWorkgroupsCommandInput,
ListManagedWorkgroupsCommandOutput,
} from "./commands/ListManagedWorkgroupsCommand";
import { ListNamespacesCommandInput, ListNamespacesCommandOutput } from "./commands/ListNamespacesCommand";
import { ListRecoveryPointsCommandInput, ListRecoveryPointsCommandOutput } from "./commands/ListRecoveryPointsCommand";
import {
Expand Down Expand Up @@ -229,6 +233,7 @@ export type ServiceInputTypes =
| GetWorkgroupCommandInput
| ListCustomDomainAssociationsCommandInput
| ListEndpointAccessCommandInput
| ListManagedWorkgroupsCommandInput
| ListNamespacesCommandInput
| ListRecoveryPointsCommandInput
| ListScheduledActionsCommandInput
Expand Down Expand Up @@ -289,6 +294,7 @@ export type ServiceOutputTypes =
| GetWorkgroupCommandOutput
| ListCustomDomainAssociationsCommandOutput
| ListEndpointAccessCommandOutput
| ListManagedWorkgroupsCommandOutput
| ListNamespacesCommandOutput
| ListRecoveryPointsCommandOutput
| ListScheduledActionsCommandOutput
Expand Down Expand Up @@ -489,15 +495,12 @@ export interface RedshiftServerlessClientResolvedConfig extends RedshiftServerle
* <p>This is an interface reference for Amazon Redshift Serverless.
* It contains documentation for one of the programming or command line interfaces you can use to manage Amazon Redshift Serverless.
* </p>
* <p>Amazon Redshift Serverless automatically provisions data warehouse capacity and intelligently scales the
* <p>Amazon Redshift Serverless automatically provisions data warehouse capacity and intelligently scales the
* underlying resources based on workload demands. Amazon Redshift Serverless adjusts capacity in seconds to deliver consistently high
* performance and simplified operations for even the most demanding and volatile workloads. Amazon Redshift Serverless lets you
* focus on using your data to acquire new insights for your business and customers.
* </p>
* <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>
* <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>
* @public
*/
export class RedshiftServerlessClient extends __Client<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,23 @@ export interface CreateWorkgroupCommandOutput extends CreateWorkgroupResponse, _

/**
* <p>Creates an workgroup in Amazon Redshift Serverless.</p>
* <p>VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that
* you own in a Region from reaching or being reached from the internet through internet
* gateways and egress-only internet gateways. If a workgroup is in an account with VPC BPA
* turned on, the following capabilities are blocked: </p>
* <ul>
* <li>
* <p>Creating a public access workgroup</p>
* </li>
* <li>
* <p>Modifying a private workgroup to public</p>
* </li>
* <li>
* <p>Adding a subnet with VPC BPA turned on to the workgroup when the workgroup is
* public</p>
* </li>
* </ul>
* <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>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ export interface GetCredentialsCommandOutput extends GetCredentialsResponse, __M
* temporary authorization to log in to Amazon Redshift Serverless.</p>
* <p>By default, the temporary credentials expire in 900 seconds.
* You can optionally specify a duration between 900 seconds (15 minutes) and 3600 seconds (60 minutes).</p>
*
* <p>The Identity and Access Management (IAM) user or role that runs
* GetCredentials must have an IAM policy attached that allows access to all
* necessary actions and resources.</p>
*
* <p>If the <code>DbName</code> parameter is specified, the IAM policy must
* allow access to the resource dbname for the specified database name.</p>
* @example
Expand Down
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;
};
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,24 @@ export interface UpdateWorkgroupCommandOutput extends UpdateWorkgroupResponse, _
/**
* <p>Updates a workgroup with the specified configuration settings. You can't update multiple parameters in one request. For example,
* 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>
* <p>VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that
* you own in a Region from reaching or being reached from the internet through internet
* gateways and egress-only internet gateways. If a workgroup is in an account with VPC BPA
* turned on, the following capabilities are blocked: </p>
* <ul>
* <li>
* <p>Creating a public access workgroup</p>
* </li>
* <li>
* <p>Modifying a private workgroup to public</p>
* </li>
* <li>
* <p>Adding a subnet with VPC BPA turned on to the workgroup when the workgroup is
* public</p>
* </li>
* </ul>
* <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>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
1 change: 1 addition & 0 deletions clients/client-redshift-serverless/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export * from "./GetUsageLimitCommand";
export * from "./GetWorkgroupCommand";
export * from "./ListCustomDomainAssociationsCommand";
export * from "./ListEndpointAccessCommand";
export * from "./ListManagedWorkgroupsCommand";
export * from "./ListNamespacesCommand";
export * from "./ListRecoveryPointsCommand";
export * from "./ListScheduledActionsCommand";
Expand Down
7 changes: 2 additions & 5 deletions clients/client-redshift-serverless/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
* <p>This is an interface reference for Amazon Redshift Serverless.
* It contains documentation for one of the programming or command line interfaces you can use to manage Amazon Redshift Serverless.
* </p>
* <p>Amazon Redshift Serverless automatically provisions data warehouse capacity and intelligently scales the
* <p>Amazon Redshift Serverless automatically provisions data warehouse capacity and intelligently scales the
* underlying resources based on workload demands. Amazon Redshift Serverless adjusts capacity in seconds to deliver consistently high
* performance and simplified operations for even the most demanding and volatile workloads. Amazon Redshift Serverless lets you
* focus on using your data to acquire new insights for your business and customers.
* </p>
* <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>
* <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>
*
* @packageDocumentation
*/
Expand Down
Loading

0 comments on commit e55f648

Please sign in to comment.