{-# 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.Lambda.UpdateFunctionCode
(
UpdateFunctionCode (..),
newUpdateFunctionCode,
updateFunctionCode_s3ObjectVersion,
updateFunctionCode_s3Key,
updateFunctionCode_zipFile,
updateFunctionCode_architectures,
updateFunctionCode_imageUri,
updateFunctionCode_s3Bucket,
updateFunctionCode_dryRun,
updateFunctionCode_revisionId,
updateFunctionCode_publish,
updateFunctionCode_functionName,
FunctionConfiguration (..),
newFunctionConfiguration,
functionConfiguration_memorySize,
functionConfiguration_runtime,
functionConfiguration_state,
functionConfiguration_signingProfileVersionArn,
functionConfiguration_lastUpdateStatus,
functionConfiguration_functionArn,
functionConfiguration_kmsKeyArn,
functionConfiguration_packageType,
functionConfiguration_fileSystemConfigs,
functionConfiguration_environment,
functionConfiguration_deadLetterConfig,
functionConfiguration_architectures,
functionConfiguration_signingJobArn,
functionConfiguration_role,
functionConfiguration_vpcConfig,
functionConfiguration_version,
functionConfiguration_functionName,
functionConfiguration_layers,
functionConfiguration_codeSize,
functionConfiguration_handler,
functionConfiguration_timeout,
functionConfiguration_lastUpdateStatusReason,
functionConfiguration_stateReason,
functionConfiguration_lastModified,
functionConfiguration_codeSha256,
functionConfiguration_tracingConfig,
functionConfiguration_stateReasonCode,
functionConfiguration_imageConfigResponse,
functionConfiguration_description,
functionConfiguration_lastUpdateStatusReasonCode,
functionConfiguration_revisionId,
functionConfiguration_masterArn,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Lambda.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 UpdateFunctionCode = UpdateFunctionCode'
{
UpdateFunctionCode -> Maybe Text
s3ObjectVersion :: Prelude.Maybe Prelude.Text,
UpdateFunctionCode -> Maybe Text
s3Key :: Prelude.Maybe Prelude.Text,
UpdateFunctionCode -> Maybe (Sensitive Base64)
zipFile :: Prelude.Maybe (Core.Sensitive Core.Base64),
UpdateFunctionCode -> Maybe (NonEmpty Architecture)
architectures :: Prelude.Maybe (Prelude.NonEmpty Architecture),
UpdateFunctionCode -> Maybe Text
imageUri :: Prelude.Maybe Prelude.Text,
UpdateFunctionCode -> Maybe Text
s3Bucket :: Prelude.Maybe Prelude.Text,
UpdateFunctionCode -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
UpdateFunctionCode -> Maybe Text
revisionId :: Prelude.Maybe Prelude.Text,
UpdateFunctionCode -> Maybe Bool
publish :: Prelude.Maybe Prelude.Bool,
UpdateFunctionCode -> Text
functionName :: Prelude.Text
}
deriving (UpdateFunctionCode -> UpdateFunctionCode -> Bool
(UpdateFunctionCode -> UpdateFunctionCode -> Bool)
-> (UpdateFunctionCode -> UpdateFunctionCode -> Bool)
-> Eq UpdateFunctionCode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFunctionCode -> UpdateFunctionCode -> Bool
$c/= :: UpdateFunctionCode -> UpdateFunctionCode -> Bool
== :: UpdateFunctionCode -> UpdateFunctionCode -> Bool
$c== :: UpdateFunctionCode -> UpdateFunctionCode -> Bool
Prelude.Eq, Int -> UpdateFunctionCode -> ShowS
[UpdateFunctionCode] -> ShowS
UpdateFunctionCode -> String
(Int -> UpdateFunctionCode -> ShowS)
-> (UpdateFunctionCode -> String)
-> ([UpdateFunctionCode] -> ShowS)
-> Show UpdateFunctionCode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFunctionCode] -> ShowS
$cshowList :: [UpdateFunctionCode] -> ShowS
show :: UpdateFunctionCode -> String
$cshow :: UpdateFunctionCode -> String
showsPrec :: Int -> UpdateFunctionCode -> ShowS
$cshowsPrec :: Int -> UpdateFunctionCode -> ShowS
Prelude.Show, (forall x. UpdateFunctionCode -> Rep UpdateFunctionCode x)
-> (forall x. Rep UpdateFunctionCode x -> UpdateFunctionCode)
-> Generic UpdateFunctionCode
forall x. Rep UpdateFunctionCode x -> UpdateFunctionCode
forall x. UpdateFunctionCode -> Rep UpdateFunctionCode x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateFunctionCode x -> UpdateFunctionCode
$cfrom :: forall x. UpdateFunctionCode -> Rep UpdateFunctionCode x
Prelude.Generic)
newUpdateFunctionCode ::
Prelude.Text ->
UpdateFunctionCode
newUpdateFunctionCode :: Text -> UpdateFunctionCode
newUpdateFunctionCode Text
pFunctionName_ =
UpdateFunctionCode' :: Maybe Text
-> Maybe Text
-> Maybe (Sensitive Base64)
-> Maybe (NonEmpty Architecture)
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Text
-> UpdateFunctionCode
UpdateFunctionCode'
{ $sel:s3ObjectVersion:UpdateFunctionCode' :: Maybe Text
s3ObjectVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3Key:UpdateFunctionCode' :: Maybe Text
s3Key = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:zipFile:UpdateFunctionCode' :: Maybe (Sensitive Base64)
zipFile = Maybe (Sensitive Base64)
forall a. Maybe a
Prelude.Nothing,
$sel:architectures:UpdateFunctionCode' :: Maybe (NonEmpty Architecture)
architectures = Maybe (NonEmpty Architecture)
forall a. Maybe a
Prelude.Nothing,
$sel:imageUri:UpdateFunctionCode' :: Maybe Text
imageUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3Bucket:UpdateFunctionCode' :: Maybe Text
s3Bucket = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dryRun:UpdateFunctionCode' :: Maybe Bool
dryRun = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:revisionId:UpdateFunctionCode' :: Maybe Text
revisionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:publish:UpdateFunctionCode' :: Maybe Bool
publish = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:functionName:UpdateFunctionCode' :: Text
functionName = Text
pFunctionName_
}
updateFunctionCode_s3ObjectVersion :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.Text)
updateFunctionCode_s3ObjectVersion :: (Maybe Text -> f (Maybe Text))
-> UpdateFunctionCode -> f UpdateFunctionCode
updateFunctionCode_s3ObjectVersion = (UpdateFunctionCode -> Maybe Text)
-> (UpdateFunctionCode -> Maybe Text -> UpdateFunctionCode)
-> Lens
UpdateFunctionCode UpdateFunctionCode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionCode' {Maybe Text
s3ObjectVersion :: Maybe Text
$sel:s3ObjectVersion:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
s3ObjectVersion} -> Maybe Text
s3ObjectVersion) (\s :: UpdateFunctionCode
s@UpdateFunctionCode' {} Maybe Text
a -> UpdateFunctionCode
s {$sel:s3ObjectVersion:UpdateFunctionCode' :: Maybe Text
s3ObjectVersion = Maybe Text
a} :: UpdateFunctionCode)
updateFunctionCode_s3Key :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.Text)
updateFunctionCode_s3Key :: (Maybe Text -> f (Maybe Text))
-> UpdateFunctionCode -> f UpdateFunctionCode
updateFunctionCode_s3Key = (UpdateFunctionCode -> Maybe Text)
-> (UpdateFunctionCode -> Maybe Text -> UpdateFunctionCode)
-> Lens
UpdateFunctionCode UpdateFunctionCode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionCode' {Maybe Text
s3Key :: Maybe Text
$sel:s3Key:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
s3Key} -> Maybe Text
s3Key) (\s :: UpdateFunctionCode
s@UpdateFunctionCode' {} Maybe Text
a -> UpdateFunctionCode
s {$sel:s3Key:UpdateFunctionCode' :: Maybe Text
s3Key = Maybe Text
a} :: UpdateFunctionCode)
updateFunctionCode_zipFile :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.ByteString)
updateFunctionCode_zipFile :: (Maybe ByteString -> f (Maybe ByteString))
-> UpdateFunctionCode -> f UpdateFunctionCode
updateFunctionCode_zipFile = (UpdateFunctionCode -> Maybe (Sensitive Base64))
-> (UpdateFunctionCode
-> Maybe (Sensitive Base64) -> UpdateFunctionCode)
-> Lens
UpdateFunctionCode
UpdateFunctionCode
(Maybe (Sensitive Base64))
(Maybe (Sensitive Base64))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionCode' {Maybe (Sensitive Base64)
zipFile :: Maybe (Sensitive Base64)
$sel:zipFile:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe (Sensitive Base64)
zipFile} -> Maybe (Sensitive Base64)
zipFile) (\s :: UpdateFunctionCode
s@UpdateFunctionCode' {} Maybe (Sensitive Base64)
a -> UpdateFunctionCode
s {$sel:zipFile:UpdateFunctionCode' :: Maybe (Sensitive Base64)
zipFile = Maybe (Sensitive Base64)
a} :: UpdateFunctionCode) ((Maybe (Sensitive Base64) -> f (Maybe (Sensitive Base64)))
-> UpdateFunctionCode -> f UpdateFunctionCode)
-> ((Maybe ByteString -> f (Maybe ByteString))
-> Maybe (Sensitive Base64) -> f (Maybe (Sensitive Base64)))
-> (Maybe ByteString -> f (Maybe ByteString))
-> UpdateFunctionCode
-> f UpdateFunctionCode
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Base64) (Sensitive Base64) ByteString ByteString
-> Iso
(Maybe (Sensitive Base64))
(Maybe (Sensitive Base64))
(Maybe ByteString)
(Maybe ByteString)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping (Exchange ByteString ByteString Base64 (Identity Base64)
-> Exchange
ByteString
ByteString
(Sensitive Base64)
(Identity (Sensitive Base64))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Exchange ByteString ByteString Base64 (Identity Base64)
-> Exchange
ByteString
ByteString
(Sensitive Base64)
(Identity (Sensitive Base64)))
-> (Exchange ByteString ByteString ByteString (Identity ByteString)
-> Exchange ByteString ByteString Base64 (Identity Base64))
-> AnIso
(Sensitive Base64) (Sensitive Base64) ByteString ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange ByteString ByteString ByteString (Identity ByteString)
-> Exchange ByteString ByteString Base64 (Identity Base64)
Iso' Base64 ByteString
Core._Base64)
updateFunctionCode_architectures :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe (Prelude.NonEmpty Architecture))
updateFunctionCode_architectures :: (Maybe (NonEmpty Architecture)
-> f (Maybe (NonEmpty Architecture)))
-> UpdateFunctionCode -> f UpdateFunctionCode
updateFunctionCode_architectures = (UpdateFunctionCode -> Maybe (NonEmpty Architecture))
-> (UpdateFunctionCode
-> Maybe (NonEmpty Architecture) -> UpdateFunctionCode)
-> Lens
UpdateFunctionCode
UpdateFunctionCode
(Maybe (NonEmpty Architecture))
(Maybe (NonEmpty Architecture))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionCode' {Maybe (NonEmpty Architecture)
architectures :: Maybe (NonEmpty Architecture)
$sel:architectures:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe (NonEmpty Architecture)
architectures} -> Maybe (NonEmpty Architecture)
architectures) (\s :: UpdateFunctionCode
s@UpdateFunctionCode' {} Maybe (NonEmpty Architecture)
a -> UpdateFunctionCode
s {$sel:architectures:UpdateFunctionCode' :: Maybe (NonEmpty Architecture)
architectures = Maybe (NonEmpty Architecture)
a} :: UpdateFunctionCode) ((Maybe (NonEmpty Architecture)
-> f (Maybe (NonEmpty Architecture)))
-> UpdateFunctionCode -> f UpdateFunctionCode)
-> ((Maybe (NonEmpty Architecture)
-> f (Maybe (NonEmpty Architecture)))
-> Maybe (NonEmpty Architecture)
-> f (Maybe (NonEmpty Architecture)))
-> (Maybe (NonEmpty Architecture)
-> f (Maybe (NonEmpty Architecture)))
-> UpdateFunctionCode
-> f UpdateFunctionCode
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Architecture)
(NonEmpty Architecture)
(NonEmpty Architecture)
(NonEmpty Architecture)
-> Iso
(Maybe (NonEmpty Architecture))
(Maybe (NonEmpty Architecture))
(Maybe (NonEmpty Architecture))
(Maybe (NonEmpty Architecture))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(NonEmpty Architecture)
(NonEmpty Architecture)
(NonEmpty Architecture)
(NonEmpty Architecture)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateFunctionCode_imageUri :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.Text)
updateFunctionCode_imageUri :: (Maybe Text -> f (Maybe Text))
-> UpdateFunctionCode -> f UpdateFunctionCode
updateFunctionCode_imageUri = (UpdateFunctionCode -> Maybe Text)
-> (UpdateFunctionCode -> Maybe Text -> UpdateFunctionCode)
-> Lens
UpdateFunctionCode UpdateFunctionCode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionCode' {Maybe Text
imageUri :: Maybe Text
$sel:imageUri:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
imageUri} -> Maybe Text
imageUri) (\s :: UpdateFunctionCode
s@UpdateFunctionCode' {} Maybe Text
a -> UpdateFunctionCode
s {$sel:imageUri:UpdateFunctionCode' :: Maybe Text
imageUri = Maybe Text
a} :: UpdateFunctionCode)
updateFunctionCode_s3Bucket :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.Text)
updateFunctionCode_s3Bucket :: (Maybe Text -> f (Maybe Text))
-> UpdateFunctionCode -> f UpdateFunctionCode
updateFunctionCode_s3Bucket = (UpdateFunctionCode -> Maybe Text)
-> (UpdateFunctionCode -> Maybe Text -> UpdateFunctionCode)
-> Lens
UpdateFunctionCode UpdateFunctionCode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionCode' {Maybe Text
s3Bucket :: Maybe Text
$sel:s3Bucket:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
s3Bucket} -> Maybe Text
s3Bucket) (\s :: UpdateFunctionCode
s@UpdateFunctionCode' {} Maybe Text
a -> UpdateFunctionCode
s {$sel:s3Bucket:UpdateFunctionCode' :: Maybe Text
s3Bucket = Maybe Text
a} :: UpdateFunctionCode)
updateFunctionCode_dryRun :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.Bool)
updateFunctionCode_dryRun :: (Maybe Bool -> f (Maybe Bool))
-> UpdateFunctionCode -> f UpdateFunctionCode
updateFunctionCode_dryRun = (UpdateFunctionCode -> Maybe Bool)
-> (UpdateFunctionCode -> Maybe Bool -> UpdateFunctionCode)
-> Lens
UpdateFunctionCode UpdateFunctionCode (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionCode' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: UpdateFunctionCode
s@UpdateFunctionCode' {} Maybe Bool
a -> UpdateFunctionCode
s {$sel:dryRun:UpdateFunctionCode' :: Maybe Bool
dryRun = Maybe Bool
a} :: UpdateFunctionCode)
updateFunctionCode_revisionId :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.Text)
updateFunctionCode_revisionId :: (Maybe Text -> f (Maybe Text))
-> UpdateFunctionCode -> f UpdateFunctionCode
updateFunctionCode_revisionId = (UpdateFunctionCode -> Maybe Text)
-> (UpdateFunctionCode -> Maybe Text -> UpdateFunctionCode)
-> Lens
UpdateFunctionCode UpdateFunctionCode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionCode' {Maybe Text
revisionId :: Maybe Text
$sel:revisionId:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
revisionId} -> Maybe Text
revisionId) (\s :: UpdateFunctionCode
s@UpdateFunctionCode' {} Maybe Text
a -> UpdateFunctionCode
s {$sel:revisionId:UpdateFunctionCode' :: Maybe Text
revisionId = Maybe Text
a} :: UpdateFunctionCode)
updateFunctionCode_publish :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.Bool)
updateFunctionCode_publish :: (Maybe Bool -> f (Maybe Bool))
-> UpdateFunctionCode -> f UpdateFunctionCode
updateFunctionCode_publish = (UpdateFunctionCode -> Maybe Bool)
-> (UpdateFunctionCode -> Maybe Bool -> UpdateFunctionCode)
-> Lens
UpdateFunctionCode UpdateFunctionCode (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionCode' {Maybe Bool
publish :: Maybe Bool
$sel:publish:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Bool
publish} -> Maybe Bool
publish) (\s :: UpdateFunctionCode
s@UpdateFunctionCode' {} Maybe Bool
a -> UpdateFunctionCode
s {$sel:publish:UpdateFunctionCode' :: Maybe Bool
publish = Maybe Bool
a} :: UpdateFunctionCode)
updateFunctionCode_functionName :: Lens.Lens' UpdateFunctionCode Prelude.Text
updateFunctionCode_functionName :: (Text -> f Text) -> UpdateFunctionCode -> f UpdateFunctionCode
updateFunctionCode_functionName = (UpdateFunctionCode -> Text)
-> (UpdateFunctionCode -> Text -> UpdateFunctionCode)
-> Lens UpdateFunctionCode UpdateFunctionCode Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFunctionCode' {Text
functionName :: Text
$sel:functionName:UpdateFunctionCode' :: UpdateFunctionCode -> Text
functionName} -> Text
functionName) (\s :: UpdateFunctionCode
s@UpdateFunctionCode' {} Text
a -> UpdateFunctionCode
s {$sel:functionName:UpdateFunctionCode' :: Text
functionName = Text
a} :: UpdateFunctionCode)
instance Core.AWSRequest UpdateFunctionCode where
type
AWSResponse UpdateFunctionCode =
FunctionConfiguration
request :: UpdateFunctionCode -> Request UpdateFunctionCode
request = Service -> UpdateFunctionCode -> Request UpdateFunctionCode
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateFunctionCode
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateFunctionCode)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateFunctionCode))
-> Logger
-> Service
-> Proxy UpdateFunctionCode
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateFunctionCode)))
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 -> Object -> Either String FunctionConfiguration
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
instance Prelude.Hashable UpdateFunctionCode
instance Prelude.NFData UpdateFunctionCode
instance Core.ToHeaders UpdateFunctionCode where
toHeaders :: UpdateFunctionCode -> ResponseHeaders
toHeaders = ResponseHeaders -> UpdateFunctionCode -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON UpdateFunctionCode where
toJSON :: UpdateFunctionCode -> Value
toJSON UpdateFunctionCode' {Maybe Bool
Maybe (NonEmpty Architecture)
Maybe Text
Maybe (Sensitive Base64)
Text
functionName :: Text
publish :: Maybe Bool
revisionId :: Maybe Text
dryRun :: Maybe Bool
s3Bucket :: Maybe Text
imageUri :: Maybe Text
architectures :: Maybe (NonEmpty Architecture)
zipFile :: Maybe (Sensitive Base64)
s3Key :: Maybe Text
s3ObjectVersion :: Maybe Text
$sel:functionName:UpdateFunctionCode' :: UpdateFunctionCode -> Text
$sel:publish:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Bool
$sel:revisionId:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:dryRun:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Bool
$sel:s3Bucket:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:imageUri:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:architectures:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe (NonEmpty Architecture)
$sel:zipFile:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe (Sensitive Base64)
$sel:s3Key:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:s3ObjectVersion:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"S3ObjectVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
s3ObjectVersion,
(Text
"S3Key" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
s3Key,
(Text
"ZipFile" Text -> Sensitive Base64 -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Base64 -> Pair)
-> Maybe (Sensitive Base64) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Base64)
zipFile,
(Text
"Architectures" Text -> NonEmpty Architecture -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Architecture -> Pair)
-> Maybe (NonEmpty Architecture) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Architecture)
architectures,
(Text
"ImageUri" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imageUri,
(Text
"S3Bucket" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
s3Bucket,
(Text
"DryRun" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dryRun,
(Text
"RevisionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
revisionId,
(Text
"Publish" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
publish
]
)
instance Core.ToPath UpdateFunctionCode where
toPath :: UpdateFunctionCode -> ByteString
toPath UpdateFunctionCode' {Maybe Bool
Maybe (NonEmpty Architecture)
Maybe Text
Maybe (Sensitive Base64)
Text
functionName :: Text
publish :: Maybe Bool
revisionId :: Maybe Text
dryRun :: Maybe Bool
s3Bucket :: Maybe Text
imageUri :: Maybe Text
architectures :: Maybe (NonEmpty Architecture)
zipFile :: Maybe (Sensitive Base64)
s3Key :: Maybe Text
s3ObjectVersion :: Maybe Text
$sel:functionName:UpdateFunctionCode' :: UpdateFunctionCode -> Text
$sel:publish:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Bool
$sel:revisionId:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:dryRun:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Bool
$sel:s3Bucket:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:imageUri:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:architectures:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe (NonEmpty Architecture)
$sel:zipFile:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe (Sensitive Base64)
$sel:s3Key:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:s3ObjectVersion:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2015-03-31/functions/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
functionName,
ByteString
"/code"
]
instance Core.ToQuery UpdateFunctionCode where
toQuery :: UpdateFunctionCode -> QueryString
toQuery = QueryString -> UpdateFunctionCode -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty