-
Notifications
You must be signed in to change notification settings - Fork 548
/
ListScheduledQueriesCommand.ts
126 lines (123 loc) · 5.17 KB
/
ListScheduledQueriesCommand.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// 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 { ListScheduledQueriesRequest, ListScheduledQueriesResponse } from "../models/models_0";
import { de_ListScheduledQueriesCommand, se_ListScheduledQueriesCommand } from "../protocols/Aws_json1_0";
import { ServiceInputTypes, ServiceOutputTypes, TimestreamQueryClientResolvedConfig } from "../TimestreamQueryClient";
/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link ListScheduledQueriesCommand}.
*/
export interface ListScheduledQueriesCommandInput extends ListScheduledQueriesRequest {}
/**
* @public
*
* The output of {@link ListScheduledQueriesCommand}.
*/
export interface ListScheduledQueriesCommandOutput extends ListScheduledQueriesResponse, __MetadataBearer {}
/**
* <p>Gets a list of all scheduled queries in the caller's Amazon account and Region.
* <code>ListScheduledQueries</code> is eventually consistent. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { TimestreamQueryClient, ListScheduledQueriesCommand } from "@aws-sdk/client-timestream-query"; // ES Modules import
* // const { TimestreamQueryClient, ListScheduledQueriesCommand } = require("@aws-sdk/client-timestream-query"); // CommonJS import
* const client = new TimestreamQueryClient(config);
* const input = { // ListScheduledQueriesRequest
* MaxResults: Number("int"),
* NextToken: "STRING_VALUE",
* };
* const command = new ListScheduledQueriesCommand(input);
* const response = await client.send(command);
* // { // ListScheduledQueriesResponse
* // ScheduledQueries: [ // ScheduledQueryList // required
* // { // ScheduledQuery
* // Arn: "STRING_VALUE", // required
* // Name: "STRING_VALUE", // required
* // CreationTime: new Date("TIMESTAMP"),
* // State: "ENABLED" || "DISABLED", // required
* // PreviousInvocationTime: new Date("TIMESTAMP"),
* // NextInvocationTime: new Date("TIMESTAMP"),
* // ErrorReportConfiguration: { // ErrorReportConfiguration
* // S3Configuration: { // S3Configuration
* // BucketName: "STRING_VALUE", // required
* // ObjectKeyPrefix: "STRING_VALUE",
* // EncryptionOption: "SSE_S3" || "SSE_KMS",
* // },
* // },
* // TargetDestination: { // TargetDestination
* // TimestreamDestination: { // TimestreamDestination
* // DatabaseName: "STRING_VALUE",
* // TableName: "STRING_VALUE",
* // },
* // },
* // LastRunStatus: "AUTO_TRIGGER_SUCCESS" || "AUTO_TRIGGER_FAILURE" || "MANUAL_TRIGGER_SUCCESS" || "MANUAL_TRIGGER_FAILURE",
* // },
* // ],
* // NextToken: "STRING_VALUE",
* // };
*
* ```
*
* @param ListScheduledQueriesCommandInput - {@link ListScheduledQueriesCommandInput}
* @returns {@link ListScheduledQueriesCommandOutput}
* @see {@link ListScheduledQueriesCommandInput} for command's `input` shape.
* @see {@link ListScheduledQueriesCommandOutput} 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 ValidationException} (client fault)
* <p> Invalid or malformed request. </p>
*
* @throws {@link TimestreamQueryServiceException}
* <p>Base exception class for all service exceptions from TimestreamQuery service.</p>
*
* @public
*/
export class ListScheduledQueriesCommand extends $Command
.classBuilder<
ListScheduledQueriesCommandInput,
ListScheduledQueriesCommandOutput,
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", "ListScheduledQueries", {})
.n("TimestreamQueryClient", "ListScheduledQueriesCommand")
.f(void 0, void 0)
.ser(se_ListScheduledQueriesCommand)
.de(de_ListScheduledQueriesCommand)
.build() {}