LOOKOUTVISION

CreateDataset

valid {
    input.Body.DatasetType == STRING
    input.Body.DatasetSource.GroundTruthManifest.S3Object.Bucket == STRING
    input.Body.DatasetSource.GroundTruthManifest.S3Object.Key == STRING
    input.Body.DatasetSource.GroundTruthManifest.S3Object.VersionId == STRING
    input.ReqMap.projectName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateModel

valid {
    input.Body.Description == STRING
    input.Body.OutputConfig.S3Location.Bucket == STRING
    input.Body.OutputConfig.S3Location.Prefix == STRING
    input.Body.KmsKeyId == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.ReqMap.projectName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateProject

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

DeleteDataset

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

DeleteModel

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

DeleteProject

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

DescribeDataset

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

DescribeModel

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

DescribeModelPackagingJob

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

DescribeProject

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

DetectAnomalies

valid {
    input.Body.Body == BLOB
    input.ReqMap.projectName == STRING
    input.ReqMap.modelVersion == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListDatasetEntries

valid {
    input.ReqMap.projectName == STRING
    input.ReqMap.datasetType == STRING
    input.Qs.labeled == BOOLEAN
    input.Qs.anomalyClass == STRING
    input.Qs.createdBefore == TIMESTAMP
    input.Qs.createdAfter == TIMESTAMP
    input.Qs.nextToken == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.sourceRefContains == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListModelPackagingJobs

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

ListModels

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

ListProjects

valid {
    input.Qs.nextToken == STRING
    input.Qs.maxResults == INTEGER
    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
}

StartModel

valid {
    input.Body.MinInferenceUnits == INTEGER
    input.Body.MaxInferenceUnits == INTEGER
    input.ReqMap.projectName == STRING
    input.ReqMap.modelVersion == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StartModelPackagingJob

enum_TargetDevice := [ "jetson_xavier" ]
enum_TargetPlatformAccelerator := [ "NVIDIA" ]
enum_TargetPlatformArch := [ "ARM64", "X86_64" ]
enum_TargetPlatformOs := [ "LINUX" ]

valid {
    input.Body.ModelVersion == STRING
    input.Body.JobName == STRING
    input.Body.Configuration.Greengrass.CompilerOptions == STRING
    input.Body.Configuration.Greengrass.TargetDevice == enum_TargetDevice[_]
    input.Body.Configuration.Greengrass.TargetPlatform.Os == enum_TargetPlatformOs[_]
    input.Body.Configuration.Greengrass.TargetPlatform.Arch == enum_TargetPlatformArch[_]
    input.Body.Configuration.Greengrass.TargetPlatform.Accelerator == enum_TargetPlatformAccelerator[_]
    input.Body.Configuration.Greengrass.S3OutputLocation.Bucket == STRING
    input.Body.Configuration.Greengrass.S3OutputLocation.Prefix == STRING
    input.Body.Configuration.Greengrass.ComponentName == STRING
    input.Body.Configuration.Greengrass.ComponentVersion == STRING
    input.Body.Configuration.Greengrass.ComponentDescription == STRING
    input.Body.Configuration.Greengrass.Tags[_].Key == STRING
    input.Body.Configuration.Greengrass.Tags[_].Value == STRING
    input.Body.Description == STRING
    input.ReqMap.projectName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StopModel

valid {
    input.ReqMap.projectName == STRING
    input.ReqMap.modelVersion == 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.ReqMap.resourceArn == 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
}

UpdateDatasetEntries

valid {
    input.Body.Changes == BLOB
    input.ReqMap.projectName == STRING
    input.ReqMap.datasetType == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}