BILLINGCONDUCTOR

AssociateAccounts

valid {
    input.Body.Arn == STRING
    input.Body.AccountIds[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

AssociatePricingRules

valid {
    input.Body.Arn == STRING
    input.Body.PricingRuleArns[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

BatchAssociateResourcesToCustomLineItem

valid {
    input.Body.TargetArn == STRING
    input.Body.ResourceArns[_] == STRING
    input.Body.BillingPeriodRange.InclusiveStartBillingPeriod == STRING
    input.Body.BillingPeriodRange.ExclusiveEndBillingPeriod == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

BatchDisassociateResourcesFromCustomLineItem

valid {
    input.Body.TargetArn == STRING
    input.Body.ResourceArns[_] == STRING
    input.Body.BillingPeriodRange.InclusiveStartBillingPeriod == STRING
    input.Body.BillingPeriodRange.ExclusiveEndBillingPeriod == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateBillingGroup

valid {
    input.Body.Name == STRING
    input.Body.AccountGrouping.LinkedAccountIds[_] == STRING
    input.Body.AccountGrouping.AutoAssociate == BOOLEAN
    input.Body.ComputationPreference.PricingPlanArn == STRING
    input.Body.PrimaryAccountId == STRING
    input.Body.Description == STRING
    input.Body.Tags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateCustomLineItem

enum_CustomLineItemType := [ "CREDIT", "FEE" ]
enum_LineItemFilterAttributeName := [ "LINE_ITEM_TYPE" ]
enum_LineItemFilterValue := [ "SAVINGS_PLAN_NEGATION" ]
enum_MatchOption := [ "NOT_EQUAL" ]

valid {
    input.Body.Name == STRING
    input.Body.Description == STRING
    input.Body.BillingGroupArn == STRING
    input.Body.BillingPeriodRange.InclusiveStartBillingPeriod == STRING
    input.Body.BillingPeriodRange.ExclusiveEndBillingPeriod == STRING
    input.Body.Tags.STRING == STRING
    input.Body.ChargeDetails.Flat.ChargeValue == DOUBLE
    input.Body.ChargeDetails.Percentage.PercentageValue == DOUBLE
    input.Body.ChargeDetails.Percentage.AssociatedValues[_] == STRING
    input.Body.ChargeDetails.Type == enum_CustomLineItemType[_]
    input.Body.ChargeDetails.LineItemFilters[_].Attribute == enum_LineItemFilterAttributeName[_]
    input.Body.ChargeDetails.LineItemFilters[_].MatchOption == enum_MatchOption[_]
    input.Body.ChargeDetails.LineItemFilters[_].Values[_] == enum_LineItemFilterValue[_]
    input.Body.AccountId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreatePricingPlan

valid {
    input.Body.Name == STRING
    input.Body.Description == STRING
    input.Body.PricingRuleArns[_] == STRING
    input.Body.Tags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreatePricingRule

enum_PricingRuleScope := [ "GLOBAL", "SERVICE", "BILLING_ENTITY", "SKU" ]
enum_PricingRuleType := [ "MARKUP", "DISCOUNT", "TIERING" ]

valid {
    input.Body.Name == STRING
    input.Body.Description == STRING
    input.Body.Scope == enum_PricingRuleScope[_]
    input.Body.Type == enum_PricingRuleType[_]
    input.Body.ModifierPercentage == DOUBLE
    input.Body.Service == STRING
    input.Body.Tags.STRING == STRING
    input.Body.BillingEntity == STRING
    input.Body.Tiering.FreeTier.Activated == BOOLEAN
    input.Body.UsageType == STRING
    input.Body.Operation == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteBillingGroup

valid {
    input.Body.Arn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteCustomLineItem

valid {
    input.Body.Arn == STRING
    input.Body.BillingPeriodRange.InclusiveStartBillingPeriod == STRING
    input.Body.BillingPeriodRange.ExclusiveEndBillingPeriod == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeletePricingPlan

valid {
    input.Body.Arn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeletePricingRule

valid {
    input.Body.Arn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DisassociateAccounts

valid {
    input.Body.Arn == STRING
    input.Body.AccountIds[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DisassociatePricingRules

valid {
    input.Body.Arn == STRING
    input.Body.PricingRuleArns[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetBillingGroupCostReport

enum_GroupByAttributeName := [ "PRODUCT_NAME", "BILLING_PERIOD" ]

valid {
    input.Body.Arn == STRING
    input.Body.BillingPeriodRange.InclusiveStartBillingPeriod == STRING
    input.Body.BillingPeriodRange.ExclusiveEndBillingPeriod == STRING
    input.Body.GroupBy[_] == enum_GroupByAttributeName[_]
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListAccountAssociations

valid {
    input.Body.BillingPeriod == STRING
    input.Body.Filters.Association == STRING
    input.Body.Filters.AccountId == STRING
    input.Body.Filters.AccountIds[_] == STRING
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListBillingGroupCostReports

valid {
    input.Body.BillingPeriod == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.Body.Filters.BillingGroupArns[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListBillingGroups

enum_BillingGroupStatus := [ "ACTIVE", "PRIMARY_ACCOUNT_MISSING" ]

valid {
    input.Body.BillingPeriod == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.Body.Filters.Arns[_] == STRING
    input.Body.Filters.PricingPlan == STRING
    input.Body.Filters.Statuses[_] == enum_BillingGroupStatus[_]
    input.Body.Filters.AutoAssociate == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListCustomLineItemVersions

valid {
    input.Body.Arn == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.Body.Filters.BillingPeriodRange.StartBillingPeriod == STRING
    input.Body.Filters.BillingPeriodRange.EndBillingPeriod == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListCustomLineItems

valid {
    input.Body.BillingPeriod == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.Body.Filters.Names[_] == STRING
    input.Body.Filters.BillingGroups[_] == STRING
    input.Body.Filters.Arns[_] == STRING
    input.Body.Filters.AccountIds[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListPricingPlans

valid {
    input.Body.BillingPeriod == STRING
    input.Body.Filters.Arns[_] == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListPricingPlansAssociatedWithPricingRule

valid {
    input.Body.BillingPeriod == STRING
    input.Body.PricingRuleArn == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListPricingRules

valid {
    input.Body.BillingPeriod == STRING
    input.Body.Filters.Arns[_] == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListPricingRulesAssociatedToPricingPlan

valid {
    input.Body.BillingPeriod == STRING
    input.Body.PricingPlanArn == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListResourcesAssociatedToCustomLineItem

enum_CustomLineItemRelationship := [ "PARENT", "CHILD" ]

valid {
    input.Body.BillingPeriod == STRING
    input.Body.Arn == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.Body.Filters.Relationship == enum_CustomLineItemRelationship[_]
    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
}

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
}

UpdateBillingGroup

enum_BillingGroupStatus := [ "ACTIVE", "PRIMARY_ACCOUNT_MISSING" ]

valid {
    input.Body.Arn == STRING
    input.Body.Name == STRING
    input.Body.Status == enum_BillingGroupStatus[_]
    input.Body.ComputationPreference.PricingPlanArn == STRING
    input.Body.Description == STRING
    input.Body.AccountGrouping.AutoAssociate == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateCustomLineItem

enum_LineItemFilterAttributeName := [ "LINE_ITEM_TYPE" ]
enum_LineItemFilterValue := [ "SAVINGS_PLAN_NEGATION" ]
enum_MatchOption := [ "NOT_EQUAL" ]

valid {
    input.Body.Arn == STRING
    input.Body.Name == STRING
    input.Body.Description == STRING
    input.Body.ChargeDetails.Flat.ChargeValue == DOUBLE
    input.Body.ChargeDetails.Percentage.PercentageValue == DOUBLE
    input.Body.ChargeDetails.LineItemFilters[_].Attribute == enum_LineItemFilterAttributeName[_]
    input.Body.ChargeDetails.LineItemFilters[_].MatchOption == enum_MatchOption[_]
    input.Body.ChargeDetails.LineItemFilters[_].Values[_] == enum_LineItemFilterValue[_]
    input.Body.BillingPeriodRange.InclusiveStartBillingPeriod == STRING
    input.Body.BillingPeriodRange.ExclusiveEndBillingPeriod == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdatePricingPlan

valid {
    input.Body.Arn == STRING
    input.Body.Name == STRING
    input.Body.Description == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdatePricingRule

enum_PricingRuleType := [ "MARKUP", "DISCOUNT", "TIERING" ]

valid {
    input.Body.Arn == STRING
    input.Body.Name == STRING
    input.Body.Description == STRING
    input.Body.Type == enum_PricingRuleType[_]
    input.Body.ModifierPercentage == DOUBLE
    input.Body.Tiering.FreeTier.Activated == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}