{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Amazonka.PinpointEmail.Types
-- Copyright : (c) 2013-2023 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.PinpointEmail.Types
( -- * Service Configuration
defaultService,
-- * Errors
_AccountSuspendedException,
_AlreadyExistsException,
_BadRequestException,
_ConcurrentModificationException,
_LimitExceededException,
_MailFromDomainNotVerifiedException,
_MessageRejected,
_NotFoundException,
_SendingPausedException,
_TooManyRequestsException,
-- * BehaviorOnMxFailure
BehaviorOnMxFailure (..),
-- * DeliverabilityDashboardAccountStatus
DeliverabilityDashboardAccountStatus (..),
-- * DeliverabilityTestStatus
DeliverabilityTestStatus (..),
-- * DimensionValueSource
DimensionValueSource (..),
-- * DkimStatus
DkimStatus (..),
-- * EventType
EventType (..),
-- * IdentityType
IdentityType (..),
-- * MailFromDomainStatus
MailFromDomainStatus (..),
-- * TlsPolicy
TlsPolicy (..),
-- * WarmupStatus
WarmupStatus (..),
-- * BlacklistEntry
BlacklistEntry (..),
newBlacklistEntry,
blacklistEntry_description,
blacklistEntry_listingTime,
blacklistEntry_rblName,
-- * Body
Body (..),
newBody,
body_html,
body_text,
-- * CloudWatchDestination
CloudWatchDestination (..),
newCloudWatchDestination,
cloudWatchDestination_dimensionConfigurations,
-- * CloudWatchDimensionConfiguration
CloudWatchDimensionConfiguration (..),
newCloudWatchDimensionConfiguration,
cloudWatchDimensionConfiguration_dimensionName,
cloudWatchDimensionConfiguration_dimensionValueSource,
cloudWatchDimensionConfiguration_defaultDimensionValue,
-- * Content
Content (..),
newContent,
content_charset,
content_data,
-- * DailyVolume
DailyVolume (..),
newDailyVolume,
dailyVolume_domainIspPlacements,
dailyVolume_startDate,
dailyVolume_volumeStatistics,
-- * DedicatedIp
DedicatedIp (..),
newDedicatedIp,
dedicatedIp_poolName,
dedicatedIp_ip,
dedicatedIp_warmupStatus,
dedicatedIp_warmupPercentage,
-- * DeliverabilityTestReport
DeliverabilityTestReport (..),
newDeliverabilityTestReport,
deliverabilityTestReport_createDate,
deliverabilityTestReport_deliverabilityTestStatus,
deliverabilityTestReport_fromEmailAddress,
deliverabilityTestReport_reportId,
deliverabilityTestReport_reportName,
deliverabilityTestReport_subject,
-- * DeliveryOptions
DeliveryOptions (..),
newDeliveryOptions,
deliveryOptions_sendingPoolName,
deliveryOptions_tlsPolicy,
-- * Destination
Destination (..),
newDestination,
destination_bccAddresses,
destination_ccAddresses,
destination_toAddresses,
-- * DkimAttributes
DkimAttributes (..),
newDkimAttributes,
dkimAttributes_signingEnabled,
dkimAttributes_status,
dkimAttributes_tokens,
-- * DomainDeliverabilityCampaign
DomainDeliverabilityCampaign (..),
newDomainDeliverabilityCampaign,
domainDeliverabilityCampaign_campaignId,
domainDeliverabilityCampaign_deleteRate,
domainDeliverabilityCampaign_esps,
domainDeliverabilityCampaign_firstSeenDateTime,
domainDeliverabilityCampaign_fromAddress,
domainDeliverabilityCampaign_imageUrl,
domainDeliverabilityCampaign_inboxCount,
domainDeliverabilityCampaign_lastSeenDateTime,
domainDeliverabilityCampaign_projectedVolume,
domainDeliverabilityCampaign_readDeleteRate,
domainDeliverabilityCampaign_readRate,
domainDeliverabilityCampaign_sendingIps,
domainDeliverabilityCampaign_spamCount,
domainDeliverabilityCampaign_subject,
-- * DomainDeliverabilityTrackingOption
DomainDeliverabilityTrackingOption (..),
newDomainDeliverabilityTrackingOption,
domainDeliverabilityTrackingOption_domain,
domainDeliverabilityTrackingOption_inboxPlacementTrackingOption,
domainDeliverabilityTrackingOption_subscriptionStartDate,
-- * DomainIspPlacement
DomainIspPlacement (..),
newDomainIspPlacement,
domainIspPlacement_inboxPercentage,
domainIspPlacement_inboxRawCount,
domainIspPlacement_ispName,
domainIspPlacement_spamPercentage,
domainIspPlacement_spamRawCount,
-- * EmailContent
EmailContent (..),
newEmailContent,
emailContent_raw,
emailContent_simple,
emailContent_template,
-- * EventDestination
EventDestination (..),
newEventDestination,
eventDestination_cloudWatchDestination,
eventDestination_enabled,
eventDestination_kinesisFirehoseDestination,
eventDestination_pinpointDestination,
eventDestination_snsDestination,
eventDestination_name,
eventDestination_matchingEventTypes,
-- * EventDestinationDefinition
EventDestinationDefinition (..),
newEventDestinationDefinition,
eventDestinationDefinition_cloudWatchDestination,
eventDestinationDefinition_enabled,
eventDestinationDefinition_kinesisFirehoseDestination,
eventDestinationDefinition_matchingEventTypes,
eventDestinationDefinition_pinpointDestination,
eventDestinationDefinition_snsDestination,
-- * IdentityInfo
IdentityInfo (..),
newIdentityInfo,
identityInfo_identityName,
identityInfo_identityType,
identityInfo_sendingEnabled,
-- * InboxPlacementTrackingOption
InboxPlacementTrackingOption (..),
newInboxPlacementTrackingOption,
inboxPlacementTrackingOption_global,
inboxPlacementTrackingOption_trackedIsps,
-- * IspPlacement
IspPlacement (..),
newIspPlacement,
ispPlacement_ispName,
ispPlacement_placementStatistics,
-- * KinesisFirehoseDestination
KinesisFirehoseDestination (..),
newKinesisFirehoseDestination,
kinesisFirehoseDestination_iamRoleArn,
kinesisFirehoseDestination_deliveryStreamArn,
-- * MailFromAttributes
MailFromAttributes (..),
newMailFromAttributes,
mailFromAttributes_mailFromDomain,
mailFromAttributes_mailFromDomainStatus,
mailFromAttributes_behaviorOnMxFailure,
-- * Message
Message (..),
newMessage,
message_subject,
message_body,
-- * MessageTag
MessageTag (..),
newMessageTag,
messageTag_name,
messageTag_value,
-- * OverallVolume
OverallVolume (..),
newOverallVolume,
overallVolume_domainIspPlacements,
overallVolume_readRatePercent,
overallVolume_volumeStatistics,
-- * PinpointDestination
PinpointDestination (..),
newPinpointDestination,
pinpointDestination_applicationArn,
-- * PlacementStatistics
PlacementStatistics (..),
newPlacementStatistics,
placementStatistics_dkimPercentage,
placementStatistics_inboxPercentage,
placementStatistics_missingPercentage,
placementStatistics_spamPercentage,
placementStatistics_spfPercentage,
-- * RawMessage
RawMessage (..),
newRawMessage,
rawMessage_data,
-- * ReputationOptions
ReputationOptions (..),
newReputationOptions,
reputationOptions_lastFreshStart,
reputationOptions_reputationMetricsEnabled,
-- * SendQuota
SendQuota (..),
newSendQuota,
sendQuota_max24HourSend,
sendQuota_maxSendRate,
sendQuota_sentLast24Hours,
-- * SendingOptions
SendingOptions (..),
newSendingOptions,
sendingOptions_sendingEnabled,
-- * SnsDestination
SnsDestination (..),
newSnsDestination,
snsDestination_topicArn,
-- * Tag
Tag (..),
newTag,
tag_key,
tag_value,
-- * Template
Template (..),
newTemplate,
template_templateArn,
template_templateData,
-- * TrackingOptions
TrackingOptions (..),
newTrackingOptions,
trackingOptions_customRedirectDomain,
-- * VolumeStatistics
VolumeStatistics (..),
newVolumeStatistics,
volumeStatistics_inboxRawCount,
volumeStatistics_projectedInbox,
volumeStatistics_projectedSpam,
volumeStatistics_spamRawCount,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.PinpointEmail.Types.BehaviorOnMxFailure
import Amazonka.PinpointEmail.Types.BlacklistEntry
import Amazonka.PinpointEmail.Types.Body
import Amazonka.PinpointEmail.Types.CloudWatchDestination
import Amazonka.PinpointEmail.Types.CloudWatchDimensionConfiguration
import Amazonka.PinpointEmail.Types.Content
import Amazonka.PinpointEmail.Types.DailyVolume
import Amazonka.PinpointEmail.Types.DedicatedIp
import Amazonka.PinpointEmail.Types.DeliverabilityDashboardAccountStatus
import Amazonka.PinpointEmail.Types.DeliverabilityTestReport
import Amazonka.PinpointEmail.Types.DeliverabilityTestStatus
import Amazonka.PinpointEmail.Types.DeliveryOptions
import Amazonka.PinpointEmail.Types.Destination
import Amazonka.PinpointEmail.Types.DimensionValueSource
import Amazonka.PinpointEmail.Types.DkimAttributes
import Amazonka.PinpointEmail.Types.DkimStatus
import Amazonka.PinpointEmail.Types.DomainDeliverabilityCampaign
import Amazonka.PinpointEmail.Types.DomainDeliverabilityTrackingOption
import Amazonka.PinpointEmail.Types.DomainIspPlacement
import Amazonka.PinpointEmail.Types.EmailContent
import Amazonka.PinpointEmail.Types.EventDestination
import Amazonka.PinpointEmail.Types.EventDestinationDefinition
import Amazonka.PinpointEmail.Types.EventType
import Amazonka.PinpointEmail.Types.IdentityInfo
import Amazonka.PinpointEmail.Types.IdentityType
import Amazonka.PinpointEmail.Types.InboxPlacementTrackingOption
import Amazonka.PinpointEmail.Types.IspPlacement
import Amazonka.PinpointEmail.Types.KinesisFirehoseDestination
import Amazonka.PinpointEmail.Types.MailFromAttributes
import Amazonka.PinpointEmail.Types.MailFromDomainStatus
import Amazonka.PinpointEmail.Types.Message
import Amazonka.PinpointEmail.Types.MessageTag
import Amazonka.PinpointEmail.Types.OverallVolume
import Amazonka.PinpointEmail.Types.PinpointDestination
import Amazonka.PinpointEmail.Types.PlacementStatistics
import Amazonka.PinpointEmail.Types.RawMessage
import Amazonka.PinpointEmail.Types.ReputationOptions
import Amazonka.PinpointEmail.Types.SendQuota
import Amazonka.PinpointEmail.Types.SendingOptions
import Amazonka.PinpointEmail.Types.SnsDestination
import Amazonka.PinpointEmail.Types.Tag
import Amazonka.PinpointEmail.Types.Template
import Amazonka.PinpointEmail.Types.TlsPolicy
import Amazonka.PinpointEmail.Types.TrackingOptions
import Amazonka.PinpointEmail.Types.VolumeStatistics
import Amazonka.PinpointEmail.Types.WarmupStatus
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
-- | API version @2018-07-26@ of the Amazon Pinpoint Email Service SDK configuration.
defaultService :: Core.Service
defaultService =
Core.Service
{ Core.abbrev = "PinpointEmail",
Core.signer = Sign.v4,
Core.endpointPrefix = "email",
Core.signingName = "ses",
Core.version = "2018-07-26",
Core.s3AddressingStyle = Core.S3AddressingStyleAuto,
Core.endpoint = Core.defaultEndpoint defaultService,
Core.timeout = Prelude.Just 70,
Core.check = Core.statusSuccess,
Core.error = Core.parseJSONError "PinpointEmail",
Core.retry = retry
}
where
retry =
Core.Exponential
{ Core.base = 5.0e-2,
Core.growth = 2,
Core.attempts = 5,
Core.check = check
}
check e
| Lens.has (Core.hasStatus 502) e =
Prelude.Just "bad_gateway"
| Lens.has (Core.hasStatus 504) e =
Prelude.Just "gateway_timeout"
| Lens.has (Core.hasStatus 500) e =
Prelude.Just "general_server_error"
| Lens.has (Core.hasStatus 509) e =
Prelude.Just "limit_exceeded"
| Lens.has
( Core.hasCode "RequestThrottledException"
Prelude.. Core.hasStatus 400
)
e =
Prelude.Just "request_throttled_exception"
| Lens.has (Core.hasStatus 503) e =
Prelude.Just "service_unavailable"
| Lens.has
( Core.hasCode "ThrottledException"
Prelude.. Core.hasStatus 400
)
e =
Prelude.Just "throttled_exception"
| Lens.has
( Core.hasCode "Throttling"
Prelude.. Core.hasStatus 400
)
e =
Prelude.Just "throttling"
| Lens.has
( Core.hasCode "ThrottlingException"
Prelude.. Core.hasStatus 400
)
e =
Prelude.Just "throttling_exception"
| Lens.has
( Core.hasCode
"ProvisionedThroughputExceededException"
Prelude.. Core.hasStatus 400
)
e =
Prelude.Just "throughput_exceeded"
| Lens.has (Core.hasStatus 429) e =
Prelude.Just "too_many_requests"
| Prelude.otherwise = Prelude.Nothing
-- | The message can\'t be sent because the account\'s ability to send email
-- has been permanently restricted.
_AccountSuspendedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_AccountSuspendedException =
Core._MatchServiceError
defaultService
"AccountSuspendedException"
Prelude.. Core.hasStatus 400
-- | The resource specified in your request already exists.
_AlreadyExistsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_AlreadyExistsException =
Core._MatchServiceError
defaultService
"AlreadyExistsException"
Prelude.. Core.hasStatus 400
-- | The input you provided is invalid.
_BadRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_BadRequestException =
Core._MatchServiceError
defaultService
"BadRequestException"
Prelude.. Core.hasStatus 400
-- | The resource is being modified by another operation or thread.
_ConcurrentModificationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ConcurrentModificationException =
Core._MatchServiceError
defaultService
"ConcurrentModificationException"
Prelude.. Core.hasStatus 500
-- | There are too many instances of the specified resource type.
_LimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LimitExceededException =
Core._MatchServiceError
defaultService
"LimitExceededException"
Prelude.. Core.hasStatus 400
-- | The message can\'t be sent because the sending domain isn\'t verified.
_MailFromDomainNotVerifiedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_MailFromDomainNotVerifiedException =
Core._MatchServiceError
defaultService
"MailFromDomainNotVerifiedException"
Prelude.. Core.hasStatus 400
-- | The message can\'t be sent because it contains invalid content.
_MessageRejected :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_MessageRejected =
Core._MatchServiceError
defaultService
"MessageRejected"
Prelude.. Core.hasStatus 400
-- | The resource you attempted to access doesn\'t exist.
_NotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_NotFoundException =
Core._MatchServiceError
defaultService
"NotFoundException"
Prelude.. Core.hasStatus 404
-- | The message can\'t be sent because the account\'s ability to send email
-- is currently paused.
_SendingPausedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_SendingPausedException =
Core._MatchServiceError
defaultService
"SendingPausedException"
Prelude.. Core.hasStatus 400
-- | Too many requests have been made to the operation.
_TooManyRequestsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_TooManyRequestsException =
Core._MatchServiceError
defaultService
"TooManyRequestsException"
Prelude.. Core.hasStatus 429