Skip to content

Commit

Permalink
feat(client-timestream-query): This change allows users to update and…
Browse files Browse the repository at this point in the history
… describe account settings associated with their accounts.
  • Loading branch information
awstools committed Apr 29, 2024
1 parent 671315c commit 4f7a643
Show file tree
Hide file tree
Showing 19 changed files with 618 additions and 13 deletions.
16 changes: 16 additions & 0 deletions clients/client-timestream-query/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,14 @@ DeleteScheduledQuery

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/timestream-query/command/DeleteScheduledQueryCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-query/Interface/DeleteScheduledQueryCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-query/Interface/DeleteScheduledQueryCommandOutput/)

</details>
<details>
<summary>
DescribeAccountSettings
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/timestream-query/command/DescribeAccountSettingsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-query/Interface/DescribeAccountSettingsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-query/Interface/DescribeAccountSettingsCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -301,6 +309,14 @@ UntagResource

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

</details>
<details>
<summary>
UpdateAccountSettings
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/timestream-query/command/UpdateAccountSettingsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-query/Interface/UpdateAccountSettingsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-timestream-query/Interface/UpdateAccountSettingsCommandOutput/)

</details>
<details>
<summary>
Expand Down
48 changes: 48 additions & 0 deletions clients/client-timestream-query/src/TimestreamQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ import {
DeleteScheduledQueryCommandInput,
DeleteScheduledQueryCommandOutput,
} from "./commands/DeleteScheduledQueryCommand";
import {
DescribeAccountSettingsCommand,
DescribeAccountSettingsCommandInput,
DescribeAccountSettingsCommandOutput,
} from "./commands/DescribeAccountSettingsCommand";
import {
DescribeEndpointsCommand,
DescribeEndpointsCommandInput,
Expand Down Expand Up @@ -50,6 +55,11 @@ import {
UntagResourceCommandInput,
UntagResourceCommandOutput,
} from "./commands/UntagResourceCommand";
import {
UpdateAccountSettingsCommand,
UpdateAccountSettingsCommandInput,
UpdateAccountSettingsCommandOutput,
} from "./commands/UpdateAccountSettingsCommand";
import {
UpdateScheduledQueryCommand,
UpdateScheduledQueryCommandInput,
Expand All @@ -61,6 +71,7 @@ const commands = {
CancelQueryCommand,
CreateScheduledQueryCommand,
DeleteScheduledQueryCommand,
DescribeAccountSettingsCommand,
DescribeEndpointsCommand,
DescribeScheduledQueryCommand,
ExecuteScheduledQueryCommand,
Expand All @@ -70,6 +81,7 @@ const commands = {
QueryCommand,
TagResourceCommand,
UntagResourceCommand,
UpdateAccountSettingsCommand,
UpdateScheduledQueryCommand,
};

Expand Down Expand Up @@ -119,6 +131,24 @@ export interface TimestreamQuery {
cb: (err: any, data?: DeleteScheduledQueryCommandOutput) => void
): void;

/**
* @see {@link DescribeAccountSettingsCommand}
*/
describeAccountSettings(): Promise<DescribeAccountSettingsCommandOutput>;
describeAccountSettings(
args: DescribeAccountSettingsCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeAccountSettingsCommandOutput>;
describeAccountSettings(
args: DescribeAccountSettingsCommandInput,
cb: (err: any, data?: DescribeAccountSettingsCommandOutput) => void
): void;
describeAccountSettings(
args: DescribeAccountSettingsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeAccountSettingsCommandOutput) => void
): void;

/**
* @see {@link DescribeEndpointsCommand}
*/
Expand Down Expand Up @@ -250,6 +280,24 @@ export interface TimestreamQuery {
cb: (err: any, data?: UntagResourceCommandOutput) => void
): void;

/**
* @see {@link UpdateAccountSettingsCommand}
*/
updateAccountSettings(): Promise<UpdateAccountSettingsCommandOutput>;
updateAccountSettings(
args: UpdateAccountSettingsCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdateAccountSettingsCommandOutput>;
updateAccountSettings(
args: UpdateAccountSettingsCommandInput,
cb: (err: any, data?: UpdateAccountSettingsCommandOutput) => void
): void;
updateAccountSettings(
args: UpdateAccountSettingsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateAccountSettingsCommandOutput) => void
): void;

/**
* @see {@link UpdateScheduledQueryCommand}
*/
Expand Down
12 changes: 12 additions & 0 deletions clients/client-timestream-query/src/TimestreamQueryClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ import {
DeleteScheduledQueryCommandInput,
DeleteScheduledQueryCommandOutput,
} from "./commands/DeleteScheduledQueryCommand";
import {
DescribeAccountSettingsCommandInput,
DescribeAccountSettingsCommandOutput,
} from "./commands/DescribeAccountSettingsCommand";
import {
DescribeEndpointsCommand,
DescribeEndpointsCommandInput,
Expand All @@ -92,6 +96,10 @@ import { PrepareQueryCommandInput, PrepareQueryCommandOutput } from "./commands/
import { QueryCommandInput, QueryCommandOutput } from "./commands/QueryCommand";
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
import {
UpdateAccountSettingsCommandInput,
UpdateAccountSettingsCommandOutput,
} from "./commands/UpdateAccountSettingsCommand";
import {
UpdateScheduledQueryCommandInput,
UpdateScheduledQueryCommandOutput,
Expand All @@ -114,6 +122,7 @@ export type ServiceInputTypes =
| CancelQueryCommandInput
| CreateScheduledQueryCommandInput
| DeleteScheduledQueryCommandInput
| DescribeAccountSettingsCommandInput
| DescribeEndpointsCommandInput
| DescribeScheduledQueryCommandInput
| ExecuteScheduledQueryCommandInput
Expand All @@ -123,6 +132,7 @@ export type ServiceInputTypes =
| QueryCommandInput
| TagResourceCommandInput
| UntagResourceCommandInput
| UpdateAccountSettingsCommandInput
| UpdateScheduledQueryCommandInput;

/**
Expand All @@ -132,6 +142,7 @@ export type ServiceOutputTypes =
| CancelQueryCommandOutput
| CreateScheduledQueryCommandOutput
| DeleteScheduledQueryCommandOutput
| DescribeAccountSettingsCommandOutput
| DescribeEndpointsCommandOutput
| DescribeScheduledQueryCommandOutput
| ExecuteScheduledQueryCommandOutput
Expand All @@ -141,6 +152,7 @@ export type ServiceOutputTypes =
| QueryCommandOutput
| TagResourceCommandOutput
| UntagResourceCommandOutput
| UpdateAccountSettingsCommandOutput
| UpdateScheduledQueryCommandOutput;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export interface CancelQueryCommandOutput extends CancelQueryResponse, __Metadat
*
* @throws {@link InternalServerException} (server fault)
* <p>
* Timestream was unable to fully process this request because of an internal
* The service was unable to fully process this request because of an internal
* server error. </p>
*
* @throws {@link InvalidEndpointException} (client fault)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export interface CreateScheduledQueryCommandOutput extends CreateScheduledQueryR
*
* @throws {@link InternalServerException} (server fault)
* <p>
* Timestream was unable to fully process this request because of an internal
* The service was unable to fully process this request because of an internal
* server error. </p>
*
* @throws {@link InvalidEndpointException} (client fault)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface DeleteScheduledQueryCommandOutput extends __MetadataBearer {}
*
* @throws {@link InternalServerException} (server fault)
* <p>
* Timestream was unable to fully process this request because of an internal
* The service was unable to fully process this request because of an internal
* server error. </p>
*
* @throws {@link InvalidEndpointException} (client fault)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// smithy-typescript generated code
import { getEndpointDiscoveryPlugin } from "@aws-sdk/middleware-endpoint-discovery";
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeAccountSettingsRequest, DescribeAccountSettingsResponse } from "../models/models_0";
import { de_DescribeAccountSettingsCommand, se_DescribeAccountSettingsCommand } from "../protocols/Aws_json1_0";
import { ServiceInputTypes, ServiceOutputTypes, TimestreamQueryClientResolvedConfig } from "../TimestreamQueryClient";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link DescribeAccountSettingsCommand}.
*/
export interface DescribeAccountSettingsCommandInput extends DescribeAccountSettingsRequest {}
/**
* @public
*
* The output of {@link DescribeAccountSettingsCommand}.
*/
export interface DescribeAccountSettingsCommandOutput extends DescribeAccountSettingsResponse, __MetadataBearer {}

/**
* <p>Describes the settings for your account that include the query pricing model and the configured maximum TCUs the service can use for your query workload.</p>
* <p>You're charged only for the duration of compute units used for your workloads.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { TimestreamQueryClient, DescribeAccountSettingsCommand } from "@aws-sdk/client-timestream-query"; // ES Modules import
* // const { TimestreamQueryClient, DescribeAccountSettingsCommand } = require("@aws-sdk/client-timestream-query"); // CommonJS import
* const client = new TimestreamQueryClient(config);
* const input = {};
* const command = new DescribeAccountSettingsCommand(input);
* const response = await client.send(command);
* // { // DescribeAccountSettingsResponse
* // MaxQueryTCU: Number("int"),
* // QueryPricingModel: "BYTES_SCANNED" || "COMPUTE_UNITS",
* // };
*
* ```
*
* @param DescribeAccountSettingsCommandInput - {@link DescribeAccountSettingsCommandInput}
* @returns {@link DescribeAccountSettingsCommandOutput}
* @see {@link DescribeAccountSettingsCommandInput} for command's `input` shape.
* @see {@link DescribeAccountSettingsCommandOutput} for command's `response` shape.
* @see {@link TimestreamQueryClientResolvedConfig | config} for TimestreamQueryClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p> You are not authorized to perform this action. </p>
*
* @throws {@link InternalServerException} (server fault)
* <p>
* The service was unable to fully process this request because of an internal
* server error. </p>
*
* @throws {@link InvalidEndpointException} (client fault)
* <p>The requested endpoint was not valid.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>The request was denied due to request throttling.</p>
*
* @throws {@link TimestreamQueryServiceException}
* <p>Base exception class for all service exceptions from TimestreamQuery service.</p>
*
* @public
*/
export class DescribeAccountSettingsCommand extends $Command
.classBuilder<
DescribeAccountSettingsCommandInput,
DescribeAccountSettingsCommandOutput,
TimestreamQueryClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: TimestreamQueryClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
getEndpointDiscoveryPlugin(config, { clientStack: cs, isDiscoveredEndpointRequired: true, options: o }),
];
})
.s("Timestream_20181101", "DescribeAccountSettings", {})
.n("TimestreamQueryClient", "DescribeAccountSettingsCommand")
.f(void 0, void 0)
.ser(se_DescribeAccountSettingsCommand)
.de(de_DescribeAccountSettingsCommand)
.build() {}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export interface DescribeEndpointsCommandOutput extends DescribeEndpointsRespons
*
* @throws {@link InternalServerException} (server fault)
* <p>
* Timestream was unable to fully process this request because of an internal
* The service was unable to fully process this request because of an internal
* server error. </p>
*
* @throws {@link ThrottlingException} (client fault)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export interface DescribeScheduledQueryCommandOutput extends DescribeScheduledQu
* // ExecutionTimeInMillis: Number("long"),
* // DataWrites: Number("long"),
* // BytesMetered: Number("long"),
* // CumulativeBytesScanned: Number("long"),
* // RecordsIngested: Number("long"),
* // QueryResultRows: Number("long"),
* // },
Expand All @@ -137,6 +138,7 @@ export interface DescribeScheduledQueryCommandOutput extends DescribeScheduledQu
* // ExecutionTimeInMillis: Number("long"),
* // DataWrites: Number("long"),
* // BytesMetered: Number("long"),
* // CumulativeBytesScanned: Number("long"),
* // RecordsIngested: Number("long"),
* // QueryResultRows: Number("long"),
* // },
Expand Down Expand Up @@ -165,7 +167,7 @@ export interface DescribeScheduledQueryCommandOutput extends DescribeScheduledQu
*
* @throws {@link InternalServerException} (server fault)
* <p>
* Timestream was unable to fully process this request because of an internal
* The service was unable to fully process this request because of an internal
* server error. </p>
*
* @throws {@link InvalidEndpointException} (client fault)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface ExecuteScheduledQueryCommandOutput extends __MetadataBearer {}
*
* @throws {@link InternalServerException} (server fault)
* <p>
* Timestream was unable to fully process this request because of an internal
* The service was unable to fully process this request because of an internal
* server error. </p>
*
* @throws {@link InvalidEndpointException} (client fault)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export interface ListScheduledQueriesCommandOutput extends ListScheduledQueriesR
*
* @throws {@link InternalServerException} (server fault)
* <p>
* Timestream was unable to fully process this request because of an internal
* The service was unable to fully process this request because of an internal
* server error. </p>
*
* @throws {@link InvalidEndpointException} (client fault)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export interface PrepareQueryCommandOutput extends PrepareQueryResponse, __Metad
*
* @throws {@link InternalServerException} (server fault)
* <p>
* Timestream was unable to fully process this request because of an internal
* The service was unable to fully process this request because of an internal
* server error. </p>
*
* @throws {@link InvalidEndpointException} (client fault)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export interface QueryCommandOutput extends QueryResponse, __MetadataBearer {}
*
* @throws {@link InternalServerException} (server fault)
* <p>
* Timestream was unable to fully process this request because of an internal
* The service was unable to fully process this request because of an internal
* server error. </p>
*
* @throws {@link InvalidEndpointException} (client fault)
Expand Down
Loading

0 comments on commit 4f7a643

Please sign in to comment.