{-# 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.DeleteAutoScalingConfiguration
(
DeleteAutoScalingConfiguration (..),
newDeleteAutoScalingConfiguration,
deleteAutoScalingConfiguration_autoScalingConfigurationArn,
DeleteAutoScalingConfigurationResponse (..),
newDeleteAutoScalingConfigurationResponse,
deleteAutoScalingConfigurationResponse_httpStatus,
deleteAutoScalingConfigurationResponse_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 DeleteAutoScalingConfiguration = DeleteAutoScalingConfiguration'
{
DeleteAutoScalingConfiguration -> Text
autoScalingConfigurationArn :: Prelude.Text
}
deriving (DeleteAutoScalingConfiguration
-> DeleteAutoScalingConfiguration -> Bool
(DeleteAutoScalingConfiguration
-> DeleteAutoScalingConfiguration -> Bool)
-> (DeleteAutoScalingConfiguration
-> DeleteAutoScalingConfiguration -> Bool)
-> Eq DeleteAutoScalingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAutoScalingConfiguration
-> DeleteAutoScalingConfiguration -> Bool
$c/= :: DeleteAutoScalingConfiguration
-> DeleteAutoScalingConfiguration -> Bool
== :: DeleteAutoScalingConfiguration
-> DeleteAutoScalingConfiguration -> Bool
$c== :: DeleteAutoScalingConfiguration
-> DeleteAutoScalingConfiguration -> Bool
Prelude.Eq, ReadPrec [DeleteAutoScalingConfiguration]
ReadPrec DeleteAutoScalingConfiguration
Int -> ReadS DeleteAutoScalingConfiguration
ReadS [DeleteAutoScalingConfiguration]
(Int -> ReadS DeleteAutoScalingConfiguration)
-> ReadS [DeleteAutoScalingConfiguration]
-> ReadPrec DeleteAutoScalingConfiguration
-> ReadPrec [DeleteAutoScalingConfiguration]
-> Read DeleteAutoScalingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAutoScalingConfiguration]
$creadListPrec :: ReadPrec [DeleteAutoScalingConfiguration]
readPrec :: ReadPrec DeleteAutoScalingConfiguration
$creadPrec :: ReadPrec DeleteAutoScalingConfiguration
readList :: ReadS [DeleteAutoScalingConfiguration]
$creadList :: ReadS [DeleteAutoScalingConfiguration]
readsPrec :: Int -> ReadS DeleteAutoScalingConfiguration
$creadsPrec :: Int -> ReadS DeleteAutoScalingConfiguration
Prelude.Read, Int -> DeleteAutoScalingConfiguration -> ShowS
[DeleteAutoScalingConfiguration] -> ShowS
DeleteAutoScalingConfiguration -> String
(Int -> DeleteAutoScalingConfiguration -> ShowS)
-> (DeleteAutoScalingConfiguration -> String)
-> ([DeleteAutoScalingConfiguration] -> ShowS)
-> Show DeleteAutoScalingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAutoScalingConfiguration] -> ShowS
$cshowList :: [DeleteAutoScalingConfiguration] -> ShowS
show :: DeleteAutoScalingConfiguration -> String
$cshow :: DeleteAutoScalingConfiguration -> String
showsPrec :: Int -> DeleteAutoScalingConfiguration -> ShowS
$cshowsPrec :: Int -> DeleteAutoScalingConfiguration -> ShowS
Prelude.Show, (forall x.
DeleteAutoScalingConfiguration
-> Rep DeleteAutoScalingConfiguration x)
-> (forall x.
Rep DeleteAutoScalingConfiguration x
-> DeleteAutoScalingConfiguration)
-> Generic DeleteAutoScalingConfiguration
forall x.
Rep DeleteAutoScalingConfiguration x
-> DeleteAutoScalingConfiguration
forall x.
DeleteAutoScalingConfiguration
-> Rep DeleteAutoScalingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAutoScalingConfiguration x
-> DeleteAutoScalingConfiguration
$cfrom :: forall x.
DeleteAutoScalingConfiguration
-> Rep DeleteAutoScalingConfiguration x
Prelude.Generic)
newDeleteAutoScalingConfiguration ::
Prelude.Text ->
DeleteAutoScalingConfiguration
newDeleteAutoScalingConfiguration :: Text -> DeleteAutoScalingConfiguration
newDeleteAutoScalingConfiguration
Text
pAutoScalingConfigurationArn_ =
DeleteAutoScalingConfiguration' :: Text -> DeleteAutoScalingConfiguration
DeleteAutoScalingConfiguration'
{ $sel:autoScalingConfigurationArn:DeleteAutoScalingConfiguration' :: Text
autoScalingConfigurationArn =
Text
pAutoScalingConfigurationArn_
}
deleteAutoScalingConfiguration_autoScalingConfigurationArn :: Lens.Lens' DeleteAutoScalingConfiguration Prelude.Text
deleteAutoScalingConfiguration_autoScalingConfigurationArn :: (Text -> f Text)
-> DeleteAutoScalingConfiguration
-> f DeleteAutoScalingConfiguration
deleteAutoScalingConfiguration_autoScalingConfigurationArn = (DeleteAutoScalingConfiguration -> Text)
-> (DeleteAutoScalingConfiguration
-> Text -> DeleteAutoScalingConfiguration)
-> Lens
DeleteAutoScalingConfiguration
DeleteAutoScalingConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAutoScalingConfiguration' {Text
autoScalingConfigurationArn :: Text
$sel:autoScalingConfigurationArn:DeleteAutoScalingConfiguration' :: DeleteAutoScalingConfiguration -> Text
autoScalingConfigurationArn} -> Text
autoScalingConfigurationArn) (\s :: DeleteAutoScalingConfiguration
s@DeleteAutoScalingConfiguration' {} Text
a -> DeleteAutoScalingConfiguration
s {$sel:autoScalingConfigurationArn:DeleteAutoScalingConfiguration' :: Text
autoScalingConfigurationArn = Text
a} :: DeleteAutoScalingConfiguration)
instance
Core.AWSRequest
DeleteAutoScalingConfiguration
where
type
AWSResponse DeleteAutoScalingConfiguration =
DeleteAutoScalingConfigurationResponse
request :: DeleteAutoScalingConfiguration
-> Request DeleteAutoScalingConfiguration
request = Service
-> DeleteAutoScalingConfiguration
-> Request DeleteAutoScalingConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteAutoScalingConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteAutoScalingConfiguration)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteAutoScalingConfiguration))
-> Logger
-> Service
-> Proxy DeleteAutoScalingConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteAutoScalingConfiguration)))
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
-> DeleteAutoScalingConfigurationResponse
DeleteAutoScalingConfigurationResponse'
(Int
-> AutoScalingConfiguration
-> DeleteAutoScalingConfigurationResponse)
-> Either String Int
-> Either
String
(AutoScalingConfiguration
-> DeleteAutoScalingConfigurationResponse)
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
-> DeleteAutoScalingConfigurationResponse)
-> Either String AutoScalingConfiguration
-> Either String DeleteAutoScalingConfigurationResponse
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
DeleteAutoScalingConfiguration
instance
Prelude.NFData
DeleteAutoScalingConfiguration
instance
Core.ToHeaders
DeleteAutoScalingConfiguration
where
toHeaders :: DeleteAutoScalingConfiguration -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DeleteAutoScalingConfiguration -> 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.DeleteAutoScalingConfiguration" ::
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 DeleteAutoScalingConfiguration where
toJSON :: DeleteAutoScalingConfiguration -> Value
toJSON DeleteAutoScalingConfiguration' {Text
autoScalingConfigurationArn :: Text
$sel:autoScalingConfigurationArn:DeleteAutoScalingConfiguration' :: DeleteAutoScalingConfiguration -> 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 DeleteAutoScalingConfiguration where
toPath :: DeleteAutoScalingConfiguration -> ByteString
toPath = ByteString -> DeleteAutoScalingConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteAutoScalingConfiguration where
toQuery :: DeleteAutoScalingConfiguration -> QueryString
toQuery = QueryString -> DeleteAutoScalingConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteAutoScalingConfigurationResponse = DeleteAutoScalingConfigurationResponse'
{
DeleteAutoScalingConfigurationResponse -> Int
httpStatus :: Prelude.Int,
DeleteAutoScalingConfigurationResponse -> AutoScalingConfiguration
autoScalingConfiguration :: AutoScalingConfiguration
}
deriving (DeleteAutoScalingConfigurationResponse
-> DeleteAutoScalingConfigurationResponse -> Bool
(DeleteAutoScalingConfigurationResponse
-> DeleteAutoScalingConfigurationResponse -> Bool)
-> (DeleteAutoScalingConfigurationResponse
-> DeleteAutoScalingConfigurationResponse -> Bool)
-> Eq DeleteAutoScalingConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAutoScalingConfigurationResponse
-> DeleteAutoScalingConfigurationResponse -> Bool
$c/= :: DeleteAutoScalingConfigurationResponse
-> DeleteAutoScalingConfigurationResponse -> Bool
== :: DeleteAutoScalingConfigurationResponse
-> DeleteAutoScalingConfigurationResponse -> Bool
$c== :: DeleteAutoScalingConfigurationResponse
-> DeleteAutoScalingConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [DeleteAutoScalingConfigurationResponse]
ReadPrec DeleteAutoScalingConfigurationResponse
Int -> ReadS DeleteAutoScalingConfigurationResponse
ReadS [DeleteAutoScalingConfigurationResponse]
(Int -> ReadS DeleteAutoScalingConfigurationResponse)
-> ReadS [DeleteAutoScalingConfigurationResponse]
-> ReadPrec DeleteAutoScalingConfigurationResponse
-> ReadPrec [DeleteAutoScalingConfigurationResponse]
-> Read DeleteAutoScalingConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAutoScalingConfigurationResponse]
$creadListPrec :: ReadPrec [DeleteAutoScalingConfigurationResponse]
readPrec :: ReadPrec DeleteAutoScalingConfigurationResponse
$creadPrec :: ReadPrec DeleteAutoScalingConfigurationResponse
readList :: ReadS [DeleteAutoScalingConfigurationResponse]
$creadList :: ReadS [DeleteAutoScalingConfigurationResponse]
readsPrec :: Int -> ReadS DeleteAutoScalingConfigurationResponse
$creadsPrec :: Int -> ReadS DeleteAutoScalingConfigurationResponse
Prelude.Read, Int -> DeleteAutoScalingConfigurationResponse -> ShowS
[DeleteAutoScalingConfigurationResponse] -> ShowS
DeleteAutoScalingConfigurationResponse -> String
(Int -> DeleteAutoScalingConfigurationResponse -> ShowS)
-> (DeleteAutoScalingConfigurationResponse -> String)
-> ([DeleteAutoScalingConfigurationResponse] -> ShowS)
-> Show DeleteAutoScalingConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAutoScalingConfigurationResponse] -> ShowS
$cshowList :: [DeleteAutoScalingConfigurationResponse] -> ShowS
show :: DeleteAutoScalingConfigurationResponse -> String
$cshow :: DeleteAutoScalingConfigurationResponse -> String
showsPrec :: Int -> DeleteAutoScalingConfigurationResponse -> ShowS
$cshowsPrec :: Int -> DeleteAutoScalingConfigurationResponse -> ShowS
Prelude.Show, (forall x.
DeleteAutoScalingConfigurationResponse
-> Rep DeleteAutoScalingConfigurationResponse x)
-> (forall x.
Rep DeleteAutoScalingConfigurationResponse x
-> DeleteAutoScalingConfigurationResponse)
-> Generic DeleteAutoScalingConfigurationResponse
forall x.
Rep DeleteAutoScalingConfigurationResponse x
-> DeleteAutoScalingConfigurationResponse
forall x.
DeleteAutoScalingConfigurationResponse
-> Rep DeleteAutoScalingConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAutoScalingConfigurationResponse x
-> DeleteAutoScalingConfigurationResponse
$cfrom :: forall x.
DeleteAutoScalingConfigurationResponse
-> Rep DeleteAutoScalingConfigurationResponse x
Prelude.Generic)
newDeleteAutoScalingConfigurationResponse ::
Prelude.Int ->
AutoScalingConfiguration ->
DeleteAutoScalingConfigurationResponse
newDeleteAutoScalingConfigurationResponse :: Int
-> AutoScalingConfiguration
-> DeleteAutoScalingConfigurationResponse
newDeleteAutoScalingConfigurationResponse
Int
pHttpStatus_
AutoScalingConfiguration
pAutoScalingConfiguration_ =
DeleteAutoScalingConfigurationResponse' :: Int
-> AutoScalingConfiguration
-> DeleteAutoScalingConfigurationResponse
DeleteAutoScalingConfigurationResponse'
{ $sel:httpStatus:DeleteAutoScalingConfigurationResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:autoScalingConfiguration:DeleteAutoScalingConfigurationResponse' :: AutoScalingConfiguration
autoScalingConfiguration =
AutoScalingConfiguration
pAutoScalingConfiguration_
}
deleteAutoScalingConfigurationResponse_httpStatus :: Lens.Lens' DeleteAutoScalingConfigurationResponse Prelude.Int
deleteAutoScalingConfigurationResponse_httpStatus :: (Int -> f Int)
-> DeleteAutoScalingConfigurationResponse
-> f DeleteAutoScalingConfigurationResponse
deleteAutoScalingConfigurationResponse_httpStatus = (DeleteAutoScalingConfigurationResponse -> Int)
-> (DeleteAutoScalingConfigurationResponse
-> Int -> DeleteAutoScalingConfigurationResponse)
-> Lens
DeleteAutoScalingConfigurationResponse
DeleteAutoScalingConfigurationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAutoScalingConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteAutoScalingConfigurationResponse' :: DeleteAutoScalingConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteAutoScalingConfigurationResponse
s@DeleteAutoScalingConfigurationResponse' {} Int
a -> DeleteAutoScalingConfigurationResponse
s {$sel:httpStatus:DeleteAutoScalingConfigurationResponse' :: Int
httpStatus = Int
a} :: DeleteAutoScalingConfigurationResponse)
deleteAutoScalingConfigurationResponse_autoScalingConfiguration :: Lens.Lens' DeleteAutoScalingConfigurationResponse AutoScalingConfiguration
deleteAutoScalingConfigurationResponse_autoScalingConfiguration :: (AutoScalingConfiguration -> f AutoScalingConfiguration)
-> DeleteAutoScalingConfigurationResponse
-> f DeleteAutoScalingConfigurationResponse
deleteAutoScalingConfigurationResponse_autoScalingConfiguration = (DeleteAutoScalingConfigurationResponse
-> AutoScalingConfiguration)
-> (DeleteAutoScalingConfigurationResponse
-> AutoScalingConfiguration
-> DeleteAutoScalingConfigurationResponse)
-> Lens
DeleteAutoScalingConfigurationResponse
DeleteAutoScalingConfigurationResponse
AutoScalingConfiguration
AutoScalingConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAutoScalingConfigurationResponse' {AutoScalingConfiguration
autoScalingConfiguration :: AutoScalingConfiguration
$sel:autoScalingConfiguration:DeleteAutoScalingConfigurationResponse' :: DeleteAutoScalingConfigurationResponse -> AutoScalingConfiguration
autoScalingConfiguration} -> AutoScalingConfiguration
autoScalingConfiguration) (\s :: DeleteAutoScalingConfigurationResponse
s@DeleteAutoScalingConfigurationResponse' {} AutoScalingConfiguration
a -> DeleteAutoScalingConfigurationResponse
s {$sel:autoScalingConfiguration:DeleteAutoScalingConfigurationResponse' :: AutoScalingConfiguration
autoScalingConfiguration = AutoScalingConfiguration
a} :: DeleteAutoScalingConfigurationResponse)
instance
Prelude.NFData
DeleteAutoScalingConfigurationResponse