Skip to content

Commit

Permalink
feat(client-redshift-serverless): Add new API operations for Amazon R…
Browse files Browse the repository at this point in the history
…edshift Serverless, a new way of using Amazon Redshift without needing to manually manage provisioned clusters. The new operations let you interact with Redshift Serverless resources, such as create snapshots, list VPC endpoints, delete resource policies, and more.
awstools committed Jun 29, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 74b38f9 commit ba28895
Showing 68 changed files with 17,605 additions and 0 deletions.
9 changes: 9 additions & 0 deletions clients/client-redshift-serverless/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/node_modules/
/build/
/coverage/
/docs/
/dist-*
*.tsbuildinfo
*.tgz
*.log
package-lock.json
201 changes: 201 additions & 0 deletions clients/client-redshift-serverless/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
225 changes: 225 additions & 0 deletions clients/client-redshift-serverless/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
<!-- generated file, do not edit directly -->

# @aws-sdk/client-redshift-serverless

[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-redshift-serverless/latest.svg)](https://www.npmjs.com/package/@aws-sdk/client-redshift-serverless)
[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-redshift-serverless.svg)](https://www.npmjs.com/package/@aws-sdk/client-redshift-serverless)

## Description

AWS SDK for JavaScript RedshiftServerless Client for Node.js, Browser and React Native.

<p>
<i>This is prerelease documentation for Amazon Redshift Serverless, which is in preview release.
The documentation and the feature are both subject to change. We recommend that you use this feature only in test environments,
and not in production environments. For preview terms and conditions, see Beta Service Participation in
<a href="https://docs.aws.amazon.com/https:/aws.amazon.com/service-terms">Amazon Web Services Service Terms</a>.</i>
</p>
<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
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>

## Installing

To install the this package, simply type add or install @aws-sdk/client-redshift-serverless
using your favorite package manager:

- `npm install @aws-sdk/client-redshift-serverless`
- `yarn add @aws-sdk/client-redshift-serverless`
- `pnpm add @aws-sdk/client-redshift-serverless`

## Getting Started

### Import

The AWS SDK is modulized by clients and commands.
To send a request, you only need to import the `RedshiftServerlessClient` and
the commands you need, for example `ConvertRecoveryPointToSnapshotCommand`:

```js
// ES5 example
const {
RedshiftServerlessClient,
ConvertRecoveryPointToSnapshotCommand,
} = require("@aws-sdk/client-redshift-serverless");
```

```ts
// ES6+ example
import { RedshiftServerlessClient, ConvertRecoveryPointToSnapshotCommand } from "@aws-sdk/client-redshift-serverless";
```

### Usage

To send a request, you:

- Initiate client with configuration (e.g. credentials, region).
- Initiate command with input parameters.
- Call `send` operation on client with command object as input.
- If you are using a custom http handler, you may call `destroy()` to close open connections.

```js
// a client can be shared by different commands.
const client = new RedshiftServerlessClient({ region: "REGION" });

const params = {
/** input parameters */
};
const command = new ConvertRecoveryPointToSnapshotCommand(params);
```

#### Async/await

We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
operator to wait for the promise returned by send operation as follows:

```js
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
```

Async-await is clean, concise, intuitive, easy to debug and has better error handling
as compared to using Promise chains or callbacks.

#### Promises

You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining)
to execute send operation.

```js
client.send(command).then(
(data) => {
// process data.
},
(error) => {
// error handling.
}
);
```

Promises can also be called using `.catch()` and `.finally()` as follows:

```js
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
```

#### Callbacks

We do not recommend using callbacks because of [callback hell](http://callbackhell.com/),
but they are supported by the send operation.

```js
// callbacks.
client.send(command, (err, data) => {
// process err and data.
});
```

#### v2 compatible style

The client can also send requests using v2 compatible style.
However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post
on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/)

```ts
import * as AWS from "@aws-sdk/client-redshift-serverless";
const client = new AWS.RedshiftServerless({ region: "REGION" });

// async/await.
try {
const data = await client.convertRecoveryPointToSnapshot(params);
// process data.
} catch (error) {
// error handling.
}

// Promises.
client
.convertRecoveryPointToSnapshot(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});

// callbacks.
client.convertRecoveryPointToSnapshot(params, (err, data) => {
// process err and data.
});
```

### Troubleshooting

When the service returns an exception, the error will include the exception information,
as well as response metadata (e.g. request id).

