{-# 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_architectures,
updateFunctionCode_dryRun,
updateFunctionCode_imageUri,
updateFunctionCode_publish,
updateFunctionCode_revisionId,
updateFunctionCode_s3Bucket,
updateFunctionCode_s3Key,
updateFunctionCode_s3ObjectVersion,
updateFunctionCode_zipFile,
updateFunctionCode_functionName,
FunctionConfiguration (..),
newFunctionConfiguration,
functionConfiguration_architectures,
functionConfiguration_codeSha256,
functionConfiguration_codeSize,
functionConfiguration_deadLetterConfig,
functionConfiguration_description,
functionConfiguration_environment,
functionConfiguration_ephemeralStorage,
functionConfiguration_fileSystemConfigs,
functionConfiguration_functionArn,
functionConfiguration_functionName,
functionConfiguration_handler,
functionConfiguration_imageConfigResponse,
functionConfiguration_kmsKeyArn,
functionConfiguration_lastModified,
functionConfiguration_lastUpdateStatus,
functionConfiguration_lastUpdateStatusReason,
functionConfiguration_lastUpdateStatusReasonCode,
functionConfiguration_layers,
functionConfiguration_masterArn,
functionConfiguration_memorySize,
functionConfiguration_packageType,
functionConfiguration_revisionId,
functionConfiguration_role,
functionConfiguration_runtime,
functionConfiguration_signingJobArn,
functionConfiguration_signingProfileVersionArn,
functionConfiguration_snapStart,
functionConfiguration_state,
functionConfiguration_stateReason,
functionConfiguration_stateReasonCode,
functionConfiguration_timeout,
functionConfiguration_tracingConfig,
functionConfiguration_version,
functionConfiguration_vpcConfig,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Lambda.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateFunctionCode = UpdateFunctionCode'
{
UpdateFunctionCode -> Maybe (NonEmpty Architecture)
architectures :: Prelude.Maybe (Prelude.NonEmpty Architecture),
UpdateFunctionCode -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
UpdateFunctionCode -> Maybe Text
imageUri :: Prelude.Maybe Prelude.Text,
UpdateFunctionCode -> Maybe Bool
publish :: Prelude.Maybe Prelude.Bool,
UpdateFunctionCode -> Maybe Text
revisionId :: Prelude.Maybe Prelude.Text,
UpdateFunctionCode -> Maybe Text
s3Bucket :: Prelude.Maybe Prelude.Text,
UpdateFunctionCode -> Maybe Text
s3Key :: Prelude.Maybe Prelude.Text,
UpdateFunctionCode -> Maybe Text
s3ObjectVersion :: Prelude.Maybe Prelude.Text,
UpdateFunctionCode -> Maybe (Sensitive Base64)
zipFile :: Prelude.Maybe (Data.Sensitive Data.Base64),
UpdateFunctionCode -> Text
functionName :: Prelude.Text
}
deriving (UpdateFunctionCode -> UpdateFunctionCode -> Bool
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
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. 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'
{ $sel:architectures:UpdateFunctionCode' :: Maybe (NonEmpty Architecture)
architectures =
forall a. Maybe a
Prelude.Nothing,
$sel:dryRun:UpdateFunctionCode' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
$sel:imageUri:UpdateFunctionCode' :: Maybe Text
imageUri = forall a. Maybe a
Prelude.Nothing,
$sel:publish:UpdateFunctionCode' :: Maybe Bool
publish = forall a. Maybe a
Prelude.Nothing,
$sel:revisionId:UpdateFunctionCode' :: Maybe Text
revisionId = forall a. Maybe a
Prelude.Nothing,
$sel:s3Bucket:UpdateFunctionCode' :: Maybe Text
s3Bucket = forall a. Maybe a
Prelude.Nothing,
$sel:s3Key:UpdateFunctionCode' :: Maybe Text
s3Key = forall a. Maybe a
Prelude.Nothing,
$sel:s3ObjectVersion:UpdateFunctionCode' :: Maybe Text
s3ObjectVersion = forall a. Maybe a
Prelude.Nothing,
$sel:zipFile:UpdateFunctionCode' :: Maybe (Sensitive Base64)
zipFile = forall a. Maybe a
Prelude.Nothing,
$sel:functionName:UpdateFunctionCode' :: Text
functionName = Text
pFunctionName_
}
updateFunctionCode_architectures :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe (Prelude.NonEmpty Architecture))
updateFunctionCode_architectures :: Lens' UpdateFunctionCode (Maybe (NonEmpty Architecture))
updateFunctionCode_architectures = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateFunctionCode_dryRun :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.Bool)
updateFunctionCode_dryRun :: Lens' UpdateFunctionCode (Maybe Bool)
updateFunctionCode_dryRun = 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_imageUri :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.Text)
updateFunctionCode_imageUri :: Lens' UpdateFunctionCode (Maybe Text)
updateFunctionCode_imageUri = 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_publish :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.Bool)
updateFunctionCode_publish :: Lens' UpdateFunctionCode (Maybe Bool)
updateFunctionCode_publish = 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_revisionId :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.Text)
updateFunctionCode_revisionId :: Lens' UpdateFunctionCode (Maybe Text)
updateFunctionCode_revisionId = 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_s3Bucket :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.Text)
updateFunctionCode_s3Bucket :: Lens' UpdateFunctionCode (Maybe Text)
updateFunctionCode_s3Bucket = 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_s3Key :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.Text)
updateFunctionCode_s3Key :: Lens' UpdateFunctionCode (Maybe Text)
updateFunctionCode_s3Key = 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_s3ObjectVersion :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.Text)
updateFunctionCode_s3ObjectVersion :: Lens' UpdateFunctionCode (Maybe Text)
updateFunctionCode_s3ObjectVersion = 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_zipFile :: Lens.Lens' UpdateFunctionCode (Prelude.Maybe Prelude.ByteString)
updateFunctionCode_zipFile :: Lens' UpdateFunctionCode (Maybe ByteString)
updateFunctionCode_zipFile = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Iso' Base64 ByteString
Data._Base64)
updateFunctionCode_functionName :: Lens.Lens' UpdateFunctionCode Prelude.Text
updateFunctionCode_functionName :: Lens' UpdateFunctionCode Text
updateFunctionCode_functionName = 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 :: (Service -> Service)
-> UpdateFunctionCode -> Request UpdateFunctionCode
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateFunctionCode
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateFunctionCode)))
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 -> forall a. FromJSON a => Object -> Either String a
Data.eitherParseJSON Object
x)
instance Prelude.Hashable UpdateFunctionCode where
hashWithSalt :: Int -> UpdateFunctionCode -> Int
hashWithSalt Int
_salt UpdateFunctionCode' {Maybe Bool
Maybe (NonEmpty Architecture)
Maybe Text
Maybe (Sensitive Base64)
Text
functionName :: Text
zipFile :: Maybe (Sensitive Base64)
s3ObjectVersion :: Maybe Text
s3Key :: Maybe Text
s3Bucket :: Maybe Text
revisionId :: Maybe Text
publish :: Maybe Bool
imageUri :: Maybe Text
dryRun :: Maybe Bool
architectures :: Maybe (NonEmpty Architecture)
$sel:functionName:UpdateFunctionCode' :: UpdateFunctionCode -> Text
$sel:zipFile:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe (Sensitive Base64)
$sel:s3ObjectVersion:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:s3Key:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:s3Bucket:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:revisionId:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:publish:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Bool
$sel:imageUri:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:dryRun:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Bool
$sel:architectures:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe (NonEmpty Architecture)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Architecture)
architectures
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageUri
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
publish
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
revisionId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3Bucket
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3Key
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3ObjectVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Base64)
zipFile
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
functionName
instance Prelude.NFData UpdateFunctionCode where
rnf :: UpdateFunctionCode -> ()
rnf UpdateFunctionCode' {Maybe Bool
Maybe (NonEmpty Architecture)
Maybe Text
Maybe (Sensitive Base64)
Text
functionName :: Text
zipFile :: Maybe (Sensitive Base64)
s3ObjectVersion :: Maybe Text
s3Key :: Maybe Text
s3Bucket :: Maybe Text
revisionId :: Maybe Text
publish :: Maybe Bool
imageUri :: Maybe Text
dryRun :: Maybe Bool
architectures :: Maybe (NonEmpty Architecture)
$sel:functionName:UpdateFunctionCode' :: UpdateFunctionCode -> Text
$sel:zipFile:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe (Sensitive Base64)
$sel:s3ObjectVersion:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:s3Key:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:s3Bucket:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:revisionId:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:publish:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Bool
$sel:imageUri:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:dryRun:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Bool
$sel:architectures:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe (NonEmpty Architecture)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Architecture)
architectures
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageUri
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
publish
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
revisionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3Bucket
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3Key
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3ObjectVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Base64)
zipFile
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
functionName
instance Data.ToHeaders UpdateFunctionCode where
toHeaders :: UpdateFunctionCode -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToJSON UpdateFunctionCode where
toJSON :: UpdateFunctionCode -> Value
toJSON UpdateFunctionCode' {Maybe Bool
Maybe (NonEmpty Architecture)
Maybe Text
Maybe (Sensitive Base64)
Text
functionName :: Text
zipFile :: Maybe (Sensitive Base64)
s3ObjectVersion :: Maybe Text
s3Key :: Maybe Text
s3Bucket :: Maybe Text
revisionId :: Maybe Text
publish :: Maybe Bool
imageUri :: Maybe Text
dryRun :: Maybe Bool
architectures :: Maybe (NonEmpty Architecture)
$sel:functionName:UpdateFunctionCode' :: UpdateFunctionCode -> Text
$sel:zipFile:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe (Sensitive Base64)
$sel:s3ObjectVersion:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:s3Key:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:s3Bucket:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:revisionId:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:publish:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Bool
$sel:imageUri:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:dryRun:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Bool
$sel:architectures:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe (NonEmpty Architecture)
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Architectures" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Architecture)
architectures,
(Key
"DryRun" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dryRun,
(Key
"ImageUri" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imageUri,
(Key
"Publish" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
publish,
(Key
"RevisionId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
revisionId,
(Key
"S3Bucket" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
s3Bucket,
(Key
"S3Key" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
s3Key,
(Key
"S3ObjectVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
s3ObjectVersion,
(Key
"ZipFile" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Base64)
zipFile
]
)
instance Data.ToPath UpdateFunctionCode where
toPath :: UpdateFunctionCode -> ByteString
toPath UpdateFunctionCode' {Maybe Bool
Maybe (NonEmpty Architecture)
Maybe Text
Maybe (Sensitive Base64)
Text
functionName :: Text
zipFile :: Maybe (Sensitive Base64)
s3ObjectVersion :: Maybe Text
s3Key :: Maybe Text
s3Bucket :: Maybe Text
revisionId :: Maybe Text
publish :: Maybe Bool
imageUri :: Maybe Text
dryRun :: Maybe Bool
architectures :: Maybe (NonEmpty Architecture)
$sel:functionName:UpdateFunctionCode' :: UpdateFunctionCode -> Text
$sel:zipFile:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe (Sensitive Base64)
$sel:s3ObjectVersion:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:s3Key:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:s3Bucket:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:revisionId:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:publish:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Bool
$sel:imageUri:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Text
$sel:dryRun:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe Bool
$sel:architectures:UpdateFunctionCode' :: UpdateFunctionCode -> Maybe (NonEmpty Architecture)
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2015-03-31/functions/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
functionName,
ByteString
"/code"
]
instance Data.ToQuery UpdateFunctionCode where
toQuery :: UpdateFunctionCode -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty