CreateModelCustomizationJob

enum_CustomizationType := [ "FINE_TUNING", "CONTINUED_PRE_TRAINING" ]

valid {
    input.Body.jobName == STRING
    input.Body.customModelName == STRING
    input.Body.roleArn == STRING
    input.Body.clientRequestToken == STRING
    input.Body.baseModelIdentifier == STRING
    input.Body.customizationType == enum_CustomizationType[_]
    input.Body.customModelKmsKeyId == STRING
    input.Body.jobTags[_].key == STRING
    input.Body.jobTags[_].value == STRING
    input.Body.customModelTags[_].key == STRING
    input.Body.customModelTags[_].value == STRING
    input.Body.trainingDataConfig.s3Uri == STRING
    input.Body.validationDataConfig.validators[_].s3Uri == STRING
    input.Body.outputDataConfig.s3Uri == STRING
    input.Body.hyperParameters.STRING == STRING
    input.Body.vpcConfig.subnetIds[_] == STRING
    input.Body.vpcConfig.securityGroupIds[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateProvisionedModelThroughput

enum_CommitmentDuration := [ "OneMonth", "SixMonths" ]

valid {
    input.Body.clientRequestToken == STRING
    input.Body.modelUnits == INTEGER
    input.Body.provisionedModelName == STRING
    input.Body.modelId == STRING
    input.Body.commitmentDuration == enum_CommitmentDuration[_]
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteCustomModel

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

DeleteModelInvocationLoggingConfiguration

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

DeleteProvisionedModelThroughput

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

GetCustomModel

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

GetFoundationModel

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

GetModelCustomizationJob

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

GetModelInvocationLoggingConfiguration

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

GetProvisionedModelThroughput

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

ListCustomModels

enum_SortModelsBy := [ "CreationTime" ]
enum_SortOrder := [ "Ascending", "Descending" ]

valid {
    input.Qs.creationTimeBefore == TIMESTAMP
    input.Qs.creationTimeAfter == TIMESTAMP
    input.Qs.nameContains == STRING
    input.Qs.baseModelArnEquals == STRING
    input.Qs.foundationModelArnEquals == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.Qs.sortBy == enum_SortModelsBy[_]
    input.Qs.sortOrder == enum_SortOrder[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListFoundationModels

enum_InferenceType := [ "ON_DEMAND", "PROVISIONED" ]
enum_ModelCustomization := [ "FINE_TUNING", "CONTINUED_PRE_TRAINING" ]
enum_ModelModality := [ "TEXT", "IMAGE", "EMBEDDING" ]

valid {
    input.Qs.byProvider == STRING
    input.Qs.byCustomizationType == enum_ModelCustomization[_]
    input.Qs.byOutputModality == enum_ModelModality[_]
    input.Qs.byInferenceType == enum_InferenceType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListModelCustomizationJobs

enum_FineTuningJobStatus := [ "InProgress", "Completed", "Failed", "Stopping", "Stopped" ]
enum_SortJobsBy := [ "CreationTime" ]
enum_SortOrder := [ "Ascending", "Descending" ]

valid {
    input.Qs.creationTimeAfter == TIMESTAMP
    input.Qs.creationTimeBefore == TIMESTAMP
    input.Qs.statusEquals == enum_FineTuningJobStatus[_]
    input.Qs.nameContains == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.Qs.sortBy == enum_SortJobsBy[_]
    input.Qs.sortOrder == enum_SortOrder[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListProvisionedModelThroughputs

enum_ProvisionedModelStatus := [ "Creating", "InService", "Updating", "Failed" ]
enum_SortByProvisionedModels := [ "CreationTime" ]
enum_SortOrder := [ "Ascending", "Descending" ]

valid {
    input.Qs.creationTimeAfter == TIMESTAMP
    input.Qs.creationTimeBefore == TIMESTAMP
    input.Qs.statusEquals == enum_ProvisionedModelStatus[_]
    input.Qs.modelArnEquals == STRING
    input.Qs.nameContains == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.Qs.sortBy == enum_SortByProvisionedModels[_]
    input.Qs.sortOrder == enum_SortOrder[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListTagsForResource

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

PutModelInvocationLoggingConfiguration

valid {
    input.Body.loggingConfig.cloudWatchConfig.logGroupName == STRING
    input.Body.loggingConfig.cloudWatchConfig.roleArn == STRING
    input.Body.loggingConfig.cloudWatchConfig.largeDataDeliveryS3Config.bucketName == STRING
    input.Body.loggingConfig.cloudWatchConfig.largeDataDeliveryS3Config.keyPrefix == STRING
    input.Body.loggingConfig.s3Config.bucketName == STRING
    input.Body.loggingConfig.s3Config.keyPrefix == STRING
    input.Body.loggingConfig.textDataDeliveryEnabled == BOOLEAN
    input.Body.loggingConfig.imageDataDeliveryEnabled == BOOLEAN
    input.Body.loggingConfig.embeddingDataDeliveryEnabled == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StopModelCustomizationJob

valid {
    input.ReqMap.jobIdentifier == 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
}

UpdateProvisionedModelThroughput

valid {
    input.Body.desiredProvisionedModelName == STRING
    input.Body.desiredModelId == STRING
    input.ReqMap.provisionedModelId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}