{-# 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.AppRunner.DescribeAutoScalingConfiguration
(
DescribeAutoScalingConfiguration (..),
newDescribeAutoScalingConfiguration,
describeAutoScalingConfiguration_autoScalingConfigurationArn,
DescribeAutoScalingConfigurationResponse (..),
newDescribeAutoScalingConfigurationResponse,
describeAutoScalingConfigurationResponse_httpStatus,
describeAutoScalingConfigurationResponse_autoScalingConfiguration,
)
where
import Amazonka.AppRunner.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 DescribeAutoScalingConfiguration = DescribeAutoScalingConfiguration'
{
DescribeAutoScalingConfiguration -> Text
autoScalingConfigurationArn :: Prelude.Text
}
deriving (DescribeAutoScalingConfiguration
-> DescribeAutoScalingConfiguration -> Bool
(DescribeAutoScalingConfiguration
-> DescribeAutoScalingConfiguration -> Bool)
-> (DescribeAutoScalingConfiguration
-> DescribeAutoScalingConfiguration -> Bool)
-> Eq DescribeAutoScalingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAutoScalingConfiguration
-> DescribeAutoScalingConfiguration -> Bool
$c/= :: DescribeAutoScalingConfiguration
-> DescribeAutoScalingConfiguration -> Bool
== :: DescribeAutoScalingConfiguration
-> DescribeAutoScalingConfiguration -> Bool
$c== :: DescribeAutoScalingConfiguration
-> DescribeAutoScalingConfiguration -> Bool
Prelude.Eq, ReadPrec [DescribeAutoScalingConfiguration]
ReadPrec DescribeAutoScalingConfiguration
Int -> ReadS DescribeAutoScalingConfiguration
ReadS [DescribeAutoScalingConfiguration]
(Int -> ReadS DescribeAutoScalingConfiguration)
-> ReadS [DescribeAutoScalingConfiguration]
-> ReadPrec DescribeAutoScalingConfiguration
-> ReadPrec [DescribeAutoScalingConfiguration]
-> Read DescribeAutoScalingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAutoScalingConfiguration]
$creadListPrec :: ReadPrec [DescribeAutoScalingConfiguration]
readPrec :: ReadPrec DescribeAutoScalingConfiguration
$creadPrec :: ReadPrec DescribeAutoScalingConfiguration
readList :: ReadS [DescribeAutoScalingConfiguration]
$creadList :: ReadS [DescribeAutoScalingConfiguration]
readsPrec :: Int -> ReadS DescribeAutoScalingConfiguration
$creadsPrec :: Int -> ReadS DescribeAutoScalingConfiguration
Prelude.Read, Int -> DescribeAutoScalingConfiguration -> ShowS
[DescribeAutoScalingConfiguration] -> ShowS
DescribeAutoScalingConfiguration -> String
(Int -> DescribeAutoScalingConfiguration -> ShowS)
-> (DescribeAutoScalingConfiguration -> String)
-> ([DescribeAutoScalingConfiguration] -> ShowS)
-> Show DescribeAutoScalingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAutoScalingConfiguration] -> ShowS
$cshowList :: [DescribeAutoScalingConfiguration] -> ShowS
show :: DescribeAutoScalingConfiguration -> String
$cshow :: DescribeAutoScalingConfiguration -> String
showsPrec :: Int -> DescribeAutoScalingConfiguration -> ShowS
$cshowsPrec :: Int -> DescribeAutoScalingConfiguration -> ShowS
Prelude.Show, (forall x.
DescribeAutoScalingConfiguration
-> Rep DescribeAutoScalingConfiguration x)
-> (forall x.
Rep DescribeAutoScalingConfiguration x
-> DescribeAutoScalingConfiguration)
-> Generic DescribeAutoScalingConfiguration
forall x.
Rep DescribeAutoScalingConfiguration x
-> DescribeAutoScalingConfiguration
forall x.
DescribeAutoScalingConfiguration
-> Rep DescribeAutoScalingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAutoScalingConfiguration x
-> DescribeAutoScalingConfiguration
$cfrom :: forall x.
DescribeAutoScalingConfiguration
-> Rep DescribeAutoScalingConfiguration x
Prelude.Generic)
newDescribeAutoScalingConfiguration ::
Prelude.Text ->
DescribeAutoScalingConfiguration
newDescribeAutoScalingConfiguration :: Text -> DescribeAutoScalingConfiguration
newDescribeAutoScalingConfiguration
Text
pAutoScalingConfigurationArn_ =
DescribeAutoScalingConfiguration' :: Text -> DescribeAutoScalingConfiguration
DescribeAutoScalingConfiguration'
{ $sel:autoScalingConfigurationArn:DescribeAutoScalingConfiguration' :: Text
autoScalingConfigurationArn =
Text
pAutoScalingConfigurationArn_
}
describeAutoScalingConfiguration_autoScalingConfigurationArn :: Lens.Lens' DescribeAutoScalingConfiguration Prelude.Text
describeAutoScalingConfiguration_autoScalingConfigurationArn :: (Text -> f Text)
-> DescribeAutoScalingConfiguration
-> f DescribeAutoScalingConfiguration
describeAutoScalingConfiguration_autoScalingConfigurationArn = (DescribeAutoScalingConfiguration -> Text)
-> (DescribeAutoScalingConfiguration
-> Text -> DescribeAutoScalingConfiguration)
-> Lens
DescribeAutoScalingConfiguration
DescribeAutoScalingConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAutoScalingConfiguration' {Text
autoScalingConfigurationArn :: Text
$sel:autoScalingConfigurationArn:DescribeAutoScalingConfiguration' :: DescribeAutoScalingConfiguration -> Text
autoScalingConfigurationArn} -> Text
autoScalingConfigurationArn) (\s :: DescribeAutoScalingConfiguration
s@DescribeAutoScalingConfiguration' {} Text
a -> DescribeAutoScalingConfiguration
s {$sel:autoScalingConfigurationArn:DescribeAutoScalingConfiguration' :: Text
autoScalingConfigurationArn = Text
a} :: DescribeAutoScalingConfiguration)
instance
Core.AWSRequest
DescribeAutoScalingConfiguration
where
type
AWSResponse DescribeAutoScalingConfiguration =
DescribeAutoScalingConfigurationResponse
request :: DescribeAutoScalingConfiguration
-> Request DescribeAutoScalingConfiguration
request = Service
-> DescribeAutoScalingConfiguration
-> Request DescribeAutoScalingConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeAutoScalingConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeAutoScalingConfiguration)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeAutoScalingConfiguration))
-> Logger
-> Service
-> Proxy DescribeAutoScalingConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeAutoScalingConfiguration)))
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 ->
Int
-> AutoScalingConfiguration
-> DescribeAutoScalingConfigurationResponse
DescribeAutoScalingConfigurationResponse'
(Int
-> AutoScalingConfiguration
-> DescribeAutoScalingConfigurationResponse)
-> Either String Int
-> Either
String
(AutoScalingConfiguration
-> DescribeAutoScalingConfigurationResponse)
forall (f :: * -> *) a b. Functor 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))
Either
String
(AutoScalingConfiguration
-> DescribeAutoScalingConfigurationResponse)
-> Either String AutoScalingConfiguration
-> Either String DescribeAutoScalingConfigurationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String AutoScalingConfiguration
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"AutoScalingConfiguration")
)
instance
Prelude.Hashable
DescribeAutoScalingConfiguration
instance
Prelude.NFData
DescribeAutoScalingConfiguration
instance
Core.ToHeaders
DescribeAutoScalingConfiguration
where
toHeaders :: DescribeAutoScalingConfiguration -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DescribeAutoScalingConfiguration -> 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
"AppRunner.DescribeAutoScalingConfiguration" ::
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 DescribeAutoScalingConfiguration where
toJSON :: DescribeAutoScalingConfiguration -> Value
toJSON DescribeAutoScalingConfiguration' {Text
autoScalingConfigurationArn :: Text
$sel:autoScalingConfigurationArn:DescribeAutoScalingConfiguration' :: DescribeAutoScalingConfiguration -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"AutoScalingConfigurationArn"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
autoScalingConfigurationArn
)
]
)
instance Core.ToPath DescribeAutoScalingConfiguration where
toPath :: DescribeAutoScalingConfiguration -> ByteString
toPath = ByteString -> DescribeAutoScalingConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
DescribeAutoScalingConfiguration
where
toQuery :: DescribeAutoScalingConfiguration -> QueryString
toQuery = QueryString -> DescribeAutoScalingConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeAutoScalingConfigurationResponse = DescribeAutoScalingConfigurationResponse'
{
DescribeAutoScalingConfigurationResponse -> Int
httpStatus :: Prelude.Int,
DescribeAutoScalingConfigurationResponse
-> AutoScalingConfiguration
autoScalingConfiguration :: AutoScalingConfiguration
}
deriving (DescribeAutoScalingConfigurationResponse
-> DescribeAutoScalingConfigurationResponse -> Bool
(DescribeAutoScalingConfigurationResponse
-> DescribeAutoScalingConfigurationResponse -> Bool)
-> (DescribeAutoScalingConfigurationResponse
-> DescribeAutoScalingConfigurationResponse -> Bool)
-> Eq DescribeAutoScalingConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAutoScalingConfigurationResponse
-> DescribeAutoScalingConfigurationResponse -> Bool
$c/= :: DescribeAutoScalingConfigurationResponse
-> DescribeAutoScalingConfigurationResponse -> Bool
== :: DescribeAutoScalingConfigurationResponse
-> DescribeAutoScalingConfigurationResponse -> Bool
$c== :: DescribeAutoScalingConfigurationResponse
-> DescribeAutoScalingConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAutoScalingConfigurationResponse]
ReadPrec DescribeAutoScalingConfigurationResponse
Int -> ReadS DescribeAutoScalingConfigurationResponse
ReadS [DescribeAutoScalingConfigurationResponse]
(Int -> ReadS DescribeAutoScalingConfigurationResponse)
-> ReadS [DescribeAutoScalingConfigurationResponse]
-> ReadPrec DescribeAutoScalingConfigurationResponse
-> ReadPrec [DescribeAutoScalingConfigurationResponse]
-> Read DescribeAutoScalingConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAutoScalingConfigurationResponse]
$creadListPrec :: ReadPrec [DescribeAutoScalingConfigurationResponse]
readPrec :: ReadPrec DescribeAutoScalingConfigurationResponse
$creadPrec :: ReadPrec DescribeAutoScalingConfigurationResponse
readList :: ReadS [DescribeAutoScalingConfigurationResponse]
$creadList :: ReadS [DescribeAutoScalingConfigurationResponse]
readsPrec :: Int -> ReadS DescribeAutoScalingConfigurationResponse
$creadsPrec :: Int -> ReadS DescribeAutoScalingConfigurationResponse
Prelude.Read, Int -> DescribeAutoScalingConfigurationResponse -> ShowS
[DescribeAutoScalingConfigurationResponse] -> ShowS
DescribeAutoScalingConfigurationResponse -> String
(Int -> DescribeAutoScalingConfigurationResponse -> ShowS)
-> (DescribeAutoScalingConfigurationResponse -> String)
-> ([DescribeAutoScalingConfigurationResponse] -> ShowS)
-> Show DescribeAutoScalingConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAutoScalingConfigurationResponse] -> ShowS
$cshowList :: [DescribeAutoScalingConfigurationResponse] -> ShowS
show :: DescribeAutoScalingConfigurationResponse -> String
$cshow :: DescribeAutoScalingConfigurationResponse -> String
showsPrec :: Int -> DescribeAutoScalingConfigurationResponse -> ShowS
$cshowsPrec :: Int -> DescribeAutoScalingConfigurationResponse -> ShowS
Prelude.Show, (forall x.
DescribeAutoScalingConfigurationResponse
-> Rep DescribeAutoScalingConfigurationResponse x)
-> (forall x.
Rep DescribeAutoScalingConfigurationResponse x
-> DescribeAutoScalingConfigurationResponse)
-> Generic DescribeAutoScalingConfigurationResponse
forall x.
Rep DescribeAutoScalingConfigurationResponse x
-> DescribeAutoScalingConfigurationResponse
forall x.
DescribeAutoScalingConfigurationResponse
-> Rep DescribeAutoScalingConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAutoScalingConfigurationResponse x
-> DescribeAutoScalingConfigurationResponse
$cfrom :: forall x.
DescribeAutoScalingConfigurationResponse
-> Rep DescribeAutoScalingConfigurationResponse x
Prelude.Generic)
newDescribeAutoScalingConfigurationResponse ::
Prelude.Int ->
AutoScalingConfiguration ->
DescribeAutoScalingConfigurationResponse
newDescribeAutoScalingConfigurationResponse :: Int
-> AutoScalingConfiguration
-> DescribeAutoScalingConfigurationResponse
newDescribeAutoScalingConfigurationResponse
Int
pHttpStatus_
AutoScalingConfiguration
pAutoScalingConfiguration_ =
DescribeAutoScalingConfigurationResponse' :: Int
-> AutoScalingConfiguration
-> DescribeAutoScalingConfigurationResponse
DescribeAutoScalingConfigurationResponse'
{ $sel:httpStatus:DescribeAutoScalingConfigurationResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:autoScalingConfiguration:DescribeAutoScalingConfigurationResponse' :: AutoScalingConfiguration
autoScalingConfiguration =
AutoScalingConfiguration
pAutoScalingConfiguration_
}
describeAutoScalingConfigurationResponse_httpStatus :: Lens.Lens' DescribeAutoScalingConfigurationResponse Prelude.Int
describeAutoScalingConfigurationResponse_httpStatus :: (Int -> f Int)
-> DescribeAutoScalingConfigurationResponse
-> f DescribeAutoScalingConfigurationResponse
describeAutoScalingConfigurationResponse_httpStatus = (DescribeAutoScalingConfigurationResponse -> Int)
-> (DescribeAutoScalingConfigurationResponse
-> Int -> DescribeAutoScalingConfigurationResponse)
-> Lens
DescribeAutoScalingConfigurationResponse
DescribeAutoScalingConfigurationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAutoScalingConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeAutoScalingConfigurationResponse' :: DescribeAutoScalingConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeAutoScalingConfigurationResponse
s@DescribeAutoScalingConfigurationResponse' {} Int
a -> DescribeAutoScalingConfigurationResponse
s {$sel:httpStatus:DescribeAutoScalingConfigurationResponse' :: Int
httpStatus = Int
a} :: DescribeAutoScalingConfigurationResponse)
describeAutoScalingConfigurationResponse_autoScalingConfiguration :: Lens.Lens' DescribeAutoScalingConfigurationResponse AutoScalingConfiguration
describeAutoScalingConfigurationResponse_autoScalingConfiguration :: (AutoScalingConfiguration -> f AutoScalingConfiguration)
-> DescribeAutoScalingConfigurationResponse
-> f DescribeAutoScalingConfigurationResponse
describeAutoScalingConfigurationResponse_autoScalingConfiguration = (DescribeAutoScalingConfigurationResponse
-> AutoScalingConfiguration)
-> (DescribeAutoScalingConfigurationResponse
-> AutoScalingConfiguration
-> DescribeAutoScalingConfigurationResponse)
-> Lens
DescribeAutoScalingConfigurationResponse
DescribeAutoScalingConfigurationResponse
AutoScalingConfiguration
AutoScalingConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAutoScalingConfigurationResponse' {AutoScalingConfiguration
autoScalingConfiguration :: AutoScalingConfiguration
$sel:autoScalingConfiguration:DescribeAutoScalingConfigurationResponse' :: DescribeAutoScalingConfigurationResponse
-> AutoScalingConfiguration
autoScalingConfiguration} -> AutoScalingConfiguration
autoScalingConfiguration) (\s :: DescribeAutoScalingConfigurationResponse
s@DescribeAutoScalingConfigurationResponse' {} AutoScalingConfiguration
a -> DescribeAutoScalingConfigurationResponse
s {$sel:autoScalingConfiguration:DescribeAutoScalingConfigurationResponse' :: AutoScalingConfiguration
autoScalingConfiguration = AutoScalingConfiguration
a} :: DescribeAutoScalingConfigurationResponse)
instance
Prelude.NFData
DescribeAutoScalingConfigurationResponse