@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:40.228Z") public class CfnScheduledQuery extends CfnResource implements IInspectable
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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.timestream.*; CfnScheduledQuery cfnScheduledQuery = CfnScheduledQuery.Builder.create(this, "MyCfnScheduledQuery") .errorReportConfiguration(ErrorReportConfigurationProperty.builder() .s3Configuration(S3ConfigurationProperty.builder() .bucketName("bucketName") // the properties below are optional .encryptionOption("encryptionOption") .objectKeyPrefix("objectKeyPrefix") .build()) .build()) .notificationConfiguration(NotificationConfigurationProperty.builder() .snsConfiguration(SnsConfigurationProperty.builder() .topicArn("topicArn") .build()) .build()) .queryString("queryString") .scheduleConfiguration(ScheduleConfigurationProperty.builder() .scheduleExpression("scheduleExpression") .build()) .scheduledQueryExecutionRoleArn("scheduledQueryExecutionRoleArn") // the properties below are optional .clientToken("clientToken") .kmsKeyId("kmsKeyId") .scheduledQueryName("scheduledQueryName") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .targetConfiguration(TargetConfigurationProperty.builder() .timestreamConfiguration(TimestreamConfigurationProperty.builder() .databaseName("databaseName") .dimensionMappings(List.of(DimensionMappingProperty.builder() .dimensionValueType("dimensionValueType") .name("name") .build())) .tableName("tableName") .timeColumn("timeColumn") // the properties below are optional .measureNameColumn("measureNameColumn") .mixedMeasureMappings(List.of(MixedMeasureMappingProperty.builder() .measureValueType("measureValueType") // the properties below are optional .measureName("measureName") .multiMeasureAttributeMappings(List.of(MultiMeasureAttributeMappingProperty.builder() .measureValueType("measureValueType") .sourceColumn("sourceColumn") // the properties below are optional .targetMultiMeasureAttributeName("targetMultiMeasureAttributeName") .build())) .sourceColumn("sourceColumn") .targetMeasureName("targetMeasureName") .build())) .multiMeasureMappings(MultiMeasureMappingsProperty.builder() .multiMeasureAttributeMappings(List.of(MultiMeasureAttributeMappingProperty.builder() .measureValueType("measureValueType") .sourceColumn("sourceColumn") // the properties below are optional .targetMultiMeasureAttributeName("targetMultiMeasureAttributeName") .build())) // the properties below are optional .targetMultiMeasureName("targetMultiMeasureName") .build()) .build()) .build()) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnScheduledQuery.Builder
A fluent builder for
CfnScheduledQuery . |
static interface |
CfnScheduledQuery.DimensionMappingProperty
This type is used to map column(s) from the query result to a dimension in the destination table.
|
static interface |
CfnScheduledQuery.ErrorReportConfigurationProperty
Configuration required for error reporting.
|
static interface |
CfnScheduledQuery.MixedMeasureMappingProperty
MixedMeasureMappings are mappings that can be used to ingest data into a mixture of narrow and multi measures in the derived table.
|
static interface |
CfnScheduledQuery.MultiMeasureAttributeMappingProperty
Attribute mapping for MULTI value measures.
|
static interface |
CfnScheduledQuery.MultiMeasureMappingsProperty
Only one of MixedMeasureMappings or MultiMeasureMappings is to be provided.
|
static interface |
CfnScheduledQuery.NotificationConfigurationProperty
Notification configuration for a scheduled query.
|
static interface |
CfnScheduledQuery.S3ConfigurationProperty
Details on S3 location for error reports that result from running a query.
|
static interface |
CfnScheduledQuery.ScheduleConfigurationProperty
Configuration of the schedule of the query.
|
static interface |
CfnScheduledQuery.SnsConfigurationProperty
Details on SNS that are required to send the notification.
|
static interface |
CfnScheduledQuery.TargetConfigurationProperty
Configuration used for writing the output of a query.
|
static interface |
CfnScheduledQuery.TimestreamConfigurationProperty
Configuration to write data into Timestream database and table.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnScheduledQuery(Construct scope,
java.lang.String id,
CfnScheduledQueryProps props)
Create a new `AWS::Timestream::ScheduledQuery`.
|
protected |
CfnScheduledQuery(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnScheduledQuery(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
The `ARN` of the scheduled query.
|
java.lang.String |
getAttrSqErrorReportConfiguration()
The scheduled query error reporting configuration.
|
java.lang.String |
getAttrSqKmsKeyId()
The KMS key used to encrypt the query resource, if a customer managed KMS key was provided.
|
java.lang.String |
getAttrSqName()
The scheduled query name.
|
java.lang.String |
getAttrSqNotificationConfiguration()
The scheduled query notification configuration.
|
java.lang.String |
getAttrSqQueryString()
The scheduled query string..
|
java.lang.String |
getAttrSqScheduleConfiguration()
The scheduled query schedule configuration.
|
java.lang.String |
getAttrSqScheduledQueryExecutionRoleArn()
The ARN of the IAM role that will be used by Timestream to run the query.
|
java.lang.String |
getAttrSqTargetConfiguration()
The configuration for query output.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getClientToken()
Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result.
|
java.lang.Object |
getErrorReportConfiguration()
Configuration for error reporting.
|
java.lang.String |
getKmsKeyId()
The Amazon KMS key used to encrypt the scheduled query resource, at-rest.
|
java.lang.Object |
getNotificationConfiguration()
Notification configuration for the scheduled query.
|
java.lang.String |
getQueryString()
The query string to run.
|
java.lang.Object |
getScheduleConfiguration()
Schedule configuration.
|
java.lang.String |
getScheduledQueryExecutionRoleArn()
The ARN for the IAM role that Timestream will assume when running the scheduled query.
|
java.lang.String |
getScheduledQueryName()
A name for the query.
|
TagManager |
getTags()
A list of key-value pairs to label the scheduled query.
|
java.lang.Object |
getTargetConfiguration()
Scheduled query target store configuration.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setClientToken(java.lang.String value)
Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result.
|
void |
setErrorReportConfiguration(CfnScheduledQuery.ErrorReportConfigurationProperty value)
Configuration for error reporting.
|
void |
setErrorReportConfiguration(IResolvable value)
Configuration for error reporting.
|
void |
setKmsKeyId(java.lang.String value)
The Amazon KMS key used to encrypt the scheduled query resource, at-rest.
|
void |
setNotificationConfiguration(CfnScheduledQuery.NotificationConfigurationProperty value)
Notification configuration for the scheduled query.
|
void |
setNotificationConfiguration(IResolvable value)
Notification configuration for the scheduled query.
|
void |
setQueryString(java.lang.String value)
The query string to run.
|
void |
setScheduleConfiguration(CfnScheduledQuery.ScheduleConfigurationProperty value)
Schedule configuration.
|
void |
setScheduleConfiguration(IResolvable value)
Schedule configuration.
|
void |
setScheduledQueryExecutionRoleArn(java.lang.String value)
The ARN for the IAM role that Timestream will assume when running the scheduled query.
|
void |
setScheduledQueryName(java.lang.String value)
A name for the query.
|
void |
setTargetConfiguration(CfnScheduledQuery.TargetConfigurationProperty value)
Scheduled query target store configuration.
|
void |
setTargetConfiguration(IResolvable value)
Scheduled query target store configuration.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnScheduledQuery(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnScheduledQuery(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnScheduledQuery(Construct scope, java.lang.String id, CfnScheduledQueryProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.String getAttrSqErrorReportConfiguration()
public java.lang.String getAttrSqKmsKeyId()
public java.lang.String getAttrSqName()
public java.lang.String getAttrSqNotificationConfiguration()
public java.lang.String getAttrSqQueryString()
public java.lang.String getAttrSqScheduleConfiguration()
public java.lang.String getAttrSqScheduledQueryExecutionRoleArn()
public java.lang.String getAttrSqTargetConfiguration()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.Object getErrorReportConfiguration()
Error reports will be generated when a problem is encountered when writing the query results.
public void setErrorReportConfiguration(CfnScheduledQuery.ErrorReportConfigurationProperty value)
Error reports will be generated when a problem is encountered when writing the query results.
public void setErrorReportConfiguration(IResolvable value)
Error reports will be generated when a problem is encountered when writing the query results.
public java.lang.Object getNotificationConfiguration()
A notification is sent by Timestream when a query run finishes, when the state is updated or when you delete it.
public void setNotificationConfiguration(IResolvable value)
A notification is sent by Timestream when a query run finishes, when the state is updated or when you delete it.
public void setNotificationConfiguration(CfnScheduledQuery.NotificationConfigurationProperty value)
A notification is sent by Timestream when a query run finishes, when the state is updated or when you delete it.
public java.lang.String getQueryString()
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.
public void setQueryString(java.lang.String value)
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.
public java.lang.Object getScheduleConfiguration()
public void setScheduleConfiguration(IResolvable value)
public void setScheduleConfiguration(CfnScheduledQuery.ScheduleConfigurationProperty value)
public java.lang.String getScheduledQueryExecutionRoleArn()
public void setScheduledQueryExecutionRoleArn(java.lang.String value)
public java.lang.String getClientToken()
Making multiple identical CreateScheduledQuery requests has the same effect as making a single request.
ClientToken
, the Query SDK generates a ClientToken
on your behalf.ClientToken
is treated as a new request.public void setClientToken(java.lang.String value)
Making multiple identical CreateScheduledQuery requests has the same effect as making a single request.
ClientToken
, the Query SDK generates a ClientToken
on your behalf.ClientToken
is treated as a new request.public java.lang.String getKmsKeyId()
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.
public void setKmsKeyId(java.lang.String value)
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.
public java.lang.String getScheduledQueryName()
Scheduled query names must be unique within each Region.
public void setScheduledQueryName(java.lang.String value)
Scheduled query names must be unique within each Region.
public java.lang.Object getTargetConfiguration()
public void setTargetConfiguration(IResolvable value)
public void setTargetConfiguration(CfnScheduledQuery.TargetConfigurationProperty value)