MICROSOFT.SCHEDULER

JobCollections_CreateOrUpdate

enum_JobCollectionPropertiesState := [ "Enabled", "Disabled", "Suspended", "Deleted" ]
enum_JobMaxRecurrenceFrequency := [ "Minute", "Hour", "Day", "Week", "Month" ]
enum_SkuName := [ "Standard", "Free", "P10Premium", "P20Premium" ]

valid {
    input.Body.name == STRING
    input.Body.location == STRING
    input.Body.tags.STRING == STRING
    input.Body.properties.sku.name == enum_SkuName[_]
    input.Body.properties.state == enum_JobCollectionPropertiesState[_]
    input.Body.properties.quota.maxJobCount == INTEGER
    input.Body.properties.quota.maxJobOccurrence == INTEGER
    input.Body.properties.quota.maxRecurrence.frequency == enum_JobMaxRecurrenceFrequency[_]
    input.Body.properties.quota.maxRecurrence.interval == INTEGER
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.jobCollectionName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

JobCollections_Delete

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

JobCollections_Disable

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

JobCollections_Enable

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

JobCollections_Get

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

JobCollections_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
}

JobCollections_ListBySubscription

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

JobCollections_Patch

enum_JobCollectionPropertiesState := [ "Enabled", "Disabled", "Suspended", "Deleted" ]
enum_JobMaxRecurrenceFrequency := [ "Minute", "Hour", "Day", "Week", "Month" ]
enum_SkuName := [ "Standard", "Free", "P10Premium", "P20Premium" ]

valid {
    input.Body.name == STRING
    input.Body.location == STRING
    input.Body.tags.STRING == STRING
    input.Body.properties.sku.name == enum_SkuName[_]
    input.Body.properties.state == enum_JobCollectionPropertiesState[_]
    input.Body.properties.quota.maxJobCount == INTEGER
    input.Body.properties.quota.maxJobOccurrence == INTEGER
    input.Body.properties.quota.maxRecurrence.frequency == enum_JobMaxRecurrenceFrequency[_]
    input.Body.properties.quota.maxRecurrence.interval == INTEGER
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.jobCollectionName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Jobs_CreateOrUpdate

enum_HttpAuthenticationType := [ "NotSpecified", "ClientCertificate", "ActiveDirectoryOAuth", "Basic" ]
enum_JobActionType := [ "Http", "Https", "StorageQueue", "ServiceBusQueue", "ServiceBusTopic" ]
enum_JobErrorActionType := [ "Http", "Https", "StorageQueue", "ServiceBusQueue", "ServiceBusTopic" ]
enum_JobRecurrenceFrequency := [ "Minute", "Hour", "Day", "Week", "Month" ]
enum_JobRecurrenceScheduleMonthlyOccurrenceDay := [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ]
enum_JobRecurrenceScheduleWeekDays := [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ]
enum_JobState := [ "Enabled", "Disabled", "Faulted", "Completed" ]
enum_RetryPolicyRetryType := [ "None", "Fixed" ]
enum_ServiceBusAuthenticationType := [ "NotSpecified", "SharedAccessKey" ]
enum_ServiceBusMessageTransportType := [ "NotSpecified", "NetMessaging", "AMQP" ]

valid {
    input.Body.properties.startTime == STRING
    input.Body.properties.action.type == enum_JobActionType[_]
    input.Body.properties.action.request.authentication.type == enum_HttpAuthenticationType[_]
    input.Body.properties.action.request.uri == STRING
    input.Body.properties.action.request.method == STRING
    input.Body.properties.action.request.body == STRING
    input.Body.properties.action.request.headers.STRING == STRING
    input.Body.properties.action.queueMessage.storageAccount == STRING
    input.Body.properties.action.queueMessage.queueName == STRING
    input.Body.properties.action.queueMessage.sasToken == STRING
    input.Body.properties.action.queueMessage.message == STRING
    input.Body.properties.action.serviceBusQueueMessage.queueName == STRING
    input.Body.properties.action.serviceBusQueueMessage.authentication.sasKey == STRING
    input.Body.properties.action.serviceBusQueueMessage.authentication.sasKeyName == STRING
    input.Body.properties.action.serviceBusQueueMessage.authentication.type == enum_ServiceBusAuthenticationType[_]
    input.Body.properties.action.serviceBusQueueMessage.brokeredMessageProperties.contentType == STRING
    input.Body.properties.action.serviceBusQueueMessage.brokeredMessageProperties.correlationId == STRING
    input.Body.properties.action.serviceBusQueueMessage.brokeredMessageProperties.forcePersistence == BOOLEAN
    input.Body.properties.action.serviceBusQueueMessage.brokeredMessageProperties.label == STRING
    input.Body.properties.action.serviceBusQueueMessage.brokeredMessageProperties.messageId == STRING
    input.Body.properties.action.serviceBusQueueMessage.brokeredMessageProperties.partitionKey == STRING
    input.Body.properties.action.serviceBusQueueMessage.brokeredMessageProperties.replyTo == STRING
    input.Body.properties.action.serviceBusQueueMessage.brokeredMessageProperties.replyToSessionId == STRING
    input.Body.properties.action.serviceBusQueueMessage.brokeredMessageProperties.scheduledEnqueueTimeUtc == STRING
    input.Body.properties.action.serviceBusQueueMessage.brokeredMessageProperties.sessionId == STRING
    input.Body.properties.action.serviceBusQueueMessage.brokeredMessageProperties.timeToLive == STRING
    input.Body.properties.action.serviceBusQueueMessage.brokeredMessageProperties.to == STRING
    input.Body.properties.action.serviceBusQueueMessage.brokeredMessageProperties.viaPartitionKey == STRING
    input.Body.properties.action.serviceBusQueueMessage.customMessageProperties.STRING == STRING
    input.Body.properties.action.serviceBusQueueMessage.message == STRING
    input.Body.properties.action.serviceBusQueueMessage.namespace == STRING
    input.Body.properties.action.serviceBusQueueMessage.transportType == enum_ServiceBusMessageTransportType[_]
    input.Body.properties.action.serviceBusTopicMessage.topicPath == STRING
    input.Body.properties.action.serviceBusTopicMessage.authentication.sasKey == STRING
    input.Body.properties.action.serviceBusTopicMessage.authentication.sasKeyName == STRING
    input.Body.properties.action.serviceBusTopicMessage.authentication.type == enum_ServiceBusAuthenticationType[_]
    input.Body.properties.action.serviceBusTopicMessage.brokeredMessageProperties.contentType == STRING
    input.Body.properties.action.serviceBusTopicMessage.brokeredMessageProperties.correlationId == STRING
    input.Body.properties.action.serviceBusTopicMessage.brokeredMessageProperties.forcePersistence == BOOLEAN
    input.Body.properties.action.serviceBusTopicMessage.brokeredMessageProperties.label == STRING
    input.Body.properties.action.serviceBusTopicMessage.brokeredMessageProperties.messageId == STRING
    input.Body.properties.action.serviceBusTopicMessage.brokeredMessageProperties.partitionKey == STRING
    input.Body.properties.action.serviceBusTopicMessage.brokeredMessageProperties.replyTo == STRING
    input.Body.properties.action.serviceBusTopicMessage.brokeredMessageProperties.replyToSessionId == STRING
    input.Body.properties.action.serviceBusTopicMessage.brokeredMessageProperties.scheduledEnqueueTimeUtc == STRING
    input.Body.properties.action.serviceBusTopicMessage.brokeredMessageProperties.sessionId == STRING
    input.Body.properties.action.serviceBusTopicMessage.brokeredMessageProperties.timeToLive == STRING
    input.Body.properties.action.serviceBusTopicMessage.brokeredMessageProperties.to == STRING
    input.Body.properties.action.serviceBusTopicMessage.brokeredMessageProperties.viaPartitionKey == STRING
    input.Body.properties.action.serviceBusTopicMessage.customMessageProperties.STRING == STRING
    input.Body.properties.action.serviceBusTopicMessage.message == STRING
    input.Body.properties.action.serviceBusTopicMessage.namespace == STRING
    input.Body.properties.action.serviceBusTopicMessage.transportType == enum_ServiceBusMessageTransportType[_]
    input.Body.properties.action.retryPolicy.retryType == enum_RetryPolicyRetryType[_]
    input.Body.properties.action.retryPolicy.retryInterval == STRING
    input.Body.properties.action.retryPolicy.retryCount == INTEGER
    input.Body.properties.action.errorAction.type == enum_JobErrorActionType[_]
    input.Body.properties.action.errorAction.request.authentication.type == enum_HttpAuthenticationType[_]
    input.Body.properties.action.errorAction.request.uri == STRING
    input.Body.properties.action.errorAction.request.method == STRING
    input.Body.properties.action.errorAction.request.body == STRING
    input.Body.properties.action.errorAction.request.headers.STRING == STRING
    input.Body.properties.action.errorAction.queueMessage.storageAccount == STRING
    input.Body.properties.action.errorAction.queueMessage.queueName == STRING
    input.Body.properties.action.errorAction.queueMessage.sasToken == STRING
    input.Body.properties.action.errorAction.queueMessage.message == STRING
    input.Body.properties.action.errorAction.serviceBusQueueMessage.queueName == STRING
    input.Body.properties.action.errorAction.serviceBusTopicMessage.topicPath == STRING
    input.Body.properties.action.errorAction.retryPolicy.retryType == enum_RetryPolicyRetryType[_]
    input.Body.properties.action.errorAction.retryPolicy.retryInterval == STRING
    input.Body.properties.action.errorAction.retryPolicy.retryCount == INTEGER
    input.Body.properties.recurrence.frequency == enum_JobRecurrenceFrequency[_]
    input.Body.properties.recurrence.interval == INTEGER
    input.Body.properties.recurrence.count == INTEGER
    input.Body.properties.recurrence.endTime == STRING
    input.Body.properties.recurrence.schedule.weekDays[_] == enum_JobRecurrenceScheduleWeekDays[_]
    input.Body.properties.recurrence.schedule.hours[_] == INTEGER
    input.Body.properties.recurrence.schedule.minutes[_] == INTEGER
    input.Body.properties.recurrence.schedule.monthDays[_] == INTEGER
    input.Body.properties.recurrence.schedule.monthlyOccurrences[_].day == enum_JobRecurrenceScheduleMonthlyOccurrenceDay[_]
    input.Body.properties.recurrence.schedule.monthlyOccurrences[_].Occurrence == INTEGER
    input.Body.properties.state == enum_JobState[_]
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.jobCollectionName == STRING
    input.ReqMap.jobName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Jobs_Delete

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

Jobs_Get

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

Jobs_List

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.jobCollectionName == STRING
    input.Qs.api-version == STRING
    input.Qs.$top == INTEGER
    input.Qs.$skip == INTEGER
    input.Qs.$filter == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Jobs_ListJobHistory

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.jobCollectionName == STRING
    input.ReqMap.jobName == STRING
    input.Qs.api-version == STRING
    input.Qs.$top == INTEGER
    input.Qs.$skip == INTEGER
    input.Qs.$filter == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Jobs_Patch

enum_HttpAuthenticationType := [ "NotSpecified", "ClientCertificate", "ActiveDirectoryOAuth", "Basic" ]
enum_JobActionType := [ "Http", "Https", "StorageQueue", "ServiceBusQueue", "ServiceBusTopic" ]
enum_JobErrorActionType := [ "Http", "Https", "StorageQueue", "ServiceBusQueue", "ServiceBusTopic" ]
enum_JobRecurrenceFrequency := [ "Minute", "Hour", "Day", "Week", "Month" ]
enum_JobRecurrenceScheduleMonthlyOccurrenceDay := [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ]
enum_JobRecurrenceScheduleWeekDays := [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ]
enum_JobState := [ "Enabled", "Disabled", "Faulted", "Completed" ]
enum_RetryPolicyRetryType := [ "None", "Fixed" ]

valid {
    input.Body.properties.startTime == STRING
    input.Body.properties.action.type == enum_JobActionType[_]
    input.Body.properties.action.request.authentication.type == enum_HttpAuthenticationType[_]
    input.Body.properties.action.request.uri == STRING
    input.Body.properties.action.request.method == STRING
    input.Body.properties.action.request.body == STRING
    input.Body.properties.action.request.headers.STRING == STRING
    input.Body.properties.action.queueMessage.storageAccount == STRING
    input.Body.properties.action.queueMessage.queueName == STRING
    input.Body.properties.action.queueMessage.sasToken == STRING
    input.Body.properties.action.queueMessage.message == STRING
    input.Body.properties.action.serviceBusQueueMessage.queueName == STRING
    input.Body.properties.action.serviceBusTopicMessage.topicPath == STRING
    input.Body.properties.action.retryPolicy.retryType == enum_RetryPolicyRetryType[_]
    input.Body.properties.action.retryPolicy.retryInterval == STRING
    input.Body.properties.action.retryPolicy.retryCount == INTEGER
    input.Body.properties.action.errorAction.type == enum_JobErrorActionType[_]
    input.Body.properties.action.errorAction.request.authentication.type == enum_HttpAuthenticationType[_]
    input.Body.properties.action.errorAction.request.uri == STRING
    input.Body.properties.action.errorAction.request.method == STRING
    input.Body.properties.action.errorAction.request.body == STRING
    input.Body.properties.action.errorAction.request.headers.STRING == STRING
    input.Body.properties.action.errorAction.queueMessage.storageAccount == STRING
    input.Body.properties.action.errorAction.queueMessage.queueName == STRING
    input.Body.properties.action.errorAction.queueMessage.sasToken == STRING
    input.Body.properties.action.errorAction.queueMessage.message == STRING
    input.Body.properties.action.errorAction.serviceBusQueueMessage.queueName == STRING
    input.Body.properties.action.errorAction.serviceBusTopicMessage.topicPath == STRING
    input.Body.properties.action.errorAction.retryPolicy.retryType == enum_RetryPolicyRetryType[_]
    input.Body.properties.action.errorAction.retryPolicy.retryInterval == STRING
    input.Body.properties.action.errorAction.retryPolicy.retryCount == INTEGER
    input.Body.properties.recurrence.frequency == enum_JobRecurrenceFrequency[_]
    input.Body.properties.recurrence.interval == INTEGER
    input.Body.properties.recurrence.count == INTEGER
    input.Body.properties.recurrence.endTime == STRING
    input.Body.properties.recurrence.schedule.weekDays[_] == enum_JobRecurrenceScheduleWeekDays[_]
    input.Body.properties.recurrence.schedule.hours[_] == INTEGER
    input.Body.properties.recurrence.schedule.minutes[_] == INTEGER
    input.Body.properties.recurrence.schedule.monthDays[_] == INTEGER
    input.Body.properties.recurrence.schedule.monthlyOccurrences[_].day == enum_JobRecurrenceScheduleMonthlyOccurrenceDay[_]
    input.Body.properties.recurrence.schedule.monthlyOccurrences[_].Occurrence == INTEGER
    input.Body.properties.state == enum_JobState[_]
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.ResourceGroup == STRING
    input.ReqMap.jobCollectionName == STRING
    input.ReqMap.jobName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
    input.ProviderMetadata.ResourceGroup == STRING
}

Jobs_Run

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