{-# 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.UpdateVpcIngressConnection
(
UpdateVpcIngressConnection (..),
newUpdateVpcIngressConnection,
updateVpcIngressConnection_vpcIngressConnectionArn,
updateVpcIngressConnection_ingressVpcConfiguration,
UpdateVpcIngressConnectionResponse (..),
newUpdateVpcIngressConnectionResponse,
updateVpcIngressConnectionResponse_httpStatus,
updateVpcIngressConnectionResponse_vpcIngressConnection,
)
where
import Amazonka.AppRunner.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateVpcIngressConnection = UpdateVpcIngressConnection'
{
UpdateVpcIngressConnection -> Text
vpcIngressConnectionArn :: Prelude.Text,
UpdateVpcIngressConnection -> IngressVpcConfiguration
ingressVpcConfiguration :: IngressVpcConfiguration
}
deriving (UpdateVpcIngressConnection -> UpdateVpcIngressConnection -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateVpcIngressConnection -> UpdateVpcIngressConnection -> Bool
$c/= :: UpdateVpcIngressConnection -> UpdateVpcIngressConnection -> Bool
== :: UpdateVpcIngressConnection -> UpdateVpcIngressConnection -> Bool
$c== :: UpdateVpcIngressConnection -> UpdateVpcIngressConnection -> Bool
Prelude.Eq, ReadPrec [UpdateVpcIngressConnection]
ReadPrec UpdateVpcIngressConnection
Int -> ReadS UpdateVpcIngressConnection
ReadS [UpdateVpcIngressConnection]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateVpcIngressConnection]
$creadListPrec :: ReadPrec [UpdateVpcIngressConnection]
readPrec :: ReadPrec UpdateVpcIngressConnection
$creadPrec :: ReadPrec UpdateVpcIngressConnection
readList :: ReadS [UpdateVpcIngressConnection]
$creadList :: ReadS [UpdateVpcIngressConnection]
readsPrec :: Int -> ReadS UpdateVpcIngressConnection
$creadsPrec :: Int -> ReadS UpdateVpcIngressConnection
Prelude.Read, Int -> UpdateVpcIngressConnection -> ShowS
[UpdateVpcIngressConnection] -> ShowS
UpdateVpcIngressConnection -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateVpcIngressConnection] -> ShowS
$cshowList :: [UpdateVpcIngressConnection] -> ShowS
show :: UpdateVpcIngressConnection -> String
$cshow :: UpdateVpcIngressConnection -> String
showsPrec :: Int -> UpdateVpcIngressConnection -> ShowS
$cshowsPrec :: Int -> UpdateVpcIngressConnection -> ShowS
Prelude.Show, forall x.
Rep UpdateVpcIngressConnection x -> UpdateVpcIngressConnection
forall x.
UpdateVpcIngressConnection -> Rep UpdateVpcIngressConnection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateVpcIngressConnection x -> UpdateVpcIngressConnection
$cfrom :: forall x.
UpdateVpcIngressConnection -> Rep UpdateVpcIngressConnection x
Prelude.Generic)
newUpdateVpcIngressConnection ::
Prelude.Text ->
IngressVpcConfiguration ->
UpdateVpcIngressConnection
newUpdateVpcIngressConnection :: Text -> IngressVpcConfiguration -> UpdateVpcIngressConnection
newUpdateVpcIngressConnection
Text
pVpcIngressConnectionArn_
IngressVpcConfiguration
pIngressVpcConfiguration_ =
UpdateVpcIngressConnection'
{ $sel:vpcIngressConnectionArn:UpdateVpcIngressConnection' :: Text
vpcIngressConnectionArn =
Text
pVpcIngressConnectionArn_,
$sel:ingressVpcConfiguration:UpdateVpcIngressConnection' :: IngressVpcConfiguration
ingressVpcConfiguration =
IngressVpcConfiguration
pIngressVpcConfiguration_
}
updateVpcIngressConnection_vpcIngressConnectionArn :: Lens.Lens' UpdateVpcIngressConnection Prelude.Text
updateVpcIngressConnection_vpcIngressConnectionArn :: Lens' UpdateVpcIngressConnection Text
updateVpcIngressConnection_vpcIngressConnectionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVpcIngressConnection' {Text
vpcIngressConnectionArn :: Text
$sel:vpcIngressConnectionArn:UpdateVpcIngressConnection' :: UpdateVpcIngressConnection -> Text
vpcIngressConnectionArn} -> Text
vpcIngressConnectionArn) (\s :: UpdateVpcIngressConnection
s@UpdateVpcIngressConnection' {} Text
a -> UpdateVpcIngressConnection
s {$sel:vpcIngressConnectionArn:UpdateVpcIngressConnection' :: Text
vpcIngressConnectionArn = Text
a} :: UpdateVpcIngressConnection)
updateVpcIngressConnection_ingressVpcConfiguration :: Lens.Lens' UpdateVpcIngressConnection IngressVpcConfiguration
updateVpcIngressConnection_ingressVpcConfiguration :: Lens' UpdateVpcIngressConnection IngressVpcConfiguration
updateVpcIngressConnection_ingressVpcConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVpcIngressConnection' {IngressVpcConfiguration
ingressVpcConfiguration :: IngressVpcConfiguration
$sel:ingressVpcConfiguration:UpdateVpcIngressConnection' :: UpdateVpcIngressConnection -> IngressVpcConfiguration
ingressVpcConfiguration} -> IngressVpcConfiguration
ingressVpcConfiguration) (\s :: UpdateVpcIngressConnection
s@UpdateVpcIngressConnection' {} IngressVpcConfiguration
a -> UpdateVpcIngressConnection
s {$sel:ingressVpcConfiguration:UpdateVpcIngressConnection' :: IngressVpcConfiguration
ingressVpcConfiguration = IngressVpcConfiguration
a} :: UpdateVpcIngressConnection)
instance Core.AWSRequest UpdateVpcIngressConnection where
type
AWSResponse UpdateVpcIngressConnection =
UpdateVpcIngressConnectionResponse
request :: (Service -> Service)
-> UpdateVpcIngressConnection -> Request UpdateVpcIngressConnection
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateVpcIngressConnection
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateVpcIngressConnection)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> VpcIngressConnection -> UpdateVpcIngressConnectionResponse
UpdateVpcIngressConnectionResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"VpcIngressConnection")
)
instance Prelude.Hashable UpdateVpcIngressConnection where
hashWithSalt :: Int -> UpdateVpcIngressConnection -> Int
hashWithSalt Int
_salt UpdateVpcIngressConnection' {Text
IngressVpcConfiguration
ingressVpcConfiguration :: IngressVpcConfiguration
vpcIngressConnectionArn :: Text
$sel:ingressVpcConfiguration:UpdateVpcIngressConnection' :: UpdateVpcIngressConnection -> IngressVpcConfiguration
$sel:vpcIngressConnectionArn:UpdateVpcIngressConnection' :: UpdateVpcIngressConnection -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vpcIngressConnectionArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` IngressVpcConfiguration
ingressVpcConfiguration
instance Prelude.NFData UpdateVpcIngressConnection where
rnf :: UpdateVpcIngressConnection -> ()
rnf UpdateVpcIngressConnection' {Text
IngressVpcConfiguration
ingressVpcConfiguration :: IngressVpcConfiguration
vpcIngressConnectionArn :: Text
$sel:ingressVpcConfiguration:UpdateVpcIngressConnection' :: UpdateVpcIngressConnection -> IngressVpcConfiguration
$sel:vpcIngressConnectionArn:UpdateVpcIngressConnection' :: UpdateVpcIngressConnection -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
vpcIngressConnectionArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf IngressVpcConfiguration
ingressVpcConfiguration
instance Data.ToHeaders UpdateVpcIngressConnection where
toHeaders :: UpdateVpcIngressConnection -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AppRunner.UpdateVpcIngressConnection" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON UpdateVpcIngressConnection where
toJSON :: UpdateVpcIngressConnection -> Value
toJSON UpdateVpcIngressConnection' {Text
IngressVpcConfiguration
ingressVpcConfiguration :: IngressVpcConfiguration
vpcIngressConnectionArn :: Text
$sel:ingressVpcConfiguration:UpdateVpcIngressConnection' :: UpdateVpcIngressConnection -> IngressVpcConfiguration
$sel:vpcIngressConnectionArn:UpdateVpcIngressConnection' :: UpdateVpcIngressConnection -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"VpcIngressConnectionArn"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
vpcIngressConnectionArn
),
forall a. a -> Maybe a
Prelude.Just
( Key
"IngressVpcConfiguration"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= IngressVpcConfiguration
ingressVpcConfiguration
)
]
)
instance Data.ToPath UpdateVpcIngressConnection where
toPath :: UpdateVpcIngressConnection -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery UpdateVpcIngressConnection where
toQuery :: UpdateVpcIngressConnection -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateVpcIngressConnectionResponse = UpdateVpcIngressConnectionResponse'
{
UpdateVpcIngressConnectionResponse -> Int
httpStatus :: Prelude.Int,
UpdateVpcIngressConnectionResponse -> VpcIngressConnection
vpcIngressConnection :: VpcIngressConnection
}
deriving (UpdateVpcIngressConnectionResponse
-> UpdateVpcIngressConnectionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateVpcIngressConnectionResponse
-> UpdateVpcIngressConnectionResponse -> Bool
$c/= :: UpdateVpcIngressConnectionResponse
-> UpdateVpcIngressConnectionResponse -> Bool
== :: UpdateVpcIngressConnectionResponse
-> UpdateVpcIngressConnectionResponse -> Bool
$c== :: UpdateVpcIngressConnectionResponse
-> UpdateVpcIngressConnectionResponse -> Bool
Prelude.Eq, ReadPrec [UpdateVpcIngressConnectionResponse]
ReadPrec UpdateVpcIngressConnectionResponse
Int -> ReadS UpdateVpcIngressConnectionResponse
ReadS [UpdateVpcIngressConnectionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateVpcIngressConnectionResponse]
$creadListPrec :: ReadPrec [UpdateVpcIngressConnectionResponse]
readPrec :: ReadPrec UpdateVpcIngressConnectionResponse
$creadPrec :: ReadPrec UpdateVpcIngressConnectionResponse
readList :: ReadS [UpdateVpcIngressConnectionResponse]
$creadList :: ReadS [UpdateVpcIngressConnectionResponse]
readsPrec :: Int -> ReadS UpdateVpcIngressConnectionResponse
$creadsPrec :: Int -> ReadS UpdateVpcIngressConnectionResponse
Prelude.Read, Int -> UpdateVpcIngressConnectionResponse -> ShowS
[UpdateVpcIngressConnectionResponse] -> ShowS
UpdateVpcIngressConnectionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateVpcIngressConnectionResponse] -> ShowS
$cshowList :: [UpdateVpcIngressConnectionResponse] -> ShowS
show :: UpdateVpcIngressConnectionResponse -> String
$cshow :: UpdateVpcIngressConnectionResponse -> String
showsPrec :: Int -> UpdateVpcIngressConnectionResponse -> ShowS
$cshowsPrec :: Int -> UpdateVpcIngressConnectionResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateVpcIngressConnectionResponse x
-> UpdateVpcIngressConnectionResponse
forall x.
UpdateVpcIngressConnectionResponse
-> Rep UpdateVpcIngressConnectionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateVpcIngressConnectionResponse x
-> UpdateVpcIngressConnectionResponse
$cfrom :: forall x.
UpdateVpcIngressConnectionResponse
-> Rep UpdateVpcIngressConnectionResponse x
Prelude.Generic)
newUpdateVpcIngressConnectionResponse ::
Prelude.Int ->
VpcIngressConnection ->
UpdateVpcIngressConnectionResponse
newUpdateVpcIngressConnectionResponse :: Int -> VpcIngressConnection -> UpdateVpcIngressConnectionResponse
newUpdateVpcIngressConnectionResponse
Int
pHttpStatus_
VpcIngressConnection
pVpcIngressConnection_ =
UpdateVpcIngressConnectionResponse'
{ $sel:httpStatus:UpdateVpcIngressConnectionResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:vpcIngressConnection:UpdateVpcIngressConnectionResponse' :: VpcIngressConnection
vpcIngressConnection =
VpcIngressConnection
pVpcIngressConnection_
}
updateVpcIngressConnectionResponse_httpStatus :: Lens.Lens' UpdateVpcIngressConnectionResponse Prelude.Int
updateVpcIngressConnectionResponse_httpStatus :: Lens' UpdateVpcIngressConnectionResponse Int
updateVpcIngressConnectionResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVpcIngressConnectionResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateVpcIngressConnectionResponse' :: UpdateVpcIngressConnectionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateVpcIngressConnectionResponse
s@UpdateVpcIngressConnectionResponse' {} Int
a -> UpdateVpcIngressConnectionResponse
s {$sel:httpStatus:UpdateVpcIngressConnectionResponse' :: Int
httpStatus = Int
a} :: UpdateVpcIngressConnectionResponse)
updateVpcIngressConnectionResponse_vpcIngressConnection :: Lens.Lens' UpdateVpcIngressConnectionResponse VpcIngressConnection
updateVpcIngressConnectionResponse_vpcIngressConnection :: Lens' UpdateVpcIngressConnectionResponse VpcIngressConnection
updateVpcIngressConnectionResponse_vpcIngressConnection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVpcIngressConnectionResponse' {VpcIngressConnection
vpcIngressConnection :: VpcIngressConnection
$sel:vpcIngressConnection:UpdateVpcIngressConnectionResponse' :: UpdateVpcIngressConnectionResponse -> VpcIngressConnection
vpcIngressConnection} -> VpcIngressConnection
vpcIngressConnection) (\s :: UpdateVpcIngressConnectionResponse
s@UpdateVpcIngressConnectionResponse' {} VpcIngressConnection
a -> UpdateVpcIngressConnectionResponse
s {$sel:vpcIngressConnection:UpdateVpcIngressConnectionResponse' :: VpcIngressConnection
vpcIngressConnection = VpcIngressConnection
a} :: UpdateVpcIngressConnectionResponse)
instance
Prelude.NFData
UpdateVpcIngressConnectionResponse
where
rnf :: UpdateVpcIngressConnectionResponse -> ()
rnf UpdateVpcIngressConnectionResponse' {Int
VpcIngressConnection
vpcIngressConnection :: VpcIngressConnection
httpStatus :: Int
$sel:vpcIngressConnection:UpdateVpcIngressConnectionResponse' :: UpdateVpcIngressConnectionResponse -> VpcIngressConnection
$sel:httpStatus:UpdateVpcIngressConnectionResponse' :: UpdateVpcIngressConnectionResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VpcIngressConnection
vpcIngressConnection