```js
try {
const data = await client.send(command);
// process data.
} catch (error) {
const { requestId, cfId, extendedRequestId } = error.$metadata;
console.log({ requestId, cfId, extendedRequestId });
/**
* The keys within exceptions are also parsed.
* You can access them by specifying exception names:
* if (error.name === 'SomeServiceException') {
* const value = error.specialKeyInException;
* }
*/
}
```

## Getting Help

Please use these community resources for getting help.
We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.

- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).
- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)
on AWS Developer Blog.
- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`.
- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3).
- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose).

To test your universal JavaScript code in Node.js, browser and react-native environments,
visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests).

## Contributing

This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-redshift-serverless` package is updated.
To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients).

## License

This SDK is distributed under the
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),
see LICENSE for more information.
94 changes: 94 additions & 0 deletions clients/client-redshift-serverless/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"name": "@aws-sdk/client-redshift-serverless",
"description": "AWS SDK for JavaScript Redshift Serverless Client for Node.js, Browser and React Native",
"version": "3.0.0",
"scripts": {
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:docs": "typedoc",
"build:es": "tsc -p tsconfig.es.json",
"build:types": "tsc -p tsconfig.types.json",
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo"
},
"main": "./dist-cjs/index.js",
"types": "./dist-types/index.d.ts",
"module": "./dist-es/index.js",
"sideEffects": false,
"dependencies": {
"@aws-crypto/sha256-browser": "2.0.0",
"@aws-crypto/sha256-js": "2.0.0",
"@aws-sdk/client-sts": "*",
"@aws-sdk/config-resolver": "*",
"@aws-sdk/credential-provider-node": "*",
"@aws-sdk/fetch-http-handler": "*",
"@aws-sdk/hash-node": "*",
"@aws-sdk/invalid-dependency": "*",
"@aws-sdk/middleware-content-length": "*",
"@aws-sdk/middleware-host-header": "*",
"@aws-sdk/middleware-logger": "*",
"@aws-sdk/middleware-recursion-detection": "*",
"@aws-sdk/middleware-retry": "*",
"@aws-sdk/middleware-serde": "*",
"@aws-sdk/middleware-signing": "*",
"@aws-sdk/middleware-stack": "*",
"@aws-sdk/middleware-user-agent": "*",
"@aws-sdk/node-config-provider": "*",
"@aws-sdk/node-http-handler": "*",
"@aws-sdk/protocol-http": "*",
"@aws-sdk/smithy-client": "*",
"@aws-sdk/types": "*",
"@aws-sdk/url-parser": "*",
"@aws-sdk/util-base64-browser": "*",
"@aws-sdk/util-base64-node": "*",
"@aws-sdk/util-body-length-browser": "*",
"@aws-sdk/util-body-length-node": "*",
"@aws-sdk/util-defaults-mode-browser": "*",
"@aws-sdk/util-defaults-mode-node": "*",
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@aws-sdk/util-utf8-browser": "*",
"@aws-sdk/util-utf8-node": "*",
"tslib": "^2.3.1"
},
"devDependencies": {
"@aws-sdk/service-client-documentation-generator": "*",
"@tsconfig/recommended": "1.0.1",
"@types/node": "^12.7.5",
"concurrently": "7.0.0",
"downlevel-dts": "0.7.0",
"rimraf": "3.0.2",
"typedoc": "0.19.2",
"typescript": "~4.6.2"
},
"engines": {
"node": ">=12.0.0"
},
"typesVersions": {
"<4.0": {
"dist-types/*": [
"dist-types/ts3.4/*"
]
}
},
"files": [
"dist-*"
],
"author": {
"name": "AWS SDK for JavaScript Team",
"url": "https://aws.amazon.com/javascript/"
},
"license": "Apache-2.0",
"browser": {
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
},
"react-native": {
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
},
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-redshift-serverless",
"repository": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-js-v3.git",
"directory": "clients/client-redshift-serverless"
}
}
1,388 changes: 1,388 additions & 0 deletions clients/client-redshift-serverless/src/RedshiftServerless.ts

Large diffs are not rendered by default.

