BatchEvaluateFeature

valid {
    input.Body.requests[_].entityId == STRING
    input.Body.requests[_].evaluationContext == STRING
    input.Body.requests[_].feature == STRING
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateExperiment

enum_ChangeDirectionEnum := [ "INCREASE", "DECREASE" ]

valid {
    input.Body.description == STRING
    input.Body.metricGoals[_].desiredChange == enum_ChangeDirectionEnum[_]
    input.Body.metricGoals[_].metricDefinition.entityIdKey == STRING
    input.Body.metricGoals[_].metricDefinition.eventPattern == STRING
    input.Body.metricGoals[_].metricDefinition.name == STRING
    input.Body.metricGoals[_].metricDefinition.unitLabel == STRING
    input.Body.metricGoals[_].metricDefinition.valueKey == STRING
    input.Body.name == STRING
    input.Body.onlineAbConfig.controlTreatmentName == STRING
    input.Body.onlineAbConfig.treatmentWeights.STRING == LONG
    input.Body.randomizationSalt == STRING
    input.Body.samplingRate == LONG
    input.Body.segment == STRING
    input.Body.tags.STRING == STRING
    input.Body.treatments[_].description == STRING
    input.Body.treatments[_].feature == STRING
    input.Body.treatments[_].name == STRING
    input.Body.treatments[_].variation == STRING
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateFeature

enum_FeatureEvaluationStrategy := [ "ALL_RULES", "DEFAULT_VARIATION" ]

valid {
    input.Body.defaultVariation == STRING
    input.Body.description == STRING
    input.Body.entityOverrides.STRING == STRING
    input.Body.evaluationStrategy == enum_FeatureEvaluationStrategy[_]
    input.Body.name == STRING
    input.Body.tags.STRING == STRING
    input.Body.variations[_].name == STRING
    input.Body.variations[_].value.boolValue == BOOLEAN
    input.Body.variations[_].value.doubleValue == DOUBLE
    input.Body.variations[_].value.longValue == LONG
    input.Body.variations[_].value.stringValue == STRING
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateLaunch

valid {
    input.Body.description == STRING
    input.Body.groups[_].description == STRING
    input.Body.groups[_].feature == STRING
    input.Body.groups[_].name == STRING
    input.Body.groups[_].variation == STRING
    input.Body.metricMonitors[_].metricDefinition.entityIdKey == STRING
    input.Body.metricMonitors[_].metricDefinition.eventPattern == STRING
    input.Body.metricMonitors[_].metricDefinition.name == STRING
    input.Body.metricMonitors[_].metricDefinition.unitLabel == STRING
    input.Body.metricMonitors[_].metricDefinition.valueKey == STRING
    input.Body.name == STRING
    input.Body.randomizationSalt == STRING
    input.Body.scheduledSplitsConfig.steps[_].groupWeights.STRING == LONG
    input.Body.scheduledSplitsConfig.steps[_].segmentOverrides[_].evaluationOrder == LONG
    input.Body.scheduledSplitsConfig.steps[_].segmentOverrides[_].segment == STRING
    input.Body.scheduledSplitsConfig.steps[_].segmentOverrides[_].weights.STRING == LONG
    input.Body.scheduledSplitsConfig.steps[_].startTime == TIMESTAMP
    input.Body.tags.STRING == STRING
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateProject

valid {
    input.Body.appConfigResource.applicationId == STRING
    input.Body.appConfigResource.environmentId == STRING
    input.Body.dataDelivery.cloudWatchLogs.logGroup == STRING
    input.Body.dataDelivery.s3Destination.bucket == STRING
    input.Body.dataDelivery.s3Destination.prefix == STRING
    input.Body.description == STRING
    input.Body.name == STRING
    input.Body.tags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateSegment

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

DeleteExperiment

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

DeleteFeature

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

DeleteLaunch

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

DeleteProject

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

DeleteSegment

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

EvaluateFeature

valid {
    input.Body.entityId == STRING
    input.Body.evaluationContext == STRING
    input.ReqMap.feature == STRING
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetExperiment

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

GetExperimentResults

enum_ExperimentBaseStat := [ "Mean" ]
enum_ExperimentReportName := [ "BayesianInference" ]
enum_ExperimentResultRequestType := [ "BaseStat", "TreatmentEffect", "ConfidenceInterval", "PValue" ]

valid {
    input.Body.baseStat == enum_ExperimentBaseStat[_]
    input.Body.endTime == TIMESTAMP
    input.Body.metricNames[_] == STRING
    input.Body.period == LONG
    input.Body.reportNames[_] == enum_ExperimentReportName[_]
    input.Body.resultStats[_] == enum_ExperimentResultRequestType[_]
    input.Body.startTime == TIMESTAMP
    input.Body.treatmentNames[_] == STRING
    input.ReqMap.experiment == STRING
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetFeature

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

GetLaunch

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

GetProject

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

GetSegment

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

ListExperiments

enum_ExperimentStatus := [ "CREATED", "UPDATING", "RUNNING", "COMPLETED", "CANCELLED" ]

valid {
    input.ReqMap.project == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.Qs.status == enum_ExperimentStatus[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListFeatures

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

ListLaunches

enum_LaunchStatus := [ "CREATED", "UPDATING", "RUNNING", "COMPLETED", "CANCELLED" ]

valid {
    input.ReqMap.project == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.Qs.status == enum_LaunchStatus[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListProjects

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

ListSegmentReferences

enum_SegmentReferenceResourceType := [ "EXPERIMENT", "LAUNCH" ]

valid {
    input.ReqMap.segment == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.Qs.type == enum_SegmentReferenceResourceType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListSegments

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

ListTagsForResource

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

PutProjectEvents

enum_EventType := [ "aws.evidently.evaluation", "aws.evidently.custom" ]

valid {
    input.Body.events[_].data == STRING
    input.Body.events[_].timestamp == TIMESTAMP
    input.Body.events[_].type == enum_EventType[_]
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StartExperiment

valid {
    input.Body.analysisCompleteTime == TIMESTAMP
    input.ReqMap.experiment == STRING
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StartLaunch

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

StopExperiment

enum_ExperimentStopDesiredState := [ "COMPLETED", "CANCELLED" ]

valid {
    input.Body.desiredState == enum_ExperimentStopDesiredState[_]
    input.Body.reason == STRING
    input.ReqMap.experiment == STRING
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StopLaunch

enum_LaunchStopDesiredState := [ "COMPLETED", "CANCELLED" ]

valid {
    input.Body.desiredState == enum_LaunchStopDesiredState[_]
    input.Body.reason == STRING
    input.ReqMap.launch == STRING
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

TagResource

valid {
    input.Body.tags.STRING == STRING
    input.ReqMap.resourceArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

TestSegmentPattern

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

UntagResource

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

UpdateExperiment

enum_ChangeDirectionEnum := [ "INCREASE", "DECREASE" ]

valid {
    input.Body.description == STRING
    input.Body.metricGoals[_].desiredChange == enum_ChangeDirectionEnum[_]
    input.Body.metricGoals[_].metricDefinition.entityIdKey == STRING
    input.Body.metricGoals[_].metricDefinition.eventPattern == STRING
    input.Body.metricGoals[_].metricDefinition.name == STRING
    input.Body.metricGoals[_].metricDefinition.unitLabel == STRING
    input.Body.metricGoals[_].metricDefinition.valueKey == STRING
    input.Body.onlineAbConfig.controlTreatmentName == STRING
    input.Body.onlineAbConfig.treatmentWeights.STRING == LONG
    input.Body.randomizationSalt == STRING
    input.Body.removeSegment == BOOLEAN
    input.Body.samplingRate == LONG
    input.Body.segment == STRING
    input.Body.treatments[_].description == STRING
    input.Body.treatments[_].feature == STRING
    input.Body.treatments[_].name == STRING
    input.Body.treatments[_].variation == STRING
    input.ReqMap.experiment == STRING
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateFeature

enum_FeatureEvaluationStrategy := [ "ALL_RULES", "DEFAULT_VARIATION" ]

valid {
    input.Body.addOrUpdateVariations[_].name == STRING
    input.Body.addOrUpdateVariations[_].value.boolValue == BOOLEAN
    input.Body.addOrUpdateVariations[_].value.doubleValue == DOUBLE
    input.Body.addOrUpdateVariations[_].value.longValue == LONG
    input.Body.addOrUpdateVariations[_].value.stringValue == STRING
    input.Body.defaultVariation == STRING
    input.Body.description == STRING
    input.Body.entityOverrides.STRING == STRING
    input.Body.evaluationStrategy == enum_FeatureEvaluationStrategy[_]
    input.Body.removeVariations[_] == STRING
    input.ReqMap.feature == STRING
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateLaunch

valid {
    input.Body.description == STRING
    input.Body.groups[_].description == STRING
    input.Body.groups[_].feature == STRING
    input.Body.groups[_].name == STRING
    input.Body.groups[_].variation == STRING
    input.Body.metricMonitors[_].metricDefinition.entityIdKey == STRING
    input.Body.metricMonitors[_].metricDefinition.eventPattern == STRING
    input.Body.metricMonitors[_].metricDefinition.name == STRING
    input.Body.metricMonitors[_].metricDefinition.unitLabel == STRING
    input.Body.metricMonitors[_].metricDefinition.valueKey == STRING
    input.Body.randomizationSalt == STRING
    input.Body.scheduledSplitsConfig.steps[_].groupWeights.STRING == LONG
    input.Body.scheduledSplitsConfig.steps[_].segmentOverrides[_].evaluationOrder == LONG
    input.Body.scheduledSplitsConfig.steps[_].segmentOverrides[_].segment == STRING
    input.Body.scheduledSplitsConfig.steps[_].segmentOverrides[_].weights.STRING == LONG
    input.Body.scheduledSplitsConfig.steps[_].startTime == TIMESTAMP
    input.ReqMap.launch == STRING
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateProject

valid {
    input.Body.appConfigResource.applicationId == STRING
    input.Body.appConfigResource.environmentId == STRING
    input.Body.description == STRING
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateProjectDataDelivery

valid {
    input.Body.cloudWatchLogs.logGroup == STRING
    input.Body.s3Destination.bucket == STRING
    input.Body.s3Destination.prefix == STRING
    input.ReqMap.project == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}