Skip to content

Commit

Permalink
feat(client-timestream-influxdb): This release introduces APIs to man…
Browse files Browse the repository at this point in the history
…age DbClusters and adds support for read replicas
  • Loading branch information
awstools committed Feb 17, 2025
1 parent 1f1905e commit b77c92f
Show file tree
Hide file tree
Showing 20 changed files with 3,348 additions and 234 deletions.
62 changes: 55 additions & 7 deletions clients/client-timestream-influxdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ using your favorite package manager:

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

```js
// ES5 example
const { TimestreamInfluxDBClient, ListDbInstancesCommand } = require("@aws-sdk/client-timestream-influxdb");
const { TimestreamInfluxDBClient, ListDbClustersCommand } = require("@aws-sdk/client-timestream-influxdb");
```

```ts
// ES6+ example
import { TimestreamInfluxDBClient, ListDbInstancesCommand } from "@aws-sdk/client-timestream-influxdb";
import { TimestreamInfluxDBClient, ListDbClustersCommand } from "@aws-sdk/client-timestream-influxdb";
```

### Usage
Expand All @@ -51,7 +51,7 @@ const client = new TimestreamInfluxDBClient({ region: "REGION" });
const params = {
/** input parameters */
};
const command = new ListDbInstancesCommand(params);
const command = new ListDbClustersCommand(params);
```

#### Async/await
Expand Down Expand Up @@ -130,15 +130,15 @@ const client = new AWS.TimestreamInfluxDB({ region: "REGION" });

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

// Promises.
client
.listDbInstances(params)
.listDbClusters(params)
.then((data) => {
// process data.
})
Expand All @@ -147,7 +147,7 @@ client
});

// callbacks.
client.listDbInstances(params, (err, data) => {
client.listDbClusters(params, (err, data) => {
// process err and data.
});
```
Expand Down Expand Up @@ -203,6 +203,14 @@ see LICENSE for more information.

## Client Commands (Operations List)

<details>
<summary>
CreateDbCluster
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/timestream-influxdb/command/CreateDbClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/CreateDbClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/CreateDbClusterCommandOutput/)

</details>
<details>
<summary>
CreateDbInstance
Expand All @@ -218,6 +226,14 @@ CreateDbParameterGroup

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/timestream-influxdb/command/CreateDbParameterGroupCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/CreateDbParameterGroupCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/CreateDbParameterGroupCommandOutput/)

</details>
<details>
<summary>
DeleteDbCluster
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/timestream-influxdb/command/DeleteDbClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/DeleteDbClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/DeleteDbClusterCommandOutput/)

</details>
<details>
<summary>
Expand All @@ -226,6 +242,14 @@ DeleteDbInstance

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/timestream-influxdb/command/DeleteDbInstanceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/DeleteDbInstanceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/DeleteDbInstanceCommandOutput/)

</details>
<details>
<summary>
GetDbCluster
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/timestream-influxdb/command/GetDbClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/GetDbClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/GetDbClusterCommandOutput/)

</details>
<details>
<summary>
Expand All @@ -242,6 +266,14 @@ GetDbParameterGroup

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/timestream-influxdb/command/GetDbParameterGroupCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/GetDbParameterGroupCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/GetDbParameterGroupCommandOutput/)

</details>
<details>
<summary>
ListDbClusters
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/timestream-influxdb/command/ListDbClustersCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/ListDbClustersCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/ListDbClustersCommandOutput/)

</details>
<details>
<summary>
Expand All @@ -250,6 +282,14 @@ ListDbInstances

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/timestream-influxdb/command/ListDbInstancesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/ListDbInstancesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/ListDbInstancesCommandOutput/)

</details>
<details>
<summary>
ListDbInstancesForCluster
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/timestream-influxdb/command/ListDbInstancesForClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/ListDbInstancesForClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/ListDbInstancesForClusterCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -282,6 +322,14 @@ UntagResource

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

