{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.WellArchitected.Types
(
defaultService,
_AccessDeniedException,
_ConflictException,
_InternalServerException,
_ResourceNotFoundException,
_ServiceQuotaExceededException,
_ThrottlingException,
_ValidationException,
AdditionalResourceType (..),
AnswerReason (..),
CheckFailureReason (..),
CheckProvider (..),
CheckStatus (..),
ChoiceReason (..),
ChoiceStatus (..),
DifferenceStatus (..),
ImportLensStatus (..),
LensStatus (..),
LensStatusType (..),
LensType (..),
NotificationType (..),
OrganizationSharingStatus (..),
PermissionType (..),
Risk (..),
ShareInvitationAction (..),
ShareResourceType (..),
ShareStatus (..),
TrustedAdvisorIntegrationStatus (..),
WorkloadEnvironment (..),
WorkloadImprovementStatus (..),
AdditionalResources (..),
newAdditionalResources,
additionalResources_content,
additionalResources_type,
Answer (..),
newAnswer,
answer_choiceAnswers,
answer_choices,
answer_helpfulResourceDisplayText,
answer_helpfulResourceUrl,
answer_improvementPlanUrl,
answer_isApplicable,
answer_notes,
answer_pillarId,
answer_questionDescription,
answer_questionId,
answer_questionTitle,
answer_reason,
answer_risk,
answer_selectedChoices,
AnswerSummary (..),
newAnswerSummary,
answerSummary_choiceAnswerSummaries,
answerSummary_choices,
answerSummary_isApplicable,
answerSummary_pillarId,
answerSummary_questionId,
answerSummary_questionTitle,
answerSummary_reason,
answerSummary_risk,
answerSummary_selectedChoices,
CheckDetail (..),
newCheckDetail,
checkDetail_accountId,
checkDetail_choiceId,
checkDetail_description,
checkDetail_flaggedResources,
checkDetail_id,
checkDetail_lensArn,
checkDetail_name,
checkDetail_pillarId,
checkDetail_provider,
checkDetail_questionId,
checkDetail_reason,
checkDetail_status,
checkDetail_updatedAt,
CheckSummary (..),
newCheckSummary,
checkSummary_accountSummary,
checkSummary_choiceId,
checkSummary_description,
checkSummary_id,
checkSummary_lensArn,
checkSummary_name,
checkSummary_pillarId,
checkSummary_provider,
checkSummary_questionId,
checkSummary_status,
checkSummary_updatedAt,
Choice (..),
newChoice,
choice_additionalResources,
choice_choiceId,
choice_description,
choice_helpfulResource,
choice_improvementPlan,
choice_title,
ChoiceAnswer (..),
newChoiceAnswer,
choiceAnswer_choiceId,
choiceAnswer_notes,
choiceAnswer_reason,
choiceAnswer_status,
ChoiceAnswerSummary (..),
newChoiceAnswerSummary,
choiceAnswerSummary_choiceId,
choiceAnswerSummary_reason,
choiceAnswerSummary_status,
ChoiceContent (..),
newChoiceContent,
choiceContent_displayText,
choiceContent_url,
ChoiceImprovementPlan (..),
newChoiceImprovementPlan,
choiceImprovementPlan_choiceId,
choiceImprovementPlan_displayText,
choiceImprovementPlan_improvementPlanUrl,
ChoiceUpdate (..),
newChoiceUpdate,
choiceUpdate_notes,
choiceUpdate_reason,
choiceUpdate_status,
ImprovementSummary (..),
newImprovementSummary,
improvementSummary_improvementPlanUrl,
improvementSummary_improvementPlans,
improvementSummary_pillarId,
improvementSummary_questionId,
improvementSummary_questionTitle,
improvementSummary_risk,
Lens (..),
newLens,
lens_description,
lens_lensArn,
lens_lensVersion,
lens_name,
lens_owner,
lens_shareInvitationId,
lens_tags,
LensReview (..),
newLensReview,
lensReview_lensAlias,
lensReview_lensArn,
lensReview_lensName,
lensReview_lensStatus,
lensReview_lensVersion,
lensReview_nextToken,
lensReview_notes,
lensReview_pillarReviewSummaries,
lensReview_riskCounts,
lensReview_updatedAt,
LensReviewReport (..),
newLensReviewReport,
lensReviewReport_base64String,
lensReviewReport_lensAlias,
lensReviewReport_lensArn,
LensReviewSummary (..),
newLensReviewSummary,
lensReviewSummary_lensAlias,
lensReviewSummary_lensArn,
lensReviewSummary_lensName,
lensReviewSummary_lensStatus,
lensReviewSummary_lensVersion,
lensReviewSummary_riskCounts,
lensReviewSummary_updatedAt,
LensShareSummary (..),
newLensShareSummary,
lensShareSummary_shareId,
lensShareSummary_sharedWith,
lensShareSummary_status,
lensShareSummary_statusMessage,
LensSummary (..),
newLensSummary,
lensSummary_createdAt,
lensSummary_description,
lensSummary_lensAlias,
lensSummary_lensArn,
lensSummary_lensName,
lensSummary_lensStatus,
lensSummary_lensType,
lensSummary_lensVersion,
lensSummary_owner,
lensSummary_updatedAt,
LensUpgradeSummary (..),
newLensUpgradeSummary,
lensUpgradeSummary_currentLensVersion,
lensUpgradeSummary_latestLensVersion,
lensUpgradeSummary_lensAlias,
lensUpgradeSummary_lensArn,
lensUpgradeSummary_workloadId,
lensUpgradeSummary_workloadName,
Milestone (..),
newMilestone,
milestone_milestoneName,
milestone_milestoneNumber,
milestone_recordedAt,
milestone_workload,
MilestoneSummary (..),
newMilestoneSummary,
milestoneSummary_milestoneName,
milestoneSummary_milestoneNumber,
milestoneSummary_recordedAt,
milestoneSummary_workloadSummary,
NotificationSummary (..),
newNotificationSummary,
notificationSummary_lensUpgradeSummary,
notificationSummary_type,
PillarDifference (..),
newPillarDifference,
pillarDifference_differenceStatus,
pillarDifference_pillarId,
pillarDifference_pillarName,
pillarDifference_questionDifferences,
PillarReviewSummary (..),
newPillarReviewSummary,
pillarReviewSummary_notes,
pillarReviewSummary_pillarId,
pillarReviewSummary_pillarName,
pillarReviewSummary_riskCounts,
QuestionDifference (..),
newQuestionDifference,
questionDifference_differenceStatus,
questionDifference_questionId,
questionDifference_questionTitle,
ShareInvitation (..),
newShareInvitation,
shareInvitation_lensAlias,
shareInvitation_lensArn,
shareInvitation_shareInvitationId,
shareInvitation_shareResourceType,
shareInvitation_workloadId,
ShareInvitationSummary (..),
newShareInvitationSummary,
shareInvitationSummary_lensArn,
shareInvitationSummary_lensName,
shareInvitationSummary_permissionType,
shareInvitationSummary_shareInvitationId,
shareInvitationSummary_shareResourceType,
shareInvitationSummary_sharedBy,
shareInvitationSummary_sharedWith,
shareInvitationSummary_workloadId,
shareInvitationSummary_workloadName,
VersionDifferences (..),
newVersionDifferences,
versionDifferences_pillarDifferences,
Workload (..),
newWorkload,
workload_accountIds,
workload_applications,
workload_architecturalDesign,
workload_awsRegions,
workload_description,
workload_discoveryConfig,
workload_environment,
workload_improvementStatus,
workload_industry,
workload_industryType,
workload_isReviewOwnerUpdateAcknowledged,
workload_lenses,
workload_nonAwsRegions,
workload_notes,
workload_owner,
workload_pillarPriorities,
workload_reviewOwner,
workload_reviewRestrictionDate,
workload_riskCounts,
workload_shareInvitationId,
workload_tags,
workload_updatedAt,
workload_workloadArn,
workload_workloadId,
workload_workloadName,
WorkloadDiscoveryConfig (..),
newWorkloadDiscoveryConfig,
workloadDiscoveryConfig_trustedAdvisorIntegrationStatus,
WorkloadShare (..),
newWorkloadShare,
workloadShare_permissionType,
workloadShare_shareId,
workloadShare_sharedBy,
workloadShare_sharedWith,
workloadShare_status,
workloadShare_workloadId,
workloadShare_workloadName,
WorkloadShareSummary (..),
newWorkloadShareSummary,
workloadShareSummary_permissionType,
workloadShareSummary_shareId,
workloadShareSummary_sharedWith,
workloadShareSummary_status,
workloadShareSummary_statusMessage,
WorkloadSummary (..),
newWorkloadSummary,
workloadSummary_improvementStatus,
workloadSummary_lenses,
workloadSummary_owner,
workloadSummary_riskCounts,
workloadSummary_updatedAt,
workloadSummary_workloadArn,
workloadSummary_workloadId,
workloadSummary_workloadName,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
import Amazonka.WellArchitected.Types.AdditionalResourceType
import Amazonka.WellArchitected.Types.AdditionalResources
import Amazonka.WellArchitected.Types.Answer
import Amazonka.WellArchitected.Types.AnswerReason
import Amazonka.WellArchitected.Types.AnswerSummary
import Amazonka.WellArchitected.Types.CheckDetail
import Amazonka.WellArchitected.Types.CheckFailureReason
import Amazonka.WellArchitected.Types.CheckProvider
import Amazonka.WellArchitected.Types.CheckStatus
import Amazonka.WellArchitected.Types.CheckSummary
import Amazonka.WellArchitected.Types.Choice
import Amazonka.WellArchitected.Types.ChoiceAnswer
import Amazonka.WellArchitected.Types.ChoiceAnswerSummary
import Amazonka.WellArchitected.Types.ChoiceContent
import Amazonka.WellArchitected.Types.ChoiceImprovementPlan
import Amazonka.WellArchitected.Types.ChoiceReason
import Amazonka.WellArchitected.Types.ChoiceStatus
import Amazonka.WellArchitected.Types.ChoiceUpdate
import Amazonka.WellArchitected.Types.DifferenceStatus
import Amazonka.WellArchitected.Types.ImportLensStatus
import Amazonka.WellArchitected.Types.ImprovementSummary
import Amazonka.WellArchitected.Types.Lens
import Amazonka.WellArchitected.Types.LensReview
import Amazonka.WellArchitected.Types.LensReviewReport
import Amazonka.WellArchitected.Types.LensReviewSummary
import Amazonka.WellArchitected.Types.LensShareSummary
import Amazonka.WellArchitected.Types.LensStatus
import Amazonka.WellArchitected.Types.LensStatusType
import Amazonka.WellArchitected.Types.LensSummary
import Amazonka.WellArchitected.Types.LensType
import Amazonka.WellArchitected.Types.LensUpgradeSummary
import Amazonka.WellArchitected.Types.Milestone
import Amazonka.WellArchitected.Types.MilestoneSummary
import Amazonka.WellArchitected.Types.NotificationSummary
import Amazonka.WellArchitected.Types.NotificationType
import Amazonka.WellArchitected.Types.OrganizationSharingStatus
import Amazonka.WellArchitected.Types.PermissionType
import Amazonka.WellArchitected.Types.PillarDifference
import Amazonka.WellArchitected.Types.PillarReviewSummary
import Amazonka.WellArchitected.Types.QuestionDifference
import Amazonka.WellArchitected.Types.Risk
import Amazonka.WellArchitected.Types.ShareInvitation
import Amazonka.WellArchitected.Types.ShareInvitationAction
import Amazonka.WellArchitected.Types.ShareInvitationSummary
import Amazonka.WellArchitected.Types.ShareResourceType
import Amazonka.WellArchitected.Types.ShareStatus
import Amazonka.WellArchitected.Types.TrustedAdvisorIntegrationStatus
import Amazonka.WellArchitected.Types.VersionDifferences
import Amazonka.WellArchitected.Types.Workload
import Amazonka.WellArchitected.Types.WorkloadDiscoveryConfig
import Amazonka.WellArchitected.Types.WorkloadEnvironment
import Amazonka.WellArchitected.Types.WorkloadImprovementStatus
import Amazonka.WellArchitected.Types.WorkloadShare
import Amazonka.WellArchitected.Types.WorkloadShareSummary
import Amazonka.WellArchitected.Types.WorkloadSummary
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"WellArchitected",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"wellarchitected",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"wellarchitected",
$sel:version:Service :: ByteString
Core.version = ByteString
"2020-03-31",
$sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
$sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
$sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"WellArchitected",
$sel:retry:Service :: Retry
Core.retry = Retry
retry
}
where
retry :: Retry
retry =
Core.Exponential
{ $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
$sel:growth:Exponential :: Int
Core.growth = Int
2,
$sel:attempts:Exponential :: Int
Core.attempts = Int
5,
$sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing
_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_AccessDeniedException :: forall a. AsError a => Fold a ServiceError
_AccessDeniedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AccessDeniedException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
403
_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ConflictException :: forall a. AsError a => Fold a ServiceError
_ConflictException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ConflictException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
409
_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalServerException :: forall a. AsError a => Fold a ServiceError
_InternalServerException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalServerException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500
_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceNotFoundException :: forall a. AsError a => Fold a ServiceError
_ResourceNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceNotFoundException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
404
_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServiceQuotaExceededException :: forall a. AsError a => Fold a ServiceError
_ServiceQuotaExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServiceQuotaExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
402
_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ThrottlingException :: forall a. AsError a => Fold a ServiceError
_ThrottlingException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429
_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ValidationException :: forall a. AsError a => Fold a ServiceError
_ValidationException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ValidationException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400