{-# 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.ImageBuilder.DeleteInfrastructureConfiguration
(
DeleteInfrastructureConfiguration (..),
newDeleteInfrastructureConfiguration,
deleteInfrastructureConfiguration_infrastructureConfigurationArn,
DeleteInfrastructureConfigurationResponse (..),
newDeleteInfrastructureConfigurationResponse,
deleteInfrastructureConfigurationResponse_requestId,
deleteInfrastructureConfigurationResponse_infrastructureConfigurationArn,
deleteInfrastructureConfigurationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.Types
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 DeleteInfrastructureConfiguration = DeleteInfrastructureConfiguration'
{
DeleteInfrastructureConfiguration -> Text
infrastructureConfigurationArn :: Prelude.Text
}
deriving (DeleteInfrastructureConfiguration
-> DeleteInfrastructureConfiguration -> Bool
(DeleteInfrastructureConfiguration
-> DeleteInfrastructureConfiguration -> Bool)
-> (DeleteInfrastructureConfiguration
-> DeleteInfrastructureConfiguration -> Bool)
-> Eq DeleteInfrastructureConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteInfrastructureConfiguration
-> DeleteInfrastructureConfiguration -> Bool
$c/= :: DeleteInfrastructureConfiguration
-> DeleteInfrastructureConfiguration -> Bool
== :: DeleteInfrastructureConfiguration
-> DeleteInfrastructureConfiguration -> Bool
$c== :: DeleteInfrastructureConfiguration
-> DeleteInfrastructureConfiguration -> Bool
Prelude.Eq, ReadPrec [DeleteInfrastructureConfiguration]
ReadPrec DeleteInfrastructureConfiguration
Int -> ReadS DeleteInfrastructureConfiguration
ReadS [DeleteInfrastructureConfiguration]
(Int -> ReadS DeleteInfrastructureConfiguration)
-> ReadS [DeleteInfrastructureConfiguration]
-> ReadPrec DeleteInfrastructureConfiguration
-> ReadPrec [DeleteInfrastructureConfiguration]
-> Read DeleteInfrastructureConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteInfrastructureConfiguration]
$creadListPrec :: ReadPrec [DeleteInfrastructureConfiguration]
readPrec :: ReadPrec DeleteInfrastructureConfiguration
$creadPrec :: ReadPrec DeleteInfrastructureConfiguration
readList :: ReadS [DeleteInfrastructureConfiguration]
$creadList :: ReadS [DeleteInfrastructureConfiguration]
readsPrec :: Int -> ReadS DeleteInfrastructureConfiguration
$creadsPrec :: Int -> ReadS DeleteInfrastructureConfiguration
Prelude.Read, Int -> DeleteInfrastructureConfiguration -> ShowS
[DeleteInfrastructureConfiguration] -> ShowS
DeleteInfrastructureConfiguration -> String
(Int -> DeleteInfrastructureConfiguration -> ShowS)
-> (DeleteInfrastructureConfiguration -> String)
-> ([DeleteInfrastructureConfiguration] -> ShowS)
-> Show DeleteInfrastructureConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteInfrastructureConfiguration] -> ShowS
$cshowList :: [DeleteInfrastructureConfiguration] -> ShowS
show :: DeleteInfrastructureConfiguration -> String
$cshow :: DeleteInfrastructureConfiguration -> String
showsPrec :: Int -> DeleteInfrastructureConfiguration -> ShowS
$cshowsPrec :: Int -> DeleteInfrastructureConfiguration -> ShowS
Prelude.Show, (forall x.
DeleteInfrastructureConfiguration
-> Rep DeleteInfrastructureConfiguration x)
-> (forall x.
Rep DeleteInfrastructureConfiguration x
-> DeleteInfrastructureConfiguration)
-> Generic DeleteInfrastructureConfiguration
forall x.
Rep DeleteInfrastructureConfiguration x
-> DeleteInfrastructureConfiguration
forall x.
DeleteInfrastructureConfiguration
-> Rep DeleteInfrastructureConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteInfrastructureConfiguration x
-> DeleteInfrastructureConfiguration
$cfrom :: forall x.
DeleteInfrastructureConfiguration
-> Rep DeleteInfrastructureConfiguration x
Prelude.Generic)
newDeleteInfrastructureConfiguration ::
Prelude.Text ->
DeleteInfrastructureConfiguration
newDeleteInfrastructureConfiguration :: Text -> DeleteInfrastructureConfiguration
newDeleteInfrastructureConfiguration
Text
pInfrastructureConfigurationArn_ =
DeleteInfrastructureConfiguration' :: Text -> DeleteInfrastructureConfiguration
DeleteInfrastructureConfiguration'
{ $sel:infrastructureConfigurationArn:DeleteInfrastructureConfiguration' :: Text
infrastructureConfigurationArn =
Text
pInfrastructureConfigurationArn_
}
deleteInfrastructureConfiguration_infrastructureConfigurationArn :: Lens.Lens' DeleteInfrastructureConfiguration Prelude.Text
deleteInfrastructureConfiguration_infrastructureConfigurationArn :: (Text -> f Text)
-> DeleteInfrastructureConfiguration
-> f DeleteInfrastructureConfiguration
deleteInfrastructureConfiguration_infrastructureConfigurationArn = (DeleteInfrastructureConfiguration -> Text)
-> (DeleteInfrastructureConfiguration
-> Text -> DeleteInfrastructureConfiguration)
-> Lens
DeleteInfrastructureConfiguration
DeleteInfrastructureConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInfrastructureConfiguration' {Text
infrastructureConfigurationArn :: Text
$sel:infrastructureConfigurationArn:DeleteInfrastructureConfiguration' :: DeleteInfrastructureConfiguration -> Text
infrastructureConfigurationArn} -> Text
infrastructureConfigurationArn) (\s :: DeleteInfrastructureConfiguration
s@DeleteInfrastructureConfiguration' {} Text
a -> DeleteInfrastructureConfiguration
s {$sel:infrastructureConfigurationArn:DeleteInfrastructureConfiguration' :: Text
infrastructureConfigurationArn = Text
a} :: DeleteInfrastructureConfiguration)
instance
Core.AWSRequest
DeleteInfrastructureConfiguration
where
type
AWSResponse DeleteInfrastructureConfiguration =
DeleteInfrastructureConfigurationResponse
request :: DeleteInfrastructureConfiguration
-> Request DeleteInfrastructureConfiguration
request = Service
-> DeleteInfrastructureConfiguration
-> Request DeleteInfrastructureConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteInfrastructureConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteInfrastructureConfiguration)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteInfrastructureConfiguration))
-> Logger
-> Service
-> Proxy DeleteInfrastructureConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteInfrastructureConfiguration)))
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 Text -> Int -> DeleteInfrastructureConfigurationResponse
DeleteInfrastructureConfigurationResponse'
(Maybe Text
-> Maybe Text -> Int -> DeleteInfrastructureConfigurationResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Int -> DeleteInfrastructureConfigurationResponse)
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
"requestId")
Either
String
(Maybe Text -> Int -> DeleteInfrastructureConfigurationResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DeleteInfrastructureConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => 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
"infrastructureConfigurationArn")
Either String (Int -> DeleteInfrastructureConfigurationResponse)
-> Either String Int
-> Either String DeleteInfrastructureConfigurationResponse
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
DeleteInfrastructureConfiguration
instance
Prelude.NFData
DeleteInfrastructureConfiguration
instance
Core.ToHeaders
DeleteInfrastructureConfiguration
where
toHeaders :: DeleteInfrastructureConfiguration -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DeleteInfrastructureConfiguration -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance
Core.ToPath
DeleteInfrastructureConfiguration
where
toPath :: DeleteInfrastructureConfiguration -> ByteString
toPath =
ByteString -> DeleteInfrastructureConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/DeleteInfrastructureConfiguration"
instance
Core.ToQuery
DeleteInfrastructureConfiguration
where
toQuery :: DeleteInfrastructureConfiguration -> QueryString
toQuery DeleteInfrastructureConfiguration' {Text
infrastructureConfigurationArn :: Text
$sel:infrastructureConfigurationArn:DeleteInfrastructureConfiguration' :: DeleteInfrastructureConfiguration -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"infrastructureConfigurationArn"
ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
infrastructureConfigurationArn
]
data DeleteInfrastructureConfigurationResponse = DeleteInfrastructureConfigurationResponse'
{
DeleteInfrastructureConfigurationResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
DeleteInfrastructureConfigurationResponse -> Maybe Text
infrastructureConfigurationArn :: Prelude.Maybe Prelude.Text,
DeleteInfrastructureConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteInfrastructureConfigurationResponse
-> DeleteInfrastructureConfigurationResponse -> Bool
(DeleteInfrastructureConfigurationResponse
-> DeleteInfrastructureConfigurationResponse -> Bool)
-> (DeleteInfrastructureConfigurationResponse
-> DeleteInfrastructureConfigurationResponse -> Bool)
-> Eq DeleteInfrastructureConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteInfrastructureConfigurationResponse
-> DeleteInfrastructureConfigurationResponse -> Bool
$c/= :: DeleteInfrastructureConfigurationResponse
-> DeleteInfrastructureConfigurationResponse -> Bool
== :: DeleteInfrastructureConfigurationResponse
-> DeleteInfrastructureConfigurationResponse -> Bool
$c== :: DeleteInfrastructureConfigurationResponse
-> DeleteInfrastructureConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [DeleteInfrastructureConfigurationResponse]
ReadPrec DeleteInfrastructureConfigurationResponse
Int -> ReadS DeleteInfrastructureConfigurationResponse
ReadS [DeleteInfrastructureConfigurationResponse]
(Int -> ReadS DeleteInfrastructureConfigurationResponse)
-> ReadS [DeleteInfrastructureConfigurationResponse]
-> ReadPrec DeleteInfrastructureConfigurationResponse
-> ReadPrec [DeleteInfrastructureConfigurationResponse]
-> Read DeleteInfrastructureConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteInfrastructureConfigurationResponse]
$creadListPrec :: ReadPrec [DeleteInfrastructureConfigurationResponse]
readPrec :: ReadPrec DeleteInfrastructureConfigurationResponse
$creadPrec :: ReadPrec DeleteInfrastructureConfigurationResponse
readList :: ReadS [DeleteInfrastructureConfigurationResponse]
$creadList :: ReadS [DeleteInfrastructureConfigurationResponse]
readsPrec :: Int -> ReadS DeleteInfrastructureConfigurationResponse
$creadsPrec :: Int -> ReadS DeleteInfrastructureConfigurationResponse
Prelude.Read, Int -> DeleteInfrastructureConfigurationResponse -> ShowS
[DeleteInfrastructureConfigurationResponse] -> ShowS
DeleteInfrastructureConfigurationResponse -> String
(Int -> DeleteInfrastructureConfigurationResponse -> ShowS)
-> (DeleteInfrastructureConfigurationResponse -> String)
-> ([DeleteInfrastructureConfigurationResponse] -> ShowS)
-> Show DeleteInfrastructureConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteInfrastructureConfigurationResponse] -> ShowS
$cshowList :: [DeleteInfrastructureConfigurationResponse] -> ShowS
show :: DeleteInfrastructureConfigurationResponse -> String
$cshow :: DeleteInfrastructureConfigurationResponse -> String
showsPrec :: Int -> DeleteInfrastructureConfigurationResponse -> ShowS
$cshowsPrec :: Int -> DeleteInfrastructureConfigurationResponse -> ShowS
Prelude.Show, (forall x.
DeleteInfrastructureConfigurationResponse
-> Rep DeleteInfrastructureConfigurationResponse x)
-> (forall x.
Rep DeleteInfrastructureConfigurationResponse x
-> DeleteInfrastructureConfigurationResponse)
-> Generic DeleteInfrastructureConfigurationResponse
forall x.
Rep DeleteInfrastructureConfigurationResponse x
-> DeleteInfrastructureConfigurationResponse
forall x.
DeleteInfrastructureConfigurationResponse
-> Rep DeleteInfrastructureConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteInfrastructureConfigurationResponse x
-> DeleteInfrastructureConfigurationResponse
$cfrom :: forall x.
DeleteInfrastructureConfigurationResponse
-> Rep DeleteInfrastructureConfigurationResponse x
Prelude.Generic)
newDeleteInfrastructureConfigurationResponse ::
Prelude.Int ->
DeleteInfrastructureConfigurationResponse
newDeleteInfrastructureConfigurationResponse :: Int -> DeleteInfrastructureConfigurationResponse
newDeleteInfrastructureConfigurationResponse
Int
pHttpStatus_ =
DeleteInfrastructureConfigurationResponse' :: Maybe Text
-> Maybe Text -> Int -> DeleteInfrastructureConfigurationResponse
DeleteInfrastructureConfigurationResponse'
{ $sel:requestId:DeleteInfrastructureConfigurationResponse' :: Maybe Text
requestId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:infrastructureConfigurationArn:DeleteInfrastructureConfigurationResponse' :: Maybe Text
infrastructureConfigurationArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteInfrastructureConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteInfrastructureConfigurationResponse_requestId :: Lens.Lens' DeleteInfrastructureConfigurationResponse (Prelude.Maybe Prelude.Text)
deleteInfrastructureConfigurationResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> DeleteInfrastructureConfigurationResponse
-> f DeleteInfrastructureConfigurationResponse
deleteInfrastructureConfigurationResponse_requestId = (DeleteInfrastructureConfigurationResponse -> Maybe Text)
-> (DeleteInfrastructureConfigurationResponse
-> Maybe Text -> DeleteInfrastructureConfigurationResponse)
-> Lens
DeleteInfrastructureConfigurationResponse
DeleteInfrastructureConfigurationResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInfrastructureConfigurationResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:DeleteInfrastructureConfigurationResponse' :: DeleteInfrastructureConfigurationResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: DeleteInfrastructureConfigurationResponse
s@DeleteInfrastructureConfigurationResponse' {} Maybe Text
a -> DeleteInfrastructureConfigurationResponse
s {$sel:requestId:DeleteInfrastructureConfigurationResponse' :: Maybe Text
requestId = Maybe Text
a} :: DeleteInfrastructureConfigurationResponse)
deleteInfrastructureConfigurationResponse_infrastructureConfigurationArn :: Lens.Lens' DeleteInfrastructureConfigurationResponse (Prelude.Maybe Prelude.Text)
deleteInfrastructureConfigurationResponse_infrastructureConfigurationArn :: (Maybe Text -> f (Maybe Text))
-> DeleteInfrastructureConfigurationResponse
-> f DeleteInfrastructureConfigurationResponse
deleteInfrastructureConfigurationResponse_infrastructureConfigurationArn = (DeleteInfrastructureConfigurationResponse -> Maybe Text)
-> (DeleteInfrastructureConfigurationResponse
-> Maybe Text -> DeleteInfrastructureConfigurationResponse)
-> Lens
DeleteInfrastructureConfigurationResponse
DeleteInfrastructureConfigurationResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInfrastructureConfigurationResponse' {Maybe Text
infrastructureConfigurationArn :: Maybe Text
$sel:infrastructureConfigurationArn:DeleteInfrastructureConfigurationResponse' :: DeleteInfrastructureConfigurationResponse -> Maybe Text
infrastructureConfigurationArn} -> Maybe Text
infrastructureConfigurationArn) (\s :: DeleteInfrastructureConfigurationResponse
s@DeleteInfrastructureConfigurationResponse' {} Maybe Text
a -> DeleteInfrastructureConfigurationResponse
s {$sel:infrastructureConfigurationArn:DeleteInfrastructureConfigurationResponse' :: Maybe Text
infrastructureConfigurationArn = Maybe Text
a} :: DeleteInfrastructureConfigurationResponse)
deleteInfrastructureConfigurationResponse_httpStatus :: Lens.Lens' DeleteInfrastructureConfigurationResponse Prelude.Int
deleteInfrastructureConfigurationResponse_httpStatus :: (Int -> f Int)
-> DeleteInfrastructureConfigurationResponse
-> f DeleteInfrastructureConfigurationResponse
deleteInfrastructureConfigurationResponse_httpStatus = (DeleteInfrastructureConfigurationResponse -> Int)
-> (DeleteInfrastructureConfigurationResponse
-> Int -> DeleteInfrastructureConfigurationResponse)
-> Lens
DeleteInfrastructureConfigurationResponse
DeleteInfrastructureConfigurationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInfrastructureConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteInfrastructureConfigurationResponse' :: DeleteInfrastructureConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteInfrastructureConfigurationResponse
s@DeleteInfrastructureConfigurationResponse' {} Int
a -> DeleteInfrastructureConfigurationResponse
s {$sel:httpStatus:DeleteInfrastructureConfigurationResponse' :: Int
httpStatus = Int
a} :: DeleteInfrastructureConfigurationResponse)
instance
Prelude.NFData
DeleteInfrastructureConfigurationResponse