{-# 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.AutoScaling.DeleteAutoScalingGroup
(
DeleteAutoScalingGroup (..),
newDeleteAutoScalingGroup,
deleteAutoScalingGroup_forceDelete,
deleteAutoScalingGroup_autoScalingGroupName,
DeleteAutoScalingGroupResponse (..),
newDeleteAutoScalingGroupResponse,
)
where
import Amazonka.AutoScaling.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 DeleteAutoScalingGroup = DeleteAutoScalingGroup'
{
DeleteAutoScalingGroup -> Maybe Bool
forceDelete :: Prelude.Maybe Prelude.Bool,
DeleteAutoScalingGroup -> Text
autoScalingGroupName :: Prelude.Text
}
deriving (DeleteAutoScalingGroup -> DeleteAutoScalingGroup -> Bool
(DeleteAutoScalingGroup -> DeleteAutoScalingGroup -> Bool)
-> (DeleteAutoScalingGroup -> DeleteAutoScalingGroup -> Bool)
-> Eq DeleteAutoScalingGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAutoScalingGroup -> DeleteAutoScalingGroup -> Bool
$c/= :: DeleteAutoScalingGroup -> DeleteAutoScalingGroup -> Bool
== :: DeleteAutoScalingGroup -> DeleteAutoScalingGroup -> Bool
$c== :: DeleteAutoScalingGroup -> DeleteAutoScalingGroup -> Bool
Prelude.Eq, ReadPrec [DeleteAutoScalingGroup]
ReadPrec DeleteAutoScalingGroup
Int -> ReadS DeleteAutoScalingGroup
ReadS [DeleteAutoScalingGroup]
(Int -> ReadS DeleteAutoScalingGroup)
-> ReadS [DeleteAutoScalingGroup]
-> ReadPrec DeleteAutoScalingGroup
-> ReadPrec [DeleteAutoScalingGroup]
-> Read DeleteAutoScalingGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAutoScalingGroup]
$creadListPrec :: ReadPrec [DeleteAutoScalingGroup]
readPrec :: ReadPrec DeleteAutoScalingGroup
$creadPrec :: ReadPrec DeleteAutoScalingGroup
readList :: ReadS [DeleteAutoScalingGroup]
$creadList :: ReadS [DeleteAutoScalingGroup]
readsPrec :: Int -> ReadS DeleteAutoScalingGroup
$creadsPrec :: Int -> ReadS DeleteAutoScalingGroup
Prelude.Read, Int -> DeleteAutoScalingGroup -> ShowS
[DeleteAutoScalingGroup] -> ShowS
DeleteAutoScalingGroup -> String
(Int -> DeleteAutoScalingGroup -> ShowS)
-> (DeleteAutoScalingGroup -> String)
-> ([DeleteAutoScalingGroup] -> ShowS)
-> Show DeleteAutoScalingGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAutoScalingGroup] -> ShowS
$cshowList :: [DeleteAutoScalingGroup] -> ShowS
show :: DeleteAutoScalingGroup -> String
$cshow :: DeleteAutoScalingGroup -> String
showsPrec :: Int -> DeleteAutoScalingGroup -> ShowS
$cshowsPrec :: Int -> DeleteAutoScalingGroup -> ShowS
Prelude.Show, (forall x. DeleteAutoScalingGroup -> Rep DeleteAutoScalingGroup x)
-> (forall x.
Rep DeleteAutoScalingGroup x -> DeleteAutoScalingGroup)
-> Generic DeleteAutoScalingGroup
forall x. Rep DeleteAutoScalingGroup x -> DeleteAutoScalingGroup
forall x. DeleteAutoScalingGroup -> Rep DeleteAutoScalingGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteAutoScalingGroup x -> DeleteAutoScalingGroup
$cfrom :: forall x. DeleteAutoScalingGroup -> Rep DeleteAutoScalingGroup x
Prelude.Generic)
newDeleteAutoScalingGroup ::
Prelude.Text ->
DeleteAutoScalingGroup
newDeleteAutoScalingGroup :: Text -> DeleteAutoScalingGroup
newDeleteAutoScalingGroup Text
pAutoScalingGroupName_ =
DeleteAutoScalingGroup' :: Maybe Bool -> Text -> DeleteAutoScalingGroup
DeleteAutoScalingGroup'
{ $sel:forceDelete:DeleteAutoScalingGroup' :: Maybe Bool
forceDelete =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:autoScalingGroupName:DeleteAutoScalingGroup' :: Text
autoScalingGroupName = Text
pAutoScalingGroupName_
}
deleteAutoScalingGroup_forceDelete :: Lens.Lens' DeleteAutoScalingGroup (Prelude.Maybe Prelude.Bool)
deleteAutoScalingGroup_forceDelete :: (Maybe Bool -> f (Maybe Bool))
-> DeleteAutoScalingGroup -> f DeleteAutoScalingGroup
deleteAutoScalingGroup_forceDelete = (DeleteAutoScalingGroup -> Maybe Bool)
-> (DeleteAutoScalingGroup -> Maybe Bool -> DeleteAutoScalingGroup)
-> Lens
DeleteAutoScalingGroup
DeleteAutoScalingGroup
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAutoScalingGroup' {Maybe Bool
forceDelete :: Maybe Bool
$sel:forceDelete:DeleteAutoScalingGroup' :: DeleteAutoScalingGroup -> Maybe Bool
forceDelete} -> Maybe Bool
forceDelete) (\s :: DeleteAutoScalingGroup
s@DeleteAutoScalingGroup' {} Maybe Bool
a -> DeleteAutoScalingGroup
s {$sel:forceDelete:DeleteAutoScalingGroup' :: Maybe Bool
forceDelete = Maybe Bool
a} :: DeleteAutoScalingGroup)
deleteAutoScalingGroup_autoScalingGroupName :: Lens.Lens' DeleteAutoScalingGroup Prelude.Text
deleteAutoScalingGroup_autoScalingGroupName :: (Text -> f Text)
-> DeleteAutoScalingGroup -> f DeleteAutoScalingGroup
deleteAutoScalingGroup_autoScalingGroupName = (DeleteAutoScalingGroup -> Text)
-> (DeleteAutoScalingGroup -> Text -> DeleteAutoScalingGroup)
-> Lens DeleteAutoScalingGroup DeleteAutoScalingGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAutoScalingGroup' {Text
autoScalingGroupName :: Text
$sel:autoScalingGroupName:DeleteAutoScalingGroup' :: DeleteAutoScalingGroup -> Text
autoScalingGroupName} -> Text
autoScalingGroupName) (\s :: DeleteAutoScalingGroup
s@DeleteAutoScalingGroup' {} Text
a -> DeleteAutoScalingGroup
s {$sel:autoScalingGroupName:DeleteAutoScalingGroup' :: Text
autoScalingGroupName = Text
a} :: DeleteAutoScalingGroup)
instance Core.AWSRequest DeleteAutoScalingGroup where
type
AWSResponse DeleteAutoScalingGroup =
DeleteAutoScalingGroupResponse
request :: DeleteAutoScalingGroup -> Request DeleteAutoScalingGroup
request = Service -> DeleteAutoScalingGroup -> Request DeleteAutoScalingGroup
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteAutoScalingGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteAutoScalingGroup)))
response =
AWSResponse DeleteAutoScalingGroup
-> Logger
-> Service
-> Proxy DeleteAutoScalingGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteAutoScalingGroup)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteAutoScalingGroup
DeleteAutoScalingGroupResponse
DeleteAutoScalingGroupResponse'
instance Prelude.Hashable DeleteAutoScalingGroup
instance Prelude.NFData DeleteAutoScalingGroup
instance Core.ToHeaders DeleteAutoScalingGroup where
toHeaders :: DeleteAutoScalingGroup -> [Header]
toHeaders = [Header] -> DeleteAutoScalingGroup -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteAutoScalingGroup where
toPath :: DeleteAutoScalingGroup -> ByteString
toPath = ByteString -> DeleteAutoScalingGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteAutoScalingGroup where
toQuery :: DeleteAutoScalingGroup -> QueryString
toQuery DeleteAutoScalingGroup' {Maybe Bool
Text
autoScalingGroupName :: Text
forceDelete :: Maybe Bool
$sel:autoScalingGroupName:DeleteAutoScalingGroup' :: DeleteAutoScalingGroup -> Text
$sel:forceDelete:DeleteAutoScalingGroup' :: DeleteAutoScalingGroup -> Maybe Bool
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DeleteAutoScalingGroup" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2011-01-01" :: Prelude.ByteString),
ByteString
"ForceDelete" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
forceDelete,
ByteString
"AutoScalingGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
autoScalingGroupName
]
data DeleteAutoScalingGroupResponse = DeleteAutoScalingGroupResponse'
{
}
deriving (DeleteAutoScalingGroupResponse
-> DeleteAutoScalingGroupResponse -> Bool
(DeleteAutoScalingGroupResponse
-> DeleteAutoScalingGroupResponse -> Bool)
-> (DeleteAutoScalingGroupResponse
-> DeleteAutoScalingGroupResponse -> Bool)
-> Eq DeleteAutoScalingGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAutoScalingGroupResponse
-> DeleteAutoScalingGroupResponse -> Bool
$c/= :: DeleteAutoScalingGroupResponse
-> DeleteAutoScalingGroupResponse -> Bool
== :: DeleteAutoScalingGroupResponse
-> DeleteAutoScalingGroupResponse -> Bool
$c== :: DeleteAutoScalingGroupResponse
-> DeleteAutoScalingGroupResponse -> Bool
Prelude.Eq, ReadPrec [DeleteAutoScalingGroupResponse]
ReadPrec DeleteAutoScalingGroupResponse
Int -> ReadS DeleteAutoScalingGroupResponse
ReadS [DeleteAutoScalingGroupResponse]
(Int -> ReadS DeleteAutoScalingGroupResponse)
-> ReadS [DeleteAutoScalingGroupResponse]
-> ReadPrec DeleteAutoScalingGroupResponse
-> ReadPrec [DeleteAutoScalingGroupResponse]
-> Read DeleteAutoScalingGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAutoScalingGroupResponse]
$creadListPrec :: ReadPrec [DeleteAutoScalingGroupResponse]
readPrec :: ReadPrec DeleteAutoScalingGroupResponse
$creadPrec :: ReadPrec DeleteAutoScalingGroupResponse
readList :: ReadS [DeleteAutoScalingGroupResponse]
$creadList :: ReadS [DeleteAutoScalingGroupResponse]
readsPrec :: Int -> ReadS DeleteAutoScalingGroupResponse
$creadsPrec :: Int -> ReadS DeleteAutoScalingGroupResponse
Prelude.Read, Int -> DeleteAutoScalingGroupResponse -> ShowS
[DeleteAutoScalingGroupResponse] -> ShowS
DeleteAutoScalingGroupResponse -> String
(Int -> DeleteAutoScalingGroupResponse -> ShowS)
-> (DeleteAutoScalingGroupResponse -> String)
-> ([DeleteAutoScalingGroupResponse] -> ShowS)
-> Show DeleteAutoScalingGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAutoScalingGroupResponse] -> ShowS
$cshowList :: [DeleteAutoScalingGroupResponse] -> ShowS
show :: DeleteAutoScalingGroupResponse -> String
$cshow :: DeleteAutoScalingGroupResponse -> String
showsPrec :: Int -> DeleteAutoScalingGroupResponse -> ShowS
$cshowsPrec :: Int -> DeleteAutoScalingGroupResponse -> ShowS
Prelude.Show, (forall x.
DeleteAutoScalingGroupResponse
-> Rep DeleteAutoScalingGroupResponse x)
-> (forall x.
Rep DeleteAutoScalingGroupResponse x
-> DeleteAutoScalingGroupResponse)
-> Generic DeleteAutoScalingGroupResponse
forall x.
Rep DeleteAutoScalingGroupResponse x
-> DeleteAutoScalingGroupResponse
forall x.
DeleteAutoScalingGroupResponse
-> Rep DeleteAutoScalingGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAutoScalingGroupResponse x
-> DeleteAutoScalingGroupResponse
$cfrom :: forall x.
DeleteAutoScalingGroupResponse
-> Rep DeleteAutoScalingGroupResponse x
Prelude.Generic)
newDeleteAutoScalingGroupResponse ::
DeleteAutoScalingGroupResponse
newDeleteAutoScalingGroupResponse :: DeleteAutoScalingGroupResponse
newDeleteAutoScalingGroupResponse =
DeleteAutoScalingGroupResponse
DeleteAutoScalingGroupResponse'
instance
Prelude.NFData
DeleteAutoScalingGroupResponse