FRAUDDETECTOR

BatchCreateVariable

valid {
    input.Body.variableEntries[_].name == STRING
    input.Body.variableEntries[_].dataType == STRING
    input.Body.variableEntries[_].dataSource == STRING
    input.Body.variableEntries[_].defaultValue == STRING
    input.Body.variableEntries[_].description == STRING
    input.Body.variableEntries[_].variableType == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

BatchGetVariable

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

CancelBatchImportJob

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

CancelBatchPredictionJob

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

CreateBatchImportJob

valid {
    input.Body.jobId == STRING
    input.Body.inputPath == STRING
    input.Body.outputPath == STRING
    input.Body.eventTypeName == STRING
    input.Body.iamRoleArn == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateBatchPredictionJob

valid {
    input.Body.jobId == STRING
    input.Body.inputPath == STRING
    input.Body.outputPath == STRING
    input.Body.eventTypeName == STRING
    input.Body.detectorName == STRING
    input.Body.detectorVersion == STRING
    input.Body.iamRoleArn == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateDetectorVersion

enum_ModelTypeEnum := [ "ONLINE_FRAUD_INSIGHTS", "TRANSACTION_FRAUD_INSIGHTS", "ACCOUNT_TAKEOVER_INSIGHTS" ]
enum_RuleExecutionMode := [ "ALL_MATCHED", "FIRST_MATCHED" ]

valid {
    input.Body.detectorId == STRING
    input.Body.description == STRING
    input.Body.externalModelEndpoints[_] == STRING
    input.Body.rules[_].detectorId == STRING
    input.Body.rules[_].ruleId == STRING
    input.Body.rules[_].ruleVersion == STRING
    input.Body.modelVersions[_].modelId == STRING
    input.Body.modelVersions[_].modelType == enum_ModelTypeEnum[_]
    input.Body.modelVersions[_].modelVersionNumber == STRING
    input.Body.modelVersions[_].arn == STRING
    input.Body.ruleExecutionMode == enum_RuleExecutionMode[_]
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateList

valid {
    input.Body.name == STRING
    input.Body.elements[_] == STRING
    input.Body.variableType == STRING
    input.Body.description == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateModel

enum_ModelTypeEnum := [ "ONLINE_FRAUD_INSIGHTS", "TRANSACTION_FRAUD_INSIGHTS", "ACCOUNT_TAKEOVER_INSIGHTS" ]

valid {
    input.Body.modelId == STRING
    input.Body.modelType == enum_ModelTypeEnum[_]
    input.Body.description == STRING
    input.Body.eventTypeName == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateModelVersion

enum_ModelTypeEnum := [ "ONLINE_FRAUD_INSIGHTS", "TRANSACTION_FRAUD_INSIGHTS", "ACCOUNT_TAKEOVER_INSIGHTS" ]
enum_TrainingDataSourceEnum := [ "EXTERNAL_EVENTS", "INGESTED_EVENTS" ]
enum_UnlabeledEventsTreatment := [ "IGNORE", "FRAUD", "LEGIT", "AUTO" ]

valid {
    input.Body.modelId == STRING
    input.Body.modelType == enum_ModelTypeEnum[_]
    input.Body.trainingDataSource == enum_TrainingDataSourceEnum[_]
    input.Body.trainingDataSchema.modelVariables[_] == STRING
    input.Body.trainingDataSchema.labelSchema.labelMapper.STRING[_] == STRING
    input.Body.trainingDataSchema.labelSchema.unlabeledEventsTreatment == enum_UnlabeledEventsTreatment[_]
    input.Body.externalEventsDetail.dataLocation == STRING
    input.Body.externalEventsDetail.dataAccessRoleArn == STRING
    input.Body.ingestedEventsDetail.ingestedEventsTimeWindow.startTime == STRING
    input.Body.ingestedEventsDetail.ingestedEventsTimeWindow.endTime == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateRule

enum_Language := [ "DETECTORPL" ]

valid {
    input.Body.ruleId == STRING
    input.Body.detectorId == STRING
    input.Body.description == STRING
    input.Body.expression == STRING
    input.Body.language == enum_Language[_]
    input.Body.outcomes[_] == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateVariable

enum_DataSource := [ "EVENT", "MODEL_SCORE", "EXTERNAL_MODEL_SCORE" ]
enum_DataType := [ "STRING", "INTEGER", "FLOAT", "BOOLEAN", "DATETIME" ]

valid {
    input.Body.name == STRING
    input.Body.dataType == enum_DataType[_]
    input.Body.dataSource == enum_DataSource[_]
    input.Body.defaultValue == STRING
    input.Body.description == STRING
    input.Body.variableType == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteBatchImportJob

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

DeleteBatchPredictionJob

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

DeleteDetector

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

DeleteDetectorVersion

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

DeleteEntityType

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

DeleteEvent

valid {
    input.Body.eventId == STRING
    input.Body.eventTypeName == STRING
    input.Body.deleteAuditHistory == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteEventType

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

DeleteEventsByEventType

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

DeleteExternalModel

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

DeleteLabel

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

DeleteList

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

DeleteModel

enum_ModelTypeEnum := [ "ONLINE_FRAUD_INSIGHTS", "TRANSACTION_FRAUD_INSIGHTS", "ACCOUNT_TAKEOVER_INSIGHTS" ]

valid {
    input.Body.modelId == STRING
    input.Body.modelType == enum_ModelTypeEnum[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteModelVersion

enum_ModelTypeEnum := [ "ONLINE_FRAUD_INSIGHTS", "TRANSACTION_FRAUD_INSIGHTS", "ACCOUNT_TAKEOVER_INSIGHTS" ]

valid {
    input.Body.modelId == STRING
    input.Body.modelType == enum_ModelTypeEnum[_]
    input.Body.modelVersionNumber == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteOutcome

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

DeleteRule

valid {
    input.Body.rule.detectorId == STRING
    input.Body.rule.ruleId == STRING
    input.Body.rule.ruleVersion == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteVariable

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

DescribeDetector

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

DescribeModelVersions

enum_ModelTypeEnum := [ "ONLINE_FRAUD_INSIGHTS", "TRANSACTION_FRAUD_INSIGHTS", "ACCOUNT_TAKEOVER_INSIGHTS" ]

valid {
    input.Body.modelId == STRING
    input.Body.modelVersionNumber == STRING
    input.Body.modelType == enum_ModelTypeEnum[_]
    input.Body.nextToken == STRING
    input.Body.maxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetBatchImportJobs

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

GetBatchPredictionJobs

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

GetDeleteEventsByEventTypeStatus

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

GetDetectorVersion

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

GetDetectors

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

GetEntityTypes

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

GetEvent

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

GetEventPrediction

valid {
    input.Body.detectorId == STRING
    input.Body.detectorVersionId == STRING
    input.Body.eventId == STRING
    input.Body.eventTypeName == STRING
    input.Body.entities[_].entityType == STRING
    input.Body.entities[_].entityId == STRING
    input.Body.eventTimestamp == STRING
    input.Body.eventVariables.STRING == STRING
    input.Body.externalModelEndpointDataBlobs.STRING.byteBuffer == BLOB
    input.Body.externalModelEndpointDataBlobs.STRING.contentType == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetEventPredictionMetadata

valid {
    input.Body.eventId == STRING
    input.Body.eventTypeName == STRING
    input.Body.detectorId == STRING
    input.Body.detectorVersionId == STRING
    input.Body.predictionTimestamp == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetEventTypes

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

GetExternalModels

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

GetKMSEncryptionKey

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

GetLabels

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

GetListElements

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

GetListsMetadata

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

GetModelVersion

enum_ModelTypeEnum := [ "ONLINE_FRAUD_INSIGHTS", "TRANSACTION_FRAUD_INSIGHTS", "ACCOUNT_TAKEOVER_INSIGHTS" ]

valid {
    input.Body.modelId == STRING
    input.Body.modelType == enum_ModelTypeEnum[_]
    input.Body.modelVersionNumber == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetModels

enum_ModelTypeEnum := [ "ONLINE_FRAUD_INSIGHTS", "TRANSACTION_FRAUD_INSIGHTS", "ACCOUNT_TAKEOVER_INSIGHTS" ]

valid {
    input.Body.modelId == STRING
    input.Body.modelType == enum_ModelTypeEnum[_]
    input.Body.nextToken == STRING
    input.Body.maxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetOutcomes

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

GetRules

valid {
    input.Body.ruleId == STRING
    input.Body.detectorId == STRING
    input.Body.ruleVersion == STRING
    input.Body.nextToken == STRING
    input.Body.maxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetVariables

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

ListEventPredictions

valid {
    input.Body.eventId.value == STRING
    input.Body.eventType.value == STRING
    input.Body.detectorId.value == STRING
    input.Body.detectorVersionId.value == STRING
    input.Body.predictionTimeRange.startTime == STRING
    input.Body.predictionTimeRange.endTime == 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.Body.nextToken == STRING
    input.Body.maxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutDetector

valid {
    input.Body.detectorId == STRING
    input.Body.description == STRING
    input.Body.eventTypeName == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutEntityType

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

PutEventType

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

valid {
    input.Body.name == STRING
    input.Body.description == STRING
    input.Body.eventVariables[_] == STRING
    input.Body.labels[_] == STRING
    input.Body.entityTypes[_] == STRING
    input.Body.eventIngestion == enum_EventIngestion[_]
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.Body.eventOrchestration.eventBridgeEnabled == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutExternalModel

enum_ModelEndpointStatus := [ "ASSOCIATED", "DISSOCIATED" ]
enum_ModelInputDataFormat := [ "TEXT_CSV", "APPLICATION_JSON" ]
enum_ModelOutputDataFormat := [ "TEXT_CSV", "APPLICATION_JSONLINES" ]
enum_ModelSource := [ "SAGEMAKER" ]

valid {
    input.Body.modelEndpoint == STRING
    input.Body.modelSource == enum_ModelSource[_]
    input.Body.invokeModelEndpointRoleArn == STRING
    input.Body.inputConfiguration.eventTypeName == STRING
    input.Body.inputConfiguration.format == enum_ModelInputDataFormat[_]
    input.Body.inputConfiguration.useEventVariables == BOOLEAN
    input.Body.inputConfiguration.jsonInputTemplate == STRING
    input.Body.inputConfiguration.csvInputTemplate == STRING
    input.Body.outputConfiguration.format == enum_ModelOutputDataFormat[_]
    input.Body.outputConfiguration.jsonKeyToVariableMap.STRING == STRING
    input.Body.outputConfiguration.csvIndexToVariableMap.STRING == STRING
    input.Body.modelEndpointStatus == enum_ModelEndpointStatus[_]
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutKMSEncryptionKey

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

PutLabel

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

PutOutcome

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

SendEvent

valid {
    input.Body.eventId == STRING
    input.Body.eventTypeName == STRING
    input.Body.eventTimestamp == STRING
    input.Body.eventVariables.STRING == STRING
    input.Body.assignedLabel == STRING
    input.Body.labelTimestamp == STRING
    input.Body.entities[_].entityType == STRING
    input.Body.entities[_].entityId == 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
}

UpdateDetectorVersion

enum_ModelTypeEnum := [ "ONLINE_FRAUD_INSIGHTS", "TRANSACTION_FRAUD_INSIGHTS", "ACCOUNT_TAKEOVER_INSIGHTS" ]
enum_RuleExecutionMode := [ "ALL_MATCHED", "FIRST_MATCHED" ]

valid {
    input.Body.detectorId == STRING
    input.Body.detectorVersionId == STRING
    input.Body.externalModelEndpoints[_] == STRING
    input.Body.rules[_].detectorId == STRING
    input.Body.rules[_].ruleId == STRING
    input.Body.rules[_].ruleVersion == STRING
    input.Body.description == STRING
    input.Body.modelVersions[_].modelId == STRING
    input.Body.modelVersions[_].modelType == enum_ModelTypeEnum[_]
    input.Body.modelVersions[_].modelVersionNumber == STRING
    input.Body.modelVersions[_].arn == STRING
    input.Body.ruleExecutionMode == enum_RuleExecutionMode[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateDetectorVersionMetadata

valid {
    input.Body.detectorId == STRING
    input.Body.detectorVersionId == STRING
    input.Body.description == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateDetectorVersionStatus

enum_DetectorVersionStatus := [ "DRAFT", "ACTIVE", "INACTIVE" ]

valid {
    input.Body.detectorId == STRING
    input.Body.detectorVersionId == STRING
    input.Body.status == enum_DetectorVersionStatus[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateEventLabel

valid {
    input.Body.eventId == STRING
    input.Body.eventTypeName == STRING
    input.Body.assignedLabel == STRING
    input.Body.labelTimestamp == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateList

enum_ListUpdateMode := [ "REPLACE", "APPEND", "REMOVE" ]

valid {
    input.Body.name == STRING
    input.Body.elements[_] == STRING
    input.Body.description == STRING
    input.Body.updateMode == enum_ListUpdateMode[_]
    input.Body.variableType == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateModel

enum_ModelTypeEnum := [ "ONLINE_FRAUD_INSIGHTS", "TRANSACTION_FRAUD_INSIGHTS", "ACCOUNT_TAKEOVER_INSIGHTS" ]

valid {
    input.Body.modelId == STRING
    input.Body.modelType == enum_ModelTypeEnum[_]
    input.Body.description == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateModelVersion

enum_ModelTypeEnum := [ "ONLINE_FRAUD_INSIGHTS", "TRANSACTION_FRAUD_INSIGHTS", "ACCOUNT_TAKEOVER_INSIGHTS" ]

valid {
    input.Body.modelId == STRING
    input.Body.modelType == enum_ModelTypeEnum[_]
    input.Body.majorVersionNumber == STRING
    input.Body.externalEventsDetail.dataLocation == STRING
    input.Body.externalEventsDetail.dataAccessRoleArn == STRING
    input.Body.ingestedEventsDetail.ingestedEventsTimeWindow.startTime == STRING
    input.Body.ingestedEventsDetail.ingestedEventsTimeWindow.endTime == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateModelVersionStatus

enum_ModelTypeEnum := [ "ONLINE_FRAUD_INSIGHTS", "TRANSACTION_FRAUD_INSIGHTS", "ACCOUNT_TAKEOVER_INSIGHTS" ]
enum_ModelVersionStatus := [ "ACTIVE", "INACTIVE", "TRAINING_CANCELLED" ]

valid {
    input.Body.modelId == STRING
    input.Body.modelType == enum_ModelTypeEnum[_]
    input.Body.modelVersionNumber == STRING
    input.Body.status == enum_ModelVersionStatus[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateRuleMetadata

valid {
    input.Body.rule.detectorId == STRING
    input.Body.rule.ruleId == STRING
    input.Body.rule.ruleVersion == STRING
    input.Body.description == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateRuleVersion

enum_Language := [ "DETECTORPL" ]

valid {
    input.Body.rule.detectorId == STRING
    input.Body.rule.ruleId == STRING
    input.Body.rule.ruleVersion == STRING
    input.Body.description == STRING
    input.Body.expression == STRING
    input.Body.language == enum_Language[_]
    input.Body.outcomes[_] == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateVariable

valid {
    input.Body.name == STRING
    input.Body.defaultValue == STRING
    input.Body.description == STRING
    input.Body.variableType == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}