IOTANALYTICS

BatchPutMessage

valid {
    input.Body.channelName == STRING
    input.Body.messages[_].messageId == STRING
    input.Body.messages[_].payload == BLOB
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CancelPipelineReprocessing

valid {
    input.ReqMap.pipelineName == STRING
    input.ReqMap.reprocessingId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateChannel

valid {
    input.Body.channelName == STRING
    input.Body.channelStorage.serviceManagedS3 == {}
    input.Body.channelStorage.customerManagedS3.bucket == STRING
    input.Body.channelStorage.customerManagedS3.keyPrefix == STRING
    input.Body.channelStorage.customerManagedS3.roleArn == STRING
    input.Body.retentionPeriod.unlimited == BOOLEAN
    input.Body.retentionPeriod.numberOfDays == INTEGER
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateDataset

enum_ComputeType := [ "ACU_1", "ACU_2" ]

valid {
    input.Body.datasetName == STRING
    input.Body.actions[_].actionName == STRING
    input.Body.actions[_].queryAction.sqlQuery == STRING
    input.Body.actions[_].queryAction.filters[_].deltaTime.offsetSeconds == INTEGER
    input.Body.actions[_].queryAction.filters[_].deltaTime.timeExpression == STRING
    input.Body.actions[_].containerAction.image == STRING
    input.Body.actions[_].containerAction.executionRoleArn == STRING
    input.Body.actions[_].containerAction.resourceConfiguration.computeType == enum_ComputeType[_]
    input.Body.actions[_].containerAction.resourceConfiguration.volumeSizeInGB == INTEGER
    input.Body.actions[_].containerAction.variables[_].name == STRING
    input.Body.actions[_].containerAction.variables[_].stringValue == STRING
    input.Body.actions[_].containerAction.variables[_].doubleValue == DOUBLE
    input.Body.actions[_].containerAction.variables[_].datasetContentVersionValue.datasetName == STRING
    input.Body.actions[_].containerAction.variables[_].outputFileUriValue.fileName == STRING
    input.Body.triggers[_].schedule.expression == STRING
    input.Body.triggers[_].dataset.name == STRING
    input.Body.contentDeliveryRules[_].entryName == STRING
    input.Body.contentDeliveryRules[_].destination.iotEventsDestinationConfiguration.inputName == STRING
    input.Body.contentDeliveryRules[_].destination.iotEventsDestinationConfiguration.roleArn == STRING
    input.Body.contentDeliveryRules[_].destination.s3DestinationConfiguration.bucket == STRING
    input.Body.contentDeliveryRules[_].destination.s3DestinationConfiguration.key == STRING
    input.Body.contentDeliveryRules[_].destination.s3DestinationConfiguration.glueConfiguration.tableName == STRING
    input.Body.contentDeliveryRules[_].destination.s3DestinationConfiguration.glueConfiguration.databaseName == STRING
    input.Body.contentDeliveryRules[_].destination.s3DestinationConfiguration.roleArn == STRING
    input.Body.retentionPeriod.unlimited == BOOLEAN
    input.Body.retentionPeriod.numberOfDays == INTEGER
    input.Body.versioningConfiguration.unlimited == BOOLEAN
    input.Body.versioningConfiguration.maxVersions == INTEGER
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.Body.lateDataRules[_].ruleName == STRING
    input.Body.lateDataRules[_].ruleConfiguration.deltaTimeSessionWindowConfiguration.timeoutInMinutes == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateDatasetContent

valid {
    input.Body.versionId == STRING
    input.ReqMap.datasetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateDatastore

valid {
    input.Body.datastoreName == STRING
    input.Body.datastoreStorage.serviceManagedS3 == {}
    input.Body.datastoreStorage.customerManagedS3.bucket == STRING
    input.Body.datastoreStorage.customerManagedS3.keyPrefix == STRING
    input.Body.datastoreStorage.customerManagedS3.roleArn == STRING
    input.Body.datastoreStorage.iotSiteWiseMultiLayerStorage.customerManagedS3Storage.bucket == STRING
    input.Body.datastoreStorage.iotSiteWiseMultiLayerStorage.customerManagedS3Storage.keyPrefix == STRING
    input.Body.retentionPeriod.unlimited == BOOLEAN
    input.Body.retentionPeriod.numberOfDays == INTEGER
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.Body.fileFormatConfiguration.jsonConfiguration == {}
    input.Body.fileFormatConfiguration.parquetConfiguration.schemaDefinition.columns[_].name == STRING
    input.Body.fileFormatConfiguration.parquetConfiguration.schemaDefinition.columns[_].type == STRING
    input.Body.datastorePartitions.partitions[_].attributePartition.attributeName == STRING
    input.Body.datastorePartitions.partitions[_].timestampPartition.attributeName == STRING
    input.Body.datastorePartitions.partitions[_].timestampPartition.timestampFormat == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreatePipeline

valid {
    input.Body.pipelineName == STRING
    input.Body.pipelineActivities[_].channel.name == STRING
    input.Body.pipelineActivities[_].channel.channelName == STRING
    input.Body.pipelineActivities[_].channel.next == STRING
    input.Body.pipelineActivities[_].lambda.name == STRING
    input.Body.pipelineActivities[_].lambda.lambdaName == STRING
    input.Body.pipelineActivities[_].lambda.batchSize == INTEGER
    input.Body.pipelineActivities[_].lambda.next == STRING
    input.Body.pipelineActivities[_].datastore.name == STRING
    input.Body.pipelineActivities[_].datastore.datastoreName == STRING
    input.Body.pipelineActivities[_].addAttributes.name == STRING
    input.Body.pipelineActivities[_].addAttributes.attributes.STRING == STRING
    input.Body.pipelineActivities[_].addAttributes.next == STRING
    input.Body.pipelineActivities[_].removeAttributes.name == STRING
    input.Body.pipelineActivities[_].removeAttributes.attributes[_] == STRING
    input.Body.pipelineActivities[_].removeAttributes.next == STRING
    input.Body.pipelineActivities[_].selectAttributes.name == STRING
    input.Body.pipelineActivities[_].selectAttributes.attributes[_] == STRING
    input.Body.pipelineActivities[_].selectAttributes.next == STRING
    input.Body.pipelineActivities[_].filter.name == STRING
    input.Body.pipelineActivities[_].filter.filter == STRING
    input.Body.pipelineActivities[_].filter.next == STRING
    input.Body.pipelineActivities[_].math.name == STRING
    input.Body.pipelineActivities[_].math.attribute == STRING
    input.Body.pipelineActivities[_].math.math == STRING
    input.Body.pipelineActivities[_].math.next == STRING
    input.Body.pipelineActivities[_].deviceRegistryEnrich.name == STRING
    input.Body.pipelineActivities[_].deviceRegistryEnrich.attribute == STRING
    input.Body.pipelineActivities[_].deviceRegistryEnrich.thingName == STRING
    input.Body.pipelineActivities[_].deviceRegistryEnrich.roleArn == STRING
    input.Body.pipelineActivities[_].deviceRegistryEnrich.next == STRING
    input.Body.pipelineActivities[_].deviceShadowEnrich.name == STRING
    input.Body.pipelineActivities[_].deviceShadowEnrich.attribute == STRING
    input.Body.pipelineActivities[_].deviceShadowEnrich.thingName == STRING
    input.Body.pipelineActivities[_].deviceShadowEnrich.roleArn == STRING
    input.Body.pipelineActivities[_].deviceShadowEnrich.next == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteChannel

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

DeleteDataset

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

DeleteDatasetContent

valid {
    input.ReqMap.datasetName == STRING
    input.Qs.versionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteDatastore

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

DeletePipeline

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

DescribeChannel

valid {
    input.ReqMap.channelName == STRING
    input.Qs.includeStatistics == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeDataset

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

DescribeDatastore

valid {
    input.ReqMap.datastoreName == STRING
    input.Qs.includeStatistics == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeLoggingOptions

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

DescribePipeline

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

GetDatasetContent

valid {
    input.ReqMap.datasetName == STRING
    input.Qs.versionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListChannels

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

ListDatasetContents

valid {
    input.ReqMap.datasetName == STRING
    input.Qs.nextToken == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.scheduledOnOrAfter == TIMESTAMP
    input.Qs.scheduledBefore == TIMESTAMP
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListDatasets

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

ListDatastores

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

ListPipelines

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

ListTagsForResource

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

PutLoggingOptions

enum_LoggingLevel := [ "ERROR" ]

valid {
    input.Body.loggingOptions.roleArn == STRING
    input.Body.loggingOptions.level == enum_LoggingLevel[_]
    input.Body.loggingOptions.enabled == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RunPipelineActivity

valid {
    input.Body.pipelineActivity.channel.name == STRING
    input.Body.pipelineActivity.channel.channelName == STRING
    input.Body.pipelineActivity.channel.next == STRING
    input.Body.pipelineActivity.lambda.name == STRING
    input.Body.pipelineActivity.lambda.lambdaName == STRING
    input.Body.pipelineActivity.lambda.batchSize == INTEGER
    input.Body.pipelineActivity.lambda.next == STRING
    input.Body.pipelineActivity.datastore.name == STRING
    input.Body.pipelineActivity.datastore.datastoreName == STRING
    input.Body.pipelineActivity.addAttributes.name == STRING
    input.Body.pipelineActivity.addAttributes.attributes.STRING == STRING
    input.Body.pipelineActivity.addAttributes.next == STRING
    input.Body.pipelineActivity.removeAttributes.name == STRING
    input.Body.pipelineActivity.removeAttributes.attributes[_] == STRING
    input.Body.pipelineActivity.removeAttributes.next == STRING
    input.Body.pipelineActivity.selectAttributes.name == STRING
    input.Body.pipelineActivity.selectAttributes.attributes[_] == STRING
    input.Body.pipelineActivity.selectAttributes.next == STRING
    input.Body.pipelineActivity.filter.name == STRING
    input.Body.pipelineActivity.filter.filter == STRING
    input.Body.pipelineActivity.filter.next == STRING
    input.Body.pipelineActivity.math.name == STRING
    input.Body.pipelineActivity.math.attribute == STRING
    input.Body.pipelineActivity.math.math == STRING
    input.Body.pipelineActivity.math.next == STRING
    input.Body.pipelineActivity.deviceRegistryEnrich.name == STRING
    input.Body.pipelineActivity.deviceRegistryEnrich.attribute == STRING
    input.Body.pipelineActivity.deviceRegistryEnrich.thingName == STRING
    input.Body.pipelineActivity.deviceRegistryEnrich.roleArn == STRING
    input.Body.pipelineActivity.deviceRegistryEnrich.next == STRING
    input.Body.pipelineActivity.deviceShadowEnrich.name == STRING
    input.Body.pipelineActivity.deviceShadowEnrich.attribute == STRING
    input.Body.pipelineActivity.deviceShadowEnrich.thingName == STRING
    input.Body.pipelineActivity.deviceShadowEnrich.roleArn == STRING
    input.Body.pipelineActivity.deviceShadowEnrich.next == STRING
    input.Body.payloads[_] == BLOB
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

SampleChannelData

valid {
    input.ReqMap.channelName == STRING
    input.Qs.maxMessages == INTEGER
    input.Qs.startTime == TIMESTAMP
    input.Qs.endTime == TIMESTAMP
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StartPipelineReprocessing

valid {
    input.Body.startTime == TIMESTAMP
    input.Body.endTime == TIMESTAMP
    input.Body.channelMessages.s3Paths[_] == STRING
    input.ReqMap.pipelineName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

TagResource

valid {
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.Qs.resourceArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UntagResource

valid {
    input.Qs.resourceArn == STRING
    input.Qs.tagKeys[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateChannel

valid {
    input.Body.channelStorage.serviceManagedS3 == {}
    input.Body.channelStorage.customerManagedS3.bucket == STRING
    input.Body.channelStorage.customerManagedS3.keyPrefix == STRING
    input.Body.channelStorage.customerManagedS3.roleArn == STRING
    input.Body.retentionPeriod.unlimited == BOOLEAN
    input.Body.retentionPeriod.numberOfDays == INTEGER
    input.ReqMap.channelName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateDataset

enum_ComputeType := [ "ACU_1", "ACU_2" ]

valid {
    input.Body.actions[_].actionName == STRING
    input.Body.actions[_].queryAction.sqlQuery == STRING
    input.Body.actions[_].queryAction.filters[_].deltaTime.offsetSeconds == INTEGER
    input.Body.actions[_].queryAction.filters[_].deltaTime.timeExpression == STRING
    input.Body.actions[_].containerAction.image == STRING
    input.Body.actions[_].containerAction.executionRoleArn == STRING
    input.Body.actions[_].containerAction.resourceConfiguration.computeType == enum_ComputeType[_]
    input.Body.actions[_].containerAction.resourceConfiguration.volumeSizeInGB == INTEGER
    input.Body.actions[_].containerAction.variables[_].name == STRING
    input.Body.actions[_].containerAction.variables[_].stringValue == STRING
    input.Body.actions[_].containerAction.variables[_].doubleValue == DOUBLE
    input.Body.actions[_].containerAction.variables[_].datasetContentVersionValue.datasetName == STRING
    input.Body.actions[_].containerAction.variables[_].outputFileUriValue.fileName == STRING
    input.Body.triggers[_].schedule.expression == STRING
    input.Body.triggers[_].dataset.name == STRING
    input.Body.contentDeliveryRules[_].entryName == STRING
    input.Body.contentDeliveryRules[_].destination.iotEventsDestinationConfiguration.inputName == STRING
    input.Body.contentDeliveryRules[_].destination.iotEventsDestinationConfiguration.roleArn == STRING
    input.Body.contentDeliveryRules[_].destination.s3DestinationConfiguration.bucket == STRING
    input.Body.contentDeliveryRules[_].destination.s3DestinationConfiguration.key == STRING
    input.Body.contentDeliveryRules[_].destination.s3DestinationConfiguration.glueConfiguration.tableName == STRING
    input.Body.contentDeliveryRules[_].destination.s3DestinationConfiguration.glueConfiguration.databaseName == STRING
    input.Body.contentDeliveryRules[_].destination.s3DestinationConfiguration.roleArn == STRING
    input.Body.retentionPeriod.unlimited == BOOLEAN
    input.Body.retentionPeriod.numberOfDays == INTEGER
    input.Body.versioningConfiguration.unlimited == BOOLEAN
    input.Body.versioningConfiguration.maxVersions == INTEGER
    input.Body.lateDataRules[_].ruleName == STRING
    input.Body.lateDataRules[_].ruleConfiguration.deltaTimeSessionWindowConfiguration.timeoutInMinutes == INTEGER
    input.ReqMap.datasetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateDatastore

valid {
    input.Body.retentionPeriod.unlimited == BOOLEAN
    input.Body.retentionPeriod.numberOfDays == INTEGER
    input.Body.datastoreStorage.serviceManagedS3 == {}
    input.Body.datastoreStorage.customerManagedS3.bucket == STRING
    input.Body.datastoreStorage.customerManagedS3.keyPrefix == STRING
    input.Body.datastoreStorage.customerManagedS3.roleArn == STRING
    input.Body.datastoreStorage.iotSiteWiseMultiLayerStorage.customerManagedS3Storage.bucket == STRING
    input.Body.datastoreStorage.iotSiteWiseMultiLayerStorage.customerManagedS3Storage.keyPrefix == STRING
    input.Body.fileFormatConfiguration.jsonConfiguration == {}
    input.Body.fileFormatConfiguration.parquetConfiguration.schemaDefinition.columns[_].name == STRING
    input.Body.fileFormatConfiguration.parquetConfiguration.schemaDefinition.columns[_].type == STRING
    input.ReqMap.datastoreName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdatePipeline

valid {
    input.Body.pipelineActivities[_].channel.name == STRING
    input.Body.pipelineActivities[_].channel.channelName == STRING
    input.Body.pipelineActivities[_].channel.next == STRING
    input.Body.pipelineActivities[_].lambda.name == STRING
    input.Body.pipelineActivities[_].lambda.lambdaName == STRING
    input.Body.pipelineActivities[_].lambda.batchSize == INTEGER
    input.Body.pipelineActivities[_].lambda.next == STRING
    input.Body.pipelineActivities[_].datastore.name == STRING
    input.Body.pipelineActivities[_].datastore.datastoreName == STRING
    input.Body.pipelineActivities[_].addAttributes.name == STRING
    input.Body.pipelineActivities[_].addAttributes.attributes.STRING == STRING
    input.Body.pipelineActivities[_].addAttributes.next == STRING
    input.Body.pipelineActivities[_].removeAttributes.name == STRING
    input.Body.pipelineActivities[_].removeAttributes.attributes[_] == STRING
    input.Body.pipelineActivities[_].removeAttributes.next == STRING
    input.Body.pipelineActivities[_].selectAttributes.name == STRING
    input.Body.pipelineActivities[_].selectAttributes.attributes[_] == STRING
    input.Body.pipelineActivities[_].selectAttributes.next == STRING
    input.Body.pipelineActivities[_].filter.name == STRING
    input.Body.pipelineActivities[_].filter.filter == STRING
    input.Body.pipelineActivities[_].filter.next == STRING
    input.Body.pipelineActivities[_].math.name == STRING
    input.Body.pipelineActivities[_].math.attribute == STRING
    input.Body.pipelineActivities[_].math.math == STRING
    input.Body.pipelineActivities[_].math.next == STRING
    input.Body.pipelineActivities[_].deviceRegistryEnrich.name == STRING
    input.Body.pipelineActivities[_].deviceRegistryEnrich.attribute == STRING
    input.Body.pipelineActivities[_].deviceRegistryEnrich.thingName == STRING
    input.Body.pipelineActivities[_].deviceRegistryEnrich.roleArn == STRING
    input.Body.pipelineActivities[_].deviceRegistryEnrich.next == STRING
    input.Body.pipelineActivities[_].deviceShadowEnrich.name == STRING
    input.Body.pipelineActivities[_].deviceShadowEnrich.attribute == STRING
    input.Body.pipelineActivities[_].deviceShadowEnrich.thingName == STRING
    input.Body.pipelineActivities[_].deviceShadowEnrich.roleArn == STRING
    input.Body.pipelineActivities[_].deviceShadowEnrich.next == STRING
    input.ReqMap.pipelineName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}