MICROSOFT.SUBSCRIPTION

Alias_Create

enum_Workload := [ "Production", "DevTest" ]

valid {
    input.Body.properties.displayName == STRING
    input.Body.properties.workload == enum_Workload[_]
    input.Body.properties.billingScope == STRING
    input.Body.properties.subscriptionId == STRING
    input.Body.properties.resellerId == STRING
    input.Body.properties.additionalProperties.managementGroupId == STRING
    input.Body.properties.additionalProperties.subscriptionTenantId == STRING
    input.Body.properties.additionalProperties.subscriptionOwnerId == STRING
    input.Body.properties.additionalProperties.tags.STRING == STRING
    input.ReqMap.aliasName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

Alias_Delete

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

Alias_Get

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

Alias_List

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

BillingAccount_GetPolicy

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

Operations_List

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

SubscriptionDefinitions_Create

valid {
    input.Body.properties.subscriptionDisplayName == STRING
    input.Body.properties.offerType == STRING
    input.Body.properties.etag == STRING
    input.ReqMap.subscriptionDefinitionName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

SubscriptionDefinitions_Get

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

SubscriptionDefinitions_List

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

SubscriptionOperation_Get

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

SubscriptionOperations_List

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

SubscriptionPolicy_AddUpdatePolicyForTenant

valid {
    input.Body.blockSubscriptionsLeavingTenant == BOOLEAN
    input.Body.blockSubscriptionsIntoTenant == BOOLEAN
    input.Body.exemptedPrincipals[_] == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

SubscriptionPolicy_GetPolicyForTenant

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

SubscriptionPolicy_ListPolicyForTenant

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

Subscription_AcceptOwnership

valid {
    input.Body.properties.displayName == STRING
    input.Body.properties.managementGroupId == STRING
    input.Body.properties.tags.STRING == STRING
    input.ReqMap.SubscriptionID == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
    input.ProviderMetadata.SubscriptionID == STRING
}

Subscription_AcceptOwnershipStatus

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

Subscription_Cancel

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

Subscription_CreateCspSubscription

valid {
    input.Body.displayName == STRING
    input.Body.skuId == STRING
    input.Body.resellerId == STRING
    input.ReqMap.billingAccountName == STRING
    input.ReqMap.customerName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

Subscription_CreateSubscription

valid {
    input.Body.displayName == STRING
    input.Body.skuId == STRING
    input.Body.costCenter == STRING
    input.Body.owner.objectId == STRING
    input.Body.managementGroupId == STRING
    input.ReqMap.billingAccountName == STRING
    input.ReqMap.billingProfileName == STRING
    input.ReqMap.invoiceSectionName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

Subscription_CreateSubscriptionInEnrollmentAccount

enum_SubscriptionCreationParametersOfferType := [ "MS-AZR-0017P", "MS-AZR-0148P" ]

valid {
    input.Body.displayName == STRING
    input.Body.managementGroupId == STRING
    input.Body.owners[_].objectId == STRING
    input.Body.offerType == enum_SubscriptionCreationParametersOfferType[_]
    input.ReqMap.enrollmentAccountName == STRING
    input.Qs.api-version == STRING
    input.ProviderMetadata.Region == STRING
}

Subscription_Enable

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

Subscription_Rename

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