TIMESTREAM-WRITE

CreateBatchLoadTask

enum_BatchLoadDataFormat := [ "CSV" ]
enum_MeasureValueType := [ "DOUBLE", "BIGINT", "VARCHAR", "BOOLEAN", "TIMESTAMP", "MULTI" ]
enum_S3EncryptionOption := [ "SSE_S3", "SSE_KMS" ]
enum_ScalarMeasureValueType := [ "DOUBLE", "BIGINT", "BOOLEAN", "VARCHAR", "TIMESTAMP" ]
enum_TimeUnit := [ "MILLISECONDS", "SECONDS", "MICROSECONDS", "NANOSECONDS" ]

valid {
    input.Body.ClientToken == STRING
    input.Body.DataModelConfiguration.DataModel.TimeColumn == STRING
    input.Body.DataModelConfiguration.DataModel.TimeUnit == enum_TimeUnit[_]
    input.Body.DataModelConfiguration.DataModel.DimensionMappings[_].SourceColumn == STRING
    input.Body.DataModelConfiguration.DataModel.DimensionMappings[_].DestinationColumn == STRING
    input.Body.DataModelConfiguration.DataModel.MultiMeasureMappings.TargetMultiMeasureName == STRING
    input.Body.DataModelConfiguration.DataModel.MultiMeasureMappings.MultiMeasureAttributeMappings[_].SourceColumn == STRING
    input.Body.DataModelConfiguration.DataModel.MultiMeasureMappings.MultiMeasureAttributeMappings[_].TargetMultiMeasureAttributeName == STRING
    input.Body.DataModelConfiguration.DataModel.MultiMeasureMappings.MultiMeasureAttributeMappings[_].MeasureValueType == enum_ScalarMeasureValueType[_]
    input.Body.DataModelConfiguration.DataModel.MixedMeasureMappings[_].MeasureName == STRING
    input.Body.DataModelConfiguration.DataModel.MixedMeasureMappings[_].SourceColumn == STRING
    input.Body.DataModelConfiguration.DataModel.MixedMeasureMappings[_].TargetMeasureName == STRING
    input.Body.DataModelConfiguration.DataModel.MixedMeasureMappings[_].MeasureValueType == enum_MeasureValueType[_]
    input.Body.DataModelConfiguration.DataModel.MixedMeasureMappings[_].MultiMeasureAttributeMappings[_].SourceColumn == STRING
    input.Body.DataModelConfiguration.DataModel.MixedMeasureMappings[_].MultiMeasureAttributeMappings[_].TargetMultiMeasureAttributeName == STRING
    input.Body.DataModelConfiguration.DataModel.MixedMeasureMappings[_].MultiMeasureAttributeMappings[_].MeasureValueType == enum_ScalarMeasureValueType[_]
    input.Body.DataModelConfiguration.DataModel.MeasureNameColumn == STRING
    input.Body.DataModelConfiguration.DataModelS3Configuration.BucketName == STRING
    input.Body.DataModelConfiguration.DataModelS3Configuration.ObjectKey == STRING
    input.Body.DataSourceConfiguration.DataSourceS3Configuration.BucketName == STRING
    input.Body.DataSourceConfiguration.DataSourceS3Configuration.ObjectKeyPrefix == STRING
    input.Body.DataSourceConfiguration.CsvConfiguration.ColumnSeparator == STRING
    input.Body.DataSourceConfiguration.CsvConfiguration.EscapeChar == STRING
    input.Body.DataSourceConfiguration.CsvConfiguration.QuoteChar == STRING
    input.Body.DataSourceConfiguration.CsvConfiguration.NullValue == STRING
    input.Body.DataSourceConfiguration.CsvConfiguration.TrimWhiteSpace == BOOLEAN
    input.Body.DataSourceConfiguration.DataFormat == enum_BatchLoadDataFormat[_]
    input.Body.ReportConfiguration.ReportS3Configuration.BucketName == STRING
    input.Body.ReportConfiguration.ReportS3Configuration.ObjectKeyPrefix == STRING
    input.Body.ReportConfiguration.ReportS3Configuration.EncryptionOption == enum_S3EncryptionOption[_]
    input.Body.ReportConfiguration.ReportS3Configuration.KmsKeyId == STRING
    input.Body.TargetDatabaseName == STRING
    input.Body.TargetTableName == STRING
    input.Body.RecordVersion == LONG
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateDatabase

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

CreateTable

enum_PartitionKeyEnforcementLevel := [ "REQUIRED", "OPTIONAL" ]
enum_PartitionKeyType := [ "DIMENSION", "MEASURE" ]
enum_S3EncryptionOption := [ "SSE_S3", "SSE_KMS" ]

valid {
    input.Body.DatabaseName == STRING
    input.Body.TableName == STRING
    input.Body.RetentionProperties.MemoryStoreRetentionPeriodInHours == LONG
    input.Body.RetentionProperties.MagneticStoreRetentionPeriodInDays == LONG
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.Body.MagneticStoreWriteProperties.EnableMagneticStoreWrites == BOOLEAN
    input.Body.MagneticStoreWriteProperties.MagneticStoreRejectedDataLocation.S3Configuration.BucketName == STRING
    input.Body.MagneticStoreWriteProperties.MagneticStoreRejectedDataLocation.S3Configuration.ObjectKeyPrefix == STRING
    input.Body.MagneticStoreWriteProperties.MagneticStoreRejectedDataLocation.S3Configuration.EncryptionOption == enum_S3EncryptionOption[_]
    input.Body.MagneticStoreWriteProperties.MagneticStoreRejectedDataLocation.S3Configuration.KmsKeyId == STRING
    input.Body.Schema.CompositePartitionKey[_].Type == enum_PartitionKeyType[_]
    input.Body.Schema.CompositePartitionKey[_].Name == STRING
    input.Body.Schema.CompositePartitionKey[_].EnforcementInRecord == enum_PartitionKeyEnforcementLevel[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteDatabase

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

DeleteTable

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

DescribeBatchLoadTask

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

DescribeDatabase

valid {
    input.Body.DatabaseName == STRING
    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
}

DescribeTable

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

ListBatchLoadTasks

enum_BatchLoadStatus := [ "CREATED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "PROGRESS_STOPPED", "PENDING_RESUME" ]

valid {
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.Body.TaskStatus == enum_BatchLoadStatus[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListDatabases

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

ListTables

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

ListTagsForResource

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

ResumeBatchLoadTask

valid {
    input.Body.TaskId == STRING
    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
}

UpdateDatabase

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

UpdateTable

enum_PartitionKeyEnforcementLevel := [ "REQUIRED", "OPTIONAL" ]
enum_PartitionKeyType := [ "DIMENSION", "MEASURE" ]
enum_S3EncryptionOption := [ "SSE_S3", "SSE_KMS" ]

valid {
    input.Body.DatabaseName == STRING
    input.Body.TableName == STRING
    input.Body.RetentionProperties.MemoryStoreRetentionPeriodInHours == LONG
    input.Body.RetentionProperties.MagneticStoreRetentionPeriodInDays == LONG
    input.Body.MagneticStoreWriteProperties.EnableMagneticStoreWrites == BOOLEAN
    input.Body.MagneticStoreWriteProperties.MagneticStoreRejectedDataLocation.S3Configuration.BucketName == STRING
    input.Body.MagneticStoreWriteProperties.MagneticStoreRejectedDataLocation.S3Configuration.ObjectKeyPrefix == STRING
    input.Body.MagneticStoreWriteProperties.MagneticStoreRejectedDataLocation.S3Configuration.EncryptionOption == enum_S3EncryptionOption[_]
    input.Body.MagneticStoreWriteProperties.MagneticStoreRejectedDataLocation.S3Configuration.KmsKeyId == STRING
    input.Body.Schema.CompositePartitionKey[_].Type == enum_PartitionKeyType[_]
    input.Body.Schema.CompositePartitionKey[_].Name == STRING
    input.Body.Schema.CompositePartitionKey[_].EnforcementInRecord == enum_PartitionKeyEnforcementLevel[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

WriteRecords

enum_DimensionValueType := [ "VARCHAR" ]
enum_MeasureValueType := [ "DOUBLE", "BIGINT", "VARCHAR", "BOOLEAN", "TIMESTAMP", "MULTI" ]
enum_TimeUnit := [ "MILLISECONDS", "SECONDS", "MICROSECONDS", "NANOSECONDS" ]

valid {
    input.Body.DatabaseName == STRING
    input.Body.TableName == STRING
    input.Body.CommonAttributes.Dimensions[_].Name == STRING
    input.Body.CommonAttributes.Dimensions[_].Value == STRING
    input.Body.CommonAttributes.Dimensions[_].DimensionValueType == enum_DimensionValueType[_]
    input.Body.CommonAttributes.MeasureName == STRING
    input.Body.CommonAttributes.MeasureValue == STRING
    input.Body.CommonAttributes.MeasureValueType == enum_MeasureValueType[_]
    input.Body.CommonAttributes.Time == STRING
    input.Body.CommonAttributes.TimeUnit == enum_TimeUnit[_]
    input.Body.CommonAttributes.Version == LONG
    input.Body.CommonAttributes.MeasureValues[_].Name == STRING
    input.Body.CommonAttributes.MeasureValues[_].Value == STRING
    input.Body.CommonAttributes.MeasureValues[_].Type == enum_MeasureValueType[_]
    input.Body.Records[_].Dimensions[_].Name == STRING
    input.Body.Records[_].Dimensions[_].Value == STRING
    input.Body.Records[_].Dimensions[_].DimensionValueType == enum_DimensionValueType[_]
    input.Body.Records[_].MeasureName == STRING
    input.Body.Records[_].MeasureValue == STRING
    input.Body.Records[_].MeasureValueType == enum_MeasureValueType[_]
    input.Body.Records[_].Time == STRING
    input.Body.Records[_].TimeUnit == enum_TimeUnit[_]
    input.Body.Records[_].Version == LONG
    input.Body.Records[_].MeasureValues[_].Name == STRING
    input.Body.Records[_].MeasureValues[_].Value == STRING
    input.Body.Records[_].MeasureValues[_].Type == enum_MeasureValueType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}