TIMESTREAM-QUERY

CancelQuery

valid {
    input.Body.QueryId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateScheduledQuery

enum_DimensionValueType := [ "VARCHAR" ]
enum_MeasureValueType := [ "BIGINT", "BOOLEAN", "DOUBLE", "VARCHAR", "MULTI" ]
enum_S3EncryptionOption := [ "SSE_S3", "SSE_KMS" ]
enum_ScalarMeasureValueType := [ "BIGINT", "BOOLEAN", "DOUBLE", "VARCHAR", "TIMESTAMP" ]

valid {
    input.Body.Name == STRING
    input.Body.QueryString == STRING
    input.Body.ScheduleConfiguration.ScheduleExpression == STRING
    input.Body.NotificationConfiguration.SnsConfiguration.TopicArn == STRING
    input.Body.TargetConfiguration.TimestreamConfiguration.DatabaseName == STRING
    input.Body.TargetConfiguration.TimestreamConfiguration.TableName == STRING
    input.Body.TargetConfiguration.TimestreamConfiguration.TimeColumn == STRING
    input.Body.TargetConfiguration.TimestreamConfiguration.DimensionMappings[_].Name == STRING
    input.Body.TargetConfiguration.TimestreamConfiguration.DimensionMappings[_].DimensionValueType == enum_DimensionValueType[_]
    input.Body.TargetConfiguration.TimestreamConfiguration.MultiMeasureMappings.TargetMultiMeasureName == STRING
    input.Body.TargetConfiguration.TimestreamConfiguration.MultiMeasureMappings.MultiMeasureAttributeMappings[_].SourceColumn == STRING
    input.Body.TargetConfiguration.TimestreamConfiguration.MultiMeasureMappings.MultiMeasureAttributeMappings[_].TargetMultiMeasureAttributeName == STRING
    input.Body.TargetConfiguration.TimestreamConfiguration.MultiMeasureMappings.MultiMeasureAttributeMappings[_].MeasureValueType == enum_ScalarMeasureValueType[_]
    input.Body.TargetConfiguration.TimestreamConfiguration.MixedMeasureMappings[_].MeasureName == STRING
    input.Body.TargetConfiguration.TimestreamConfiguration.MixedMeasureMappings[_].SourceColumn == STRING
    input.Body.TargetConfiguration.TimestreamConfiguration.MixedMeasureMappings[_].TargetMeasureName == STRING
    input.Body.TargetConfiguration.TimestreamConfiguration.MixedMeasureMappings[_].MeasureValueType == enum_MeasureValueType[_]
    input.Body.TargetConfiguration.TimestreamConfiguration.MixedMeasureMappings[_].MultiMeasureAttributeMappings[_].SourceColumn == STRING
    input.Body.TargetConfiguration.TimestreamConfiguration.MixedMeasureMappings[_].MultiMeasureAttributeMappings[_].TargetMultiMeasureAttributeName == STRING
    input.Body.TargetConfiguration.TimestreamConfiguration.MixedMeasureMappings[_].MultiMeasureAttributeMappings[_].MeasureValueType == enum_ScalarMeasureValueType[_]
    input.Body.TargetConfiguration.TimestreamConfiguration.MeasureNameColumn == STRING
    input.Body.ClientToken == STRING
    input.Body.ScheduledQueryExecutionRoleArn == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.Body.KmsKeyId == STRING
    input.Body.ErrorReportConfiguration.S3Configuration.BucketName == STRING
    input.Body.ErrorReportConfiguration.S3Configuration.ObjectKeyPrefix == STRING
    input.Body.ErrorReportConfiguration.S3Configuration.EncryptionOption == enum_S3EncryptionOption[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteScheduledQuery

valid {
    input.Body.ScheduledQueryArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeAccountSettings

valid {
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeEndpoints

valid {
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeScheduledQuery

valid {
    input.Body.ScheduledQueryArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ExecuteScheduledQuery

enum_ScheduledQueryInsightsMode := [ "ENABLED_WITH_RATE_CONTROL", "DISABLED" ]

valid {
    input.Body.ScheduledQueryArn == STRING
    input.Body.InvocationTime == TIMESTAMP
    input.Body.ClientToken == STRING
    input.Body.QueryInsights.Mode == enum_ScheduledQueryInsightsMode[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListScheduledQueries

valid {
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListTagsForResource

valid {
    input.Body.ResourceARN == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PrepareQuery

valid {
    input.Body.QueryString == STRING
    input.Body.ValidateOnly == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

Query

enum_QueryInsightsMode := [ "ENABLED_WITH_RATE_CONTROL", "DISABLED" ]

valid {
    input.Body.QueryString == STRING
    input.Body.ClientToken == STRING
    input.Body.NextToken == STRING
    input.Body.MaxRows == INTEGER
    input.Body.QueryInsights.Mode == enum_QueryInsightsMode[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

TagResource

valid {
    input.Body.ResourceARN == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UntagResource

valid {
    input.Body.ResourceARN == STRING
    input.Body.TagKeys[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateAccountSettings

enum_ComputeMode := [ "ON_DEMAND", "PROVISIONED" ]
enum_QueryPricingModel := [ "BYTES_SCANNED", "COMPUTE_UNITS" ]

valid {
    input.Body.MaxQueryTCU == INTEGER
    input.Body.QueryPricingModel == enum_QueryPricingModel[_]
    input.Body.QueryCompute.ComputeMode == enum_ComputeMode[_]
    input.Body.QueryCompute.ProvisionedCapacity.TargetQueryTCU == INTEGER
    input.Body.QueryCompute.ProvisionedCapacity.NotificationConfiguration.SnsConfiguration.TopicArn == STRING
    input.Body.QueryCompute.ProvisionedCapacity.NotificationConfiguration.RoleArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateScheduledQuery

enum_ScheduledQueryState := [ "ENABLED", "DISABLED" ]

valid {
    input.Body.ScheduledQueryArn == STRING
    input.Body.State == enum_ScheduledQueryState[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}