BatchGetMetricData

enum_Metric := [ "SEND", "COMPLAINT", "PERMANENT_BOUNCE", "TRANSIENT_BOUNCE", "OPEN", "CLICK", "DELIVERY", "DELIVERY_OPEN", "DELIVERY_CLICK", "DELIVERY_COMPLAINT" ]
enum_MetricNamespace := [ "VDM" ]

valid {
    input.Body.Queries[_].Id == STRING
    input.Body.Queries[_].Namespace == enum_MetricNamespace[_]
    input.Body.Queries[_].Metric == enum_Metric[_]
    input.Body.Queries[_].Dimensions.EMAIL_IDENTITY == STRING
    input.Body.Queries[_].Dimensions.CONFIGURATION_SET == STRING
    input.Body.Queries[_].Dimensions.ISP == STRING
    input.Body.Queries[_].StartDate == TIMESTAMP
    input.Body.Queries[_].EndDate == TIMESTAMP
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CancelExportJob

valid {
    input.ReqMap.JobId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateConfigurationSet

enum_FeatureStatus := [ "ENABLED", "DISABLED" ]
enum_SuppressionListReason := [ "BOUNCE", "COMPLAINT" ]
enum_TlsPolicy := [ "REQUIRE", "OPTIONAL" ]

valid {
    input.Body.ConfigurationSetName == STRING
    input.Body.TrackingOptions.CustomRedirectDomain == STRING
    input.Body.DeliveryOptions.TlsPolicy == enum_TlsPolicy[_]
    input.Body.DeliveryOptions.SendingPoolName == STRING
    input.Body.ReputationOptions.ReputationMetricsEnabled == BOOLEAN
    input.Body.ReputationOptions.LastFreshStart == TIMESTAMP
    input.Body.SendingOptions.SendingEnabled == BOOLEAN
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.Body.SuppressionOptions.SuppressedReasons[_] == enum_SuppressionListReason[_]
    input.Body.VdmOptions.DashboardOptions.EngagementMetrics == enum_FeatureStatus[_]
    input.Body.VdmOptions.GuardianOptions.OptimizedSharedDelivery == enum_FeatureStatus[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateConfigurationSetEventDestination

enum_DimensionValueSource := [ "MESSAGE_TAG", "EMAIL_HEADER", "LINK_TAG" ]
enum_EventType := [ "SEND", "REJECT", "BOUNCE", "COMPLAINT", "DELIVERY", "OPEN", "CLICK", "RENDERING_FAILURE", "DELIVERY_DELAY", "SUBSCRIPTION" ]

valid {
    input.Body.EventDestinationName == STRING
    input.Body.EventDestination.Enabled == BOOLEAN
    input.Body.EventDestination.MatchingEventTypes[_] == enum_EventType[_]
    input.Body.EventDestination.KinesisFirehoseDestination.IamRoleArn == STRING
    input.Body.EventDestination.KinesisFirehoseDestination.DeliveryStreamArn == STRING
    input.Body.EventDestination.CloudWatchDestination.DimensionConfigurations[_].DimensionName == STRING
    input.Body.EventDestination.CloudWatchDestination.DimensionConfigurations[_].DimensionValueSource == enum_DimensionValueSource[_]
    input.Body.EventDestination.CloudWatchDestination.DimensionConfigurations[_].DefaultDimensionValue == STRING
    input.Body.EventDestination.SnsDestination.TopicArn == STRING
    input.Body.EventDestination.EventBridgeDestination.EventBusArn == STRING
    input.Body.EventDestination.PinpointDestination.ApplicationArn == STRING
    input.ReqMap.ConfigurationSetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateContact

enum_SubscriptionStatus := [ "OPT_IN", "OPT_OUT" ]

valid {
    input.Body.EmailAddress == STRING
    input.Body.TopicPreferences[_].TopicName == STRING
    input.Body.TopicPreferences[_].SubscriptionStatus == enum_SubscriptionStatus[_]
    input.Body.UnsubscribeAll == BOOLEAN
    input.Body.AttributesData == STRING
    input.ReqMap.ContactListName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateContactList

enum_SubscriptionStatus := [ "OPT_IN", "OPT_OUT" ]

valid {
    input.Body.ContactListName == STRING
    input.Body.Topics[_].TopicName == STRING
    input.Body.Topics[_].DisplayName == STRING
    input.Body.Topics[_].Description == STRING
    input.Body.Topics[_].DefaultSubscriptionStatus == enum_SubscriptionStatus[_]
    input.Body.Description == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateCustomVerificationEmailTemplate

valid {
    input.Body.TemplateName == STRING
    input.Body.FromEmailAddress == STRING
    input.Body.TemplateSubject == STRING
    input.Body.TemplateContent == STRING
    input.Body.SuccessRedirectionURL == STRING
    input.Body.FailureRedirectionURL == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateDedicatedIpPool

enum_ScalingMode := [ "STANDARD", "MANAGED" ]

valid {
    input.Body.PoolName == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.Body.ScalingMode == enum_ScalingMode[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateDeliverabilityTestReport

valid {
    input.Body.ReportName == STRING
    input.Body.FromEmailAddress == STRING
    input.Body.Content.Simple.Subject.Data == STRING
    input.Body.Content.Simple.Subject.Charset == STRING
    input.Body.Content.Simple.Body.Text.Data == STRING
    input.Body.Content.Simple.Body.Text.Charset == STRING
    input.Body.Content.Simple.Body.Html.Data == STRING
    input.Body.Content.Simple.Body.Html.Charset == STRING
    input.Body.Content.Simple.Headers[_].Name == STRING
    input.Body.Content.Simple.Headers[_].Value == STRING
    input.Body.Content.Raw.Data == BLOB
    input.Body.Content.Template.TemplateName == STRING
    input.Body.Content.Template.TemplateArn == STRING
    input.Body.Content.Template.TemplateData == STRING
    input.Body.Content.Template.Headers[_].Name == STRING
    input.Body.Content.Template.Headers[_].Value == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateEmailIdentity

enum_DkimSigningKeyLength := [ "RSA_1024_BIT", "RSA_2048_BIT" ]

valid {
    input.Body.EmailIdentity == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.Body.DkimSigningAttributes.DomainSigningSelector == STRING
    input.Body.DkimSigningAttributes.DomainSigningPrivateKey == STRING
    input.Body.DkimSigningAttributes.NextSigningKeyLength == enum_DkimSigningKeyLength[_]
    input.Body.ConfigurationSetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateEmailIdentityPolicy

valid {
    input.Body.Policy == STRING
    input.ReqMap.EmailIdentity == STRING
    input.ReqMap.PolicyName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateEmailTemplate

valid {
    input.Body.TemplateName == STRING
    input.Body.TemplateContent.Subject == STRING
    input.Body.TemplateContent.Text == STRING
    input.Body.TemplateContent.Html == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateExportJob

enum_DataFormat := [ "CSV", "JSON" ]
enum_DeliveryEventType := [ "SEND", "DELIVERY", "TRANSIENT_BOUNCE", "PERMANENT_BOUNCE", "UNDETERMINED_BOUNCE", "COMPLAINT" ]
enum_EngagementEventType := [ "OPEN", "CLICK" ]
enum_Metric := [ "SEND", "COMPLAINT", "PERMANENT_BOUNCE", "TRANSIENT_BOUNCE", "OPEN", "CLICK", "DELIVERY", "DELIVERY_OPEN", "DELIVERY_CLICK", "DELIVERY_COMPLAINT" ]
enum_MetricAggregation := [ "RATE", "VOLUME" ]
enum_MetricNamespace := [ "VDM" ]

valid {
    input.Body.ExportDataSource.MetricsDataSource.Dimensions.EMAIL_IDENTITY[_] == STRING
    input.Body.ExportDataSource.MetricsDataSource.Dimensions.CONFIGURATION_SET[_] == STRING
    input.Body.ExportDataSource.MetricsDataSource.Dimensions.ISP[_] == STRING
    input.Body.ExportDataSource.MetricsDataSource.Namespace == enum_MetricNamespace[_]
    input.Body.ExportDataSource.MetricsDataSource.Metrics[_].Name == enum_Metric[_]
    input.Body.ExportDataSource.MetricsDataSource.Metrics[_].Aggregation == enum_MetricAggregation[_]
    input.Body.ExportDataSource.MetricsDataSource.StartDate == TIMESTAMP
    input.Body.ExportDataSource.MetricsDataSource.EndDate == TIMESTAMP
    input.Body.ExportDataSource.MessageInsightsDataSource.StartDate == TIMESTAMP
    input.Body.ExportDataSource.MessageInsightsDataSource.EndDate == TIMESTAMP
    input.Body.ExportDataSource.MessageInsightsDataSource.Include.FromEmailAddress[_] == STRING
    input.Body.ExportDataSource.MessageInsightsDataSource.Include.Destination[_] == STRING
    input.Body.ExportDataSource.MessageInsightsDataSource.Include.Subject[_] == STRING
    input.Body.ExportDataSource.MessageInsightsDataSource.Include.Isp[_] == STRING
    input.Body.ExportDataSource.MessageInsightsDataSource.Include.LastDeliveryEvent[_] == enum_DeliveryEventType[_]
    input.Body.ExportDataSource.MessageInsightsDataSource.Include.LastEngagementEvent[_] == enum_EngagementEventType[_]
    input.Body.ExportDataSource.MessageInsightsDataSource.Exclude.FromEmailAddress[_] == STRING
    input.Body.ExportDataSource.MessageInsightsDataSource.Exclude.Destination[_] == STRING
    input.Body.ExportDataSource.MessageInsightsDataSource.Exclude.Subject[_] == STRING
    input.Body.ExportDataSource.MessageInsightsDataSource.Exclude.Isp[_] == STRING
    input.Body.ExportDataSource.MessageInsightsDataSource.Exclude.LastDeliveryEvent[_] == enum_DeliveryEventType[_]
    input.Body.ExportDataSource.MessageInsightsDataSource.Exclude.LastEngagementEvent[_] == enum_EngagementEventType[_]
    input.Body.ExportDataSource.MessageInsightsDataSource.MaxResults == INTEGER
    input.Body.ExportDestination.DataFormat == enum_DataFormat[_]
    input.Body.ExportDestination.S3Url == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateImportJob

enum_ContactListImportAction := [ "DELETE", "PUT" ]
enum_DataFormat := [ "CSV", "JSON" ]
enum_SuppressionListImportAction := [ "DELETE", "PUT" ]

valid {
    input.Body.ImportDestination.SuppressionListDestination.SuppressionListImportAction == enum_SuppressionListImportAction[_]
    input.Body.ImportDestination.ContactListDestination.ContactListName == STRING
    input.Body.ImportDestination.ContactListDestination.ContactListImportAction == enum_ContactListImportAction[_]
    input.Body.ImportDataSource.S3Url == STRING
    input.Body.ImportDataSource.DataFormat == enum_DataFormat[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteConfigurationSet

valid {
    input.ReqMap.ConfigurationSetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteConfigurationSetEventDestination

valid {
    input.ReqMap.ConfigurationSetName == STRING
    input.ReqMap.EventDestinationName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteContact

valid {
    input.ReqMap.ContactListName == STRING
    input.ReqMap.EmailAddress == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteContactList

valid {
    input.ReqMap.ContactListName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteCustomVerificationEmailTemplate

valid {
    input.ReqMap.TemplateName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteDedicatedIpPool

valid {
    input.ReqMap.PoolName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteEmailIdentity

valid {
    input.ReqMap.EmailIdentity == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteEmailIdentityPolicy

valid {
    input.ReqMap.EmailIdentity == STRING
    input.ReqMap.PolicyName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteEmailTemplate

valid {
    input.ReqMap.TemplateName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteSuppressedDestination

valid {
    input.ReqMap.EmailAddress == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetAccount

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

GetBlacklistReports

valid {
    input.Qs.BlacklistItemNames[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetConfigurationSet

valid {
    input.ReqMap.ConfigurationSetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetConfigurationSetEventDestinations

valid {
    input.ReqMap.ConfigurationSetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetContact

valid {
    input.ReqMap.ContactListName == STRING
    input.ReqMap.EmailAddress == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetContactList

valid {
    input.ReqMap.ContactListName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetCustomVerificationEmailTemplate

valid {
    input.ReqMap.TemplateName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetDedicatedIp

valid {
    input.ReqMap.IP == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetDedicatedIpPool

valid {
    input.ReqMap.PoolName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetDedicatedIps

valid {
    input.Qs.PoolName == STRING
    input.Qs.NextToken == STRING
    input.Qs.PageSize == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetDeliverabilityDashboardOptions

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

GetDeliverabilityTestReport

valid {
    input.ReqMap.ReportId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetDomainDeliverabilityCampaign

valid {
    input.ReqMap.CampaignId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetDomainStatisticsReport

valid {
    input.ReqMap.Domain == STRING
    input.Qs.StartDate == TIMESTAMP
    input.Qs.EndDate == TIMESTAMP
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetEmailIdentity

valid {
    input.ReqMap.EmailIdentity == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetEmailIdentityPolicies

valid {
    input.ReqMap.EmailIdentity == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetEmailTemplate

valid {
    input.ReqMap.TemplateName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetExportJob

valid {
    input.ReqMap.JobId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetImportJob

valid {
    input.ReqMap.JobId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetMessageInsights

valid {
    input.ReqMap.MessageId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetSuppressedDestination

valid {
    input.ReqMap.EmailAddress == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListConfigurationSets

valid {
    input.Qs.NextToken == STRING
    input.Qs.PageSize == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListContactLists

valid {
    input.Qs.PageSize == INTEGER
    input.Qs.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListContacts

enum_SubscriptionStatus := [ "OPT_IN", "OPT_OUT" ]

valid {
    input.Body.Filter.FilteredStatus == enum_SubscriptionStatus[_]
    input.Body.Filter.TopicFilter.TopicName == STRING
    input.Body.Filter.TopicFilter.UseDefaultIfPreferenceUnavailable == BOOLEAN
    input.Body.PageSize == INTEGER
    input.Body.NextToken == STRING
    input.ReqMap.ContactListName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListCustomVerificationEmailTemplates

valid {
    input.Qs.NextToken == STRING
    input.Qs.PageSize == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListDedicatedIpPools

valid {
    input.Qs.NextToken == STRING
    input.Qs.PageSize == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListDeliverabilityTestReports

valid {
    input.Qs.NextToken == STRING
    input.Qs.PageSize == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListDomainDeliverabilityCampaigns

valid {
    input.ReqMap.SubscribedDomain == STRING
    input.Qs.StartDate == TIMESTAMP
    input.Qs.EndDate == TIMESTAMP
    input.Qs.NextToken == STRING
    input.Qs.PageSize == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListEmailIdentities

valid {
    input.Qs.NextToken == STRING
    input.Qs.PageSize == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListEmailTemplates

valid {
    input.Qs.NextToken == STRING
    input.Qs.PageSize == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListExportJobs

enum_ExportSourceType := [ "METRICS_DATA", "MESSAGE_INSIGHTS" ]
enum_JobStatus := [ "CREATED", "PROCESSING", "COMPLETED", "FAILED", "CANCELLED" ]

valid {
    input.Body.NextToken == STRING
    input.Body.PageSize == INTEGER
    input.Body.ExportSourceType == enum_ExportSourceType[_]
    input.Body.JobStatus == enum_JobStatus[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListImportJobs

enum_ImportDestinationType := [ "SUPPRESSION_LIST", "CONTACT_LIST" ]

valid {
    input.Body.ImportDestinationType == enum_ImportDestinationType[_]
    input.Body.NextToken == STRING
    input.Body.PageSize == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListRecommendations

valid {
    input.Body.Filter.TYPE == STRING
    input.Body.Filter.IMPACT == STRING
    input.Body.Filter.STATUS == STRING
    input.Body.Filter.RESOURCE_ARN == STRING
    input.Body.NextToken == STRING
    input.Body.PageSize == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListSuppressedDestinations

enum_SuppressionListReason := [ "BOUNCE", "COMPLAINT" ]

valid {
    input.Qs.Reason[_] == enum_SuppressionListReason[_]
    input.Qs.StartDate == TIMESTAMP
    input.Qs.EndDate == TIMESTAMP
    input.Qs.NextToken == STRING
    input.Qs.PageSize == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListTagsForResource

valid {
    input.Qs.ResourceArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutAccountDedicatedIpWarmupAttributes

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

PutAccountDetails

enum_ContactLanguage := [ "EN", "JA" ]
enum_MailType := [ "MARKETING", "TRANSACTIONAL" ]

valid {
    input.Body.MailType == enum_MailType[_]
    input.Body.WebsiteURL == STRING
    input.Body.ContactLanguage == enum_ContactLanguage[_]
    input.Body.UseCaseDescription == STRING
    input.Body.AdditionalContactEmailAddresses[_] == STRING
    input.Body.ProductionAccessEnabled == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutAccountSendingAttributes

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

PutAccountSuppressionAttributes

enum_SuppressionListReason := [ "BOUNCE", "COMPLAINT" ]

valid {
    input.Body.SuppressedReasons[_] == enum_SuppressionListReason[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutAccountVdmAttributes

enum_FeatureStatus := [ "ENABLED", "DISABLED" ]

valid {
    input.Body.VdmAttributes.VdmEnabled == enum_FeatureStatus[_]
    input.Body.VdmAttributes.DashboardAttributes.EngagementMetrics == enum_FeatureStatus[_]
    input.Body.VdmAttributes.GuardianAttributes.OptimizedSharedDelivery == enum_FeatureStatus[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutConfigurationSetDeliveryOptions

enum_TlsPolicy := [ "REQUIRE", "OPTIONAL" ]

valid {
    input.Body.TlsPolicy == enum_TlsPolicy[_]
    input.Body.SendingPoolName == STRING
    input.ReqMap.ConfigurationSetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutConfigurationSetReputationOptions

valid {
    input.Body.ReputationMetricsEnabled == BOOLEAN
    input.ReqMap.ConfigurationSetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutConfigurationSetSendingOptions

valid {
    input.Body.SendingEnabled == BOOLEAN
    input.ReqMap.ConfigurationSetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutConfigurationSetSuppressionOptions

enum_SuppressionListReason := [ "BOUNCE", "COMPLAINT" ]

valid {
    input.Body.SuppressedReasons[_] == enum_SuppressionListReason[_]
    input.ReqMap.ConfigurationSetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutConfigurationSetTrackingOptions

valid {
    input.Body.CustomRedirectDomain == STRING
    input.ReqMap.ConfigurationSetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutConfigurationSetVdmOptions

enum_FeatureStatus := [ "ENABLED", "DISABLED" ]

valid {
    input.Body.VdmOptions.DashboardOptions.EngagementMetrics == enum_FeatureStatus[_]
    input.Body.VdmOptions.GuardianOptions.OptimizedSharedDelivery == enum_FeatureStatus[_]
    input.ReqMap.ConfigurationSetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutDedicatedIpInPool

valid {
    input.Body.DestinationPoolName == STRING
    input.ReqMap.IP == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutDedicatedIpPoolScalingAttributes

enum_ScalingMode := [ "STANDARD", "MANAGED" ]

valid {
    input.Body.ScalingMode == enum_ScalingMode[_]
    input.ReqMap.PoolName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutDedicatedIpWarmupAttributes

valid {
    input.Body.WarmupPercentage == INTEGER
    input.ReqMap.IP == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutDeliverabilityDashboardOption

valid {
    input.Body.DashboardEnabled == BOOLEAN
    input.Body.SubscribedDomains[_].Domain == STRING
    input.Body.SubscribedDomains[_].SubscriptionStartDate == TIMESTAMP
    input.Body.SubscribedDomains[_].InboxPlacementTrackingOption.Global == BOOLEAN
    input.Body.SubscribedDomains[_].InboxPlacementTrackingOption.TrackedIsps[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutEmailIdentityConfigurationSetAttributes

valid {
    input.Body.ConfigurationSetName == STRING
    input.ReqMap.EmailIdentity == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutEmailIdentityDkimAttributes

valid {
    input.Body.SigningEnabled == BOOLEAN
    input.ReqMap.EmailIdentity == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutEmailIdentityDkimSigningAttributes

enum_DkimSigningAttributesOrigin := [ "AWS_SES", "EXTERNAL" ]
enum_DkimSigningKeyLength := [ "RSA_1024_BIT", "RSA_2048_BIT" ]

valid {
    input.Body.SigningAttributesOrigin == enum_DkimSigningAttributesOrigin[_]
    input.Body.SigningAttributes.DomainSigningSelector == STRING
    input.Body.SigningAttributes.DomainSigningPrivateKey == STRING
    input.Body.SigningAttributes.NextSigningKeyLength == enum_DkimSigningKeyLength[_]
    input.ReqMap.EmailIdentity == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutEmailIdentityFeedbackAttributes

valid {
    input.Body.EmailForwardingEnabled == BOOLEAN
    input.ReqMap.EmailIdentity == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutEmailIdentityMailFromAttributes

enum_BehaviorOnMxFailure := [ "USE_DEFAULT_VALUE", "REJECT_MESSAGE" ]

valid {
    input.Body.MailFromDomain == STRING
    input.Body.BehaviorOnMxFailure == enum_BehaviorOnMxFailure[_]
    input.ReqMap.EmailIdentity == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutSuppressedDestination

enum_SuppressionListReason := [ "BOUNCE", "COMPLAINT" ]

valid {
    input.Body.EmailAddress == STRING
    input.Body.Reason == enum_SuppressionListReason[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

SendBulkEmail

valid {
    input.Body.FromEmailAddress == STRING
    input.Body.FromEmailAddressIdentityArn == STRING
    input.Body.ReplyToAddresses[_] == STRING
    input.Body.FeedbackForwardingEmailAddress == STRING
    input.Body.FeedbackForwardingEmailAddressIdentityArn == STRING
    input.Body.DefaultEmailTags[_].Name == STRING
    input.Body.DefaultEmailTags[_].Value == STRING
    input.Body.DefaultContent.Template.TemplateName == STRING
    input.Body.DefaultContent.Template.TemplateArn == STRING
    input.Body.DefaultContent.Template.TemplateData == STRING
    input.Body.DefaultContent.Template.Headers[_].Name == STRING
    input.Body.DefaultContent.Template.Headers[_].Value == STRING
    input.Body.BulkEmailEntries[_].Destination.ToAddresses[_] == STRING
    input.Body.BulkEmailEntries[_].Destination.CcAddresses[_] == STRING
    input.Body.BulkEmailEntries[_].Destination.BccAddresses[_] == STRING
    input.Body.BulkEmailEntries[_].ReplacementTags[_].Name == STRING
    input.Body.BulkEmailEntries[_].ReplacementTags[_].Value == STRING
    input.Body.BulkEmailEntries[_].ReplacementEmailContent.ReplacementTemplate.ReplacementTemplateData == STRING
    input.Body.BulkEmailEntries[_].ReplacementHeaders[_].Name == STRING
    input.Body.BulkEmailEntries[_].ReplacementHeaders[_].Value == STRING
    input.Body.ConfigurationSetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

SendCustomVerificationEmail

valid {
    input.Body.EmailAddress == STRING
    input.Body.TemplateName == STRING
    input.Body.ConfigurationSetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

SendEmail

valid {
    input.Body.FromEmailAddress == STRING
    input.Body.FromEmailAddressIdentityArn == STRING
    input.Body.Destination.ToAddresses[_] == STRING
    input.Body.Destination.CcAddresses[_] == STRING
    input.Body.Destination.BccAddresses[_] == STRING
    input.Body.ReplyToAddresses[_] == STRING
    input.Body.FeedbackForwardingEmailAddress == STRING
    input.Body.FeedbackForwardingEmailAddressIdentityArn == STRING
    input.Body.Content.Simple.Subject.Data == STRING
    input.Body.Content.Simple.Subject.Charset == STRING
    input.Body.Content.Simple.Body.Text.Data == STRING
    input.Body.Content.Simple.Body.Text.Charset == STRING
    input.Body.Content.Simple.Body.Html.Data == STRING
    input.Body.Content.Simple.Body.Html.Charset == STRING
    input.Body.Content.Simple.Headers[_].Name == STRING
    input.Body.Content.Simple.Headers[_].Value == STRING
    input.Body.Content.Raw.Data == BLOB
    input.Body.Content.Template.TemplateName == STRING
    input.Body.Content.Template.TemplateArn == STRING
    input.Body.Content.Template.TemplateData == STRING
    input.Body.Content.Template.Headers[_].Name == STRING
    input.Body.Content.Template.Headers[_].Value == STRING
    input.Body.EmailTags[_].Name == STRING
    input.Body.EmailTags[_].Value == STRING
    input.Body.ConfigurationSetName == STRING
    input.Body.ListManagementOptions.ContactListName == STRING
    input.Body.ListManagementOptions.TopicName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

TagResource

valid {
    input.Body.ResourceArn == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

TestRenderEmailTemplate

valid {
    input.Body.TemplateData == STRING
    input.ReqMap.TemplateName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UntagResource

valid {
    input.Qs.ResourceArn == STRING
    input.Qs.TagKeys[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateConfigurationSetEventDestination

enum_DimensionValueSource := [ "MESSAGE_TAG", "EMAIL_HEADER", "LINK_TAG" ]
enum_EventType := [ "SEND", "REJECT", "BOUNCE", "COMPLAINT", "DELIVERY", "OPEN", "CLICK", "RENDERING_FAILURE", "DELIVERY_DELAY", "SUBSCRIPTION" ]

valid {
    input.Body.EventDestination.Enabled == BOOLEAN
    input.Body.EventDestination.MatchingEventTypes[_] == enum_EventType[_]
    input.Body.EventDestination.KinesisFirehoseDestination.IamRoleArn == STRING
    input.Body.EventDestination.KinesisFirehoseDestination.DeliveryStreamArn == STRING
    input.Body.EventDestination.CloudWatchDestination.DimensionConfigurations[_].DimensionName == STRING
    input.Body.EventDestination.CloudWatchDestination.DimensionConfigurations[_].DimensionValueSource == enum_DimensionValueSource[_]
    input.Body.EventDestination.CloudWatchDestination.DimensionConfigurations[_].DefaultDimensionValue == STRING
    input.Body.EventDestination.SnsDestination.TopicArn == STRING
    input.Body.EventDestination.EventBridgeDestination.EventBusArn == STRING
    input.Body.EventDestination.PinpointDestination.ApplicationArn == STRING
    input.ReqMap.ConfigurationSetName == STRING
    input.ReqMap.EventDestinationName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateContact

enum_SubscriptionStatus := [ "OPT_IN", "OPT_OUT" ]

valid {
    input.Body.TopicPreferences[_].TopicName == STRING
    input.Body.TopicPreferences[_].SubscriptionStatus == enum_SubscriptionStatus[_]
    input.Body.UnsubscribeAll == BOOLEAN
    input.Body.AttributesData == STRING
    input.ReqMap.ContactListName == STRING
    input.ReqMap.EmailAddress == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateContactList

enum_SubscriptionStatus := [ "OPT_IN", "OPT_OUT" ]

valid {
    input.Body.Topics[_].TopicName == STRING
    input.Body.Topics[_].DisplayName == STRING
    input.Body.Topics[_].Description == STRING
    input.Body.Topics[_].DefaultSubscriptionStatus == enum_SubscriptionStatus[_]
    input.Body.Description == STRING
    input.ReqMap.ContactListName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateCustomVerificationEmailTemplate

valid {
    input.Body.FromEmailAddress == STRING
    input.Body.TemplateSubject == STRING
    input.Body.TemplateContent == STRING
    input.Body.SuccessRedirectionURL == STRING
    input.Body.FailureRedirectionURL == STRING
    input.ReqMap.TemplateName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateEmailIdentityPolicy

valid {
    input.Body.Policy == STRING
    input.ReqMap.EmailIdentity == STRING
    input.ReqMap.PolicyName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateEmailTemplate

valid {
    input.Body.TemplateContent.Subject == STRING
    input.Body.TemplateContent.Text == STRING
    input.Body.TemplateContent.Html == STRING
    input.ReqMap.TemplateName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}