{-# 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.Synthetics.UpdateCanary
(
UpdateCanary (..),
newUpdateCanary,
updateCanary_artifactConfig,
updateCanary_artifactS3Location,
updateCanary_code,
updateCanary_executionRoleArn,
updateCanary_failureRetentionPeriodInDays,
updateCanary_runConfig,
updateCanary_runtimeVersion,
updateCanary_schedule,
updateCanary_successRetentionPeriodInDays,
updateCanary_visualReference,
updateCanary_vpcConfig,
updateCanary_name,
UpdateCanaryResponse (..),
newUpdateCanaryResponse,
updateCanaryResponse_httpStatus,
)
where
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
import Amazonka.Synthetics.Types
data UpdateCanary = UpdateCanary'
{
UpdateCanary -> Maybe ArtifactConfigInput
artifactConfig :: Prelude.Maybe ArtifactConfigInput,
UpdateCanary -> Maybe Text
artifactS3Location :: Prelude.Maybe Prelude.Text,
UpdateCanary -> Maybe CanaryCodeInput
code :: Prelude.Maybe CanaryCodeInput,
UpdateCanary -> Maybe Text
executionRoleArn :: Prelude.Maybe Prelude.Text,
UpdateCanary -> Maybe Natural
failureRetentionPeriodInDays :: Prelude.Maybe Prelude.Natural,
UpdateCanary -> Maybe CanaryRunConfigInput
runConfig :: Prelude.Maybe CanaryRunConfigInput,
UpdateCanary -> Maybe Text
runtimeVersion :: Prelude.Maybe Prelude.Text,
UpdateCanary -> Maybe CanaryScheduleInput
schedule :: Prelude.Maybe CanaryScheduleInput,
UpdateCanary -> Maybe Natural
successRetentionPeriodInDays :: Prelude.Maybe Prelude.Natural,
UpdateCanary -> Maybe VisualReferenceInput
visualReference :: Prelude.Maybe VisualReferenceInput,
UpdateCanary -> Maybe VpcConfigInput
vpcConfig :: Prelude.Maybe VpcConfigInput,
UpdateCanary -> Text
name :: Prelude.Text
}
deriving (UpdateCanary -> UpdateCanary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateCanary -> UpdateCanary -> Bool
$c/= :: UpdateCanary -> UpdateCanary -> Bool
== :: UpdateCanary -> UpdateCanary -> Bool
$c== :: UpdateCanary -> UpdateCanary -> Bool
Prelude.Eq, ReadPrec [UpdateCanary]
ReadPrec UpdateCanary
Int -> ReadS UpdateCanary
ReadS [UpdateCanary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateCanary]
$creadListPrec :: ReadPrec [UpdateCanary]
readPrec :: ReadPrec UpdateCanary
$creadPrec :: ReadPrec UpdateCanary
readList :: ReadS [UpdateCanary]
$creadList :: ReadS [UpdateCanary]
readsPrec :: Int -> ReadS UpdateCanary
$creadsPrec :: Int -> ReadS UpdateCanary
Prelude.Read, Int -> UpdateCanary -> ShowS
[UpdateCanary] -> ShowS
UpdateCanary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateCanary] -> ShowS
$cshowList :: [UpdateCanary] -> ShowS
show :: UpdateCanary -> String
$cshow :: UpdateCanary -> String
showsPrec :: Int -> UpdateCanary -> ShowS
$cshowsPrec :: Int -> UpdateCanary -> ShowS
Prelude.Show, forall x. Rep UpdateCanary x -> UpdateCanary
forall x. UpdateCanary -> Rep UpdateCanary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateCanary x -> UpdateCanary
$cfrom :: forall x. UpdateCanary -> Rep UpdateCanary x
Prelude.Generic)
newUpdateCanary ::
Prelude.Text ->
UpdateCanary
newUpdateCanary :: Text -> UpdateCanary
newUpdateCanary Text
pName_ =
UpdateCanary'
{ $sel:artifactConfig:UpdateCanary' :: Maybe ArtifactConfigInput
artifactConfig = forall a. Maybe a
Prelude.Nothing,
$sel:artifactS3Location:UpdateCanary' :: Maybe Text
artifactS3Location = forall a. Maybe a
Prelude.Nothing,
$sel:code:UpdateCanary' :: Maybe CanaryCodeInput
code = forall a. Maybe a
Prelude.Nothing,
$sel:executionRoleArn:UpdateCanary' :: Maybe Text
executionRoleArn = forall a. Maybe a
Prelude.Nothing,
$sel:failureRetentionPeriodInDays:UpdateCanary' :: Maybe Natural
failureRetentionPeriodInDays = forall a. Maybe a
Prelude.Nothing,
$sel:runConfig:UpdateCanary' :: Maybe CanaryRunConfigInput
runConfig = forall a. Maybe a
Prelude.Nothing,
$sel:runtimeVersion:UpdateCanary' :: Maybe Text
runtimeVersion = forall a. Maybe a
Prelude.Nothing,
$sel:schedule:UpdateCanary' :: Maybe CanaryScheduleInput
schedule = forall a. Maybe a
Prelude.Nothing,
$sel:successRetentionPeriodInDays:UpdateCanary' :: Maybe Natural
successRetentionPeriodInDays = forall a. Maybe a
Prelude.Nothing,
$sel:visualReference:UpdateCanary' :: Maybe VisualReferenceInput
visualReference = forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:UpdateCanary' :: Maybe VpcConfigInput
vpcConfig = forall a. Maybe a
Prelude.Nothing,
$sel:name:UpdateCanary' :: Text
name = Text
pName_
}
updateCanary_artifactConfig :: Lens.Lens' UpdateCanary (Prelude.Maybe ArtifactConfigInput)
updateCanary_artifactConfig :: Lens' UpdateCanary (Maybe ArtifactConfigInput)
updateCanary_artifactConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCanary' {Maybe ArtifactConfigInput
artifactConfig :: Maybe ArtifactConfigInput
$sel:artifactConfig:UpdateCanary' :: UpdateCanary -> Maybe ArtifactConfigInput
artifactConfig} -> Maybe ArtifactConfigInput
artifactConfig) (\s :: UpdateCanary
s@UpdateCanary' {} Maybe ArtifactConfigInput
a -> UpdateCanary
s {$sel:artifactConfig:UpdateCanary' :: Maybe ArtifactConfigInput
artifactConfig = Maybe ArtifactConfigInput
a} :: UpdateCanary)
updateCanary_artifactS3Location :: Lens.Lens' UpdateCanary (Prelude.Maybe Prelude.Text)
updateCanary_artifactS3Location :: Lens' UpdateCanary (Maybe Text)
updateCanary_artifactS3Location = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCanary' {Maybe Text
artifactS3Location :: Maybe Text
$sel:artifactS3Location:UpdateCanary' :: UpdateCanary -> Maybe Text
artifactS3Location} -> Maybe Text
artifactS3Location) (\s :: UpdateCanary
s@UpdateCanary' {} Maybe Text
a -> UpdateCanary
s {$sel:artifactS3Location:UpdateCanary' :: Maybe Text
artifactS3Location = Maybe Text
a} :: UpdateCanary)
updateCanary_code :: Lens.Lens' UpdateCanary (Prelude.Maybe CanaryCodeInput)
updateCanary_code :: Lens' UpdateCanary (Maybe CanaryCodeInput)
updateCanary_code = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCanary' {Maybe CanaryCodeInput
code :: Maybe CanaryCodeInput
$sel:code:UpdateCanary' :: UpdateCanary -> Maybe CanaryCodeInput
code} -> Maybe CanaryCodeInput
code) (\s :: UpdateCanary
s@UpdateCanary' {} Maybe CanaryCodeInput
a -> UpdateCanary
s {$sel:code:UpdateCanary' :: Maybe CanaryCodeInput
code = Maybe CanaryCodeInput
a} :: UpdateCanary)
updateCanary_executionRoleArn :: Lens.Lens' UpdateCanary (Prelude.Maybe Prelude.Text)
updateCanary_executionRoleArn :: Lens' UpdateCanary (Maybe Text)
updateCanary_executionRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCanary' {Maybe Text
executionRoleArn :: Maybe Text
$sel:executionRoleArn:UpdateCanary' :: UpdateCanary -> Maybe Text
executionRoleArn} -> Maybe Text
executionRoleArn) (\s :: UpdateCanary
s@UpdateCanary' {} Maybe Text
a -> UpdateCanary
s {$sel:executionRoleArn:UpdateCanary' :: Maybe Text
executionRoleArn = Maybe Text
a} :: UpdateCanary)
updateCanary_failureRetentionPeriodInDays :: Lens.Lens' UpdateCanary (Prelude.Maybe Prelude.Natural)
updateCanary_failureRetentionPeriodInDays :: Lens' UpdateCanary (Maybe Natural)
updateCanary_failureRetentionPeriodInDays = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCanary' {Maybe Natural
failureRetentionPeriodInDays :: Maybe Natural
$sel:failureRetentionPeriodInDays:UpdateCanary' :: UpdateCanary -> Maybe Natural
failureRetentionPeriodInDays} -> Maybe Natural
failureRetentionPeriodInDays) (\s :: UpdateCanary
s@UpdateCanary' {} Maybe Natural
a -> UpdateCanary
s {$sel:failureRetentionPeriodInDays:UpdateCanary' :: Maybe Natural
failureRetentionPeriodInDays = Maybe Natural
a} :: UpdateCanary)
updateCanary_runConfig :: Lens.Lens' UpdateCanary (Prelude.Maybe CanaryRunConfigInput)
updateCanary_runConfig :: Lens' UpdateCanary (Maybe CanaryRunConfigInput)
updateCanary_runConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCanary' {Maybe CanaryRunConfigInput
runConfig :: Maybe CanaryRunConfigInput
$sel:runConfig:UpdateCanary' :: UpdateCanary -> Maybe CanaryRunConfigInput
runConfig} -> Maybe CanaryRunConfigInput
runConfig) (\s :: UpdateCanary
s@UpdateCanary' {} Maybe CanaryRunConfigInput
a -> UpdateCanary
s {$sel:runConfig:UpdateCanary' :: Maybe CanaryRunConfigInput
runConfig = Maybe CanaryRunConfigInput
a} :: UpdateCanary)
updateCanary_runtimeVersion :: Lens.Lens' UpdateCanary (Prelude.Maybe Prelude.Text)
updateCanary_runtimeVersion :: Lens' UpdateCanary (Maybe Text)
updateCanary_runtimeVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCanary' {Maybe Text
runtimeVersion :: Maybe Text
$sel:runtimeVersion:UpdateCanary' :: UpdateCanary -> Maybe Text
runtimeVersion} -> Maybe Text
runtimeVersion) (\s :: UpdateCanary
s@UpdateCanary' {} Maybe Text
a -> UpdateCanary
s {$sel:runtimeVersion:UpdateCanary' :: Maybe Text
runtimeVersion = Maybe Text
a} :: UpdateCanary)
updateCanary_schedule :: Lens.Lens' UpdateCanary (Prelude.Maybe CanaryScheduleInput)
updateCanary_schedule :: Lens' UpdateCanary (Maybe CanaryScheduleInput)
updateCanary_schedule = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCanary' {Maybe CanaryScheduleInput
schedule :: Maybe CanaryScheduleInput
$sel:schedule:UpdateCanary' :: UpdateCanary -> Maybe CanaryScheduleInput
schedule} -> Maybe CanaryScheduleInput
schedule) (\s :: UpdateCanary
s@UpdateCanary' {} Maybe CanaryScheduleInput
a -> UpdateCanary
s {$sel:schedule:UpdateCanary' :: Maybe CanaryScheduleInput
schedule = Maybe CanaryScheduleInput
a} :: UpdateCanary)
updateCanary_successRetentionPeriodInDays :: Lens.Lens' UpdateCanary (Prelude.Maybe Prelude.Natural)
updateCanary_successRetentionPeriodInDays :: Lens' UpdateCanary (Maybe Natural)
updateCanary_successRetentionPeriodInDays = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCanary' {Maybe Natural
successRetentionPeriodInDays :: Maybe Natural
$sel:successRetentionPeriodInDays:UpdateCanary' :: UpdateCanary -> Maybe Natural
successRetentionPeriodInDays} -> Maybe Natural
successRetentionPeriodInDays) (\s :: UpdateCanary
s@UpdateCanary' {} Maybe Natural
a -> UpdateCanary
s {$sel:successRetentionPeriodInDays:UpdateCanary' :: Maybe Natural
successRetentionPeriodInDays = Maybe Natural
a} :: UpdateCanary)
updateCanary_visualReference :: Lens.Lens' UpdateCanary (Prelude.Maybe VisualReferenceInput)
updateCanary_visualReference :: Lens' UpdateCanary (Maybe VisualReferenceInput)
updateCanary_visualReference = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCanary' {Maybe VisualReferenceInput
visualReference :: Maybe VisualReferenceInput
$sel:visualReference:UpdateCanary' :: UpdateCanary -> Maybe VisualReferenceInput
visualReference} -> Maybe VisualReferenceInput
visualReference) (\s :: UpdateCanary
s@UpdateCanary' {} Maybe VisualReferenceInput
a -> UpdateCanary
s {$sel:visualReference:UpdateCanary' :: Maybe VisualReferenceInput
visualReference = Maybe VisualReferenceInput
a} :: UpdateCanary)
updateCanary_vpcConfig :: Lens.Lens' UpdateCanary (Prelude.Maybe VpcConfigInput)
updateCanary_vpcConfig :: Lens' UpdateCanary (Maybe VpcConfigInput)
updateCanary_vpcConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCanary' {Maybe VpcConfigInput
vpcConfig :: Maybe VpcConfigInput
$sel:vpcConfig:UpdateCanary' :: UpdateCanary -> Maybe VpcConfigInput
vpcConfig} -> Maybe VpcConfigInput
vpcConfig) (\s :: UpdateCanary
s@UpdateCanary' {} Maybe VpcConfigInput
a -> UpdateCanary
s {$sel:vpcConfig:UpdateCanary' :: Maybe VpcConfigInput
vpcConfig = Maybe VpcConfigInput
a} :: UpdateCanary)
updateCanary_name :: Lens.Lens' UpdateCanary Prelude.Text
updateCanary_name :: Lens' UpdateCanary Text
updateCanary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCanary' {Text
name :: Text
$sel:name:UpdateCanary' :: UpdateCanary -> Text
name} -> Text
name) (\s :: UpdateCanary
s@UpdateCanary' {} Text
a -> UpdateCanary
s {$sel:name:UpdateCanary' :: Text
name = Text
a} :: UpdateCanary)
instance Core.AWSRequest UpdateCanary where
type AWSResponse UpdateCanary = UpdateCanaryResponse
request :: (Service -> Service) -> UpdateCanary -> Request UpdateCanary
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateCanary
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateCanary)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> UpdateCanaryResponse
UpdateCanaryResponse'
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))
)
instance Prelude.Hashable UpdateCanary where
hashWithSalt :: Int -> UpdateCanary -> Int
hashWithSalt Int
_salt UpdateCanary' {Maybe Natural
Maybe Text
Maybe CanaryCodeInput
Maybe CanaryRunConfigInput
Maybe CanaryScheduleInput
Maybe ArtifactConfigInput
Maybe VisualReferenceInput
Maybe VpcConfigInput
Text
name :: Text
vpcConfig :: Maybe VpcConfigInput
visualReference :: Maybe VisualReferenceInput
successRetentionPeriodInDays :: Maybe Natural
schedule :: Maybe CanaryScheduleInput
runtimeVersion :: Maybe Text
runConfig :: Maybe CanaryRunConfigInput
failureRetentionPeriodInDays :: Maybe Natural
executionRoleArn :: Maybe Text
code :: Maybe CanaryCodeInput
artifactS3Location :: Maybe Text
artifactConfig :: Maybe ArtifactConfigInput
$sel:name:UpdateCanary' :: UpdateCanary -> Text
$sel:vpcConfig:UpdateCanary' :: UpdateCanary -> Maybe VpcConfigInput
$sel:visualReference:UpdateCanary' :: UpdateCanary -> Maybe VisualReferenceInput
$sel:successRetentionPeriodInDays:UpdateCanary' :: UpdateCanary -> Maybe Natural
$sel:schedule:UpdateCanary' :: UpdateCanary -> Maybe CanaryScheduleInput
$sel:runtimeVersion:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:runConfig:UpdateCanary' :: UpdateCanary -> Maybe CanaryRunConfigInput
$sel:failureRetentionPeriodInDays:UpdateCanary' :: UpdateCanary -> Maybe Natural
$sel:executionRoleArn:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:code:UpdateCanary' :: UpdateCanary -> Maybe CanaryCodeInput
$sel:artifactS3Location:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:artifactConfig:UpdateCanary' :: UpdateCanary -> Maybe ArtifactConfigInput
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ArtifactConfigInput
artifactConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
artifactS3Location
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CanaryCodeInput
code
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
executionRoleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
failureRetentionPeriodInDays
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CanaryRunConfigInput
runConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
runtimeVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CanaryScheduleInput
schedule
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
successRetentionPeriodInDays
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VisualReferenceInput
visualReference
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VpcConfigInput
vpcConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData UpdateCanary where
rnf :: UpdateCanary -> ()
rnf UpdateCanary' {Maybe Natural
Maybe Text
Maybe CanaryCodeInput
Maybe CanaryRunConfigInput
Maybe CanaryScheduleInput
Maybe ArtifactConfigInput
Maybe VisualReferenceInput
Maybe VpcConfigInput
Text
name :: Text
vpcConfig :: Maybe VpcConfigInput
visualReference :: Maybe VisualReferenceInput
successRetentionPeriodInDays :: Maybe Natural
schedule :: Maybe CanaryScheduleInput
runtimeVersion :: Maybe Text
runConfig :: Maybe CanaryRunConfigInput
failureRetentionPeriodInDays :: Maybe Natural
executionRoleArn :: Maybe Text
code :: Maybe CanaryCodeInput
artifactS3Location :: Maybe Text
artifactConfig :: Maybe ArtifactConfigInput
$sel:name:UpdateCanary' :: UpdateCanary -> Text
$sel:vpcConfig:UpdateCanary' :: UpdateCanary -> Maybe VpcConfigInput
$sel:visualReference:UpdateCanary' :: UpdateCanary -> Maybe VisualReferenceInput
$sel:successRetentionPeriodInDays:UpdateCanary' :: UpdateCanary -> Maybe Natural
$sel:schedule:UpdateCanary' :: UpdateCanary -> Maybe CanaryScheduleInput
$sel:runtimeVersion:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:runConfig:UpdateCanary' :: UpdateCanary -> Maybe CanaryRunConfigInput
$sel:failureRetentionPeriodInDays:UpdateCanary' :: UpdateCanary -> Maybe Natural
$sel:executionRoleArn:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:code:UpdateCanary' :: UpdateCanary -> Maybe CanaryCodeInput
$sel:artifactS3Location:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:artifactConfig:UpdateCanary' :: UpdateCanary -> Maybe ArtifactConfigInput
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ArtifactConfigInput
artifactConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
artifactS3Location
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CanaryCodeInput
code
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
executionRoleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
failureRetentionPeriodInDays
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CanaryRunConfigInput
runConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
runtimeVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CanaryScheduleInput
schedule
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
successRetentionPeriodInDays
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VisualReferenceInput
visualReference
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcConfigInput
vpcConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
instance Data.ToHeaders UpdateCanary where
toHeaders :: UpdateCanary -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON UpdateCanary where
toJSON :: UpdateCanary -> Value
toJSON UpdateCanary' {Maybe Natural
Maybe Text
Maybe CanaryCodeInput
Maybe CanaryRunConfigInput
Maybe CanaryScheduleInput
Maybe ArtifactConfigInput
Maybe VisualReferenceInput
Maybe VpcConfigInput
Text
name :: Text
vpcConfig :: Maybe VpcConfigInput
visualReference :: Maybe VisualReferenceInput
successRetentionPeriodInDays :: Maybe Natural
schedule :: Maybe CanaryScheduleInput
runtimeVersion :: Maybe Text
runConfig :: Maybe CanaryRunConfigInput
failureRetentionPeriodInDays :: Maybe Natural
executionRoleArn :: Maybe Text
code :: Maybe CanaryCodeInput
artifactS3Location :: Maybe Text
artifactConfig :: Maybe ArtifactConfigInput
$sel:name:UpdateCanary' :: UpdateCanary -> Text
$sel:vpcConfig:UpdateCanary' :: UpdateCanary -> Maybe VpcConfigInput
$sel:visualReference:UpdateCanary' :: UpdateCanary -> Maybe VisualReferenceInput
$sel:successRetentionPeriodInDays:UpdateCanary' :: UpdateCanary -> Maybe Natural
$sel:schedule:UpdateCanary' :: UpdateCanary -> Maybe CanaryScheduleInput
$sel:runtimeVersion:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:runConfig:UpdateCanary' :: UpdateCanary -> Maybe CanaryRunConfigInput
$sel:failureRetentionPeriodInDays:UpdateCanary' :: UpdateCanary -> Maybe Natural
$sel:executionRoleArn:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:code:UpdateCanary' :: UpdateCanary -> Maybe CanaryCodeInput
$sel:artifactS3Location:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:artifactConfig:UpdateCanary' :: UpdateCanary -> Maybe ArtifactConfigInput
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ArtifactConfig" 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 ArtifactConfigInput
artifactConfig,
(Key
"ArtifactS3Location" 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
artifactS3Location,
(Key
"Code" 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 CanaryCodeInput
code,
(Key
"ExecutionRoleArn" 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
executionRoleArn,
(Key
"FailureRetentionPeriodInDays" 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 Natural
failureRetentionPeriodInDays,
(Key
"RunConfig" 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 CanaryRunConfigInput
runConfig,
(Key
"RuntimeVersion" 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
runtimeVersion,
(Key
"Schedule" 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 CanaryScheduleInput
schedule,
(Key
"SuccessRetentionPeriodInDays" 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 Natural
successRetentionPeriodInDays,
(Key
"VisualReference" 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 VisualReferenceInput
visualReference,
(Key
"VpcConfig" 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 VpcConfigInput
vpcConfig
]
)
instance Data.ToPath UpdateCanary where
toPath :: UpdateCanary -> ByteString
toPath UpdateCanary' {Maybe Natural
Maybe Text
Maybe CanaryCodeInput
Maybe CanaryRunConfigInput
Maybe CanaryScheduleInput
Maybe ArtifactConfigInput
Maybe VisualReferenceInput
Maybe VpcConfigInput
Text
name :: Text
vpcConfig :: Maybe VpcConfigInput
visualReference :: Maybe VisualReferenceInput
successRetentionPeriodInDays :: Maybe Natural
schedule :: Maybe CanaryScheduleInput
runtimeVersion :: Maybe Text
runConfig :: Maybe CanaryRunConfigInput
failureRetentionPeriodInDays :: Maybe Natural
executionRoleArn :: Maybe Text
code :: Maybe CanaryCodeInput
artifactS3Location :: Maybe Text
artifactConfig :: Maybe ArtifactConfigInput
$sel:name:UpdateCanary' :: UpdateCanary -> Text
$sel:vpcConfig:UpdateCanary' :: UpdateCanary -> Maybe VpcConfigInput
$sel:visualReference:UpdateCanary' :: UpdateCanary -> Maybe VisualReferenceInput
$sel:successRetentionPeriodInDays:UpdateCanary' :: UpdateCanary -> Maybe Natural
$sel:schedule:UpdateCanary' :: UpdateCanary -> Maybe CanaryScheduleInput
$sel:runtimeVersion:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:runConfig:UpdateCanary' :: UpdateCanary -> Maybe CanaryRunConfigInput
$sel:failureRetentionPeriodInDays:UpdateCanary' :: UpdateCanary -> Maybe Natural
$sel:executionRoleArn:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:code:UpdateCanary' :: UpdateCanary -> Maybe CanaryCodeInput
$sel:artifactS3Location:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:artifactConfig:UpdateCanary' :: UpdateCanary -> Maybe ArtifactConfigInput
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/canary/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
name]
instance Data.ToQuery UpdateCanary where
toQuery :: UpdateCanary -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateCanaryResponse = UpdateCanaryResponse'
{
UpdateCanaryResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateCanaryResponse -> UpdateCanaryResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateCanaryResponse -> UpdateCanaryResponse -> Bool
$c/= :: UpdateCanaryResponse -> UpdateCanaryResponse -> Bool
== :: UpdateCanaryResponse -> UpdateCanaryResponse -> Bool
$c== :: UpdateCanaryResponse -> UpdateCanaryResponse -> Bool
Prelude.Eq, ReadPrec [UpdateCanaryResponse]
ReadPrec UpdateCanaryResponse
Int -> ReadS UpdateCanaryResponse
ReadS [UpdateCanaryResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateCanaryResponse]
$creadListPrec :: ReadPrec [UpdateCanaryResponse]
readPrec :: ReadPrec UpdateCanaryResponse
$creadPrec :: ReadPrec UpdateCanaryResponse
readList :: ReadS [UpdateCanaryResponse]
$creadList :: ReadS [UpdateCanaryResponse]
readsPrec :: Int -> ReadS UpdateCanaryResponse
$creadsPrec :: Int -> ReadS UpdateCanaryResponse
Prelude.Read, Int -> UpdateCanaryResponse -> ShowS
[UpdateCanaryResponse] -> ShowS
UpdateCanaryResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateCanaryResponse] -> ShowS
$cshowList :: [UpdateCanaryResponse] -> ShowS
show :: UpdateCanaryResponse -> String
$cshow :: UpdateCanaryResponse -> String
showsPrec :: Int -> UpdateCanaryResponse -> ShowS
$cshowsPrec :: Int -> UpdateCanaryResponse -> ShowS
Prelude.Show, forall x. Rep UpdateCanaryResponse x -> UpdateCanaryResponse
forall x. UpdateCanaryResponse -> Rep UpdateCanaryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateCanaryResponse x -> UpdateCanaryResponse
$cfrom :: forall x. UpdateCanaryResponse -> Rep UpdateCanaryResponse x
Prelude.Generic)
newUpdateCanaryResponse ::
Prelude.Int ->
UpdateCanaryResponse
newUpdateCanaryResponse :: Int -> UpdateCanaryResponse
newUpdateCanaryResponse Int
pHttpStatus_ =
UpdateCanaryResponse' {$sel:httpStatus:UpdateCanaryResponse' :: Int
httpStatus = Int
pHttpStatus_}
updateCanaryResponse_httpStatus :: Lens.Lens' UpdateCanaryResponse Prelude.Int
updateCanaryResponse_httpStatus :: Lens' UpdateCanaryResponse Int
updateCanaryResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCanaryResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateCanaryResponse' :: UpdateCanaryResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateCanaryResponse
s@UpdateCanaryResponse' {} Int
a -> UpdateCanaryResponse
s {$sel:httpStatus:UpdateCanaryResponse' :: Int
httpStatus = Int
a} :: UpdateCanaryResponse)
instance Prelude.NFData UpdateCanaryResponse where
rnf :: UpdateCanaryResponse -> ()
rnf UpdateCanaryResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateCanaryResponse' :: UpdateCanaryResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus