MICROSOFT.CAPACITY

AutoQuotaIncrease_Create

enum_AqiState := [ "enabled", "disabled" ]
enum_ContactMethod := [ "Email", "Phone" ]
enum_SeverityTypes := [ "Critical", "Moderate", "Minimal" ]

valid {
    input.Body.properties.settings.autoQuotaIncreaseState == enum_AqiState[_]
    input.Body.properties.onFailure.emailActions.emailAddresses[_].emailAddress == STRING
    input.Body.properties.onSuccess.emailActions.emailAddresses[_].emailAddress == STRING
    input.Body.properties.supportTicketAction.severity == enum_SeverityTypes[_]
    input.Body.properties.supportTicketAction.firstName == STRING
    input.Body.properties.supportTicketAction.lastName == STRING
    input.Body.properties.supportTicketAction.country == STRING
    input.Body.properties.supportTicketAction.phoneNumber == STRING
    input.Body.properties.supportTicketAction.primaryEmailAddress == STRING
    input.Body.properties.supportTicketAction.supportLanguage == STRING
    input.Body.properties.supportTicketAction.preferredContactMethod == enum_ContactMethod[_]
    input.Body.properties.supportTicketAction.alternateEmailAddresses[_] == STRING
    input.ReqMap.SubscriptionID == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

AutoQuotaIncrease_GetProperties

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

CalculateExchange_Post

enum_AppliedScopeType := [ "Single", "Shared", "ManagementGroup" ]
enum_BenefitTerm := [ "P1Y", "P3Y" ]
enum_BillingPlan := [ "P1M" ]
enum_CommitmentGrain := [ "Hourly" ]
enum_InstanceFlexibility := [ "On", "Off" ]
enum_ReservationBillingPlan := [ "Upfront", "Monthly" ]
enum_ReservationTerm := [ "P1Y", "P3Y", "P5Y" ]
enum_ReservedResourceType := [ "VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb", "RedHat", "SqlDataWarehouse", "VMwareCloudSimple", "RedHatOsa", "Databricks", "AppService", "ManagedDisk", "BlockBlob", "RedisCache", "AzureDataExplorer", "MySql", "MariaDb", "PostgreSql", "DedicatedHost", "SapHana", "SqlAzureHybridBenefit", "AVS", "DataFactory", "NetAppStorage", "AzureFiles", "SqlEdge", "VirtualMachineSoftware" ]

valid {
    input.Body.properties.reservationsToPurchase[_].sku.name == STRING
    input.Body.properties.reservationsToPurchase[_].location == STRING
    input.Body.properties.reservationsToPurchase[_].properties.reservedResourceType == enum_ReservedResourceType[_]
    input.Body.properties.reservationsToPurchase[_].properties.billingScopeId == STRING
    input.Body.properties.reservationsToPurchase[_].properties.term == enum_ReservationTerm[_]
    input.Body.properties.reservationsToPurchase[_].properties.billingPlan == enum_ReservationBillingPlan[_]
    input.Body.properties.reservationsToPurchase[_].properties.quantity == INTEGER
    input.Body.properties.reservationsToPurchase[_].properties.displayName == STRING
    input.Body.properties.reservationsToPurchase[_].properties.appliedScopeType == enum_AppliedScopeType[_]
    input.Body.properties.reservationsToPurchase[_].properties.appliedScopes[_] == STRING
    input.Body.properties.reservationsToPurchase[_].properties.appliedScopeProperties.tenantId == STRING
    input.Body.properties.reservationsToPurchase[_].properties.appliedScopeProperties.managementGroupId == STRING
    input.Body.properties.reservationsToPurchase[_].properties.appliedScopeProperties.subscriptionId == STRING
    input.Body.properties.reservationsToPurchase[_].properties.appliedScopeProperties.resourceGroupId == STRING
    input.Body.properties.reservationsToPurchase[_].properties.appliedScopeProperties.displayName == STRING
    input.Body.properties.reservationsToPurchase[_].properties.renew == BOOLEAN
    input.Body.properties.reservationsToPurchase[_].properties.reservedResourceProperties.instanceFlexibility == enum_InstanceFlexibility[_]
    input.Body.properties.reservationsToPurchase[_].properties.reviewDateTime == STRING
    input.Body.properties.savingsPlansToPurchase[_].sku.name == STRING
    input.Body.properties.savingsPlansToPurchase[_].properties.displayName == STRING
    input.Body.properties.savingsPlansToPurchase[_].properties.billingScopeId == STRING
    input.Body.properties.savingsPlansToPurchase[_].properties.term == enum_BenefitTerm[_]
    input.Body.properties.savingsPlansToPurchase[_].properties.billingPlan == enum_BillingPlan[_]
    input.Body.properties.savingsPlansToPurchase[_].properties.appliedScopeType == enum_AppliedScopeType[_]
    input.Body.properties.savingsPlansToPurchase[_].properties.appliedScopeProperties.tenantId == STRING
    input.Body.properties.savingsPlansToPurchase[_].properties.appliedScopeProperties.managementGroupId == STRING
    input.Body.properties.savingsPlansToPurchase[_].properties.appliedScopeProperties.subscriptionId == STRING
    input.Body.properties.savingsPlansToPurchase[_].properties.appliedScopeProperties.resourceGroupId == STRING
    input.Body.properties.savingsPlansToPurchase[_].properties.appliedScopeProperties.displayName == STRING
    input.Body.properties.savingsPlansToPurchase[_].properties.commitment.grain == enum_CommitmentGrain[_]
    input.Body.properties.savingsPlansToPurchase[_].properties.commitment.currencyCode == STRING
    input.Body.properties.savingsPlansToPurchase[_].properties.commitment.amount == NUMBER
    input.Body.properties.reservationsToExchange[_].reservationId == STRING
    input.Body.properties.reservationsToExchange[_].quantity == INTEGER
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

CalculateRefund_Post

valid {
    input.Body.id == STRING
    input.Body.properties.scope == STRING
    input.Body.properties.reservationToReturn.reservationId == STRING
    input.Body.properties.reservationToReturn.quantity == INTEGER
    input.ReqMap.reservationOrderId == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

Exchange_Post

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

GetAppliedReservationList

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

GetCatalog

valid {
    input.ReqMap.SubscriptionID == STRING
    input.Qs.api-version == STRING
    input.Qs.reservedResourceType == STRING
    input.Qs.location == STRING
    input.Qs.publisherId == STRING
    input.Qs.offerId == STRING
    input.Qs.planId == STRING
    input.Qs.$filter == STRING
    input.Qs.$skip == NUMBER
    input.Qs.$take == NUMBER
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

Operation_List

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

QuotaRequestStatus_Get

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

QuotaRequestStatus_List

valid {
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.providerId == STRING
    input.ReqMap.location == STRING
    input.Qs.api-version == STRING
    input.Qs.$filter == STRING
    input.Qs.$top == INTEGER
    input.Qs.$skiptoken == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

Quota_CreateOrUpdate

enum_ResourceTypesName := [ "standard", "dedicated", "lowPriority", "shared", "serviceSpecific" ]

valid {
    input.Body.properties.limit == INTEGER
    input.Body.properties.unit == STRING
    input.Body.properties.name.value == STRING
    input.Body.properties.resourceType == enum_ResourceTypesName[_]
    input.Body.properties.properties.STRING == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.providerId == STRING
    input.ReqMap.location == STRING
    input.ReqMap.resourceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

Quota_Get

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

Quota_List

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

Quota_Update

enum_ResourceTypesName := [ "standard", "dedicated", "lowPriority", "shared", "serviceSpecific" ]

valid {
    input.Body.properties.limit == INTEGER
    input.Body.properties.unit == STRING
    input.Body.properties.name.value == STRING
    input.Body.properties.resourceType == enum_ResourceTypesName[_]
    input.Body.properties.properties.STRING == STRING
    input.ReqMap.SubscriptionID == STRING
    input.ReqMap.providerId == STRING
    input.ReqMap.location == STRING
    input.ReqMap.resourceName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

ReservationOrder_Calculate

enum_AppliedScopeType := [ "Single", "Shared", "ManagementGroup" ]
enum_InstanceFlexibility := [ "On", "Off" ]
enum_ReservationBillingPlan := [ "Upfront", "Monthly" ]
enum_ReservationTerm := [ "P1Y", "P3Y", "P5Y" ]
enum_ReservedResourceType := [ "VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb", "RedHat", "SqlDataWarehouse", "VMwareCloudSimple", "RedHatOsa", "Databricks", "AppService", "ManagedDisk", "BlockBlob", "RedisCache", "AzureDataExplorer", "MySql", "MariaDb", "PostgreSql", "DedicatedHost", "SapHana", "SqlAzureHybridBenefit", "AVS", "DataFactory", "NetAppStorage", "AzureFiles", "SqlEdge", "VirtualMachineSoftware" ]

valid {
    input.Body.sku.name == STRING
    input.Body.location == STRING
    input.Body.properties.reservedResourceType == enum_ReservedResourceType[_]
    input.Body.properties.billingScopeId == STRING
    input.Body.properties.term == enum_ReservationTerm[_]
    input.Body.properties.billingPlan == enum_ReservationBillingPlan[_]
    input.Body.properties.quantity == INTEGER
    input.Body.properties.displayName == STRING
    input.Body.properties.appliedScopeType == enum_AppliedScopeType[_]
    input.Body.properties.appliedScopes[_] == STRING
    input.Body.properties.appliedScopeProperties.tenantId == STRING
    input.Body.properties.appliedScopeProperties.managementGroupId == STRING
    input.Body.properties.appliedScopeProperties.subscriptionId == STRING
    input.Body.properties.appliedScopeProperties.resourceGroupId == STRING
    input.Body.properties.appliedScopeProperties.displayName == STRING
    input.Body.properties.renew == BOOLEAN
    input.Body.properties.reservedResourceProperties.instanceFlexibility == enum_InstanceFlexibility[_]
    input.Body.properties.reviewDateTime == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

ReservationOrder_ChangeDirectory

valid {
    input.Body.destinationTenantId == STRING
    input.ReqMap.reservationOrderId == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

ReservationOrder_Get

valid {
    input.ReqMap.reservationOrderId == STRING
    input.Qs.api-version == STRING
    input.Qs.$expand == STRING
    input.ProviderMetadata.Region == STRING
}

ReservationOrder_List

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

ReservationOrder_Purchase

enum_AppliedScopeType := [ "Single", "Shared", "ManagementGroup" ]
enum_InstanceFlexibility := [ "On", "Off" ]
enum_ReservationBillingPlan := [ "Upfront", "Monthly" ]
enum_ReservationTerm := [ "P1Y", "P3Y", "P5Y" ]
enum_ReservedResourceType := [ "VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb", "RedHat", "SqlDataWarehouse", "VMwareCloudSimple", "RedHatOsa", "Databricks", "AppService", "ManagedDisk", "BlockBlob", "RedisCache", "AzureDataExplorer", "MySql", "MariaDb", "PostgreSql", "DedicatedHost", "SapHana", "SqlAzureHybridBenefit", "AVS", "DataFactory", "NetAppStorage", "AzureFiles", "SqlEdge", "VirtualMachineSoftware" ]

valid {
    input.Body.sku.name == STRING
    input.Body.location == STRING
    input.Body.properties.reservedResourceType == enum_ReservedResourceType[_]
    input.Body.properties.billingScopeId == STRING
    input.Body.properties.term == enum_ReservationTerm[_]
    input.Body.properties.billingPlan == enum_ReservationBillingPlan[_]
    input.Body.properties.quantity == INTEGER
    input.Body.properties.displayName == STRING
    input.Body.properties.appliedScopeType == enum_AppliedScopeType[_]
    input.Body.properties.appliedScopes[_] == STRING
    input.Body.properties.appliedScopeProperties.tenantId == STRING
    input.Body.properties.appliedScopeProperties.managementGroupId == STRING
    input.Body.properties.appliedScopeProperties.subscriptionId == STRING
    input.Body.properties.appliedScopeProperties.resourceGroupId == STRING
    input.Body.properties.appliedScopeProperties.displayName == STRING
    input.Body.properties.renew == BOOLEAN
    input.Body.properties.reservedResourceProperties.instanceFlexibility == enum_InstanceFlexibility[_]
    input.Body.properties.reviewDateTime == STRING
    input.ReqMap.reservationOrderId == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

Reservation_Archive

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

Reservation_AvailableScopes

valid {
    input.Body.properties.scopes[_] == STRING
    input.ReqMap.reservationOrderId == STRING
    input.ReqMap.reservationId == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

Reservation_Get

valid {
    input.ReqMap.reservationOrderId == STRING
    input.ReqMap.reservationId == STRING
    input.Qs.api-version == STRING
    input.Qs.$expand == STRING
    input.ProviderMetadata.Region == STRING
}

Reservation_List

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

Reservation_ListAll

valid {
    input.Qs.api-version == STRING
    input.Qs.$filter == STRING
    input.Qs.$orderby == STRING
    input.Qs.refreshSummary == STRING
    input.Qs.$skiptoken == NUMBER
    input.Qs.selectedState == STRING
    input.Qs.take == NUMBER
    input.ProviderMetadata.Region == STRING
}

Reservation_ListRevisions

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

Reservation_Merge

valid {
    input.Body.properties.sources[_] == STRING
    input.ReqMap.reservationOrderId == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

Reservation_Split

valid {
    input.Body.properties.quantities[_] == INTEGER
    input.Body.properties.reservationId == STRING
    input.ReqMap.reservationOrderId == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

Reservation_Unarchive

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

Reservation_Update

enum_AppliedScopeType := [ "Single", "Shared", "ManagementGroup" ]
enum_InstanceFlexibility := [ "On", "Off" ]
enum_ReservationBillingPlan := [ "Upfront", "Monthly" ]
enum_ReservationTerm := [ "P1Y", "P3Y", "P5Y" ]
enum_ReservedResourceType := [ "VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb", "RedHat", "SqlDataWarehouse", "VMwareCloudSimple", "RedHatOsa", "Databricks", "AppService", "ManagedDisk", "BlockBlob", "RedisCache", "AzureDataExplorer", "MySql", "MariaDb", "PostgreSql", "DedicatedHost", "SapHana", "SqlAzureHybridBenefit", "AVS", "DataFactory", "NetAppStorage", "AzureFiles", "SqlEdge", "VirtualMachineSoftware" ]

valid {
    input.Body.properties.appliedScopeType == enum_AppliedScopeType[_]
    input.Body.properties.appliedScopes[_] == STRING
    input.Body.properties.appliedScopeProperties.tenantId == STRING
    input.Body.properties.appliedScopeProperties.managementGroupId == STRING
    input.Body.properties.appliedScopeProperties.subscriptionId == STRING
    input.Body.properties.appliedScopeProperties.resourceGroupId == STRING
    input.Body.properties.appliedScopeProperties.displayName == STRING
    input.Body.properties.instanceFlexibility == enum_InstanceFlexibility[_]
    input.Body.properties.name == STRING
    input.Body.properties.renew == BOOLEAN
    input.Body.properties.renewProperties.purchaseProperties.sku.name == STRING
    input.Body.properties.renewProperties.purchaseProperties.location == STRING
    input.Body.properties.renewProperties.purchaseProperties.properties.reservedResourceType == enum_ReservedResourceType[_]
    input.Body.properties.renewProperties.purchaseProperties.properties.billingScopeId == STRING
    input.Body.properties.renewProperties.purchaseProperties.properties.term == enum_ReservationTerm[_]
    input.Body.properties.renewProperties.purchaseProperties.properties.billingPlan == enum_ReservationBillingPlan[_]
    input.Body.properties.renewProperties.purchaseProperties.properties.quantity == INTEGER
    input.Body.properties.renewProperties.purchaseProperties.properties.displayName == STRING
    input.Body.properties.renewProperties.purchaseProperties.properties.appliedScopeType == enum_AppliedScopeType[_]
    input.Body.properties.renewProperties.purchaseProperties.properties.appliedScopes[_] == STRING
    input.Body.properties.renewProperties.purchaseProperties.properties.appliedScopeProperties.tenantId == STRING
    input.Body.properties.renewProperties.purchaseProperties.properties.appliedScopeProperties.managementGroupId == STRING
    input.Body.properties.renewProperties.purchaseProperties.properties.appliedScopeProperties.subscriptionId == STRING
    input.Body.properties.renewProperties.purchaseProperties.properties.appliedScopeProperties.resourceGroupId == STRING
    input.Body.properties.renewProperties.purchaseProperties.properties.appliedScopeProperties.displayName == STRING
    input.Body.properties.renewProperties.purchaseProperties.properties.renew == BOOLEAN
    input.Body.properties.renewProperties.purchaseProperties.properties.reservedResourceProperties.instanceFlexibility == enum_InstanceFlexibility[_]
    input.Body.properties.renewProperties.purchaseProperties.properties.reviewDateTime == STRING
    input.Body.properties.reviewDateTime == STRING
    input.ReqMap.reservationOrderId == STRING
    input.ReqMap.reservationId == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

Return_Post

valid {
    input.Body.properties.sessionId == STRING
    input.Body.properties.scope == STRING
    input.Body.properties.reservationToReturn.reservationId == STRING
    input.Body.properties.reservationToReturn.quantity == INTEGER
    input.Body.properties.returnReason == STRING
    input.ReqMap.reservationOrderId == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}