Skip to content

Commit 4f7a643

Browse files
author
awstools
committed
feat(client-timestream-query): This change allows users to update and describe account settings associated with their accounts.
1 parent 671315c commit 4f7a643

19 files changed

+618
-13
lines changed

clients/client-timestream-query/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,14 @@ DeleteScheduledQuery
229229

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

232+
</details>
233+
<details>
234+
<summary>
235+
DescribeAccountSettings
236+
</summary>
237+
238+
[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/)
239+
232240
</details>
233241
<details>
234242
<summary>
@@ -301,6 +309,14 @@ UntagResource
301309

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

312+
</details>
313+
<details>
314+
<summary>
315+
UpdateAccountSettings
316+
</summary>
317+
318+
[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/)
319+
304320
</details>
305321
<details>
306322
<summary>

clients/client-timestream-query/src/TimestreamQuery.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ import {
1313
DeleteScheduledQueryCommandInput,
1414
DeleteScheduledQueryCommandOutput,
1515
} from "./commands/DeleteScheduledQueryCommand";
16+
import {
17+
DescribeAccountSettingsCommand,
18+
DescribeAccountSettingsCommandInput,
19+
DescribeAccountSettingsCommandOutput,
20+
} from "./commands/DescribeAccountSettingsCommand";
1621
import {
1722
DescribeEndpointsCommand,
1823
DescribeEndpointsCommandInput,
@@ -50,6 +55,11 @@ import {
5055
UntagResourceCommandInput,
5156
UntagResourceCommandOutput,
5257
} from "./commands/UntagResourceCommand";
58+
import {
59+
UpdateAccountSettingsCommand,
60+
UpdateAccountSettingsCommandInput,
61+
UpdateAccountSettingsCommandOutput,
62+
} from "./commands/UpdateAccountSettingsCommand";
5363
import {
5464
UpdateScheduledQueryCommand,
5565
UpdateScheduledQueryCommandInput,
@@ -61,6 +71,7 @@ const commands = {
6171
CancelQueryCommand,
6272
CreateScheduledQueryCommand,
6373
DeleteScheduledQueryCommand,
74+
DescribeAccountSettingsCommand,
6475
DescribeEndpointsCommand,
6576
DescribeScheduledQueryCommand,
6677
ExecuteScheduledQueryCommand,
@@ -70,6 +81,7 @@ const commands = {
7081
QueryCommand,
7182
TagResourceCommand,
7283
UntagResourceCommand,
84+
UpdateAccountSettingsCommand,
7385
UpdateScheduledQueryCommand,
7486
};
7587

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

134+
/**
135+
* @see {@link DescribeAccountSettingsCommand}
136+
*/
137+
describeAccountSettings(): Promise<DescribeAccountSettingsCommandOutput>;
138+
describeAccountSettings(
139+
args: DescribeAccountSettingsCommandInput,
140+
options?: __HttpHandlerOptions
141+
): Promise<DescribeAccountSettingsCommandOutput>;
142+
describeAccountSettings(
143+
args: DescribeAccountSettingsCommandInput,
144+
cb: (err: any, data?: DescribeAccountSettingsCommandOutput) => void
145+
): void;
146+
describeAccountSettings(
147+
args: DescribeAccountSettingsCommandInput,
148+
options: __HttpHandlerOptions,
149+
cb: (err: any, data?: DescribeAccountSettingsCommandOutput) => void
150+
): void;
151+
122152
/**
123153
* @see {@link DescribeEndpointsCommand}
124154
*/
@@ -250,6 +280,24 @@ export interface TimestreamQuery {
250280
cb: (err: any, data?: UntagResourceCommandOutput) => void
251281
): void;
252282

283+
/**
284+
* @see {@link UpdateAccountSettingsCommand}
285+
*/
286+
updateAccountSettings(): Promise<UpdateAccountSettingsCommandOutput>;
287+
updateAccountSettings(
288+
args: UpdateAccountSettingsCommandInput,
289+
options?: __HttpHandlerOptions
290+
): Promise<UpdateAccountSettingsCommandOutput>;
291+
updateAccountSettings(
292+
args: UpdateAccountSettingsCommandInput,
293+
cb: (err: any, data?: UpdateAccountSettingsCommandOutput) => void
294+
): void;
295+
updateAccountSettings(
296+
args: UpdateAccountSettingsCommandInput,
297+
options: __HttpHandlerOptions,
298+
cb: (err: any, data?: UpdateAccountSettingsCommandOutput) => void
299+
): void;
300+
253301
/**
254302
* @see {@link UpdateScheduledQueryCommand}
255303
*/

clients/client-timestream-query/src/TimestreamQueryClient.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ import {
6767
DeleteScheduledQueryCommandInput,
6868
DeleteScheduledQueryCommandOutput,
6969
} from "./commands/DeleteScheduledQueryCommand";
70+
import {
71+
DescribeAccountSettingsCommandInput,
72+
DescribeAccountSettingsCommandOutput,
73+
} from "./commands/DescribeAccountSettingsCommand";
7074
import {
7175
DescribeEndpointsCommand,
7276
DescribeEndpointsCommandInput,
@@ -92,6 +96,10 @@ import { PrepareQueryCommandInput, PrepareQueryCommandOutput } from "./commands/
9296
import { QueryCommandInput, QueryCommandOutput } from "./commands/QueryCommand";
9397
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
9498
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
99+
import {
100+
UpdateAccountSettingsCommandInput,
101+
UpdateAccountSettingsCommandOutput,
102+
} from "./commands/UpdateAccountSettingsCommand";
95103
import {
96104
UpdateScheduledQueryCommandInput,
97105
UpdateScheduledQueryCommandOutput,
@@ -114,6 +122,7 @@ export type ServiceInputTypes =
114122
| CancelQueryCommandInput
115123
| CreateScheduledQueryCommandInput
116124
| DeleteScheduledQueryCommandInput
125+
| DescribeAccountSettingsCommandInput
117126
| DescribeEndpointsCommandInput
118127
| DescribeScheduledQueryCommandInput
119128
| ExecuteScheduledQueryCommandInput
@@ -123,6 +132,7 @@ export type ServiceInputTypes =
123132
| QueryCommandInput
124133
| TagResourceCommandInput
125134
| UntagResourceCommandInput
135+
| UpdateAccountSettingsCommandInput
126136
| UpdateScheduledQueryCommandInput;
127137

128138
/**
@@ -132,6 +142,7 @@ export type ServiceOutputTypes =
132142
| CancelQueryCommandOutput
133143
| CreateScheduledQueryCommandOutput
134144
| DeleteScheduledQueryCommandOutput
145+
| DescribeAccountSettingsCommandOutput
135146
| DescribeEndpointsCommandOutput
136147
| DescribeScheduledQueryCommandOutput
137148
| ExecuteScheduledQueryCommandOutput
@@ -141,6 +152,7 @@ export type ServiceOutputTypes =
141152
| QueryCommandOutput
142153
| TagResourceCommandOutput
143154
| UntagResourceCommandOutput
155+
| UpdateAccountSettingsCommandOutput
144156
| UpdateScheduledQueryCommandOutput;
145157

146158
/**

clients/client-timestream-query/src/commands/CancelQueryCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export interface CancelQueryCommandOutput extends CancelQueryResponse, __Metadat
6262
*
6363
* @throws {@link InternalServerException} (server fault)
6464
* <p>
65-
* Timestream was unable to fully process this request because of an internal
65+
* The service was unable to fully process this request because of an internal
6666
* server error. </p>
6767
*
6868
* @throws {@link InvalidEndpointException} (client fault)

clients/client-timestream-query/src/commands/CreateScheduledQueryCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export interface CreateScheduledQueryCommandOutput extends CreateScheduledQueryR
132132
*
133133
* @throws {@link InternalServerException} (server fault)
134134
* <p>
135-
* Timestream was unable to fully process this request because of an internal
135+
* The service was unable to fully process this request because of an internal
136136
* server error. </p>
137137
*
138138
* @throws {@link InvalidEndpointException} (client fault)

clients/client-timestream-query/src/commands/DeleteScheduledQueryCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export interface DeleteScheduledQueryCommandOutput extends __MetadataBearer {}
5555
*
5656
* @throws {@link InternalServerException} (server fault)
5757
* <p>
58-
* Timestream was unable to fully process this request because of an internal
58+
* The service was unable to fully process this request because of an internal
5959
* server error. </p>
6060
*
6161
* @throws {@link InvalidEndpointException} (client fault)
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
// smithy-typescript generated code
2+
import { getEndpointDiscoveryPlugin } from "@aws-sdk/middleware-endpoint-discovery";
3+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
4+
import { getSerdePlugin } from "@smithy/middleware-serde";
5+
import { Command as $Command } from "@smithy/smithy-client";
6+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
7+
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { DescribeAccountSettingsRequest, DescribeAccountSettingsResponse } from "../models/models_0";
10+
import { de_DescribeAccountSettingsCommand, se_DescribeAccountSettingsCommand } from "../protocols/Aws_json1_0";
11+
import { ServiceInputTypes, ServiceOutputTypes, TimestreamQueryClientResolvedConfig } from "../TimestreamQueryClient";
12+
13+
/**
14+
* @public
15+
*/
16+
export { __MetadataBearer, $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link DescribeAccountSettingsCommand}.
21+
*/
22+
export interface DescribeAccountSettingsCommandInput extends DescribeAccountSettingsRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link DescribeAccountSettingsCommand}.
27+
*/
28+
export interface DescribeAccountSettingsCommandOutput extends DescribeAccountSettingsResponse, __MetadataBearer {}
29+
30+
/**
31+
* <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>
32+
* <p>You're charged only for the duration of compute units used for your workloads.</p>
33+
* @example
34+
* Use a bare-bones client and the command you need to make an API call.
35+
* ```javascript
36+
* import { TimestreamQueryClient, DescribeAccountSettingsCommand } from "@aws-sdk/client-timestream-query"; // ES Modules import
37+
* // const { TimestreamQueryClient, DescribeAccountSettingsCommand } = require("@aws-sdk/client-timestream-query"); // CommonJS import
38+
* const client = new TimestreamQueryClient(config);
39+
* const input = {};
40+
* const command = new DescribeAccountSettingsCommand(input);
41+
* const response = await client.send(command);
42+
* // { // DescribeAccountSettingsResponse
43+
* // MaxQueryTCU: Number("int"),
44+
* // QueryPricingModel: "BYTES_SCANNED" || "COMPUTE_UNITS",
45+
* // };
46+
*
47+
* ```
48+
*
49+
* @param DescribeAccountSettingsCommandInput - {@link DescribeAccountSettingsCommandInput}
50+
* @returns {@link DescribeAccountSettingsCommandOutput}
51+
* @see {@link DescribeAccountSettingsCommandInput} for command's `input` shape.
52+
* @see {@link DescribeAccountSettingsCommandOutput} for command's `response` shape.
53+
* @see {@link TimestreamQueryClientResolvedConfig | config} for TimestreamQueryClient's `config` shape.
54+
*
55+
* @throws {@link AccessDeniedException} (client fault)
56+
* <p> You are not authorized to perform this action. </p>
57+
*
58+
* @throws {@link InternalServerException} (server fault)
59+
* <p>
60+
* The service was unable to fully process this request because of an internal
61+
* server error. </p>
62+
*
63+
* @throws {@link InvalidEndpointException} (client fault)
64+
* <p>The requested endpoint was not valid.</p>
65+
*
66+
* @throws {@link ThrottlingException} (client fault)
67+
* <p>The request was denied due to request throttling.</p>
68+
*
69+
* @throws {@link TimestreamQueryServiceException}
70+
* <p>Base exception class for all service exceptions from TimestreamQuery service.</p>
71+
*
72+
* @public
73+
*/
74+
export class DescribeAccountSettingsCommand extends $Command
75+
.classBuilder<
76+
DescribeAccountSettingsCommandInput,
77+
DescribeAccountSettingsCommandOutput,
78+
TimestreamQueryClientResolvedConfig,
79+
ServiceInputTypes,
80+
ServiceOutputTypes
81+
>()
82+
.ep({
83+
...commonParams,
84+
})
85+
.m(function (this: any, Command: any, cs: any, config: TimestreamQueryClientResolvedConfig, o: any) {
86+
return [
87+
getSerdePlugin(config, this.serialize, this.deserialize),
88+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
89+
getEndpointDiscoveryPlugin(config, { clientStack: cs, isDiscoveredEndpointRequired: true, options: o }),
90+
];
91+
})
92+
.s("Timestream_20181101", "DescribeAccountSettings", {})
93+
.n("TimestreamQueryClient", "DescribeAccountSettingsCommand")
94+
.f(void 0, void 0)
95+
.ser(se_DescribeAccountSettingsCommand)
96+
.de(de_DescribeAccountSettingsCommand)
97+
.build() {}

clients/client-timestream-query/src/commands/DescribeEndpointsCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export interface DescribeEndpointsCommandOutput extends DescribeEndpointsRespons
7676
*
7777
* @throws {@link InternalServerException} (server fault)
7878
* <p>
79-
* Timestream was unable to fully process this request because of an internal
79+
* The service was unable to fully process this request because of an internal
8080
* server error. </p>
8181
*
8282
* @throws {@link ThrottlingException} (client fault)

clients/client-timestream-query/src/commands/DescribeScheduledQueryCommand.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export interface DescribeScheduledQueryCommandOutput extends DescribeScheduledQu
117117
* // ExecutionTimeInMillis: Number("long"),
118118
* // DataWrites: Number("long"),
119119
* // BytesMetered: Number("long"),
120+
* // CumulativeBytesScanned: Number("long"),
120121
* // RecordsIngested: Number("long"),
121122
* // QueryResultRows: Number("long"),
122123
* // },
@@ -137,6 +138,7 @@ export interface DescribeScheduledQueryCommandOutput extends DescribeScheduledQu
137138
* // ExecutionTimeInMillis: Number("long"),
138139
* // DataWrites: Number("long"),
139140
* // BytesMetered: Number("long"),
141+
* // CumulativeBytesScanned: Number("long"),
140142
* // RecordsIngested: Number("long"),
141143
* // QueryResultRows: Number("long"),
142144
* // },
@@ -165,7 +167,7 @@ export interface DescribeScheduledQueryCommandOutput extends DescribeScheduledQu
165167
*
166168
* @throws {@link InternalServerException} (server fault)
167169
* <p>
168-
* Timestream was unable to fully process this request because of an internal
170+
* The service was unable to fully process this request because of an internal
169171
* server error. </p>
170172
*
171173
* @throws {@link InvalidEndpointException} (client fault)

clients/client-timestream-query/src/commands/ExecuteScheduledQueryCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export interface ExecuteScheduledQueryCommandOutput extends __MetadataBearer {}
5757
*
5858
* @throws {@link InternalServerException} (server fault)
5959
* <p>
60-
* Timestream was unable to fully process this request because of an internal
60+
* The service was unable to fully process this request because of an internal
6161
* server error. </p>
6262
*
6363
* @throws {@link InvalidEndpointException} (client fault)

0 commit comments

Comments
 (0)