@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.583Z") @Stability(value=Stable) 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.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnScheduledQuery(software.constructs.Construct scope,
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 |
|---|---|
String |
getAttrArn()
The `ARN` of the scheduled query.
|
String |
getAttrSqErrorReportConfiguration()
The scheduled query error reporting configuration.
|
String |
getAttrSqKmsKeyId()
The KMS key used to encrypt the query resource, if a customer managed KMS key was provided.
|
String |
getAttrSqName()
The scheduled query name.
|
String |
getAttrSqNotificationConfiguration()
The scheduled query notification configuration.
|
String |
getAttrSqQueryString()
The scheduled query string..
|
String |
getAttrSqScheduleConfiguration()
The scheduled query schedule configuration.
|
String |
getAttrSqScheduledQueryExecutionRoleArn()
The ARN of the IAM role that will be used by Timestream to run the query.
|
String |
getAttrSqTargetConfiguration()
The configuration for query output.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getClientToken()
Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result.
|
Object |
getErrorReportConfiguration()
Configuration for error reporting.
|
String |
getKmsKeyId()
The Amazon KMS key used to encrypt the scheduled query resource, at-rest.
|
Object |
getNotificationConfiguration()
Notification configuration for the scheduled query.
|
String |
getQueryString()
The query string to run.
|
Object |
getScheduleConfiguration()
Schedule configuration.
|
String |
getScheduledQueryExecutionRoleArn()
The ARN for the IAM role that Timestream will assume when running the scheduled query.
|
String |
getScheduledQueryName()
A name for the query.
|
TagManager |
getTags()
A list of key-value pairs to label the scheduled query.
|
Object |
getTargetConfiguration()
Scheduled query target store configuration.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setClientToken(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(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(String value)
The query string to run.
|
void |
setScheduleConfiguration(CfnScheduledQuery.ScheduleConfigurationProperty value)
Schedule configuration.
|
void |
setScheduleConfiguration(IResolvable value)
Schedule configuration.
|
void |
setScheduledQueryExecutionRoleArn(String value)
The ARN for the IAM role that Timestream will assume when running the scheduled query.
|
void |
setScheduledQueryName(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, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnScheduledQuery(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnScheduledQuery(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnScheduledQuery(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull public String getAttrSqErrorReportConfiguration()
@Stability(value=Stable) @NotNull public String getAttrSqKmsKeyId()
@Stability(value=Stable) @NotNull public String getAttrSqName()
@Stability(value=Stable) @NotNull public String getAttrSqNotificationConfiguration()
@Stability(value=Stable) @NotNull public String getAttrSqQueryString()
@Stability(value=Stable) @NotNull public String getAttrSqScheduleConfiguration()
@Stability(value=Stable) @NotNull public String getAttrSqScheduledQueryExecutionRoleArn()
@Stability(value=Stable) @NotNull public String getAttrSqTargetConfiguration()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public Object getErrorReportConfiguration()
Error reports will be generated when a problem is encountered when writing the query results.
@Stability(value=Stable)
public void setErrorReportConfiguration(@NotNull
CfnScheduledQuery.ErrorReportConfigurationProperty value)
Error reports will be generated when a problem is encountered when writing the query results.
@Stability(value=Stable)
public void setErrorReportConfiguration(@NotNull
IResolvable value)
Error reports will be generated when a problem is encountered when writing the query results.
@Stability(value=Stable) @NotNull public Object getNotificationConfiguration()
A notification is sent by Timestream when a query run finishes, when the state is updated or when you delete it.
@Stability(value=Stable)
public void setNotificationConfiguration(@NotNull
CfnScheduledQuery.NotificationConfigurationProperty value)
A notification is sent by Timestream when a query run finishes, when the state is updated or when you delete it.
@Stability(value=Stable)
public void setNotificationConfiguration(@NotNull
IResolvable value)
A notification is sent by Timestream when a query run finishes, when the state is updated or when you delete it.
@Stability(value=Stable) @NotNull public 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.
@Stability(value=Stable)
public void setQueryString(@NotNull
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.
@Stability(value=Stable) @NotNull public Object getScheduleConfiguration()
@Stability(value=Stable)
public void setScheduleConfiguration(@NotNull
CfnScheduledQuery.ScheduleConfigurationProperty value)
@Stability(value=Stable)
public void setScheduleConfiguration(@NotNull
IResolvable value)
@Stability(value=Stable) @NotNull public String getScheduledQueryExecutionRoleArn()
@Stability(value=Stable)
public void setScheduledQueryExecutionRoleArn(@NotNull
String value)
@Stability(value=Stable) @Nullable public 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.@Stability(value=Stable)
public void setClientToken(@Nullable
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.@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setKmsKeyId(@Nullable
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.
@Stability(value=Stable) @Nullable public String getScheduledQueryName()
Scheduled query names must be unique within each Region.
@Stability(value=Stable)
public void setScheduledQueryName(@Nullable
String value)
Scheduled query names must be unique within each Region.
@Stability(value=Stable) @Nullable public Object getTargetConfiguration()
@Stability(value=Stable)
public void setTargetConfiguration(@Nullable
CfnScheduledQuery.TargetConfigurationProperty value)
@Stability(value=Stable)
public void setTargetConfiguration(@Nullable
IResolvable value)
Copyright © 2022. All rights reserved.