</details>
<details>
<summary>
UpdateDbCluster
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/timestream-influxdb/command/UpdateDbClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/UpdateDbClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-influxdb/Interface/UpdateDbClusterCommandOutput/)

</details>
<details>
<summary>
Expand Down
121 changes: 121 additions & 0 deletions clients/client-timestream-influxdb/src/TimestreamInfluxDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
import { createAggregatedClient } from "@smithy/smithy-client";
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";

import {
CreateDbClusterCommand,
CreateDbClusterCommandInput,
CreateDbClusterCommandOutput,
} from "./commands/CreateDbClusterCommand";
import {
CreateDbInstanceCommand,
CreateDbInstanceCommandInput,
Expand All @@ -12,11 +17,21 @@ import {
CreateDbParameterGroupCommandInput,
CreateDbParameterGroupCommandOutput,
} from "./commands/CreateDbParameterGroupCommand";
import {
DeleteDbClusterCommand,
DeleteDbClusterCommandInput,
DeleteDbClusterCommandOutput,
} from "./commands/DeleteDbClusterCommand";
import {
DeleteDbInstanceCommand,
DeleteDbInstanceCommandInput,
DeleteDbInstanceCommandOutput,
} from "./commands/DeleteDbInstanceCommand";
import {
GetDbClusterCommand,
GetDbClusterCommandInput,
GetDbClusterCommandOutput,
} from "./commands/GetDbClusterCommand";
import {
GetDbInstanceCommand,
GetDbInstanceCommandInput,
Expand All @@ -27,11 +42,21 @@ import {
GetDbParameterGroupCommandInput,
GetDbParameterGroupCommandOutput,
} from "./commands/GetDbParameterGroupCommand";
import {
ListDbClustersCommand,
ListDbClustersCommandInput,
ListDbClustersCommandOutput,
} from "./commands/ListDbClustersCommand";
import {
ListDbInstancesCommand,
ListDbInstancesCommandInput,
ListDbInstancesCommandOutput,
} from "./commands/ListDbInstancesCommand";
import {
ListDbInstancesForClusterCommand,
ListDbInstancesForClusterCommandInput,
ListDbInstancesForClusterCommandOutput,
} from "./commands/ListDbInstancesForClusterCommand";
import {
ListDbParameterGroupsCommand,
ListDbParameterGroupsCommandInput,
Expand All @@ -48,6 +73,11 @@ import {
UntagResourceCommandInput,
UntagResourceCommandOutput,
} from "./commands/UntagResourceCommand";
import {
UpdateDbClusterCommand,
UpdateDbClusterCommandInput,
UpdateDbClusterCommandOutput,
} from "./commands/UpdateDbClusterCommand";
import {
UpdateDbInstanceCommand,
UpdateDbInstanceCommandInput,
Expand All @@ -56,20 +86,40 @@ import {
import { TimestreamInfluxDBClient, TimestreamInfluxDBClientConfig } from "./TimestreamInfluxDBClient";

const commands = {
CreateDbClusterCommand,
CreateDbInstanceCommand,
CreateDbParameterGroupCommand,
DeleteDbClusterCommand,
DeleteDbInstanceCommand,
GetDbClusterCommand,
GetDbInstanceCommand,
GetDbParameterGroupCommand,
ListDbClustersCommand,
ListDbInstancesCommand,
ListDbInstancesForClusterCommand,
ListDbParameterGroupsCommand,
ListTagsForResourceCommand,
TagResourceCommand,
UntagResourceCommand,
UpdateDbClusterCommand,
UpdateDbInstanceCommand,
};

export interface TimestreamInfluxDB {
/**
* @see {@link CreateDbClusterCommand}
*/
createDbCluster(
args: CreateDbClusterCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateDbClusterCommandOutput>;
createDbCluster(args: CreateDbClusterCommandInput, cb: (err: any, data?: CreateDbClusterCommandOutput) => void): void;
createDbCluster(
args: CreateDbClusterCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateDbClusterCommandOutput) => void
): void;

/**
* @see {@link CreateDbInstanceCommand}
*/
Expand Down Expand Up @@ -104,6 +154,20 @@ export interface TimestreamInfluxDB {
cb: (err: any, data?: CreateDbParameterGroupCommandOutput) => void
): void;

/**
* @see {@link DeleteDbClusterCommand}
*/
deleteDbCluster(
args: DeleteDbClusterCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteDbClusterCommandOutput>;
deleteDbCluster(args: DeleteDbClusterCommandInput, cb: (err: any, data?: DeleteDbClusterCommandOutput) => void): void;
deleteDbCluster(
args: DeleteDbClusterCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteDbClusterCommandOutput) => void
): void;

/**
* @see {@link DeleteDbInstanceCommand}
*/
Expand All @@ -121,6 +185,17 @@ export interface TimestreamInfluxDB {
cb: (err: any, data?: DeleteDbInstanceCommandOutput) => void
): void;

/**
* @see {@link GetDbClusterCommand}
*/
getDbCluster(args: GetDbClusterCommandInput, options?: __HttpHandlerOptions): Promise<GetDbClusterCommandOutput>;
getDbCluster(args: GetDbClusterCommandInput, cb: (err: any, data?: GetDbClusterCommandOutput) => void): void;
getDbCluster(
args: GetDbClusterCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetDbClusterCommandOutput) => void
): void;

/**
* @see {@link GetDbInstanceCommand}
*/
Expand Down Expand Up @@ -149,6 +224,21 @@ export interface TimestreamInfluxDB {
cb: (err: any, data?: GetDbParameterGroupCommandOutput) => void
): void;

/**
* @see {@link ListDbClustersCommand}
*/
listDbClusters(): Promise<ListDbClustersCommandOutput>;
listDbClusters(
args: ListDbClustersCommandInput,
options?: __HttpHandlerOptions
): Promise<ListDbClustersCommandOutput>;
listDbClusters(args: ListDbClustersCommandInput, cb: (err: any, data?: ListDbClustersCommandOutput) => void): void;
listDbClusters(
args: ListDbClustersCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListDbClustersCommandOutput) => void
): void;

/**
* @see {@link ListDbInstancesCommand}
*/
Expand All @@ -164,6 +254,23 @@ export interface TimestreamInfluxDB {
cb: (err: any, data?: ListDbInstancesCommandOutput) => void
): void;

/**
* @see {@link ListDbInstancesForClusterCommand}
*/
listDbInstancesForCluster(
args: ListDbInstancesForClusterCommandInput,
options?: __HttpHandlerOptions
): Promise<ListDbInstancesForClusterCommandOutput>;
listDbInstancesForCluster(
args: ListDbInstancesForClusterCommandInput,
cb: (err: any, data?: ListDbInstancesForClusterCommandOutput) => void
): void;
listDbInstancesForCluster(
args: ListDbInstancesForClusterCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListDbInstancesForClusterCommandOutput) => void
): void;

/**
* @see {@link ListDbParameterGroupsCommand}
*/
Expand Down Expand Up @@ -221,6 +328,20 @@ export interface TimestreamInfluxDB {
cb: (err: any, data?: UntagResourceCommandOutput) => void
): void;

/**
* @see {@link UpdateDbClusterCommand}
*/
updateDbCluster(
args: UpdateDbClusterCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdateDbClusterCommandOutput>;
updateDbCluster(args: UpdateDbClusterCommandInput, cb: (err: any, data?: UpdateDbClusterCommandOutput) => void): void;
updateDbCluster(
args: UpdateDbClusterCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateDbClusterCommandOutput) => void
): void;

/**
* @see {@link UpdateDbInstanceCommand}
*/
Expand Down
Loading

0 comments on commit b77c92f

Please sign in to comment.