{-# 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.ExportEBSVolumeRecommendations
(
ExportEBSVolumeRecommendations (..),
newExportEBSVolumeRecommendations,
exportEBSVolumeRecommendations_accountIds,
exportEBSVolumeRecommendations_fileFormat,
exportEBSVolumeRecommendations_filters,
exportEBSVolumeRecommendations_fieldsToExport,
exportEBSVolumeRecommendations_includeMemberAccounts,
exportEBSVolumeRecommendations_s3DestinationConfig,
ExportEBSVolumeRecommendationsResponse (..),
newExportEBSVolumeRecommendationsResponse,
exportEBSVolumeRecommendationsResponse_jobId,
exportEBSVolumeRecommendationsResponse_s3Destination,
exportEBSVolumeRecommendationsResponse_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 ExportEBSVolumeRecommendations = ExportEBSVolumeRecommendations'
{
ExportEBSVolumeRecommendations -> Maybe [Text]
accountIds :: Prelude.Maybe [Prelude.Text],
ExportEBSVolumeRecommendations -> Maybe FileFormat
fileFormat :: Prelude.Maybe FileFormat,
ExportEBSVolumeRecommendations -> Maybe [EBSFilter]
filters :: Prelude.Maybe [EBSFilter],
ExportEBSVolumeRecommendations -> Maybe [ExportableVolumeField]
fieldsToExport :: Prelude.Maybe [ExportableVolumeField],
ExportEBSVolumeRecommendations -> Maybe Bool
includeMemberAccounts :: Prelude.Maybe Prelude.Bool,
ExportEBSVolumeRecommendations -> S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
}
deriving (ExportEBSVolumeRecommendations
-> ExportEBSVolumeRecommendations -> Bool
(ExportEBSVolumeRecommendations
-> ExportEBSVolumeRecommendations -> Bool)
-> (ExportEBSVolumeRecommendations
-> ExportEBSVolumeRecommendations -> Bool)
-> Eq ExportEBSVolumeRecommendations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportEBSVolumeRecommendations
-> ExportEBSVolumeRecommendations -> Bool
$c/= :: ExportEBSVolumeRecommendations
-> ExportEBSVolumeRecommendations -> Bool
== :: ExportEBSVolumeRecommendations
-> ExportEBSVolumeRecommendations -> Bool
$c== :: ExportEBSVolumeRecommendations
-> ExportEBSVolumeRecommendations -> Bool
Prelude.Eq, ReadPrec [ExportEBSVolumeRecommendations]
ReadPrec ExportEBSVolumeRecommendations
Int -> ReadS ExportEBSVolumeRecommendations
ReadS [ExportEBSVolumeRecommendations]
(Int -> ReadS ExportEBSVolumeRecommendations)
-> ReadS [ExportEBSVolumeRecommendations]
-> ReadPrec ExportEBSVolumeRecommendations
-> ReadPrec [ExportEBSVolumeRecommendations]
-> Read ExportEBSVolumeRecommendations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportEBSVolumeRecommendations]
$creadListPrec :: ReadPrec [ExportEBSVolumeRecommendations]
readPrec :: ReadPrec ExportEBSVolumeRecommendations
$creadPrec :: ReadPrec ExportEBSVolumeRecommendations
readList :: ReadS [ExportEBSVolumeRecommendations]
$creadList :: ReadS [ExportEBSVolumeRecommendations]
readsPrec :: Int -> ReadS ExportEBSVolumeRecommendations
$creadsPrec :: Int -> ReadS ExportEBSVolumeRecommendations
Prelude.Read, Int -> ExportEBSVolumeRecommendations -> ShowS
[ExportEBSVolumeRecommendations] -> ShowS
ExportEBSVolumeRecommendations -> String
(Int -> ExportEBSVolumeRecommendations -> ShowS)
-> (ExportEBSVolumeRecommendations -> String)
-> ([ExportEBSVolumeRecommendations] -> ShowS)
-> Show ExportEBSVolumeRecommendations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportEBSVolumeRecommendations] -> ShowS
$cshowList :: [ExportEBSVolumeRecommendations] -> ShowS
show :: ExportEBSVolumeRecommendations -> String
$cshow :: ExportEBSVolumeRecommendations -> String
showsPrec :: Int -> ExportEBSVolumeRecommendations -> ShowS
$cshowsPrec :: Int -> ExportEBSVolumeRecommendations -> ShowS
Prelude.Show, (forall x.
ExportEBSVolumeRecommendations
-> Rep ExportEBSVolumeRecommendations x)
-> (forall x.
Rep ExportEBSVolumeRecommendations x
-> ExportEBSVolumeRecommendations)
-> Generic ExportEBSVolumeRecommendations
forall x.
Rep ExportEBSVolumeRecommendations x
-> ExportEBSVolumeRecommendations
forall x.
ExportEBSVolumeRecommendations
-> Rep ExportEBSVolumeRecommendations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExportEBSVolumeRecommendations x
-> ExportEBSVolumeRecommendations
$cfrom :: forall x.
ExportEBSVolumeRecommendations
-> Rep ExportEBSVolumeRecommendations x
Prelude.Generic)
newExportEBSVolumeRecommendations ::
S3DestinationConfig ->
ExportEBSVolumeRecommendations
newExportEBSVolumeRecommendations :: S3DestinationConfig -> ExportEBSVolumeRecommendations
newExportEBSVolumeRecommendations
S3DestinationConfig
pS3DestinationConfig_ =
ExportEBSVolumeRecommendations' :: Maybe [Text]
-> Maybe FileFormat
-> Maybe [EBSFilter]
-> Maybe [ExportableVolumeField]
-> Maybe Bool
-> S3DestinationConfig
-> ExportEBSVolumeRecommendations
ExportEBSVolumeRecommendations'
{ $sel:accountIds:ExportEBSVolumeRecommendations' :: Maybe [Text]
accountIds =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:fileFormat:ExportEBSVolumeRecommendations' :: Maybe FileFormat
fileFormat = Maybe FileFormat
forall a. Maybe a
Prelude.Nothing,
$sel:filters:ExportEBSVolumeRecommendations' :: Maybe [EBSFilter]
filters = Maybe [EBSFilter]
forall a. Maybe a
Prelude.Nothing,
$sel:fieldsToExport:ExportEBSVolumeRecommendations' :: Maybe [ExportableVolumeField]
fieldsToExport = Maybe [ExportableVolumeField]
forall a. Maybe a
Prelude.Nothing,
$sel:includeMemberAccounts:ExportEBSVolumeRecommendations' :: Maybe Bool
includeMemberAccounts = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:s3DestinationConfig:ExportEBSVolumeRecommendations' :: S3DestinationConfig
s3DestinationConfig = S3DestinationConfig
pS3DestinationConfig_
}
exportEBSVolumeRecommendations_accountIds :: Lens.Lens' ExportEBSVolumeRecommendations (Prelude.Maybe [Prelude.Text])
exportEBSVolumeRecommendations_accountIds :: (Maybe [Text] -> f (Maybe [Text]))
-> ExportEBSVolumeRecommendations
-> f ExportEBSVolumeRecommendations
exportEBSVolumeRecommendations_accountIds = (ExportEBSVolumeRecommendations -> Maybe [Text])
-> (ExportEBSVolumeRecommendations
-> Maybe [Text] -> ExportEBSVolumeRecommendations)
-> Lens
ExportEBSVolumeRecommendations
ExportEBSVolumeRecommendations
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportEBSVolumeRecommendations' {Maybe [Text]
accountIds :: Maybe [Text]
$sel:accountIds:ExportEBSVolumeRecommendations' :: ExportEBSVolumeRecommendations -> Maybe [Text]
accountIds} -> Maybe [Text]
accountIds) (\s :: ExportEBSVolumeRecommendations
s@ExportEBSVolumeRecommendations' {} Maybe [Text]
a -> ExportEBSVolumeRecommendations
s {$sel:accountIds:ExportEBSVolumeRecommendations' :: Maybe [Text]
accountIds = Maybe [Text]
a} :: ExportEBSVolumeRecommendations) ((Maybe [Text] -> f (Maybe [Text]))
-> ExportEBSVolumeRecommendations
-> f ExportEBSVolumeRecommendations)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ExportEBSVolumeRecommendations
-> f ExportEBSVolumeRecommendations
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
exportEBSVolumeRecommendations_fileFormat :: Lens.Lens' ExportEBSVolumeRecommendations (Prelude.Maybe FileFormat)
exportEBSVolumeRecommendations_fileFormat :: (Maybe FileFormat -> f (Maybe FileFormat))
-> ExportEBSVolumeRecommendations
-> f ExportEBSVolumeRecommendations
exportEBSVolumeRecommendations_fileFormat = (ExportEBSVolumeRecommendations -> Maybe FileFormat)
-> (ExportEBSVolumeRecommendations
-> Maybe FileFormat -> ExportEBSVolumeRecommendations)
-> Lens
ExportEBSVolumeRecommendations
ExportEBSVolumeRecommendations
(Maybe FileFormat)
(Maybe FileFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportEBSVolumeRecommendations' {Maybe FileFormat
fileFormat :: Maybe FileFormat
$sel:fileFormat:ExportEBSVolumeRecommendations' :: ExportEBSVolumeRecommendations -> Maybe FileFormat
fileFormat} -> Maybe FileFormat
fileFormat) (\s :: ExportEBSVolumeRecommendations
s@ExportEBSVolumeRecommendations' {} Maybe FileFormat
a -> ExportEBSVolumeRecommendations
s {$sel:fileFormat:ExportEBSVolumeRecommendations' :: Maybe FileFormat
fileFormat = Maybe FileFormat
a} :: ExportEBSVolumeRecommendations)
exportEBSVolumeRecommendations_filters :: Lens.Lens' ExportEBSVolumeRecommendations (Prelude.Maybe [EBSFilter])
exportEBSVolumeRecommendations_filters :: (Maybe [EBSFilter] -> f (Maybe [EBSFilter]))
-> ExportEBSVolumeRecommendations
-> f ExportEBSVolumeRecommendations
exportEBSVolumeRecommendations_filters = (ExportEBSVolumeRecommendations -> Maybe [EBSFilter])
-> (ExportEBSVolumeRecommendations
-> Maybe [EBSFilter] -> ExportEBSVolumeRecommendations)
-> Lens
ExportEBSVolumeRecommendations
ExportEBSVolumeRecommendations
(Maybe [EBSFilter])
(Maybe [EBSFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportEBSVolumeRecommendations' {Maybe [EBSFilter]
filters :: Maybe [EBSFilter]
$sel:filters:ExportEBSVolumeRecommendations' :: ExportEBSVolumeRecommendations -> Maybe [EBSFilter]
filters} -> Maybe [EBSFilter]
filters) (\s :: ExportEBSVolumeRecommendations
s@ExportEBSVolumeRecommendations' {} Maybe [EBSFilter]
a -> ExportEBSVolumeRecommendations
s {$sel:filters:ExportEBSVolumeRecommendations' :: Maybe [EBSFilter]
filters = Maybe [EBSFilter]
a} :: ExportEBSVolumeRecommendations) ((Maybe [EBSFilter] -> f (Maybe [EBSFilter]))
-> ExportEBSVolumeRecommendations
-> f ExportEBSVolumeRecommendations)
-> ((Maybe [EBSFilter] -> f (Maybe [EBSFilter]))
-> Maybe [EBSFilter] -> f (Maybe [EBSFilter]))
-> (Maybe [EBSFilter] -> f (Maybe [EBSFilter]))
-> ExportEBSVolumeRecommendations
-> f ExportEBSVolumeRecommendations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [EBSFilter] [EBSFilter] [EBSFilter] [EBSFilter]
-> Iso
(Maybe [EBSFilter])
(Maybe [EBSFilter])
(Maybe [EBSFilter])
(Maybe [EBSFilter])
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 [EBSFilter] [EBSFilter] [EBSFilter] [EBSFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
exportEBSVolumeRecommendations_fieldsToExport :: Lens.Lens' ExportEBSVolumeRecommendations (Prelude.Maybe [ExportableVolumeField])
exportEBSVolumeRecommendations_fieldsToExport :: (Maybe [ExportableVolumeField]
-> f (Maybe [ExportableVolumeField]))
-> ExportEBSVolumeRecommendations
-> f ExportEBSVolumeRecommendations
exportEBSVolumeRecommendations_fieldsToExport = (ExportEBSVolumeRecommendations -> Maybe [ExportableVolumeField])
-> (ExportEBSVolumeRecommendations
-> Maybe [ExportableVolumeField] -> ExportEBSVolumeRecommendations)
-> Lens
ExportEBSVolumeRecommendations
ExportEBSVolumeRecommendations
(Maybe [ExportableVolumeField])
(Maybe [ExportableVolumeField])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportEBSVolumeRecommendations' {Maybe [ExportableVolumeField]
fieldsToExport :: Maybe [ExportableVolumeField]
$sel:fieldsToExport:ExportEBSVolumeRecommendations' :: ExportEBSVolumeRecommendations -> Maybe [ExportableVolumeField]
fieldsToExport} -> Maybe [ExportableVolumeField]
fieldsToExport) (\s :: ExportEBSVolumeRecommendations
s@ExportEBSVolumeRecommendations' {} Maybe [ExportableVolumeField]
a -> ExportEBSVolumeRecommendations
s {$sel:fieldsToExport:ExportEBSVolumeRecommendations' :: Maybe [ExportableVolumeField]
fieldsToExport = Maybe [ExportableVolumeField]
a} :: ExportEBSVolumeRecommendations) ((Maybe [ExportableVolumeField]
-> f (Maybe [ExportableVolumeField]))
-> ExportEBSVolumeRecommendations
-> f ExportEBSVolumeRecommendations)
-> ((Maybe [ExportableVolumeField]
-> f (Maybe [ExportableVolumeField]))
-> Maybe [ExportableVolumeField]
-> f (Maybe [ExportableVolumeField]))
-> (Maybe [ExportableVolumeField]
-> f (Maybe [ExportableVolumeField]))
-> ExportEBSVolumeRecommendations
-> f ExportEBSVolumeRecommendations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ExportableVolumeField]
[ExportableVolumeField]
[ExportableVolumeField]
[ExportableVolumeField]
-> Iso
(Maybe [ExportableVolumeField])
(Maybe [ExportableVolumeField])
(Maybe [ExportableVolumeField])
(Maybe [ExportableVolumeField])
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
[ExportableVolumeField]
[ExportableVolumeField]
[ExportableVolumeField]
[ExportableVolumeField]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
exportEBSVolumeRecommendations_includeMemberAccounts :: Lens.Lens' ExportEBSVolumeRecommendations (Prelude.Maybe Prelude.Bool)
exportEBSVolumeRecommendations_includeMemberAccounts :: (Maybe Bool -> f (Maybe Bool))
-> ExportEBSVolumeRecommendations
-> f ExportEBSVolumeRecommendations
exportEBSVolumeRecommendations_includeMemberAccounts = (ExportEBSVolumeRecommendations -> Maybe Bool)
-> (ExportEBSVolumeRecommendations
-> Maybe Bool -> ExportEBSVolumeRecommendations)
-> Lens
ExportEBSVolumeRecommendations
ExportEBSVolumeRecommendations
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportEBSVolumeRecommendations' {Maybe Bool
includeMemberAccounts :: Maybe Bool
$sel:includeMemberAccounts:ExportEBSVolumeRecommendations' :: ExportEBSVolumeRecommendations -> Maybe Bool
includeMemberAccounts} -> Maybe Bool
includeMemberAccounts) (\s :: ExportEBSVolumeRecommendations
s@ExportEBSVolumeRecommendations' {} Maybe Bool
a -> ExportEBSVolumeRecommendations
s {$sel:includeMemberAccounts:ExportEBSVolumeRecommendations' :: Maybe Bool
includeMemberAccounts = Maybe Bool
a} :: ExportEBSVolumeRecommendations)
exportEBSVolumeRecommendations_s3DestinationConfig :: Lens.Lens' ExportEBSVolumeRecommendations S3DestinationConfig
exportEBSVolumeRecommendations_s3DestinationConfig :: (S3DestinationConfig -> f S3DestinationConfig)
-> ExportEBSVolumeRecommendations
-> f ExportEBSVolumeRecommendations
exportEBSVolumeRecommendations_s3DestinationConfig = (ExportEBSVolumeRecommendations -> S3DestinationConfig)
-> (ExportEBSVolumeRecommendations
-> S3DestinationConfig -> ExportEBSVolumeRecommendations)
-> Lens
ExportEBSVolumeRecommendations
ExportEBSVolumeRecommendations
S3DestinationConfig
S3DestinationConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportEBSVolumeRecommendations' {S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
$sel:s3DestinationConfig:ExportEBSVolumeRecommendations' :: ExportEBSVolumeRecommendations -> S3DestinationConfig
s3DestinationConfig} -> S3DestinationConfig
s3DestinationConfig) (\s :: ExportEBSVolumeRecommendations
s@ExportEBSVolumeRecommendations' {} S3DestinationConfig
a -> ExportEBSVolumeRecommendations
s {$sel:s3DestinationConfig:ExportEBSVolumeRecommendations' :: S3DestinationConfig
s3DestinationConfig = S3DestinationConfig
a} :: ExportEBSVolumeRecommendations)
instance
Core.AWSRequest
ExportEBSVolumeRecommendations
where
type
AWSResponse ExportEBSVolumeRecommendations =
ExportEBSVolumeRecommendationsResponse
request :: ExportEBSVolumeRecommendations
-> Request ExportEBSVolumeRecommendations
request = Service
-> ExportEBSVolumeRecommendations
-> Request ExportEBSVolumeRecommendations
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ExportEBSVolumeRecommendations
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse ExportEBSVolumeRecommendations)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ExportEBSVolumeRecommendations))
-> Logger
-> Service
-> Proxy ExportEBSVolumeRecommendations
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse ExportEBSVolumeRecommendations)))
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
-> ExportEBSVolumeRecommendationsResponse
ExportEBSVolumeRecommendationsResponse'
(Maybe Text
-> Maybe S3Destination
-> Int
-> ExportEBSVolumeRecommendationsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe S3Destination
-> Int -> ExportEBSVolumeRecommendationsResponse)
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 -> ExportEBSVolumeRecommendationsResponse)
-> Either String (Maybe S3Destination)
-> Either String (Int -> ExportEBSVolumeRecommendationsResponse)
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 -> ExportEBSVolumeRecommendationsResponse)
-> Either String Int
-> Either String ExportEBSVolumeRecommendationsResponse
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
ExportEBSVolumeRecommendations
instance
Prelude.NFData
ExportEBSVolumeRecommendations
instance
Core.ToHeaders
ExportEBSVolumeRecommendations
where
toHeaders :: ExportEBSVolumeRecommendations -> ResponseHeaders
toHeaders =
ResponseHeaders
-> ExportEBSVolumeRecommendations -> 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.ExportEBSVolumeRecommendations" ::
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 ExportEBSVolumeRecommendations where
toJSON :: ExportEBSVolumeRecommendations -> Value
toJSON ExportEBSVolumeRecommendations' {Maybe Bool
Maybe [Text]
Maybe [EBSFilter]
Maybe [ExportableVolumeField]
Maybe FileFormat
S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
includeMemberAccounts :: Maybe Bool
fieldsToExport :: Maybe [ExportableVolumeField]
filters :: Maybe [EBSFilter]
fileFormat :: Maybe FileFormat
accountIds :: Maybe [Text]
$sel:s3DestinationConfig:ExportEBSVolumeRecommendations' :: ExportEBSVolumeRecommendations -> S3DestinationConfig
$sel:includeMemberAccounts:ExportEBSVolumeRecommendations' :: ExportEBSVolumeRecommendations -> Maybe Bool
$sel:fieldsToExport:ExportEBSVolumeRecommendations' :: ExportEBSVolumeRecommendations -> Maybe [ExportableVolumeField]
$sel:filters:ExportEBSVolumeRecommendations' :: ExportEBSVolumeRecommendations -> Maybe [EBSFilter]
$sel:fileFormat:ExportEBSVolumeRecommendations' :: ExportEBSVolumeRecommendations -> Maybe FileFormat
$sel:accountIds:ExportEBSVolumeRecommendations' :: ExportEBSVolumeRecommendations -> 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 -> [EBSFilter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([EBSFilter] -> Pair) -> Maybe [EBSFilter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EBSFilter]
filters,
(Text
"fieldsToExport" Text -> [ExportableVolumeField] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([ExportableVolumeField] -> Pair)
-> Maybe [ExportableVolumeField] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ExportableVolumeField]
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,
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 ExportEBSVolumeRecommendations where
toPath :: ExportEBSVolumeRecommendations -> ByteString
toPath = ByteString -> ExportEBSVolumeRecommendations -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ExportEBSVolumeRecommendations where
toQuery :: ExportEBSVolumeRecommendations -> QueryString
toQuery = QueryString -> ExportEBSVolumeRecommendations -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ExportEBSVolumeRecommendationsResponse = ExportEBSVolumeRecommendationsResponse'
{
ExportEBSVolumeRecommendationsResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
ExportEBSVolumeRecommendationsResponse -> Maybe S3Destination
s3Destination :: Prelude.Maybe S3Destination,
ExportEBSVolumeRecommendationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ExportEBSVolumeRecommendationsResponse
-> ExportEBSVolumeRecommendationsResponse -> Bool
(ExportEBSVolumeRecommendationsResponse
-> ExportEBSVolumeRecommendationsResponse -> Bool)
-> (ExportEBSVolumeRecommendationsResponse
-> ExportEBSVolumeRecommendationsResponse -> Bool)
-> Eq ExportEBSVolumeRecommendationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportEBSVolumeRecommendationsResponse
-> ExportEBSVolumeRecommendationsResponse -> Bool
$c/= :: ExportEBSVolumeRecommendationsResponse
-> ExportEBSVolumeRecommendationsResponse -> Bool
== :: ExportEBSVolumeRecommendationsResponse
-> ExportEBSVolumeRecommendationsResponse -> Bool
$c== :: ExportEBSVolumeRecommendationsResponse
-> ExportEBSVolumeRecommendationsResponse -> Bool
Prelude.Eq, ReadPrec [ExportEBSVolumeRecommendationsResponse]
ReadPrec ExportEBSVolumeRecommendationsResponse
Int -> ReadS ExportEBSVolumeRecommendationsResponse
ReadS [ExportEBSVolumeRecommendationsResponse]
(Int -> ReadS ExportEBSVolumeRecommendationsResponse)
-> ReadS [ExportEBSVolumeRecommendationsResponse]
-> ReadPrec ExportEBSVolumeRecommendationsResponse
-> ReadPrec [ExportEBSVolumeRecommendationsResponse]
-> Read ExportEBSVolumeRecommendationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportEBSVolumeRecommendationsResponse]
$creadListPrec :: ReadPrec [ExportEBSVolumeRecommendationsResponse]
readPrec :: ReadPrec ExportEBSVolumeRecommendationsResponse
$creadPrec :: ReadPrec ExportEBSVolumeRecommendationsResponse
readList :: ReadS [ExportEBSVolumeRecommendationsResponse]
$creadList :: ReadS [ExportEBSVolumeRecommendationsResponse]
readsPrec :: Int -> ReadS ExportEBSVolumeRecommendationsResponse
$creadsPrec :: Int -> ReadS ExportEBSVolumeRecommendationsResponse
Prelude.Read, Int -> ExportEBSVolumeRecommendationsResponse -> ShowS
[ExportEBSVolumeRecommendationsResponse] -> ShowS
ExportEBSVolumeRecommendationsResponse -> String
(Int -> ExportEBSVolumeRecommendationsResponse -> ShowS)
-> (ExportEBSVolumeRecommendationsResponse -> String)
-> ([ExportEBSVolumeRecommendationsResponse] -> ShowS)
-> Show ExportEBSVolumeRecommendationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportEBSVolumeRecommendationsResponse] -> ShowS
$cshowList :: [ExportEBSVolumeRecommendationsResponse] -> ShowS
show :: ExportEBSVolumeRecommendationsResponse -> String
$cshow :: ExportEBSVolumeRecommendationsResponse -> String
showsPrec :: Int -> ExportEBSVolumeRecommendationsResponse -> ShowS
$cshowsPrec :: Int -> ExportEBSVolumeRecommendationsResponse -> ShowS
Prelude.Show, (forall x.
ExportEBSVolumeRecommendationsResponse
-> Rep ExportEBSVolumeRecommendationsResponse x)
-> (forall x.
Rep ExportEBSVolumeRecommendationsResponse x
-> ExportEBSVolumeRecommendationsResponse)
-> Generic ExportEBSVolumeRecommendationsResponse
forall x.
Rep ExportEBSVolumeRecommendationsResponse x
-> ExportEBSVolumeRecommendationsResponse
forall x.
ExportEBSVolumeRecommendationsResponse
-> Rep ExportEBSVolumeRecommendationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExportEBSVolumeRecommendationsResponse x
-> ExportEBSVolumeRecommendationsResponse
$cfrom :: forall x.
ExportEBSVolumeRecommendationsResponse
-> Rep ExportEBSVolumeRecommendationsResponse x
Prelude.Generic)
newExportEBSVolumeRecommendationsResponse ::
Prelude.Int ->
ExportEBSVolumeRecommendationsResponse
newExportEBSVolumeRecommendationsResponse :: Int -> ExportEBSVolumeRecommendationsResponse
newExportEBSVolumeRecommendationsResponse
Int
pHttpStatus_ =
ExportEBSVolumeRecommendationsResponse' :: Maybe Text
-> Maybe S3Destination
-> Int
-> ExportEBSVolumeRecommendationsResponse
ExportEBSVolumeRecommendationsResponse'
{ $sel:jobId:ExportEBSVolumeRecommendationsResponse' :: Maybe Text
jobId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3Destination:ExportEBSVolumeRecommendationsResponse' :: Maybe S3Destination
s3Destination = Maybe S3Destination
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ExportEBSVolumeRecommendationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
exportEBSVolumeRecommendationsResponse_jobId :: Lens.Lens' ExportEBSVolumeRecommendationsResponse (Prelude.Maybe Prelude.Text)
exportEBSVolumeRecommendationsResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> ExportEBSVolumeRecommendationsResponse
-> f ExportEBSVolumeRecommendationsResponse
exportEBSVolumeRecommendationsResponse_jobId = (ExportEBSVolumeRecommendationsResponse -> Maybe Text)
-> (ExportEBSVolumeRecommendationsResponse
-> Maybe Text -> ExportEBSVolumeRecommendationsResponse)
-> Lens
ExportEBSVolumeRecommendationsResponse
ExportEBSVolumeRecommendationsResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportEBSVolumeRecommendationsResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:ExportEBSVolumeRecommendationsResponse' :: ExportEBSVolumeRecommendationsResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: ExportEBSVolumeRecommendationsResponse
s@ExportEBSVolumeRecommendationsResponse' {} Maybe Text
a -> ExportEBSVolumeRecommendationsResponse
s {$sel:jobId:ExportEBSVolumeRecommendationsResponse' :: Maybe Text
jobId = Maybe Text
a} :: ExportEBSVolumeRecommendationsResponse)
exportEBSVolumeRecommendationsResponse_s3Destination :: Lens.Lens' ExportEBSVolumeRecommendationsResponse (Prelude.Maybe S3Destination)
exportEBSVolumeRecommendationsResponse_s3Destination :: (Maybe S3Destination -> f (Maybe S3Destination))
-> ExportEBSVolumeRecommendationsResponse
-> f ExportEBSVolumeRecommendationsResponse
exportEBSVolumeRecommendationsResponse_s3Destination = (ExportEBSVolumeRecommendationsResponse -> Maybe S3Destination)
-> (ExportEBSVolumeRecommendationsResponse
-> Maybe S3Destination -> ExportEBSVolumeRecommendationsResponse)
-> Lens
ExportEBSVolumeRecommendationsResponse
ExportEBSVolumeRecommendationsResponse
(Maybe S3Destination)
(Maybe S3Destination)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportEBSVolumeRecommendationsResponse' {Maybe S3Destination
s3Destination :: Maybe S3Destination
$sel:s3Destination:ExportEBSVolumeRecommendationsResponse' :: ExportEBSVolumeRecommendationsResponse -> Maybe S3Destination
s3Destination} -> Maybe S3Destination
s3Destination) (\s :: ExportEBSVolumeRecommendationsResponse
s@ExportEBSVolumeRecommendationsResponse' {} Maybe S3Destination
a -> ExportEBSVolumeRecommendationsResponse
s {$sel:s3Destination:ExportEBSVolumeRecommendationsResponse' :: Maybe S3Destination
s3Destination = Maybe S3Destination
a} :: ExportEBSVolumeRecommendationsResponse)
exportEBSVolumeRecommendationsResponse_httpStatus :: Lens.Lens' ExportEBSVolumeRecommendationsResponse Prelude.Int
exportEBSVolumeRecommendationsResponse_httpStatus :: (Int -> f Int)
-> ExportEBSVolumeRecommendationsResponse
-> f ExportEBSVolumeRecommendationsResponse
exportEBSVolumeRecommendationsResponse_httpStatus = (ExportEBSVolumeRecommendationsResponse -> Int)
-> (ExportEBSVolumeRecommendationsResponse
-> Int -> ExportEBSVolumeRecommendationsResponse)
-> Lens
ExportEBSVolumeRecommendationsResponse
ExportEBSVolumeRecommendationsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportEBSVolumeRecommendationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ExportEBSVolumeRecommendationsResponse' :: ExportEBSVolumeRecommendationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ExportEBSVolumeRecommendationsResponse
s@ExportEBSVolumeRecommendationsResponse' {} Int
a -> ExportEBSVolumeRecommendationsResponse
s {$sel:httpStatus:ExportEBSVolumeRecommendationsResponse' :: Int
httpStatus = Int
a} :: ExportEBSVolumeRecommendationsResponse)
instance
Prelude.NFData
ExportEBSVolumeRecommendationsResponse