408 changes: 408 additions & 0 deletions clients/client-redshift-serverless/src/RedshiftServerlessClient.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { ConvertRecoveryPointToSnapshotRequest, ConvertRecoveryPointToSnapshotResponse } from "../models/models_0";
import {
deserializeAws_json1_1ConvertRecoveryPointToSnapshotCommand,
serializeAws_json1_1ConvertRecoveryPointToSnapshotCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface ConvertRecoveryPointToSnapshotCommandInput extends ConvertRecoveryPointToSnapshotRequest {}
export interface ConvertRecoveryPointToSnapshotCommandOutput
extends ConvertRecoveryPointToSnapshotResponse,
__MetadataBearer {}

/**
* <p>Converts a recovery point to a snapshot. For more information about recovery points and snapshots,
* see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-snapshots-recovery.html">Working with snapshots and recovery points</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, ConvertRecoveryPointToSnapshotCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, ConvertRecoveryPointToSnapshotCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new ConvertRecoveryPointToSnapshotCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link ConvertRecoveryPointToSnapshotCommandInput} for command's `input` shape.
* @see {@link ConvertRecoveryPointToSnapshotCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class ConvertRecoveryPointToSnapshotCommand extends $Command<
ConvertRecoveryPointToSnapshotCommandInput,
ConvertRecoveryPointToSnapshotCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: ConvertRecoveryPointToSnapshotCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<ConvertRecoveryPointToSnapshotCommandInput, ConvertRecoveryPointToSnapshotCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "ConvertRecoveryPointToSnapshotCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: ConvertRecoveryPointToSnapshotRequest.filterSensitiveLog,
outputFilterSensitiveLog: ConvertRecoveryPointToSnapshotResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(
input: ConvertRecoveryPointToSnapshotCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> {
return serializeAws_json1_1ConvertRecoveryPointToSnapshotCommand(input, context);
}

private deserialize(
output: __HttpResponse,
context: __SerdeContext
): Promise<ConvertRecoveryPointToSnapshotCommandOutput> {
return deserializeAws_json1_1ConvertRecoveryPointToSnapshotCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { CreateEndpointAccessRequest, CreateEndpointAccessResponse } from "../models/models_0";
import {
deserializeAws_json1_1CreateEndpointAccessCommand,
serializeAws_json1_1CreateEndpointAccessCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface CreateEndpointAccessCommandInput extends CreateEndpointAccessRequest {}
export interface CreateEndpointAccessCommandOutput extends CreateEndpointAccessResponse, __MetadataBearer {}

/**
* <p>Creates an Amazon Redshift Serverless managed VPC endpoint.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, CreateEndpointAccessCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, CreateEndpointAccessCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new CreateEndpointAccessCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link CreateEndpointAccessCommandInput} for command's `input` shape.
* @see {@link CreateEndpointAccessCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class CreateEndpointAccessCommand extends $Command<
CreateEndpointAccessCommandInput,
CreateEndpointAccessCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: CreateEndpointAccessCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<CreateEndpointAccessCommandInput, CreateEndpointAccessCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "CreateEndpointAccessCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: CreateEndpointAccessRequest.filterSensitiveLog,
outputFilterSensitiveLog: CreateEndpointAccessResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: CreateEndpointAccessCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1CreateEndpointAccessCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CreateEndpointAccessCommandOutput> {
return deserializeAws_json1_1CreateEndpointAccessCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { CreateNamespaceRequest, CreateNamespaceResponse } from "../models/models_0";
import {
deserializeAws_json1_1CreateNamespaceCommand,
serializeAws_json1_1CreateNamespaceCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface CreateNamespaceCommandInput extends CreateNamespaceRequest {}
export interface CreateNamespaceCommandOutput extends CreateNamespaceResponse, __MetadataBearer {}

/**
* <p>Creates a namespace in Amazon Redshift Serverless.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, CreateNamespaceCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, CreateNamespaceCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new CreateNamespaceCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link CreateNamespaceCommandInput} for command's `input` shape.
* @see {@link CreateNamespaceCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class CreateNamespaceCommand extends $Command<
CreateNamespaceCommandInput,
CreateNamespaceCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: CreateNamespaceCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<CreateNamespaceCommandInput, CreateNamespaceCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "CreateNamespaceCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: CreateNamespaceRequest.filterSensitiveLog,
outputFilterSensitiveLog: CreateNamespaceResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: CreateNamespaceCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1CreateNamespaceCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CreateNamespaceCommandOutput> {
return deserializeAws_json1_1CreateNamespaceCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { CreateSnapshotRequest, CreateSnapshotResponse } from "../models/models_0";
import {
deserializeAws_json1_1CreateSnapshotCommand,
serializeAws_json1_1CreateSnapshotCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface CreateSnapshotCommandInput extends CreateSnapshotRequest {}
export interface CreateSnapshotCommandOutput extends CreateSnapshotResponse, __MetadataBearer {}

/**
* <p>Creates a snapshot of all databases in a namespace.
* For more information about snapshots, see
* <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-snapshots-recovery.html">
* Working with snapshots and recovery points</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, CreateSnapshotCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, CreateSnapshotCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new CreateSnapshotCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link CreateSnapshotCommandInput} for command's `input` shape.
* @see {@link CreateSnapshotCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class CreateSnapshotCommand extends $Command<
CreateSnapshotCommandInput,
CreateSnapshotCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: CreateSnapshotCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<CreateSnapshotCommandInput, CreateSnapshotCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "CreateSnapshotCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: CreateSnapshotRequest.filterSensitiveLog,
outputFilterSensitiveLog: CreateSnapshotResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: CreateSnapshotCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1CreateSnapshotCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CreateSnapshotCommandOutput> {
return deserializeAws_json1_1CreateSnapshotCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { CreateUsageLimitRequest, CreateUsageLimitResponse } from "../models/models_0";
import {
deserializeAws_json1_1CreateUsageLimitCommand,
serializeAws_json1_1CreateUsageLimitCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface CreateUsageLimitCommandInput extends CreateUsageLimitRequest {}
export interface CreateUsageLimitCommandOutput extends CreateUsageLimitResponse, __MetadataBearer {}

/**
* <p>Creates a usage limit for a specified Amazon Redshift Serverless usage type. The usage limit is identified by the returned usage limit identifier.
* </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, CreateUsageLimitCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, CreateUsageLimitCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new CreateUsageLimitCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link CreateUsageLimitCommandInput} for command's `input` shape.
* @see {@link CreateUsageLimitCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class CreateUsageLimitCommand extends $Command<
CreateUsageLimitCommandInput,
CreateUsageLimitCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: CreateUsageLimitCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<CreateUsageLimitCommandInput, CreateUsageLimitCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "CreateUsageLimitCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: CreateUsageLimitRequest.filterSensitiveLog,
outputFilterSensitiveLog: CreateUsageLimitResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: CreateUsageLimitCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1CreateUsageLimitCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CreateUsageLimitCommandOutput> {
return deserializeAws_json1_1CreateUsageLimitCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { CreateWorkgroupRequest, CreateWorkgroupResponse } from "../models/models_0";
import {
deserializeAws_json1_1CreateWorkgroupCommand,
serializeAws_json1_1CreateWorkgroupCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface CreateWorkgroupCommandInput extends CreateWorkgroupRequest {}
export interface CreateWorkgroupCommandOutput extends CreateWorkgroupResponse, __MetadataBearer {}

/**
* <p>Creates an workgroup in Amazon Redshift Serverless.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, CreateWorkgroupCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, CreateWorkgroupCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new CreateWorkgroupCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link CreateWorkgroupCommandInput} for command's `input` shape.
* @see {@link CreateWorkgroupCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class CreateWorkgroupCommand extends $Command<
CreateWorkgroupCommandInput,
CreateWorkgroupCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: CreateWorkgroupCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<CreateWorkgroupCommandInput, CreateWorkgroupCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "CreateWorkgroupCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: CreateWorkgroupRequest.filterSensitiveLog,
outputFilterSensitiveLog: CreateWorkgroupResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: CreateWorkgroupCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1CreateWorkgroupCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CreateWorkgroupCommandOutput> {
return deserializeAws_json1_1CreateWorkgroupCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { DeleteEndpointAccessRequest, DeleteEndpointAccessResponse } from "../models/models_0";
import {
deserializeAws_json1_1DeleteEndpointAccessCommand,
serializeAws_json1_1DeleteEndpointAccessCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface DeleteEndpointAccessCommandInput extends DeleteEndpointAccessRequest {}
export interface DeleteEndpointAccessCommandOutput extends DeleteEndpointAccessResponse, __MetadataBearer {}

/**
* <p>Deletes an Amazon Redshift Serverless managed VPC endpoint.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, DeleteEndpointAccessCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, DeleteEndpointAccessCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new DeleteEndpointAccessCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link DeleteEndpointAccessCommandInput} for command's `input` shape.
* @see {@link DeleteEndpointAccessCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class DeleteEndpointAccessCommand extends $Command<
DeleteEndpointAccessCommandInput,
DeleteEndpointAccessCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: DeleteEndpointAccessCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<DeleteEndpointAccessCommandInput, DeleteEndpointAccessCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "DeleteEndpointAccessCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: DeleteEndpointAccessRequest.filterSensitiveLog,
outputFilterSensitiveLog: DeleteEndpointAccessResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: DeleteEndpointAccessCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1DeleteEndpointAccessCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteEndpointAccessCommandOutput> {
return deserializeAws_json1_1DeleteEndpointAccessCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { DeleteNamespaceRequest, DeleteNamespaceResponse } from "../models/models_0";
import {
deserializeAws_json1_1DeleteNamespaceCommand,
serializeAws_json1_1DeleteNamespaceCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface DeleteNamespaceCommandInput extends DeleteNamespaceRequest {}
export interface DeleteNamespaceCommandOutput extends DeleteNamespaceResponse, __MetadataBearer {}

/**
* <p>Deletes a namespace from Amazon Redshift Serverless.
* Before you delete the namespace, you can create a final snapshot that has all of the data within the namespace.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, DeleteNamespaceCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, DeleteNamespaceCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new DeleteNamespaceCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link DeleteNamespaceCommandInput} for command's `input` shape.
* @see {@link DeleteNamespaceCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class DeleteNamespaceCommand extends $Command<
DeleteNamespaceCommandInput,
DeleteNamespaceCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: DeleteNamespaceCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<DeleteNamespaceCommandInput, DeleteNamespaceCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "DeleteNamespaceCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: DeleteNamespaceRequest.filterSensitiveLog,
outputFilterSensitiveLog: DeleteNamespaceResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: DeleteNamespaceCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1DeleteNamespaceCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteNamespaceCommandOutput> {
return deserializeAws_json1_1DeleteNamespaceCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { DeleteResourcePolicyRequest, DeleteResourcePolicyResponse } from "../models/models_0";
import {
deserializeAws_json1_1DeleteResourcePolicyCommand,
serializeAws_json1_1DeleteResourcePolicyCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface DeleteResourcePolicyCommandInput extends DeleteResourcePolicyRequest {}
export interface DeleteResourcePolicyCommandOutput extends DeleteResourcePolicyResponse, __MetadataBearer {}

/**
* <p>Deletes the specified resource policy.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, DeleteResourcePolicyCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, DeleteResourcePolicyCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new DeleteResourcePolicyCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link DeleteResourcePolicyCommandInput} for command's `input` shape.
* @see {@link DeleteResourcePolicyCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class DeleteResourcePolicyCommand extends $Command<
DeleteResourcePolicyCommandInput,
DeleteResourcePolicyCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: DeleteResourcePolicyCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "DeleteResourcePolicyCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: DeleteResourcePolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: DeleteResourcePolicyResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: DeleteResourcePolicyCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1DeleteResourcePolicyCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteResourcePolicyCommandOutput> {
return deserializeAws_json1_1DeleteResourcePolicyCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { DeleteSnapshotRequest, DeleteSnapshotResponse } from "../models/models_0";
import {
deserializeAws_json1_1DeleteSnapshotCommand,
serializeAws_json1_1DeleteSnapshotCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface DeleteSnapshotCommandInput extends DeleteSnapshotRequest {}
export interface DeleteSnapshotCommandOutput extends DeleteSnapshotResponse, __MetadataBearer {}

/**
* <p>Deletes a snapshot from Amazon Redshift Serverless.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, DeleteSnapshotCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, DeleteSnapshotCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new DeleteSnapshotCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link DeleteSnapshotCommandInput} for command's `input` shape.
* @see {@link DeleteSnapshotCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class DeleteSnapshotCommand extends $Command<
DeleteSnapshotCommandInput,
DeleteSnapshotCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: DeleteSnapshotCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<DeleteSnapshotCommandInput, DeleteSnapshotCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "DeleteSnapshotCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: DeleteSnapshotRequest.filterSensitiveLog,
outputFilterSensitiveLog: DeleteSnapshotResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: DeleteSnapshotCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1DeleteSnapshotCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteSnapshotCommandOutput> {
return deserializeAws_json1_1DeleteSnapshotCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { DeleteUsageLimitRequest, DeleteUsageLimitResponse } from "../models/models_0";
import {
deserializeAws_json1_1DeleteUsageLimitCommand,
serializeAws_json1_1DeleteUsageLimitCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface DeleteUsageLimitCommandInput extends DeleteUsageLimitRequest {}
export interface DeleteUsageLimitCommandOutput extends DeleteUsageLimitResponse, __MetadataBearer {}

/**
* <p>Deletes a usage limit from Amazon Redshift Serverless.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, DeleteUsageLimitCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, DeleteUsageLimitCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new DeleteUsageLimitCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link DeleteUsageLimitCommandInput} for command's `input` shape.
* @see {@link DeleteUsageLimitCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class DeleteUsageLimitCommand extends $Command<
DeleteUsageLimitCommandInput,
DeleteUsageLimitCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: DeleteUsageLimitCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<DeleteUsageLimitCommandInput, DeleteUsageLimitCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "DeleteUsageLimitCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: DeleteUsageLimitRequest.filterSensitiveLog,
outputFilterSensitiveLog: DeleteUsageLimitResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: DeleteUsageLimitCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1DeleteUsageLimitCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteUsageLimitCommandOutput> {
return deserializeAws_json1_1DeleteUsageLimitCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { DeleteWorkgroupRequest, DeleteWorkgroupResponse } from "../models/models_0";
import {
deserializeAws_json1_1DeleteWorkgroupCommand,
serializeAws_json1_1DeleteWorkgroupCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface DeleteWorkgroupCommandInput extends DeleteWorkgroupRequest {}
export interface DeleteWorkgroupCommandOutput extends DeleteWorkgroupResponse, __MetadataBearer {}

/**
* <p>Deletes a workgroup.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, DeleteWorkgroupCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, DeleteWorkgroupCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new DeleteWorkgroupCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link DeleteWorkgroupCommandInput} for command's `input` shape.
* @see {@link DeleteWorkgroupCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class DeleteWorkgroupCommand extends $Command<
DeleteWorkgroupCommandInput,
DeleteWorkgroupCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: DeleteWorkgroupCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<DeleteWorkgroupCommandInput, DeleteWorkgroupCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "DeleteWorkgroupCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: DeleteWorkgroupRequest.filterSensitiveLog,
outputFilterSensitiveLog: DeleteWorkgroupResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: DeleteWorkgroupCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1DeleteWorkgroupCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteWorkgroupCommandOutput> {
return deserializeAws_json1_1DeleteWorkgroupCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { GetCredentialsRequest, GetCredentialsResponse } from "../models/models_0";
import {
deserializeAws_json1_1GetCredentialsCommand,
serializeAws_json1_1GetCredentialsCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface GetCredentialsCommandInput extends GetCredentialsRequest {}
export interface GetCredentialsCommandOutput extends GetCredentialsResponse, __MetadataBearer {}

/**
* <p>Returns a database user name and temporary password with
* 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
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, GetCredentialsCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, GetCredentialsCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new GetCredentialsCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link GetCredentialsCommandInput} for command's `input` shape.
* @see {@link GetCredentialsCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class GetCredentialsCommand extends $Command<
GetCredentialsCommandInput,
GetCredentialsCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: GetCredentialsCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<GetCredentialsCommandInput, GetCredentialsCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "GetCredentialsCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: GetCredentialsRequest.filterSensitiveLog,
outputFilterSensitiveLog: GetCredentialsResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: GetCredentialsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1GetCredentialsCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetCredentialsCommandOutput> {
return deserializeAws_json1_1GetCredentialsCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { GetEndpointAccessRequest, GetEndpointAccessResponse } from "../models/models_0";
import {
deserializeAws_json1_1GetEndpointAccessCommand,
serializeAws_json1_1GetEndpointAccessCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface GetEndpointAccessCommandInput extends GetEndpointAccessRequest {}
export interface GetEndpointAccessCommandOutput extends GetEndpointAccessResponse, __MetadataBearer {}

/**
* <p>Returns information, such as the name, about a VPC endpoint.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, GetEndpointAccessCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, GetEndpointAccessCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new GetEndpointAccessCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link GetEndpointAccessCommandInput} for command's `input` shape.
* @see {@link GetEndpointAccessCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class GetEndpointAccessCommand extends $Command<
GetEndpointAccessCommandInput,
GetEndpointAccessCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: GetEndpointAccessCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<GetEndpointAccessCommandInput, GetEndpointAccessCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "GetEndpointAccessCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: GetEndpointAccessRequest.filterSensitiveLog,
outputFilterSensitiveLog: GetEndpointAccessResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: GetEndpointAccessCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1GetEndpointAccessCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetEndpointAccessCommandOutput> {
return deserializeAws_json1_1GetEndpointAccessCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
100 changes: 100 additions & 0 deletions clients/client-redshift-serverless/src/commands/GetNamespaceCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { GetNamespaceRequest, GetNamespaceResponse } from "../models/models_0";
import {
deserializeAws_json1_1GetNamespaceCommand,
serializeAws_json1_1GetNamespaceCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface GetNamespaceCommandInput extends GetNamespaceRequest {}
export interface GetNamespaceCommandOutput extends GetNamespaceResponse, __MetadataBearer {}

/**
* <p>Returns information about a namespace in Amazon Redshift Serverless.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, GetNamespaceCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, GetNamespaceCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new GetNamespaceCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link GetNamespaceCommandInput} for command's `input` shape.
* @see {@link GetNamespaceCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class GetNamespaceCommand extends $Command<
GetNamespaceCommandInput,
GetNamespaceCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: GetNamespaceCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<GetNamespaceCommandInput, GetNamespaceCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "GetNamespaceCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: GetNamespaceRequest.filterSensitiveLog,
outputFilterSensitiveLog: GetNamespaceResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: GetNamespaceCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1GetNamespaceCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetNamespaceCommandOutput> {
return deserializeAws_json1_1GetNamespaceCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { GetRecoveryPointRequest, GetRecoveryPointResponse } from "../models/models_0";
import {
deserializeAws_json1_1GetRecoveryPointCommand,
serializeAws_json1_1GetRecoveryPointCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface GetRecoveryPointCommandInput extends GetRecoveryPointRequest {}
export interface GetRecoveryPointCommandOutput extends GetRecoveryPointResponse, __MetadataBearer {}

/**
* <p>Returns information about a recovery point.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, GetRecoveryPointCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, GetRecoveryPointCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new GetRecoveryPointCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link GetRecoveryPointCommandInput} for command's `input` shape.
* @see {@link GetRecoveryPointCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class GetRecoveryPointCommand extends $Command<
GetRecoveryPointCommandInput,
GetRecoveryPointCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: GetRecoveryPointCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<GetRecoveryPointCommandInput, GetRecoveryPointCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "GetRecoveryPointCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: GetRecoveryPointRequest.filterSensitiveLog,
outputFilterSensitiveLog: GetRecoveryPointResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: GetRecoveryPointCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1GetRecoveryPointCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetRecoveryPointCommandOutput> {
return deserializeAws_json1_1GetRecoveryPointCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { GetResourcePolicyRequest, GetResourcePolicyResponse } from "../models/models_0";
import {
deserializeAws_json1_1GetResourcePolicyCommand,
serializeAws_json1_1GetResourcePolicyCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface GetResourcePolicyCommandInput extends GetResourcePolicyRequest {}
export interface GetResourcePolicyCommandOutput extends GetResourcePolicyResponse, __MetadataBearer {}

/**
* <p>Returns a resource policy.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, GetResourcePolicyCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, GetResourcePolicyCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new GetResourcePolicyCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link GetResourcePolicyCommandInput} for command's `input` shape.
* @see {@link GetResourcePolicyCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class GetResourcePolicyCommand extends $Command<
GetResourcePolicyCommandInput,
GetResourcePolicyCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: GetResourcePolicyCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "GetResourcePolicyCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: GetResourcePolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: GetResourcePolicyResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: GetResourcePolicyCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1GetResourcePolicyCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetResourcePolicyCommandOutput> {
return deserializeAws_json1_1GetResourcePolicyCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
100 changes: 100 additions & 0 deletions clients/client-redshift-serverless/src/commands/GetSnapshotCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { GetSnapshotRequest, GetSnapshotResponse } from "../models/models_0";
import {
deserializeAws_json1_1GetSnapshotCommand,
serializeAws_json1_1GetSnapshotCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface GetSnapshotCommandInput extends GetSnapshotRequest {}
export interface GetSnapshotCommandOutput extends GetSnapshotResponse, __MetadataBearer {}

/**
* <p>Returns information about a specific snapshot.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, GetSnapshotCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, GetSnapshotCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new GetSnapshotCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link GetSnapshotCommandInput} for command's `input` shape.
* @see {@link GetSnapshotCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class GetSnapshotCommand extends $Command<
GetSnapshotCommandInput,
GetSnapshotCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: GetSnapshotCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<GetSnapshotCommandInput, GetSnapshotCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "GetSnapshotCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: GetSnapshotRequest.filterSensitiveLog,
outputFilterSensitiveLog: GetSnapshotResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: GetSnapshotCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1GetSnapshotCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetSnapshotCommandOutput> {
return deserializeAws_json1_1GetSnapshotCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { GetUsageLimitRequest, GetUsageLimitResponse } from "../models/models_0";
import {
deserializeAws_json1_1GetUsageLimitCommand,
serializeAws_json1_1GetUsageLimitCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface GetUsageLimitCommandInput extends GetUsageLimitRequest {}
export interface GetUsageLimitCommandOutput extends GetUsageLimitResponse, __MetadataBearer {}

/**
* <p>Returns information about a usage limit.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, GetUsageLimitCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, GetUsageLimitCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new GetUsageLimitCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link GetUsageLimitCommandInput} for command's `input` shape.
* @see {@link GetUsageLimitCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class GetUsageLimitCommand extends $Command<
GetUsageLimitCommandInput,
GetUsageLimitCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: GetUsageLimitCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<GetUsageLimitCommandInput, GetUsageLimitCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "GetUsageLimitCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: GetUsageLimitRequest.filterSensitiveLog,
outputFilterSensitiveLog: GetUsageLimitResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: GetUsageLimitCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1GetUsageLimitCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetUsageLimitCommandOutput> {
return deserializeAws_json1_1GetUsageLimitCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
100 changes: 100 additions & 0 deletions clients/client-redshift-serverless/src/commands/GetWorkgroupCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { GetWorkgroupRequest, GetWorkgroupResponse } from "../models/models_0";
import {
deserializeAws_json1_1GetWorkgroupCommand,
serializeAws_json1_1GetWorkgroupCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface GetWorkgroupCommandInput extends GetWorkgroupRequest {}
export interface GetWorkgroupCommandOutput extends GetWorkgroupResponse, __MetadataBearer {}

/**
* <p>Returns information about a specific workgroup.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, GetWorkgroupCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, GetWorkgroupCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new GetWorkgroupCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link GetWorkgroupCommandInput} for command's `input` shape.
* @see {@link GetWorkgroupCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class GetWorkgroupCommand extends $Command<
GetWorkgroupCommandInput,
GetWorkgroupCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: GetWorkgroupCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<GetWorkgroupCommandInput, GetWorkgroupCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "GetWorkgroupCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: GetWorkgroupRequest.filterSensitiveLog,
outputFilterSensitiveLog: GetWorkgroupResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: GetWorkgroupCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1GetWorkgroupCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetWorkgroupCommandOutput> {
return deserializeAws_json1_1GetWorkgroupCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { ListEndpointAccessRequest, ListEndpointAccessResponse } from "../models/models_0";
import {
deserializeAws_json1_1ListEndpointAccessCommand,
serializeAws_json1_1ListEndpointAccessCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface ListEndpointAccessCommandInput extends ListEndpointAccessRequest {}
export interface ListEndpointAccessCommandOutput extends ListEndpointAccessResponse, __MetadataBearer {}

/**
* <p>Returns an array of <code>EndpointAccess</code> objects and relevant information.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, ListEndpointAccessCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, ListEndpointAccessCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new ListEndpointAccessCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link ListEndpointAccessCommandInput} for command's `input` shape.
* @see {@link ListEndpointAccessCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class ListEndpointAccessCommand extends $Command<
ListEndpointAccessCommandInput,
ListEndpointAccessCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: ListEndpointAccessCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<ListEndpointAccessCommandInput, ListEndpointAccessCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "ListEndpointAccessCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: ListEndpointAccessRequest.filterSensitiveLog,
outputFilterSensitiveLog: ListEndpointAccessResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: ListEndpointAccessCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1ListEndpointAccessCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListEndpointAccessCommandOutput> {
return deserializeAws_json1_1ListEndpointAccessCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { ListNamespacesRequest, ListNamespacesResponse } from "../models/models_0";
import {
deserializeAws_json1_1ListNamespacesCommand,
serializeAws_json1_1ListNamespacesCommand,
} from "../protocols/Aws_json1_1";
import {
RedshiftServerlessClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../RedshiftServerlessClient";

export interface ListNamespacesCommandInput extends ListNamespacesRequest {}
export interface ListNamespacesCommandOutput extends ListNamespacesResponse, __MetadataBearer {}

/**
* <p>Returns information about a list of specified namespaces.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftServerlessClient, ListNamespacesCommand } from "@aws-sdk/client-redshift-serverless"; // ES Modules import
* // const { RedshiftServerlessClient, ListNamespacesCommand } = require("@aws-sdk/client-redshift-serverless"); // CommonJS import
* const client = new RedshiftServerlessClient(config);
* const command = new ListNamespacesCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link ListNamespacesCommandInput} for command's `input` shape.
* @see {@link ListNamespacesCommandOutput} for command's `response` shape.
* @see {@link RedshiftServerlessClientResolvedConfig | config} for RedshiftServerlessClient's `config` shape.
*
*/
export class ListNamespacesCommand extends $Command<
ListNamespacesCommandInput,
ListNamespacesCommandOutput,
RedshiftServerlessClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: ListNamespacesCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RedshiftServerlessClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<ListNamespacesCommandInput, ListNamespacesCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RedshiftServerlessClient";
const commandName = "ListNamespacesCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: ListNamespacesRequest.filterSensitiveLog,
outputFilterSensitiveLog: ListNamespacesResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: ListNamespacesCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1ListNamespacesCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListNamespacesCommandOutput> {
return deserializeAws_json1_1ListNamespacesCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Loading

0 comments on commit ba28895

Please sign in to comment.