AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon Timestream Query CreateScheduledQuery API operation.

Syntax

New-TSQScheduledQuery
-S3Configuration_BucketName <String>
-TimestreamConfiguration_DatabaseName <String>
-TimestreamConfiguration_DimensionMapping <DimensionMapping[]>
-S3Configuration_EncryptionOption <S3EncryptionOption>
-KmsKeyId <String>
-TimestreamConfiguration_MeasureNameColumn <String>
-TimestreamConfiguration_MixedMeasureMapping <MixedMeasureMapping[]>
-MultiMeasureMappings_MultiMeasureAttributeMapping <MultiMeasureAttributeMapping[]>
-Name <String>
-S3Configuration_ObjectKeyPrefix <String>
-QueryString <String>
-ScheduledQueryExecutionRoleArn <String>
-ScheduleConfiguration_ScheduleExpression <String>
-TimestreamConfiguration_TableName <String>
-Tag <Tag[]>
-MultiMeasureMappings_TargetMultiMeasureName <String>
-TimestreamConfiguration_TimeColumn <String>
-SnsConfiguration_TopicArn <String>
-ClientToken <String>
-Select <String>
-Force <SwitchParameter>
-ClientConfig <AmazonTimestreamQueryConfig>

Description

Create a scheduled query that will be run on your behalf at the configured schedule. Timestream assumes the execution role provided as part of the ScheduledQueryExecutionRoleArn parameter to run the query. You can use the NotificationConfiguration parameter to configure notification for your scheduled query operations.

Parameters

Amazon.PowerShell.Cmdlets.TSQ.AmazonTimestreamQueryClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ClientToken <String>
Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result. Making multiple identical CreateScheduledQuery requests has the same effect as making a single request.
  • If CreateScheduledQuery is called without a ClientToken, the Query SDK generates a ClientToken on your behalf.
  • After 8 hours, any request with the same ClientToken is treated as a new request.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-KmsKeyId <String>
The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the Amazon KMS key is not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with alias/If ErrorReportConfiguration uses SSE_KMS as encryption type, the same KmsKeyId is used to encrypt the error report at rest.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-MultiMeasureMappings_MultiMeasureAttributeMapping <MultiMeasureAttributeMapping[]>
Required. Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTargetConfiguration_TimestreamConfiguration_MultiMeasureMappings_MultiMeasureAttributeMappings
-MultiMeasureMappings_TargetMultiMeasureName <String>
The name of the target multi-measure name in the derived table. This input is required when measureNameColumn is not provided. If MeasureNameColumn is provided, then value from that column will be used as multi-measure name.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTargetConfiguration_TimestreamConfiguration_MultiMeasureMappings_TargetMultiMeasureName
-Name <String>
Name of the scheduled query.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-QueryString <String>
The query string to run. Parameter names can be specified in the query string @ character followed by an identifier. The named Parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run.The timestamp calculated according to the ScheduleConfiguration parameter, will be the value of @scheduled_runtime paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-S3Configuration_BucketName <String>
Name of the S3 bucket under which error reports will be created.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesErrorReportConfiguration_S3Configuration_BucketName
-S3Configuration_EncryptionOption <S3EncryptionOption>
Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesErrorReportConfiguration_S3Configuration_EncryptionOption
-S3Configuration_ObjectKeyPrefix <String>
Prefix for the error report key. Timestream by default adds the following prefix to the error report path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesErrorReportConfiguration_S3Configuration_ObjectKeyPrefix
-ScheduleConfiguration_ScheduleExpression <String>
An expression that denotes when to trigger the scheduled query run. This can be a cron expression or a rate expression.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-ScheduledQueryExecutionRoleArn <String>
The ARN for the IAM role that Timestream will assume when running the scheduled query.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'Arn'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.TimestreamQuery.Model.CreateScheduledQueryResponse). Specifying the name of a property of type Amazon.TimestreamQuery.Model.CreateScheduledQueryResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SnsConfiguration_TopicArn <String>
SNS topic ARN that the scheduled query status notifications will be sent to.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesNotificationConfiguration_SnsConfiguration_TopicArn
-Tag <Tag[]>
A list of key-value pairs to label the scheduled query.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags
-TimestreamConfiguration_DatabaseName <String>
Name of Timestream database to which the query result will be written.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTargetConfiguration_TimestreamConfiguration_DatabaseName
-TimestreamConfiguration_DimensionMapping <DimensionMapping[]>
This is to allow mapping column(s) from the query result to the dimension in the destination table.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTargetConfiguration_TimestreamConfiguration_DimensionMappings
-TimestreamConfiguration_MeasureNameColumn <String>
Name of the measure column.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTargetConfiguration_TimestreamConfiguration_MeasureNameColumn
-TimestreamConfiguration_MixedMeasureMapping <MixedMeasureMapping[]>
Specifies how to map measures to multi-measure records.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTargetConfiguration_TimestreamConfiguration_MixedMeasureMappings
-TimestreamConfiguration_TableName <String>
Name of Timestream table that the query result will be written to. The table should be within the same database that is provided in Timestream configuration.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTargetConfiguration_TimestreamConfiguration_TableName
-TimestreamConfiguration_TimeColumn <String>
Column from query result that should be used as the time column in destination table. Column type for this should be TIMESTAMP.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTargetConfiguration_TimestreamConfiguration_TimeColumn

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns a System.String object. The service call response (type Amazon.TimestreamQuery.Model.CreateScheduledQueryResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z