MICROSOFT.AZUREARCDATA

ActiveDirectoryConnectors_Create

enum_ActiveDirectoryConnectorDomainDetailsServiceAccountProvisioning := [ "automatic", "manual" ]

valid {
    input.Body.properties.domainServiceAccountLoginInformation.username == STRING
    input.Body.properties.domainServiceAccountLoginInformation.password == STRING
    input.Body.properties.spec.activeDirectory.realm == STRING
    input.Body.properties.spec.activeDirectory.netbiosDomainName == STRING
    input.Body.properties.spec.activeDirectory.serviceAccountProvisioning == enum_ActiveDirectoryConnectorDomainDetailsServiceAccountProvisioning[_]
    input.Body.properties.spec.activeDirectory.ouDistinguishedName == STRING
    input.Body.properties.spec.activeDirectory.domainControllers.primaryDomainController.hostname == STRING
    input.Body.properties.spec.activeDirectory.domainControllers.secondaryDomainControllers[_].hostname == STRING
    input.Body.properties.spec.dns.domainName == STRING
    input.Body.properties.spec.dns.nameserverIPAddresses[_] == STRING
    input.Body.properties.spec.dns.replicas == INTEGER
    input.Body.properties.spec.dns.preferK8sDnsForPtrLookups == BOOLEAN
    input.Body.properties.status.lastUpdateTime == STRING
    input.Body.properties.status.observedGeneration == INTEGER
    input.Body.properties.status.state == STRING
    input.Body.STRING == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.dataControllerName == STRING
    input.ReqMap.activeDirectoryConnectorName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

ActiveDirectoryConnectors_Delete

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.dataControllerName == STRING
    input.ReqMap.activeDirectoryConnectorName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

ActiveDirectoryConnectors_Get

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.dataControllerName == STRING
    input.ReqMap.activeDirectoryConnectorName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

ActiveDirectoryConnectors_List

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.dataControllerName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

DataControllers_DeleteDataController

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.dataControllerName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

DataControllers_GetDataController

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.dataControllerName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

DataControllers_ListInGroup

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

DataControllers_ListInSubscription

valid {
    input.ReqMap.SubscriptionID == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

DataControllers_PatchDataController

enum_DataControllerPropertiesInfrastructure := [ "azure", "gcp", "aws", "alibaba", "onpremises", "other" ]

valid {
    input.Body.tags.STRING == STRING
    input.Body.properties.infrastructure == enum_DataControllerPropertiesInfrastructure[_]
    input.Body.properties.onPremiseProperty.id == STRING
    input.Body.properties.onPremiseProperty.publicSigningKey == STRING
    input.Body.properties.onPremiseProperty.signingCertificateThumbprint == STRING
    input.Body.properties.k8sRaw.STRING == STRING
    input.Body.properties.uploadWatermark.metrics == STRING
    input.Body.properties.uploadWatermark.logs == STRING
    input.Body.properties.uploadWatermark.usages == STRING
    input.Body.properties.lastUploadedDate == STRING
    input.Body.properties.basicLoginInformation.username == STRING
    input.Body.properties.basicLoginInformation.password == STRING
    input.Body.properties.metricsDashboardCredential.username == STRING
    input.Body.properties.metricsDashboardCredential.password == STRING
    input.Body.properties.logsDashboardCredential.username == STRING
    input.Body.properties.logsDashboardCredential.password == STRING
    input.Body.properties.logAnalyticsWorkspaceConfig.workspaceId == STRING
    input.Body.properties.logAnalyticsWorkspaceConfig.primaryKey == STRING
    input.Body.properties.uploadServicePrincipal.clientId == STRING
    input.Body.properties.uploadServicePrincipal.tenantId == STRING
    input.Body.properties.uploadServicePrincipal.authority == STRING
    input.Body.properties.uploadServicePrincipal.clientSecret == STRING
    input.Body.properties.clusterId == STRING
    input.Body.properties.extensionId == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.dataControllerName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

DataControllers_PutDataController

enum_DataControllerPropertiesInfrastructure := [ "azure", "gcp", "aws", "alibaba", "onpremises", "other" ]
enum_ExtendedLocationType := [ "CustomLocation" ]

valid {
    input.Body.extendedLocation.name == STRING
    input.Body.extendedLocation.type == enum_ExtendedLocationType[_]
    input.Body.properties.infrastructure == enum_DataControllerPropertiesInfrastructure[_]
    input.Body.properties.onPremiseProperty.id == STRING
    input.Body.properties.onPremiseProperty.publicSigningKey == STRING
    input.Body.properties.onPremiseProperty.signingCertificateThumbprint == STRING
    input.Body.properties.k8sRaw.STRING == STRING
    input.Body.properties.uploadWatermark.metrics == STRING
    input.Body.properties.uploadWatermark.logs == STRING
    input.Body.properties.uploadWatermark.usages == STRING
    input.Body.properties.lastUploadedDate == STRING
    input.Body.properties.basicLoginInformation.username == STRING
    input.Body.properties.basicLoginInformation.password == STRING
    input.Body.properties.metricsDashboardCredential.username == STRING
    input.Body.properties.metricsDashboardCredential.password == STRING
    input.Body.properties.logsDashboardCredential.username == STRING
    input.Body.properties.logsDashboardCredential.password == STRING
    input.Body.properties.logAnalyticsWorkspaceConfig.workspaceId == STRING
    input.Body.properties.logAnalyticsWorkspaceConfig.primaryKey == STRING
    input.Body.properties.uploadServicePrincipal.clientId == STRING
    input.Body.properties.uploadServicePrincipal.tenantId == STRING
    input.Body.properties.uploadServicePrincipal.authority == STRING
    input.Body.properties.uploadServicePrincipal.clientSecret == STRING
    input.Body.properties.clusterId == STRING
    input.Body.properties.extensionId == STRING
    input.Body.tags.STRING == STRING
    input.Body.location == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.dataControllerName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

FailoverGroups_Create

enum_FailoverGroupSpecPartnerSyncMode := [ "async", "sync" ]
enum_FailoverGroupSpecRole := [ "primary", "secondary", "force-primary-allow-data-loss", "force-secondary" ]

valid {
    input.Body.properties.partnerManagedInstanceId == STRING
    input.Body.properties.spec.sharedName == STRING
    input.Body.properties.spec.sourceMI == STRING
    input.Body.properties.spec.partnerMI == STRING
    input.Body.properties.spec.partnerMirroringURL == STRING
    input.Body.properties.spec.partnerMirroringCert == STRING
    input.Body.properties.spec.partnerSyncMode == enum_FailoverGroupSpecPartnerSyncMode[_]
    input.Body.properties.spec.role == enum_FailoverGroupSpecRole[_]
    input.Body.properties.status.STRING == STRING
    input.Body.STRING == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlManagedInstanceName == STRING
    input.ReqMap.failoverGroupName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

FailoverGroups_Delete

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlManagedInstanceName == STRING
    input.ReqMap.failoverGroupName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

FailoverGroups_Get

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlManagedInstanceName == STRING
    input.ReqMap.failoverGroupName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

FailoverGroups_List

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlManagedInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Operations_List

valid {
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

PostgresInstances_Create

enum_ExtendedLocationType := [ "CustomLocation" ]
enum_PostgresInstanceSkuTier := [ "Hyperscale" ]

valid {
    input.Body.extendedLocation.name == STRING
    input.Body.extendedLocation.type == enum_ExtendedLocationType[_]
    input.Body.properties.dataControllerId == STRING
    input.Body.properties.admin == STRING
    input.Body.properties.basicLoginInformation.username == STRING
    input.Body.properties.basicLoginInformation.password == STRING
    input.Body.properties.k8sRaw.STRING == STRING
    input.Body.properties.lastUploadedDate == STRING
    input.Body.sku.tier == enum_PostgresInstanceSkuTier[_]
    input.Body.sku.name == STRING
    input.Body.sku.dev == BOOLEAN
    input.Body.sku.size == STRING
    input.Body.sku.family == STRING
    input.Body.sku.capacity == INTEGER
    input.Body.tags.STRING == STRING
    input.Body.location == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.postgresInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

PostgresInstances_Delete

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.postgresInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

PostgresInstances_Get

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.postgresInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

PostgresInstances_List

valid {
    input.ReqMap.SubscriptionID == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

PostgresInstances_ListByResourceGroup

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

PostgresInstances_Update

valid {
    input.Body.tags.STRING == STRING
    input.Body.properties.dataControllerId == STRING
    input.Body.properties.admin == STRING
    input.Body.properties.basicLoginInformation.username == STRING
    input.Body.properties.basicLoginInformation.password == STRING
    input.Body.properties.k8sRaw.STRING == STRING
    input.Body.properties.lastUploadedDate == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.postgresInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlManagedInstances_Create

enum_ExtendedLocationType := [ "CustomLocation" ]
enum_SqlManagedInstancePropertiesLicenseType := [ "BasePrice", "LicenseIncluded", "DisasterRecovery" ]
enum_SqlManagedInstanceSkuName := [ "vCore" ]
enum_SqlManagedInstanceSkuTier := [ "GeneralPurpose", "BusinessCritical" ]

valid {
    input.Body.properties.dataControllerId == STRING
    input.Body.properties.admin == STRING
    input.Body.properties.startTime == STRING
    input.Body.properties.endTime == STRING
    input.Body.properties.k8sRaw.spec.scheduling.default.resources.requests.STRING == STRING
    input.Body.properties.k8sRaw.spec.scheduling.default.resources.limits.STRING == STRING
    input.Body.properties.k8sRaw.spec.replicas == INTEGER
    input.Body.properties.k8sRaw.spec.security.adminLoginSecret == STRING
    input.Body.properties.k8sRaw.spec.security.serviceCertificateSecret == STRING
    input.Body.properties.k8sRaw.spec.security.activeDirectory.connector.name == STRING
    input.Body.properties.k8sRaw.spec.security.activeDirectory.connector.namespace == STRING
    input.Body.properties.k8sRaw.spec.security.activeDirectory.accountName == STRING
    input.Body.properties.k8sRaw.spec.security.activeDirectory.keytabSecret == STRING
    input.Body.properties.k8sRaw.spec.security.activeDirectory.encryptionTypes[_] == STRING
    input.Body.properties.k8sRaw.spec.security.transparentDataEncryption.mode == STRING
    input.Body.properties.k8sRaw.spec.security.transparentDataEncryption.protectorSecret == STRING
    input.Body.properties.k8sRaw.spec.settings.network.forceencryption == INTEGER
    input.Body.properties.k8sRaw.spec.settings.network.tlsciphers == STRING
    input.Body.properties.k8sRaw.spec.settings.network.tlsprotocols == STRING
    input.Body.properties.basicLoginInformation.username == STRING
    input.Body.properties.basicLoginInformation.password == STRING
    input.Body.properties.lastUploadedDate == STRING
    input.Body.properties.activeDirectoryInformation.keytabInformation.keytab == STRING
    input.Body.properties.licenseType == enum_SqlManagedInstancePropertiesLicenseType[_]
    input.Body.properties.clusterId == STRING
    input.Body.properties.extensionId == STRING
    input.Body.extendedLocation.name == STRING
    input.Body.extendedLocation.type == enum_ExtendedLocationType[_]
    input.Body.sku.name == enum_SqlManagedInstanceSkuName[_]
    input.Body.sku.tier == enum_SqlManagedInstanceSkuTier[_]
    input.Body.sku.dev == BOOLEAN
    input.Body.sku.size == STRING
    input.Body.sku.family == STRING
    input.Body.sku.capacity == INTEGER
    input.Body.tags.STRING == STRING
    input.Body.location == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlManagedInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlManagedInstances_Delete

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlManagedInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlManagedInstances_Get

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlManagedInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlManagedInstances_List

valid {
    input.ReqMap.SubscriptionID == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

SqlManagedInstances_ListByResourceGroup

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlManagedInstances_Update

valid {
    input.Body.tags.STRING == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlManagedInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerAvailabilityGroups_Create

valid {
    input.Body.properties.info.failureConditionLevel == INTEGER
    input.Body.properties.info.healthCheckTimeout == INTEGER
    input.Body.properties.info.basicFeatures == BOOLEAN
    input.Body.properties.info.dtcSupport == BOOLEAN
    input.Body.properties.info.dbFailover == BOOLEAN
    input.Body.properties.info.isDistributed == BOOLEAN
    input.Body.properties.info.requiredSynchronizedSecondariesToCommit == INTEGER
    input.Body.properties.info.isContained == BOOLEAN
    input.Body.properties.replicas.value[_].replicaName == STRING
    input.Body.properties.replicas.value[_].configure.endpointUrl == STRING
    input.Body.properties.replicas.value[_].configure.sessionTimeout == INTEGER
    input.Body.properties.replicas.value[_].configure.backupPriority == INTEGER
    input.Body.properties.replicas.value[_].configure.readOnlyRoutingUrl == STRING
    input.Body.properties.replicas.value[_].configure.readWriteRoutingUrl == STRING
    input.Body.properties.replicas.value[_].state == {}
    input.Body.properties.databases.value[_].databaseName == STRING
    input.Body.tags.STRING == STRING
    input.Body.location == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.ReqMap.availabilityGroupName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerAvailabilityGroups_Delete

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.ReqMap.availabilityGroupName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerAvailabilityGroups_DetailView

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.ReqMap.availabilityGroupName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerAvailabilityGroups_Failover

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.ReqMap.availabilityGroupName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerAvailabilityGroups_ForceFailoverAllowDataLoss

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.ReqMap.availabilityGroupName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerAvailabilityGroups_Get

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.ReqMap.availabilityGroupName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerAvailabilityGroups_List

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerAvailabilityGroups_Update

valid {
    input.Body.tags.STRING == STRING
    input.Body.properties.info.failureConditionLevel == INTEGER
    input.Body.properties.info.healthCheckTimeout == INTEGER
    input.Body.properties.info.basicFeatures == BOOLEAN
    input.Body.properties.info.dtcSupport == BOOLEAN
    input.Body.properties.info.dbFailover == BOOLEAN
    input.Body.properties.info.isDistributed == BOOLEAN
    input.Body.properties.info.requiredSynchronizedSecondariesToCommit == INTEGER
    input.Body.properties.info.isContained == BOOLEAN
    input.Body.properties.replicas.value[_].replicaName == STRING
    input.Body.properties.replicas.value[_].configure.endpointUrl == STRING
    input.Body.properties.replicas.value[_].configure.sessionTimeout == INTEGER
    input.Body.properties.replicas.value[_].configure.backupPriority == INTEGER
    input.Body.properties.replicas.value[_].configure.readOnlyRoutingUrl == STRING
    input.Body.properties.replicas.value[_].configure.readWriteRoutingUrl == STRING
    input.Body.properties.replicas.value[_].state == {}
    input.Body.properties.databases.value[_].databaseName == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.ReqMap.availabilityGroupName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerDatabases_Create

enum_BackupPolicyDifferentialBackupHours := [ 12, 24 ]
enum_SqlServerDatabaseResourcePropertiesCreateMode := [ "Default", "PointInTimeRestore" ]
enum_SqlServerDatabaseResourcePropertiesRecoveryMode := [ "Full", "Bulk-logged", "Simple" ]
enum_SqlServerDatabaseResourcePropertiesState := [ "Online", "Restoring", "Recovering", "RecoveryPending", "Suspect", "Emergency", "Offline", "Copying", "OfflineSecondary" ]

valid {
    input.Body.properties.collationName == STRING
    input.Body.properties.databaseCreationDate == STRING
    input.Body.properties.compatibilityLevel == INTEGER
    input.Body.properties.sizeMB == NUMBER
    input.Body.properties.spaceAvailableMB == NUMBER
    input.Body.properties.state == enum_SqlServerDatabaseResourcePropertiesState[_]
    input.Body.properties.isReadOnly == BOOLEAN
    input.Body.properties.recoveryMode == enum_SqlServerDatabaseResourcePropertiesRecoveryMode[_]
    input.Body.properties.databaseOptions.isAutoCloseOn == BOOLEAN
    input.Body.properties.databaseOptions.isAutoShrinkOn == BOOLEAN
    input.Body.properties.databaseOptions.isAutoCreateStatsOn == BOOLEAN
    input.Body.properties.databaseOptions.isAutoUpdateStatsOn == BOOLEAN
    input.Body.properties.databaseOptions.isRemoteDataArchiveEnabled == BOOLEAN
    input.Body.properties.databaseOptions.isMemoryOptimizationEnabled == BOOLEAN
    input.Body.properties.databaseOptions.isEncrypted == BOOLEAN
    input.Body.properties.databaseOptions.isTrustworthyOn == BOOLEAN
    input.Body.properties.backupInformation.lastFullBackup == STRING
    input.Body.properties.backupInformation.lastLogBackup == STRING
    input.Body.properties.backupPolicy.retentionPeriodDays == INTEGER
    input.Body.properties.backupPolicy.fullBackupDays == INTEGER
    input.Body.properties.backupPolicy.differentialBackupHours == enum_BackupPolicyDifferentialBackupHours[_]
    input.Body.properties.backupPolicy.transactionLogBackupMinutes == INTEGER
    input.Body.properties.createMode == enum_SqlServerDatabaseResourcePropertiesCreateMode[_]
    input.Body.properties.sourceDatabaseId == STRING
    input.Body.properties.restorePointInTime == STRING
    input.Body.tags.STRING == STRING
    input.Body.location == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.ReqMap.databaseName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerDatabases_Delete

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.ReqMap.databaseName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerDatabases_Get

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.ReqMap.databaseName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerDatabases_List

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerDatabases_Update

enum_BackupPolicyDifferentialBackupHours := [ 12, 24 ]
enum_SqlServerDatabaseResourcePropertiesCreateMode := [ "Default", "PointInTimeRestore" ]
enum_SqlServerDatabaseResourcePropertiesRecoveryMode := [ "Full", "Bulk-logged", "Simple" ]
enum_SqlServerDatabaseResourcePropertiesState := [ "Online", "Restoring", "Recovering", "RecoveryPending", "Suspect", "Emergency", "Offline", "Copying", "OfflineSecondary" ]

valid {
    input.Body.tags.STRING == STRING
    input.Body.properties.collationName == STRING
    input.Body.properties.databaseCreationDate == STRING
    input.Body.properties.compatibilityLevel == INTEGER
    input.Body.properties.sizeMB == NUMBER
    input.Body.properties.spaceAvailableMB == NUMBER
    input.Body.properties.state == enum_SqlServerDatabaseResourcePropertiesState[_]
    input.Body.properties.isReadOnly == BOOLEAN
    input.Body.properties.recoveryMode == enum_SqlServerDatabaseResourcePropertiesRecoveryMode[_]
    input.Body.properties.databaseOptions.isAutoCloseOn == BOOLEAN
    input.Body.properties.databaseOptions.isAutoShrinkOn == BOOLEAN
    input.Body.properties.databaseOptions.isAutoCreateStatsOn == BOOLEAN
    input.Body.properties.databaseOptions.isAutoUpdateStatsOn == BOOLEAN
    input.Body.properties.databaseOptions.isRemoteDataArchiveEnabled == BOOLEAN
    input.Body.properties.databaseOptions.isMemoryOptimizationEnabled == BOOLEAN
    input.Body.properties.databaseOptions.isEncrypted == BOOLEAN
    input.Body.properties.databaseOptions.isTrustworthyOn == BOOLEAN
    input.Body.properties.backupInformation.lastFullBackup == STRING
    input.Body.properties.backupInformation.lastLogBackup == STRING
    input.Body.properties.backupPolicy.retentionPeriodDays == INTEGER
    input.Body.properties.backupPolicy.fullBackupDays == INTEGER
    input.Body.properties.backupPolicy.differentialBackupHours == enum_BackupPolicyDifferentialBackupHours[_]
    input.Body.properties.backupPolicy.transactionLogBackupMinutes == INTEGER
    input.Body.properties.createMode == enum_SqlServerDatabaseResourcePropertiesCreateMode[_]
    input.Body.properties.sourceDatabaseId == STRING
    input.Body.properties.restorePointInTime == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.ReqMap.databaseName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerInstances_Create

enum_BackupPolicyDifferentialBackupHours := [ 12, 24 ]
enum_SqlServerInstancePropertiesEdition := [ "Evaluation", "Enterprise", "Standard", "Web", "Developer", "Express", "Business Intelligence" ]
enum_SqlServerInstancePropertiesHostType := [ "Azure Virtual Machine", "Azure VMWare Virtual Machine", "Azure Kubernetes Service", "AWS VMWare Virtual Machine", "AWS Kubernetes Service", "GCP VMWare Virtual Machine", "GCP Kubernetes Service", "Container", "Virtual Machine", "Physical Server", "AWS Virtual Machine", "GCP Virtual Machine", "Other" ]
enum_SqlServerInstancePropertiesVersion := [ "SQL Server 2012", "SQL Server 2014", "SQL Server 2016", "SQL Server 2017", "SQL Server 2019", "SQL Server 2022", "Unknown" ]

valid {
    input.Body.properties.version == enum_SqlServerInstancePropertiesVersion[_]
    input.Body.properties.edition == enum_SqlServerInstancePropertiesEdition[_]
    input.Body.properties.cores == STRING
    input.Body.properties.instanceName == STRING
    input.Body.properties.hostType == enum_SqlServerInstancePropertiesHostType[_]
    input.Body.properties.failoverCluster == {}
    input.Body.properties.backupPolicy.retentionPeriodDays == INTEGER
    input.Body.properties.backupPolicy.fullBackupDays == INTEGER
    input.Body.properties.backupPolicy.differentialBackupHours == enum_BackupPolicyDifferentialBackupHours[_]
    input.Body.properties.backupPolicy.transactionLogBackupMinutes == INTEGER
    input.Body.properties.upgradeLockedUntil == STRING
    input.Body.properties.monitoring.enabled == BOOLEAN
    input.Body.tags.STRING == STRING
    input.Body.location == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerInstances_Delete

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerInstances_Get

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerInstances_List

valid {
    input.ReqMap.SubscriptionID == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

SqlServerInstances_ListByResourceGroup

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerInstances_Update

enum_BackupPolicyDifferentialBackupHours := [ 12, 24 ]
enum_SqlServerInstanceUpdatePropertiesEdition := [ "Evaluation", "Enterprise", "Standard", "Web", "Developer", "Express", "Business Intelligence" ]
enum_SqlServerInstanceUpdatePropertiesHostType := [ "Azure Virtual Machine", "Azure VMWare Virtual Machine", "Azure Kubernetes Service", "AWS VMWare Virtual Machine", "AWS Kubernetes Service", "GCP VMWare Virtual Machine", "GCP Kubernetes Service", "Container", "Virtual Machine", "Physical Server", "AWS Virtual Machine", "GCP Virtual Machine", "Other" ]
enum_SqlServerInstanceUpdatePropertiesVersion := [ "SQL Server 2012", "SQL Server 2014", "SQL Server 2016", "SQL Server 2017", "SQL Server 2019", "SQL Server 2022", "Unknown" ]

valid {
    input.Body.tags.STRING == STRING
    input.Body.properties.version == enum_SqlServerInstanceUpdatePropertiesVersion[_]
    input.Body.properties.edition == enum_SqlServerInstanceUpdatePropertiesEdition[_]
    input.Body.properties.cores == STRING
    input.Body.properties.instanceName == STRING
    input.Body.properties.hostType == enum_SqlServerInstanceUpdatePropertiesHostType[_]
    input.Body.properties.failoverCluster == {}
    input.Body.properties.backupPolicy.retentionPeriodDays == INTEGER
    input.Body.properties.backupPolicy.fullBackupDays == INTEGER
    input.Body.properties.backupPolicy.differentialBackupHours == enum_BackupPolicyDifferentialBackupHours[_]
    input.Body.properties.backupPolicy.transactionLogBackupMinutes == INTEGER
    input.Body.properties.upgradeLockedUntil == STRING
    input.Body.properties.monitoring.enabled == BOOLEAN
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

SqlServerInstances_getTelemetry

enum_SqlServerInstanceTelemetryRequestAggregationType := [ "Average", "Minimum", "Maximum", "Sum", "Count" ]

valid {
    input.Body.datasetName == STRING
    input.Body.startTime == STRING
    input.Body.endTime == STRING
    input.Body.interval == STRING
    input.Body.aggregationType == enum_SqlServerInstanceTelemetryRequestAggregationType[_]
    input.Body.databaseNames[_] == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.sqlServerInstanceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}