CreateKeyspace

enum_rs := [ "SINGLE_REGION", "MULTI_REGION" ]

valid {
    input.Body.keyspaceName == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.Body.replicationSpecification.replicationStrategy == enum_rs[_]
    input.Body.replicationSpecification.regionList[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateTable

enum_ClientSideTimestampsStatus := [ "ENABLED" ]
enum_EncryptionType := [ "CUSTOMER_MANAGED_KMS_KEY", "AWS_OWNED_KMS_KEY" ]
enum_PointInTimeRecoveryStatus := [ "ENABLED", "DISABLED" ]
enum_SortOrder := [ "ASC", "DESC" ]
enum_ThroughputMode := [ "PAY_PER_REQUEST", "PROVISIONED" ]
enum_TimeToLiveStatus := [ "ENABLED" ]

valid {
    input.Body.keyspaceName == STRING
    input.Body.tableName == STRING
    input.Body.schemaDefinition.allColumns[_].name == STRING
    input.Body.schemaDefinition.allColumns[_].type == STRING
    input.Body.schemaDefinition.partitionKeys[_].name == STRING
    input.Body.schemaDefinition.clusteringKeys[_].name == STRING
    input.Body.schemaDefinition.clusteringKeys[_].orderBy == enum_SortOrder[_]
    input.Body.schemaDefinition.staticColumns[_].name == STRING
    input.Body.comment.message == STRING
    input.Body.capacitySpecification.throughputMode == enum_ThroughputMode[_]
    input.Body.capacitySpecification.readCapacityUnits == LONG
    input.Body.capacitySpecification.writeCapacityUnits == LONG
    input.Body.encryptionSpecification.type == enum_EncryptionType[_]
    input.Body.encryptionSpecification.kmsKeyIdentifier == STRING
    input.Body.pointInTimeRecovery.status == enum_PointInTimeRecoveryStatus[_]
    input.Body.ttl.status == enum_TimeToLiveStatus[_]
    input.Body.defaultTimeToLive == INTEGER
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.Body.clientSideTimestamps.status == enum_ClientSideTimestampsStatus[_]
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.autoScalingDisabled == BOOLEAN
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.minimumUnits == LONG
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.maximumUnits == LONG
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.disableScaleIn == BOOLEAN
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleInCooldown == INTEGER
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleOutCooldown == INTEGER
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.targetValue == DOUBLE
    input.Body.autoScalingSpecification.readCapacityAutoScaling.autoScalingDisabled == BOOLEAN
    input.Body.autoScalingSpecification.readCapacityAutoScaling.minimumUnits == LONG
    input.Body.autoScalingSpecification.readCapacityAutoScaling.maximumUnits == LONG
    input.Body.autoScalingSpecification.readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.disableScaleIn == BOOLEAN
    input.Body.autoScalingSpecification.readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleInCooldown == INTEGER
    input.Body.autoScalingSpecification.readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleOutCooldown == INTEGER
    input.Body.autoScalingSpecification.readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.targetValue == DOUBLE
    input.Body.replicaSpecifications[_].region == STRING
    input.Body.replicaSpecifications[_].readCapacityUnits == LONG
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.autoScalingDisabled == BOOLEAN
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.minimumUnits == LONG
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.maximumUnits == LONG
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.disableScaleIn == BOOLEAN
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleInCooldown == INTEGER
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleOutCooldown == INTEGER
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.targetValue == DOUBLE
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateType

valid {
    input.Body.keyspaceName == STRING
    input.Body.typeName == STRING
    input.Body.fieldDefinitions[_].name == STRING
    input.Body.fieldDefinitions[_].type == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteKeyspace

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

DeleteTable

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

DeleteType

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

GetKeyspace

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

GetTable

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

GetTableAutoScalingSettings

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

GetType

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

ListKeyspaces

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.nextToken == STRING
    input.Body.maxResults == INTEGER
    input.Body.keyspaceName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListTagsForResource

valid {
    input.Body.resourceArn == STRING
    input.Body.nextToken == STRING
    input.Body.maxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListTypes

valid {
    input.Body.nextToken == STRING
    input.Body.maxResults == INTEGER
    input.Body.keyspaceName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RestoreTable

enum_EncryptionType := [ "CUSTOMER_MANAGED_KMS_KEY", "AWS_OWNED_KMS_KEY" ]
enum_PointInTimeRecoveryStatus := [ "ENABLED", "DISABLED" ]
enum_ThroughputMode := [ "PAY_PER_REQUEST", "PROVISIONED" ]

valid {
    input.Body.sourceKeyspaceName == STRING
    input.Body.sourceTableName == STRING
    input.Body.targetKeyspaceName == STRING
    input.Body.targetTableName == STRING
    input.Body.restoreTimestamp == TIMESTAMP
    input.Body.capacitySpecificationOverride.throughputMode == enum_ThroughputMode[_]
    input.Body.capacitySpecificationOverride.readCapacityUnits == LONG
    input.Body.capacitySpecificationOverride.writeCapacityUnits == LONG
    input.Body.encryptionSpecificationOverride.type == enum_EncryptionType[_]
    input.Body.encryptionSpecificationOverride.kmsKeyIdentifier == STRING
    input.Body.pointInTimeRecoveryOverride.status == enum_PointInTimeRecoveryStatus[_]
    input.Body.tagsOverride[_].key == STRING
    input.Body.tagsOverride[_].value == STRING
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.autoScalingDisabled == BOOLEAN
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.minimumUnits == LONG
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.maximumUnits == LONG
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.disableScaleIn == BOOLEAN
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleInCooldown == INTEGER
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleOutCooldown == INTEGER
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.targetValue == DOUBLE
    input.Body.autoScalingSpecification.readCapacityAutoScaling.autoScalingDisabled == BOOLEAN
    input.Body.autoScalingSpecification.readCapacityAutoScaling.minimumUnits == LONG
    input.Body.autoScalingSpecification.readCapacityAutoScaling.maximumUnits == LONG
    input.Body.autoScalingSpecification.readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.disableScaleIn == BOOLEAN
    input.Body.autoScalingSpecification.readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleInCooldown == INTEGER
    input.Body.autoScalingSpecification.readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleOutCooldown == INTEGER
    input.Body.autoScalingSpecification.readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.targetValue == DOUBLE
    input.Body.replicaSpecifications[_].region == STRING
    input.Body.replicaSpecifications[_].readCapacityUnits == LONG
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.autoScalingDisabled == BOOLEAN
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.minimumUnits == LONG
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.maximumUnits == LONG
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.disableScaleIn == BOOLEAN
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleInCooldown == INTEGER
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleOutCooldown == INTEGER
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.targetValue == DOUBLE
    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.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateKeyspace

enum_ClientSideTimestampsStatus := [ "ENABLED" ]
enum_rs := [ "SINGLE_REGION", "MULTI_REGION" ]

valid {
    input.Body.keyspaceName == STRING
    input.Body.replicationSpecification.replicationStrategy == enum_rs[_]
    input.Body.replicationSpecification.regionList[_] == STRING
    input.Body.clientSideTimestamps.status == enum_ClientSideTimestampsStatus[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateTable

enum_ClientSideTimestampsStatus := [ "ENABLED" ]
enum_EncryptionType := [ "CUSTOMER_MANAGED_KMS_KEY", "AWS_OWNED_KMS_KEY" ]
enum_PointInTimeRecoveryStatus := [ "ENABLED", "DISABLED" ]
enum_ThroughputMode := [ "PAY_PER_REQUEST", "PROVISIONED" ]
enum_TimeToLiveStatus := [ "ENABLED" ]

valid {
    input.Body.keyspaceName == STRING
    input.Body.tableName == STRING
    input.Body.addColumns[_].name == STRING
    input.Body.addColumns[_].type == STRING
    input.Body.capacitySpecification.throughputMode == enum_ThroughputMode[_]
    input.Body.capacitySpecification.readCapacityUnits == LONG
    input.Body.capacitySpecification.writeCapacityUnits == LONG
    input.Body.encryptionSpecification.type == enum_EncryptionType[_]
    input.Body.encryptionSpecification.kmsKeyIdentifier == STRING
    input.Body.pointInTimeRecovery.status == enum_PointInTimeRecoveryStatus[_]
    input.Body.ttl.status == enum_TimeToLiveStatus[_]
    input.Body.defaultTimeToLive == INTEGER
    input.Body.clientSideTimestamps.status == enum_ClientSideTimestampsStatus[_]
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.autoScalingDisabled == BOOLEAN
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.minimumUnits == LONG
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.maximumUnits == LONG
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.disableScaleIn == BOOLEAN
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleInCooldown == INTEGER
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleOutCooldown == INTEGER
    input.Body.autoScalingSpecification.writeCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.targetValue == DOUBLE
    input.Body.autoScalingSpecification.readCapacityAutoScaling.autoScalingDisabled == BOOLEAN
    input.Body.autoScalingSpecification.readCapacityAutoScaling.minimumUnits == LONG
    input.Body.autoScalingSpecification.readCapacityAutoScaling.maximumUnits == LONG
    input.Body.autoScalingSpecification.readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.disableScaleIn == BOOLEAN
    input.Body.autoScalingSpecification.readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleInCooldown == INTEGER
    input.Body.autoScalingSpecification.readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleOutCooldown == INTEGER
    input.Body.autoScalingSpecification.readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.targetValue == DOUBLE
    input.Body.replicaSpecifications[_].region == STRING
    input.Body.replicaSpecifications[_].readCapacityUnits == LONG
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.autoScalingDisabled == BOOLEAN
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.minimumUnits == LONG
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.maximumUnits == LONG
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.disableScaleIn == BOOLEAN
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleInCooldown == INTEGER
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.scaleOutCooldown == INTEGER
    input.Body.replicaSpecifications[_].readCapacityAutoScaling.scalingPolicy.targetTrackingScalingPolicyConfiguration.targetValue == DOUBLE
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}