CreateConfigurationSet

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.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" ]

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.PinpointDestination.ApplicationArn == STRING
    input.ReqMap.ConfigurationSetName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateDedicatedIpPool

valid {
    input.Body.PoolName == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    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.Raw.Data == BLOB
    input.Body.Content.Template.TemplateArn == STRING
    input.Body.Content.Template.TemplateData == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateEmailIdentity

valid {
    input.Body.EmailIdentity == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    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
}

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
}

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
}

GetDedicatedIp

valid {
    input.ReqMap.IP == 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
}

ListConfigurationSets

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
}

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
}

PutAccountSendingAttributes

valid {
    input.Body.SendingEnabled == BOOLEAN
    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
}

PutConfigurationSetTrackingOptions

valid {
    input.Body.CustomRedirectDomain == STRING
    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
}

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
}

PutEmailIdentityDkimAttributes

valid {
    input.Body.SigningEnabled == BOOLEAN
    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
}

SendEmail

valid {
    input.Body.FromEmailAddress == 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.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.Raw.Data == BLOB
    input.Body.Content.Template.TemplateArn == STRING
    input.Body.Content.Template.TemplateData == STRING
    input.Body.EmailTags[_].Name == STRING
    input.Body.EmailTags[_].Value == STRING
    input.Body.ConfigurationSetName == 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
}

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" ]

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.PinpointDestination.ApplicationArn == STRING
    input.ReqMap.ConfigurationSetName == STRING
    input.ReqMap.EventDestinationName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}