EMR-CONTAINERS

CancelJobRun

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

CreateJobTemplate

enum_TemplateParameterDataType := [ "NUMBER", "STRING" ]

valid {
    input.Body.name == STRING
    input.Body.clientToken == STRING
    input.Body.jobTemplateData.executionRoleArn == STRING
    input.Body.jobTemplateData.releaseLabel == STRING
    input.Body.jobTemplateData.configurationOverrides.applicationConfiguration[_].classification == STRING
    input.Body.jobTemplateData.configurationOverrides.applicationConfiguration[_].properties.STRING == STRING
    input.Body.jobTemplateData.configurationOverrides.applicationConfiguration[_].configurations == NESTED
    input.Body.jobTemplateData.configurationOverrides.monitoringConfiguration.persistentAppUI == STRING
    input.Body.jobTemplateData.configurationOverrides.monitoringConfiguration.cloudWatchMonitoringConfiguration.logGroupName == STRING
    input.Body.jobTemplateData.configurationOverrides.monitoringConfiguration.cloudWatchMonitoringConfiguration.logStreamNamePrefix == STRING
    input.Body.jobTemplateData.configurationOverrides.monitoringConfiguration.s3MonitoringConfiguration.logUri == STRING
    input.Body.jobTemplateData.jobDriver.sparkSubmitJobDriver.entryPoint == STRING
    input.Body.jobTemplateData.jobDriver.sparkSubmitJobDriver.entryPointArguments[_] == STRING
    input.Body.jobTemplateData.jobDriver.sparkSubmitJobDriver.sparkSubmitParameters == STRING
    input.Body.jobTemplateData.jobDriver.sparkSqlJobDriver.entryPoint == STRING
    input.Body.jobTemplateData.jobDriver.sparkSqlJobDriver.sparkSqlParameters == STRING
    input.Body.jobTemplateData.parameterConfiguration.STRING.type == enum_TemplateParameterDataType[_]
    input.Body.jobTemplateData.parameterConfiguration.STRING.defaultValue == STRING
    input.Body.jobTemplateData.jobTags.STRING == STRING
    input.Body.tags.STRING == STRING
    input.Body.kmsKeyArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateManagedEndpoint

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

valid {
    input.Body.name == STRING
    input.Body.type == STRING
    input.Body.releaseLabel == STRING
    input.Body.executionRoleArn == STRING
    input.Body.certificateArn == STRING
    input.Body.configurationOverrides.applicationConfiguration[_].classification == STRING
    input.Body.configurationOverrides.applicationConfiguration[_].properties.STRING == STRING
    input.Body.configurationOverrides.applicationConfiguration[_].configurations == NESTED
    input.Body.configurationOverrides.monitoringConfiguration.persistentAppUI == enum_PersistentAppUI[_]
    input.Body.configurationOverrides.monitoringConfiguration.cloudWatchMonitoringConfiguration.logGroupName == STRING
    input.Body.configurationOverrides.monitoringConfiguration.cloudWatchMonitoringConfiguration.logStreamNamePrefix == STRING
    input.Body.configurationOverrides.monitoringConfiguration.s3MonitoringConfiguration.logUri == STRING
    input.Body.configurationOverrides.monitoringConfiguration.containerLogRotationConfiguration.rotationSize == STRING
    input.Body.configurationOverrides.monitoringConfiguration.containerLogRotationConfiguration.maxFilesToKeep == INTEGER
    input.Body.clientToken == STRING
    input.Body.tags.STRING == STRING
    input.ReqMap.virtualClusterId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateSecurityConfiguration

enum_CertificateProviderType := [ "PEM" ]

valid {
    input.Body.clientToken == STRING
    input.Body.name == STRING
    input.Body.securityConfigurationData.authorizationConfiguration.lakeFormationConfiguration.authorizedSessionTagValue == STRING
    input.Body.securityConfigurationData.authorizationConfiguration.lakeFormationConfiguration.secureNamespaceInfo.clusterId == STRING
    input.Body.securityConfigurationData.authorizationConfiguration.lakeFormationConfiguration.secureNamespaceInfo.namespace == STRING
    input.Body.securityConfigurationData.authorizationConfiguration.lakeFormationConfiguration.queryEngineRoleArn == STRING
    input.Body.securityConfigurationData.authorizationConfiguration.encryptionConfiguration.inTransitEncryptionConfiguration.tlsCertificateConfiguration.certificateProviderType == enum_CertificateProviderType[_]
    input.Body.securityConfigurationData.authorizationConfiguration.encryptionConfiguration.inTransitEncryptionConfiguration.tlsCertificateConfiguration.publicCertificateSecretArn == STRING
    input.Body.securityConfigurationData.authorizationConfiguration.encryptionConfiguration.inTransitEncryptionConfiguration.tlsCertificateConfiguration.privateCertificateSecretArn == STRING
    input.Body.tags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateVirtualCluster

enum_ContainerProviderType := [ "EKS" ]

valid {
    input.Body.name == STRING
    input.Body.containerProvider.type == enum_ContainerProviderType[_]
    input.Body.containerProvider.id == STRING
    input.Body.containerProvider.info.eksInfo.namespace == STRING
    input.Body.clientToken == STRING
    input.Body.tags.STRING == STRING
    input.Body.securityConfigurationId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteJobTemplate

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

DeleteManagedEndpoint

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

DeleteVirtualCluster

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

DescribeJobRun

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

DescribeJobTemplate

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

DescribeManagedEndpoint

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

DescribeSecurityConfiguration

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

DescribeVirtualCluster

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

GetManagedEndpointSessionCredentials

valid {
    input.Body.executionRoleArn == STRING
    input.Body.credentialType == STRING
    input.Body.durationInSeconds == INTEGER
    input.Body.logContext == STRING
    input.Body.clientToken == STRING
    input.ReqMap.endpointId == STRING
    input.ReqMap.virtualClusterId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListJobRuns

enum_JobRunState := [ "PENDING", "SUBMITTED", "RUNNING", "FAILED", "CANCELLED", "CANCEL_PENDING", "COMPLETED" ]

valid {
    input.ReqMap.virtualClusterId == STRING
    input.Qs.createdBefore == TIMESTAMP
    input.Qs.createdAfter == TIMESTAMP
    input.Qs.name == STRING
    input.Qs.states[_] == enum_JobRunState[_]
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListJobTemplates

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

ListManagedEndpoints

enum_EndpointState := [ "CREATING", "ACTIVE", "TERMINATING", "TERMINATED", "TERMINATED_WITH_ERRORS" ]

valid {
    input.ReqMap.virtualClusterId == STRING
    input.Qs.createdBefore == TIMESTAMP
    input.Qs.createdAfter == TIMESTAMP
    input.Qs.types[_] == STRING
    input.Qs.states[_] == enum_EndpointState[_]
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListSecurityConfigurations

valid {
    input.Qs.createdAfter == TIMESTAMP
    input.Qs.createdBefore == TIMESTAMP
    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
}

ListVirtualClusters

enum_ContainerProviderType := [ "EKS" ]
enum_VirtualClusterState := [ "RUNNING", "TERMINATING", "TERMINATED", "ARRESTED" ]

valid {
    input.Qs.containerProviderId == STRING
    input.Qs.containerProviderType == enum_ContainerProviderType[_]
    input.Qs.createdAfter == TIMESTAMP
    input.Qs.createdBefore == TIMESTAMP
    input.Qs.states[_] == enum_VirtualClusterState[_]
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.Qs.eksAccessEntryIntegrated == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StartJobRun

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

valid {
    input.Body.name == STRING
    input.Body.clientToken == STRING
    input.Body.executionRoleArn == STRING
    input.Body.releaseLabel == STRING
    input.Body.jobDriver.sparkSubmitJobDriver.entryPoint == STRING
    input.Body.jobDriver.sparkSubmitJobDriver.entryPointArguments[_] == STRING
    input.Body.jobDriver.sparkSubmitJobDriver.sparkSubmitParameters == STRING
    input.Body.jobDriver.sparkSqlJobDriver.entryPoint == STRING
    input.Body.jobDriver.sparkSqlJobDriver.sparkSqlParameters == STRING
    input.Body.configurationOverrides.applicationConfiguration[_].classification == STRING
    input.Body.configurationOverrides.applicationConfiguration[_].properties.STRING == STRING
    input.Body.configurationOverrides.applicationConfiguration[_].configurations == NESTED
    input.Body.configurationOverrides.monitoringConfiguration.persistentAppUI == enum_PersistentAppUI[_]
    input.Body.configurationOverrides.monitoringConfiguration.cloudWatchMonitoringConfiguration.logGroupName == STRING
    input.Body.configurationOverrides.monitoringConfiguration.cloudWatchMonitoringConfiguration.logStreamNamePrefix == STRING
    input.Body.configurationOverrides.monitoringConfiguration.s3MonitoringConfiguration.logUri == STRING
    input.Body.configurationOverrides.monitoringConfiguration.containerLogRotationConfiguration.rotationSize == STRING
    input.Body.configurationOverrides.monitoringConfiguration.containerLogRotationConfiguration.maxFilesToKeep == INTEGER
    input.Body.tags.STRING == STRING
    input.Body.jobTemplateId == STRING
    input.Body.jobTemplateParameters.STRING == STRING
    input.Body.retryPolicyConfiguration.maxAttempts == INTEGER
    input.ReqMap.virtualClusterId == 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
}

UntagResource

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