ListScheduledQueriesCommand

Gets a list of all scheduled queries in the caller's Amazon account and Region. ListScheduledQueries is eventually consistent.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

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",
// };

ListScheduledQueriesCommand Input

Parameter
Type
Description
MaxResults
number | undefined

The maximum number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as the argument to the subsequent call to ListScheduledQueriesRequest.

NextToken
string | undefined

A pagination token to resume pagination.

ListScheduledQueriesCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
ScheduledQueries
Required
ScheduledQuery[] | undefined

A list of scheduled queries.

NextToken
string | undefined

A token to specify where to start paginating. This is the NextToken from a previously truncated response.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have the necessary permissions to access the account settings.

InternalServerException
server

An internal server error occurred while processing the request.

InvalidEndpointException
client

The requested endpoint is invalid.

ThrottlingException
client

The request was throttled due to excessive requests.

ValidationException
client

Invalid or malformed request.

TimestreamQueryServiceException
Base exception class for all service exceptions from TimestreamQuery service.