{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ComputeOptimizer.ExportAutoScalingGroupRecommendations
(
ExportAutoScalingGroupRecommendations (..),
newExportAutoScalingGroupRecommendations,
exportAutoScalingGroupRecommendations_accountIds,
exportAutoScalingGroupRecommendations_fileFormat,
exportAutoScalingGroupRecommendations_filters,
exportAutoScalingGroupRecommendations_fieldsToExport,
exportAutoScalingGroupRecommendations_includeMemberAccounts,
exportAutoScalingGroupRecommendations_recommendationPreferences,
exportAutoScalingGroupRecommendations_s3DestinationConfig,
ExportAutoScalingGroupRecommendationsResponse (..),
newExportAutoScalingGroupRecommendationsResponse,
exportAutoScalingGroupRecommendationsResponse_jobId,
exportAutoScalingGroupRecommendationsResponse_s3Destination,
exportAutoScalingGroupRecommendationsResponse_httpStatus,
)
where
import Amazonka.ComputeOptimizer.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ExportAutoScalingGroupRecommendations = ExportAutoScalingGroupRecommendations'
{
ExportAutoScalingGroupRecommendations -> Maybe [Text]
accountIds :: Prelude.Maybe [Prelude.Text],
ExportAutoScalingGroupRecommendations -> Maybe FileFormat
fileFormat :: Prelude.Maybe FileFormat,
ExportAutoScalingGroupRecommendations -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
ExportAutoScalingGroupRecommendations
-> Maybe [ExportableAutoScalingGroupField]
fieldsToExport :: Prelude.Maybe [ExportableAutoScalingGroupField],
ExportAutoScalingGroupRecommendations -> Maybe Bool
includeMemberAccounts :: Prelude.Maybe Prelude.Bool,
ExportAutoScalingGroupRecommendations
-> Maybe RecommendationPreferences
recommendationPreferences :: Prelude.Maybe RecommendationPreferences,
ExportAutoScalingGroupRecommendations -> S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
}
deriving (ExportAutoScalingGroupRecommendations
-> ExportAutoScalingGroupRecommendations -> Bool
(ExportAutoScalingGroupRecommendations
-> ExportAutoScalingGroupRecommendations -> Bool)
-> (ExportAutoScalingGroupRecommendations
-> ExportAutoScalingGroupRecommendations -> Bool)
-> Eq ExportAutoScalingGroupRecommendations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportAutoScalingGroupRecommendations
-> ExportAutoScalingGroupRecommendations -> Bool
$c/= :: ExportAutoScalingGroupRecommendations
-> ExportAutoScalingGroupRecommendations -> Bool
== :: ExportAutoScalingGroupRecommendations
-> ExportAutoScalingGroupRecommendations -> Bool
$c== :: ExportAutoScalingGroupRecommendations
-> ExportAutoScalingGroupRecommendations -> Bool
Prelude.Eq, ReadPrec [ExportAutoScalingGroupRecommendations]
ReadPrec ExportAutoScalingGroupRecommendations
Int -> ReadS ExportAutoScalingGroupRecommendations
ReadS [ExportAutoScalingGroupRecommendations]
(Int -> ReadS ExportAutoScalingGroupRecommendations)
-> ReadS [ExportAutoScalingGroupRecommendations]
-> ReadPrec ExportAutoScalingGroupRecommendations
-> ReadPrec [ExportAutoScalingGroupRecommendations]
-> Read ExportAutoScalingGroupRecommendations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportAutoScalingGroupRecommendations]
$creadListPrec :: ReadPrec [ExportAutoScalingGroupRecommendations]
readPrec :: ReadPrec ExportAutoScalingGroupRecommendations
$creadPrec :: ReadPrec ExportAutoScalingGroupRecommendations
readList :: ReadS [ExportAutoScalingGroupRecommendations]
$creadList :: ReadS [ExportAutoScalingGroupRecommendations]
readsPrec :: Int -> ReadS ExportAutoScalingGroupRecommendations
$creadsPrec :: Int -> ReadS ExportAutoScalingGroupRecommendations
Prelude.Read, Int -> ExportAutoScalingGroupRecommendations -> ShowS
[ExportAutoScalingGroupRecommendations] -> ShowS
ExportAutoScalingGroupRecommendations -> String
(Int -> ExportAutoScalingGroupRecommendations -> ShowS)
-> (ExportAutoScalingGroupRecommendations -> String)
-> ([ExportAutoScalingGroupRecommendations] -> ShowS)
-> Show ExportAutoScalingGroupRecommendations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportAutoScalingGroupRecommendations] -> ShowS
$cshowList :: [ExportAutoScalingGroupRecommendations] -> ShowS
show :: ExportAutoScalingGroupRecommendations -> String
$cshow :: ExportAutoScalingGroupRecommendations -> String
showsPrec :: Int -> ExportAutoScalingGroupRecommendations -> ShowS
$cshowsPrec :: Int -> ExportAutoScalingGroupRecommendations -> ShowS
Prelude.Show, (forall x.
ExportAutoScalingGroupRecommendations
-> Rep ExportAutoScalingGroupRecommendations x)
-> (forall x.
Rep ExportAutoScalingGroupRecommendations x
-> ExportAutoScalingGroupRecommendations)
-> Generic ExportAutoScalingGroupRecommendations
forall x.
Rep ExportAutoScalingGroupRecommendations x
-> ExportAutoScalingGroupRecommendations
forall x.
ExportAutoScalingGroupRecommendations
-> Rep ExportAutoScalingGroupRecommendations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExportAutoScalingGroupRecommendations x
-> ExportAutoScalingGroupRecommendations
$cfrom :: forall x.
ExportAutoScalingGroupRecommendations
-> Rep ExportAutoScalingGroupRecommendations x
Prelude.Generic)
newExportAutoScalingGroupRecommendations ::
S3DestinationConfig ->
ExportAutoScalingGroupRecommendations
newExportAutoScalingGroupRecommendations :: S3DestinationConfig -> ExportAutoScalingGroupRecommendations
newExportAutoScalingGroupRecommendations
S3DestinationConfig
pS3DestinationConfig_ =
ExportAutoScalingGroupRecommendations' :: Maybe [Text]
-> Maybe FileFormat
-> Maybe [Filter]
-> Maybe [ExportableAutoScalingGroupField]
-> Maybe Bool
-> Maybe RecommendationPreferences
-> S3DestinationConfig
-> ExportAutoScalingGroupRecommendations
ExportAutoScalingGroupRecommendations'
{ $sel:accountIds:ExportAutoScalingGroupRecommendations' :: Maybe [Text]
accountIds =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:fileFormat:ExportAutoScalingGroupRecommendations' :: Maybe FileFormat
fileFormat = Maybe FileFormat
forall a. Maybe a
Prelude.Nothing,
$sel:filters:ExportAutoScalingGroupRecommendations' :: Maybe [Filter]
filters = Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
$sel:fieldsToExport:ExportAutoScalingGroupRecommendations' :: Maybe [ExportableAutoScalingGroupField]
fieldsToExport = Maybe [ExportableAutoScalingGroupField]
forall a. Maybe a
Prelude.Nothing,
$sel:includeMemberAccounts:ExportAutoScalingGroupRecommendations' :: Maybe Bool
includeMemberAccounts =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:recommendationPreferences:ExportAutoScalingGroupRecommendations' :: Maybe RecommendationPreferences
recommendationPreferences =
Maybe RecommendationPreferences
forall a. Maybe a
Prelude.Nothing,
$sel:s3DestinationConfig:ExportAutoScalingGroupRecommendations' :: S3DestinationConfig
s3DestinationConfig =
S3DestinationConfig
pS3DestinationConfig_
}
exportAutoScalingGroupRecommendations_accountIds :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe [Prelude.Text])
exportAutoScalingGroupRecommendations_accountIds :: (Maybe [Text] -> f (Maybe [Text]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
exportAutoScalingGroupRecommendations_accountIds = (ExportAutoScalingGroupRecommendations -> Maybe [Text])
-> (ExportAutoScalingGroupRecommendations
-> Maybe [Text] -> ExportAutoScalingGroupRecommendations)
-> Lens
ExportAutoScalingGroupRecommendations
ExportAutoScalingGroupRecommendations
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendations' {Maybe [Text]
accountIds :: Maybe [Text]
$sel:accountIds:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe [Text]
accountIds} -> Maybe [Text]
accountIds) (\s :: ExportAutoScalingGroupRecommendations
s@ExportAutoScalingGroupRecommendations' {} Maybe [Text]
a -> ExportAutoScalingGroupRecommendations
s {$sel:accountIds:ExportAutoScalingGroupRecommendations' :: Maybe [Text]
accountIds = Maybe [Text]
a} :: ExportAutoScalingGroupRecommendations) ((Maybe [Text] -> f (Maybe [Text]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
exportAutoScalingGroupRecommendations_fileFormat :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe FileFormat)
exportAutoScalingGroupRecommendations_fileFormat :: (Maybe FileFormat -> f (Maybe FileFormat))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
exportAutoScalingGroupRecommendations_fileFormat = (ExportAutoScalingGroupRecommendations -> Maybe FileFormat)
-> (ExportAutoScalingGroupRecommendations
-> Maybe FileFormat -> ExportAutoScalingGroupRecommendations)
-> Lens
ExportAutoScalingGroupRecommendations
ExportAutoScalingGroupRecommendations
(Maybe FileFormat)
(Maybe FileFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendations' {Maybe FileFormat
fileFormat :: Maybe FileFormat
$sel:fileFormat:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe FileFormat
fileFormat} -> Maybe FileFormat
fileFormat) (\s :: ExportAutoScalingGroupRecommendations
s@ExportAutoScalingGroupRecommendations' {} Maybe FileFormat
a -> ExportAutoScalingGroupRecommendations
s {$sel:fileFormat:ExportAutoScalingGroupRecommendations' :: Maybe FileFormat
fileFormat = Maybe FileFormat
a} :: ExportAutoScalingGroupRecommendations)
exportAutoScalingGroupRecommendations_filters :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe [Filter])
exportAutoScalingGroupRecommendations_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
exportAutoScalingGroupRecommendations_filters = (ExportAutoScalingGroupRecommendations -> Maybe [Filter])
-> (ExportAutoScalingGroupRecommendations
-> Maybe [Filter] -> ExportAutoScalingGroupRecommendations)
-> Lens
ExportAutoScalingGroupRecommendations
ExportAutoScalingGroupRecommendations
(Maybe [Filter])
(Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendations' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ExportAutoScalingGroupRecommendations
s@ExportAutoScalingGroupRecommendations' {} Maybe [Filter]
a -> ExportAutoScalingGroupRecommendations
s {$sel:filters:ExportAutoScalingGroupRecommendations' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ExportAutoScalingGroupRecommendations) ((Maybe [Filter] -> f (Maybe [Filter]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
-> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
(Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
exportAutoScalingGroupRecommendations_fieldsToExport :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe [ExportableAutoScalingGroupField])
exportAutoScalingGroupRecommendations_fieldsToExport :: (Maybe [ExportableAutoScalingGroupField]
-> f (Maybe [ExportableAutoScalingGroupField]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
exportAutoScalingGroupRecommendations_fieldsToExport = (ExportAutoScalingGroupRecommendations
-> Maybe [ExportableAutoScalingGroupField])
-> (ExportAutoScalingGroupRecommendations
-> Maybe [ExportableAutoScalingGroupField]
-> ExportAutoScalingGroupRecommendations)
-> Lens
ExportAutoScalingGroupRecommendations
ExportAutoScalingGroupRecommendations
(Maybe [ExportableAutoScalingGroupField])
(Maybe [ExportableAutoScalingGroupField])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendations' {Maybe [ExportableAutoScalingGroupField]
fieldsToExport :: Maybe [ExportableAutoScalingGroupField]
$sel:fieldsToExport:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations
-> Maybe [ExportableAutoScalingGroupField]
fieldsToExport} -> Maybe [ExportableAutoScalingGroupField]
fieldsToExport) (\s :: ExportAutoScalingGroupRecommendations
s@ExportAutoScalingGroupRecommendations' {} Maybe [ExportableAutoScalingGroupField]
a -> ExportAutoScalingGroupRecommendations
s {$sel:fieldsToExport:ExportAutoScalingGroupRecommendations' :: Maybe [ExportableAutoScalingGroupField]
fieldsToExport = Maybe [ExportableAutoScalingGroupField]
a} :: ExportAutoScalingGroupRecommendations) ((Maybe [ExportableAutoScalingGroupField]
-> f (Maybe [ExportableAutoScalingGroupField]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations)
-> ((Maybe [ExportableAutoScalingGroupField]
-> f (Maybe [ExportableAutoScalingGroupField]))
-> Maybe [ExportableAutoScalingGroupField]
-> f (Maybe [ExportableAutoScalingGroupField]))
-> (Maybe [ExportableAutoScalingGroupField]
-> f (Maybe [ExportableAutoScalingGroupField]))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ExportableAutoScalingGroupField]
[ExportableAutoScalingGroupField]
[ExportableAutoScalingGroupField]
[ExportableAutoScalingGroupField]
-> Iso
(Maybe [ExportableAutoScalingGroupField])
(Maybe [ExportableAutoScalingGroupField])
(Maybe [ExportableAutoScalingGroupField])
(Maybe [ExportableAutoScalingGroupField])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[ExportableAutoScalingGroupField]
[ExportableAutoScalingGroupField]
[ExportableAutoScalingGroupField]
[ExportableAutoScalingGroupField]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
exportAutoScalingGroupRecommendations_includeMemberAccounts :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe Prelude.Bool)
exportAutoScalingGroupRecommendations_includeMemberAccounts :: (Maybe Bool -> f (Maybe Bool))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
exportAutoScalingGroupRecommendations_includeMemberAccounts = (ExportAutoScalingGroupRecommendations -> Maybe Bool)
-> (ExportAutoScalingGroupRecommendations
-> Maybe Bool -> ExportAutoScalingGroupRecommendations)
-> Lens
ExportAutoScalingGroupRecommendations
ExportAutoScalingGroupRecommendations
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendations' {Maybe Bool
includeMemberAccounts :: Maybe Bool
$sel:includeMemberAccounts:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe Bool
includeMemberAccounts} -> Maybe Bool
includeMemberAccounts) (\s :: ExportAutoScalingGroupRecommendations
s@ExportAutoScalingGroupRecommendations' {} Maybe Bool
a -> ExportAutoScalingGroupRecommendations
s {$sel:includeMemberAccounts:ExportAutoScalingGroupRecommendations' :: Maybe Bool
includeMemberAccounts = Maybe Bool
a} :: ExportAutoScalingGroupRecommendations)
exportAutoScalingGroupRecommendations_recommendationPreferences :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe RecommendationPreferences)
exportAutoScalingGroupRecommendations_recommendationPreferences :: (Maybe RecommendationPreferences
-> f (Maybe RecommendationPreferences))
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
exportAutoScalingGroupRecommendations_recommendationPreferences = (ExportAutoScalingGroupRecommendations
-> Maybe RecommendationPreferences)
-> (ExportAutoScalingGroupRecommendations
-> Maybe RecommendationPreferences
-> ExportAutoScalingGroupRecommendations)
-> Lens
ExportAutoScalingGroupRecommendations
ExportAutoScalingGroupRecommendations
(Maybe RecommendationPreferences)
(Maybe RecommendationPreferences)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendations' {Maybe RecommendationPreferences
recommendationPreferences :: Maybe RecommendationPreferences
$sel:recommendationPreferences:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations
-> Maybe RecommendationPreferences
recommendationPreferences} -> Maybe RecommendationPreferences
recommendationPreferences) (\s :: ExportAutoScalingGroupRecommendations
s@ExportAutoScalingGroupRecommendations' {} Maybe RecommendationPreferences
a -> ExportAutoScalingGroupRecommendations
s {$sel:recommendationPreferences:ExportAutoScalingGroupRecommendations' :: Maybe RecommendationPreferences
recommendationPreferences = Maybe RecommendationPreferences
a} :: ExportAutoScalingGroupRecommendations)
exportAutoScalingGroupRecommendations_s3DestinationConfig :: Lens.Lens' ExportAutoScalingGroupRecommendations S3DestinationConfig
exportAutoScalingGroupRecommendations_s3DestinationConfig :: (S3DestinationConfig -> f S3DestinationConfig)
-> ExportAutoScalingGroupRecommendations
-> f ExportAutoScalingGroupRecommendations
exportAutoScalingGroupRecommendations_s3DestinationConfig = (ExportAutoScalingGroupRecommendations -> S3DestinationConfig)
-> (ExportAutoScalingGroupRecommendations
-> S3DestinationConfig -> ExportAutoScalingGroupRecommendations)
-> Lens
ExportAutoScalingGroupRecommendations
ExportAutoScalingGroupRecommendations
S3DestinationConfig
S3DestinationConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendations' {S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
$sel:s3DestinationConfig:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> S3DestinationConfig
s3DestinationConfig} -> S3DestinationConfig
s3DestinationConfig) (\s :: ExportAutoScalingGroupRecommendations
s@ExportAutoScalingGroupRecommendations' {} S3DestinationConfig
a -> ExportAutoScalingGroupRecommendations
s {$sel:s3DestinationConfig:ExportAutoScalingGroupRecommendations' :: S3DestinationConfig
s3DestinationConfig = S3DestinationConfig
a} :: ExportAutoScalingGroupRecommendations)
instance
Core.AWSRequest
ExportAutoScalingGroupRecommendations
where
type
AWSResponse
ExportAutoScalingGroupRecommendations =
ExportAutoScalingGroupRecommendationsResponse
request :: ExportAutoScalingGroupRecommendations
-> Request ExportAutoScalingGroupRecommendations
request = Service
-> ExportAutoScalingGroupRecommendations
-> Request ExportAutoScalingGroupRecommendations
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ExportAutoScalingGroupRecommendations
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse ExportAutoScalingGroupRecommendations)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either
String (AWSResponse ExportAutoScalingGroupRecommendations))
-> Logger
-> Service
-> Proxy ExportAutoScalingGroupRecommendations
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse ExportAutoScalingGroupRecommendations)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe S3Destination
-> Int
-> ExportAutoScalingGroupRecommendationsResponse
ExportAutoScalingGroupRecommendationsResponse'
(Maybe Text
-> Maybe S3Destination
-> Int
-> ExportAutoScalingGroupRecommendationsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe S3Destination
-> Int -> ExportAutoScalingGroupRecommendationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"jobId")
Either
String
(Maybe S3Destination
-> Int -> ExportAutoScalingGroupRecommendationsResponse)
-> Either String (Maybe S3Destination)
-> Either
String (Int -> ExportAutoScalingGroupRecommendationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe S3Destination)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"s3Destination")
Either
String (Int -> ExportAutoScalingGroupRecommendationsResponse)
-> Either String Int
-> Either String ExportAutoScalingGroupRecommendationsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
ExportAutoScalingGroupRecommendations
instance
Prelude.NFData
ExportAutoScalingGroupRecommendations
instance
Core.ToHeaders
ExportAutoScalingGroupRecommendations
where
toHeaders :: ExportAutoScalingGroupRecommendations -> ResponseHeaders
toHeaders =
ResponseHeaders
-> ExportAutoScalingGroupRecommendations -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"ComputeOptimizerService.ExportAutoScalingGroupRecommendations" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance
Core.ToJSON
ExportAutoScalingGroupRecommendations
where
toJSON :: ExportAutoScalingGroupRecommendations -> Value
toJSON ExportAutoScalingGroupRecommendations' {Maybe Bool
Maybe [Text]
Maybe [ExportableAutoScalingGroupField]
Maybe [Filter]
Maybe FileFormat
Maybe RecommendationPreferences
S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
recommendationPreferences :: Maybe RecommendationPreferences
includeMemberAccounts :: Maybe Bool
fieldsToExport :: Maybe [ExportableAutoScalingGroupField]
filters :: Maybe [Filter]
fileFormat :: Maybe FileFormat
accountIds :: Maybe [Text]
$sel:s3DestinationConfig:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> S3DestinationConfig
$sel:recommendationPreferences:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations
-> Maybe RecommendationPreferences
$sel:includeMemberAccounts:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe Bool
$sel:fieldsToExport:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations
-> Maybe [ExportableAutoScalingGroupField]
$sel:filters:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe [Filter]
$sel:fileFormat:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe FileFormat
$sel:accountIds:ExportAutoScalingGroupRecommendations' :: ExportAutoScalingGroupRecommendations -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"accountIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
accountIds,
(Text
"fileFormat" Text -> FileFormat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (FileFormat -> Pair) -> Maybe FileFormat -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FileFormat
fileFormat,
(Text
"filters" Text -> [Filter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Filter] -> Pair) -> Maybe [Filter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
(Text
"fieldsToExport" Text -> [ExportableAutoScalingGroupField] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([ExportableAutoScalingGroupField] -> Pair)
-> Maybe [ExportableAutoScalingGroupField] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ExportableAutoScalingGroupField]
fieldsToExport,
(Text
"includeMemberAccounts" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeMemberAccounts,
(Text
"recommendationPreferences" Text -> RecommendationPreferences -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(RecommendationPreferences -> Pair)
-> Maybe RecommendationPreferences -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RecommendationPreferences
recommendationPreferences,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"s3DestinationConfig" Text -> S3DestinationConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= S3DestinationConfig
s3DestinationConfig)
]
)
instance
Core.ToPath
ExportAutoScalingGroupRecommendations
where
toPath :: ExportAutoScalingGroupRecommendations -> ByteString
toPath = ByteString -> ExportAutoScalingGroupRecommendations -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
ExportAutoScalingGroupRecommendations
where
toQuery :: ExportAutoScalingGroupRecommendations -> QueryString
toQuery = QueryString -> ExportAutoScalingGroupRecommendations -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ExportAutoScalingGroupRecommendationsResponse = ExportAutoScalingGroupRecommendationsResponse'
{
ExportAutoScalingGroupRecommendationsResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
ExportAutoScalingGroupRecommendationsResponse
-> Maybe S3Destination
s3Destination :: Prelude.Maybe S3Destination,
ExportAutoScalingGroupRecommendationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ExportAutoScalingGroupRecommendationsResponse
-> ExportAutoScalingGroupRecommendationsResponse -> Bool
(ExportAutoScalingGroupRecommendationsResponse
-> ExportAutoScalingGroupRecommendationsResponse -> Bool)
-> (ExportAutoScalingGroupRecommendationsResponse
-> ExportAutoScalingGroupRecommendationsResponse -> Bool)
-> Eq ExportAutoScalingGroupRecommendationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportAutoScalingGroupRecommendationsResponse
-> ExportAutoScalingGroupRecommendationsResponse -> Bool
$c/= :: ExportAutoScalingGroupRecommendationsResponse
-> ExportAutoScalingGroupRecommendationsResponse -> Bool
== :: ExportAutoScalingGroupRecommendationsResponse
-> ExportAutoScalingGroupRecommendationsResponse -> Bool
$c== :: ExportAutoScalingGroupRecommendationsResponse
-> ExportAutoScalingGroupRecommendationsResponse -> Bool
Prelude.Eq, ReadPrec [ExportAutoScalingGroupRecommendationsResponse]
ReadPrec ExportAutoScalingGroupRecommendationsResponse
Int -> ReadS ExportAutoScalingGroupRecommendationsResponse
ReadS [ExportAutoScalingGroupRecommendationsResponse]
(Int -> ReadS ExportAutoScalingGroupRecommendationsResponse)
-> ReadS [ExportAutoScalingGroupRecommendationsResponse]
-> ReadPrec ExportAutoScalingGroupRecommendationsResponse
-> ReadPrec [ExportAutoScalingGroupRecommendationsResponse]
-> Read ExportAutoScalingGroupRecommendationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportAutoScalingGroupRecommendationsResponse]
$creadListPrec :: ReadPrec [ExportAutoScalingGroupRecommendationsResponse]
readPrec :: ReadPrec ExportAutoScalingGroupRecommendationsResponse
$creadPrec :: ReadPrec ExportAutoScalingGroupRecommendationsResponse
readList :: ReadS [ExportAutoScalingGroupRecommendationsResponse]
$creadList :: ReadS [ExportAutoScalingGroupRecommendationsResponse]
readsPrec :: Int -> ReadS ExportAutoScalingGroupRecommendationsResponse
$creadsPrec :: Int -> ReadS ExportAutoScalingGroupRecommendationsResponse
Prelude.Read, Int -> ExportAutoScalingGroupRecommendationsResponse -> ShowS
[ExportAutoScalingGroupRecommendationsResponse] -> ShowS
ExportAutoScalingGroupRecommendationsResponse -> String
(Int -> ExportAutoScalingGroupRecommendationsResponse -> ShowS)
-> (ExportAutoScalingGroupRecommendationsResponse -> String)
-> ([ExportAutoScalingGroupRecommendationsResponse] -> ShowS)
-> Show ExportAutoScalingGroupRecommendationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportAutoScalingGroupRecommendationsResponse] -> ShowS
$cshowList :: [ExportAutoScalingGroupRecommendationsResponse] -> ShowS
show :: ExportAutoScalingGroupRecommendationsResponse -> String
$cshow :: ExportAutoScalingGroupRecommendationsResponse -> String
showsPrec :: Int -> ExportAutoScalingGroupRecommendationsResponse -> ShowS
$cshowsPrec :: Int -> ExportAutoScalingGroupRecommendationsResponse -> ShowS
Prelude.Show, (forall x.
ExportAutoScalingGroupRecommendationsResponse
-> Rep ExportAutoScalingGroupRecommendationsResponse x)
-> (forall x.
Rep ExportAutoScalingGroupRecommendationsResponse x
-> ExportAutoScalingGroupRecommendationsResponse)
-> Generic ExportAutoScalingGroupRecommendationsResponse
forall x.
Rep ExportAutoScalingGroupRecommendationsResponse x
-> ExportAutoScalingGroupRecommendationsResponse
forall x.
ExportAutoScalingGroupRecommendationsResponse
-> Rep ExportAutoScalingGroupRecommendationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExportAutoScalingGroupRecommendationsResponse x
-> ExportAutoScalingGroupRecommendationsResponse
$cfrom :: forall x.
ExportAutoScalingGroupRecommendationsResponse
-> Rep ExportAutoScalingGroupRecommendationsResponse x
Prelude.Generic)
newExportAutoScalingGroupRecommendationsResponse ::
Prelude.Int ->
ExportAutoScalingGroupRecommendationsResponse
newExportAutoScalingGroupRecommendationsResponse :: Int -> ExportAutoScalingGroupRecommendationsResponse
newExportAutoScalingGroupRecommendationsResponse
Int
pHttpStatus_ =
ExportAutoScalingGroupRecommendationsResponse' :: Maybe Text
-> Maybe S3Destination
-> Int
-> ExportAutoScalingGroupRecommendationsResponse
ExportAutoScalingGroupRecommendationsResponse'
{ $sel:jobId:ExportAutoScalingGroupRecommendationsResponse' :: Maybe Text
jobId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3Destination:ExportAutoScalingGroupRecommendationsResponse' :: Maybe S3Destination
s3Destination =
Maybe S3Destination
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ExportAutoScalingGroupRecommendationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
exportAutoScalingGroupRecommendationsResponse_jobId :: Lens.Lens' ExportAutoScalingGroupRecommendationsResponse (Prelude.Maybe Prelude.Text)
exportAutoScalingGroupRecommendationsResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> ExportAutoScalingGroupRecommendationsResponse
-> f ExportAutoScalingGroupRecommendationsResponse
exportAutoScalingGroupRecommendationsResponse_jobId = (ExportAutoScalingGroupRecommendationsResponse -> Maybe Text)
-> (ExportAutoScalingGroupRecommendationsResponse
-> Maybe Text -> ExportAutoScalingGroupRecommendationsResponse)
-> Lens
ExportAutoScalingGroupRecommendationsResponse
ExportAutoScalingGroupRecommendationsResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendationsResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:ExportAutoScalingGroupRecommendationsResponse' :: ExportAutoScalingGroupRecommendationsResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: ExportAutoScalingGroupRecommendationsResponse
s@ExportAutoScalingGroupRecommendationsResponse' {} Maybe Text
a -> ExportAutoScalingGroupRecommendationsResponse
s {$sel:jobId:ExportAutoScalingGroupRecommendationsResponse' :: Maybe Text
jobId = Maybe Text
a} :: ExportAutoScalingGroupRecommendationsResponse)
exportAutoScalingGroupRecommendationsResponse_s3Destination :: Lens.Lens' ExportAutoScalingGroupRecommendationsResponse (Prelude.Maybe S3Destination)
exportAutoScalingGroupRecommendationsResponse_s3Destination :: (Maybe S3Destination -> f (Maybe S3Destination))
-> ExportAutoScalingGroupRecommendationsResponse
-> f ExportAutoScalingGroupRecommendationsResponse
exportAutoScalingGroupRecommendationsResponse_s3Destination = (ExportAutoScalingGroupRecommendationsResponse
-> Maybe S3Destination)
-> (ExportAutoScalingGroupRecommendationsResponse
-> Maybe S3Destination
-> ExportAutoScalingGroupRecommendationsResponse)
-> Lens
ExportAutoScalingGroupRecommendationsResponse
ExportAutoScalingGroupRecommendationsResponse
(Maybe S3Destination)
(Maybe S3Destination)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendationsResponse' {Maybe S3Destination
s3Destination :: Maybe S3Destination
$sel:s3Destination:ExportAutoScalingGroupRecommendationsResponse' :: ExportAutoScalingGroupRecommendationsResponse
-> Maybe S3Destination
s3Destination} -> Maybe S3Destination
s3Destination) (\s :: ExportAutoScalingGroupRecommendationsResponse
s@ExportAutoScalingGroupRecommendationsResponse' {} Maybe S3Destination
a -> ExportAutoScalingGroupRecommendationsResponse
s {$sel:s3Destination:ExportAutoScalingGroupRecommendationsResponse' :: Maybe S3Destination
s3Destination = Maybe S3Destination
a} :: ExportAutoScalingGroupRecommendationsResponse)
exportAutoScalingGroupRecommendationsResponse_httpStatus :: Lens.Lens' ExportAutoScalingGroupRecommendationsResponse Prelude.Int
exportAutoScalingGroupRecommendationsResponse_httpStatus :: (Int -> f Int)
-> ExportAutoScalingGroupRecommendationsResponse
-> f ExportAutoScalingGroupRecommendationsResponse
exportAutoScalingGroupRecommendationsResponse_httpStatus = (ExportAutoScalingGroupRecommendationsResponse -> Int)
-> (ExportAutoScalingGroupRecommendationsResponse
-> Int -> ExportAutoScalingGroupRecommendationsResponse)
-> Lens
ExportAutoScalingGroupRecommendationsResponse
ExportAutoScalingGroupRecommendationsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAutoScalingGroupRecommendationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ExportAutoScalingGroupRecommendationsResponse' :: ExportAutoScalingGroupRecommendationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ExportAutoScalingGroupRecommendationsResponse
s@ExportAutoScalingGroupRecommendationsResponse' {} Int
a -> ExportAutoScalingGroupRecommendationsResponse
s {$sel:httpStatus:ExportAutoScalingGroupRecommendationsResponse' :: Int
httpStatus = Int
a} :: ExportAutoScalingGroupRecommendationsResponse)
instance
Prelude.NFData
ExportAutoScalingGroupRecommendationsResponse