{-# 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_successRetentionPeriodInDays,
updateCanary_schedule,
updateCanary_artifactS3Location,
updateCanary_runConfig,
updateCanary_executionRoleArn,
updateCanary_runtimeVersion,
updateCanary_failureRetentionPeriodInDays,
updateCanary_artifactConfig,
updateCanary_vpcConfig,
updateCanary_visualReference,
updateCanary_code,
updateCanary_name,
UpdateCanaryResponse (..),
newUpdateCanaryResponse,
updateCanaryResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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 Natural
successRetentionPeriodInDays :: Prelude.Maybe Prelude.Natural,
UpdateCanary -> Maybe CanaryScheduleInput
schedule :: Prelude.Maybe CanaryScheduleInput,
UpdateCanary -> Maybe Text
artifactS3Location :: Prelude.Maybe Prelude.Text,
UpdateCanary -> Maybe CanaryRunConfigInput
runConfig :: Prelude.Maybe CanaryRunConfigInput,
UpdateCanary -> Maybe Text
executionRoleArn :: Prelude.Maybe Prelude.Text,
UpdateCanary -> Maybe Text
runtimeVersion :: Prelude.Maybe Prelude.Text,
UpdateCanary -> Maybe Natural
failureRetentionPeriodInDays :: Prelude.Maybe Prelude.Natural,
UpdateCanary -> Maybe ArtifactConfigInput
artifactConfig :: Prelude.Maybe ArtifactConfigInput,
UpdateCanary -> Maybe VpcConfigInput
vpcConfig :: Prelude.Maybe VpcConfigInput,
UpdateCanary -> Maybe VisualReferenceInput
visualReference :: Prelude.Maybe VisualReferenceInput,
UpdateCanary -> Maybe CanaryCodeInput
code :: Prelude.Maybe CanaryCodeInput,
UpdateCanary -> Text
name :: Prelude.Text
}
deriving (UpdateCanary -> UpdateCanary -> Bool
(UpdateCanary -> UpdateCanary -> Bool)
-> (UpdateCanary -> UpdateCanary -> Bool) -> Eq UpdateCanary
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]
(Int -> ReadS UpdateCanary)
-> ReadS [UpdateCanary]
-> ReadPrec UpdateCanary
-> ReadPrec [UpdateCanary]
-> Read 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
(Int -> UpdateCanary -> ShowS)
-> (UpdateCanary -> String)
-> ([UpdateCanary] -> ShowS)
-> Show UpdateCanary
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. UpdateCanary -> Rep UpdateCanary x)
-> (forall x. Rep UpdateCanary x -> UpdateCanary)
-> Generic UpdateCanary
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' :: Maybe Natural
-> Maybe CanaryScheduleInput
-> Maybe Text
-> Maybe CanaryRunConfigInput
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe ArtifactConfigInput
-> Maybe VpcConfigInput
-> Maybe VisualReferenceInput
-> Maybe CanaryCodeInput
-> Text
-> UpdateCanary
UpdateCanary'
{ $sel:successRetentionPeriodInDays:UpdateCanary' :: Maybe Natural
successRetentionPeriodInDays =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:schedule:UpdateCanary' :: Maybe CanaryScheduleInput
schedule = Maybe CanaryScheduleInput
forall a. Maybe a
Prelude.Nothing,
$sel:artifactS3Location:UpdateCanary' :: Maybe Text
artifactS3Location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:runConfig:UpdateCanary' :: Maybe CanaryRunConfigInput
runConfig = Maybe CanaryRunConfigInput
forall a. Maybe a
Prelude.Nothing,
$sel:executionRoleArn:UpdateCanary' :: Maybe Text
executionRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:runtimeVersion:UpdateCanary' :: Maybe Text
runtimeVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:failureRetentionPeriodInDays:UpdateCanary' :: Maybe Natural
failureRetentionPeriodInDays = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:artifactConfig:UpdateCanary' :: Maybe ArtifactConfigInput
artifactConfig = Maybe ArtifactConfigInput
forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:UpdateCanary' :: Maybe VpcConfigInput
vpcConfig = Maybe VpcConfigInput
forall a. Maybe a
Prelude.Nothing,
$sel:visualReference:UpdateCanary' :: Maybe VisualReferenceInput
visualReference = Maybe VisualReferenceInput
forall a. Maybe a
Prelude.Nothing,
$sel:code:UpdateCanary' :: Maybe CanaryCodeInput
code = Maybe CanaryCodeInput
forall a. Maybe a
Prelude.Nothing,
$sel:name:UpdateCanary' :: Text
name = Text
pName_
}
updateCanary_successRetentionPeriodInDays :: Lens.Lens' UpdateCanary (Prelude.Maybe Prelude.Natural)
updateCanary_successRetentionPeriodInDays :: (Maybe Natural -> f (Maybe Natural))
-> UpdateCanary -> f UpdateCanary
updateCanary_successRetentionPeriodInDays = (UpdateCanary -> Maybe Natural)
-> (UpdateCanary -> Maybe Natural -> UpdateCanary)
-> Lens UpdateCanary UpdateCanary (Maybe Natural) (Maybe Natural)
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_schedule :: Lens.Lens' UpdateCanary (Prelude.Maybe CanaryScheduleInput)
updateCanary_schedule :: (Maybe CanaryScheduleInput -> f (Maybe CanaryScheduleInput))
-> UpdateCanary -> f UpdateCanary
updateCanary_schedule = (UpdateCanary -> Maybe CanaryScheduleInput)
-> (UpdateCanary -> Maybe CanaryScheduleInput -> UpdateCanary)
-> Lens
UpdateCanary
UpdateCanary
(Maybe CanaryScheduleInput)
(Maybe CanaryScheduleInput)
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_artifactS3Location :: Lens.Lens' UpdateCanary (Prelude.Maybe Prelude.Text)
updateCanary_artifactS3Location :: (Maybe Text -> f (Maybe Text)) -> UpdateCanary -> f UpdateCanary
updateCanary_artifactS3Location = (UpdateCanary -> Maybe Text)
-> (UpdateCanary -> Maybe Text -> UpdateCanary)
-> Lens UpdateCanary UpdateCanary (Maybe Text) (Maybe Text)
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_runConfig :: Lens.Lens' UpdateCanary (Prelude.Maybe CanaryRunConfigInput)
updateCanary_runConfig :: (Maybe CanaryRunConfigInput -> f (Maybe CanaryRunConfigInput))
-> UpdateCanary -> f UpdateCanary
updateCanary_runConfig = (UpdateCanary -> Maybe CanaryRunConfigInput)
-> (UpdateCanary -> Maybe CanaryRunConfigInput -> UpdateCanary)
-> Lens
UpdateCanary
UpdateCanary
(Maybe CanaryRunConfigInput)
(Maybe CanaryRunConfigInput)
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_executionRoleArn :: Lens.Lens' UpdateCanary (Prelude.Maybe Prelude.Text)
updateCanary_executionRoleArn :: (Maybe Text -> f (Maybe Text)) -> UpdateCanary -> f UpdateCanary
updateCanary_executionRoleArn = (UpdateCanary -> Maybe Text)
-> (UpdateCanary -> Maybe Text -> UpdateCanary)
-> Lens UpdateCanary UpdateCanary (Maybe Text) (Maybe Text)
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_runtimeVersion :: Lens.Lens' UpdateCanary (Prelude.Maybe Prelude.Text)
updateCanary_runtimeVersion :: (Maybe Text -> f (Maybe Text)) -> UpdateCanary -> f UpdateCanary
updateCanary_runtimeVersion = (UpdateCanary -> Maybe Text)
-> (UpdateCanary -> Maybe Text -> UpdateCanary)
-> Lens UpdateCanary UpdateCanary (Maybe Text) (Maybe Text)
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_failureRetentionPeriodInDays :: Lens.Lens' UpdateCanary (Prelude.Maybe Prelude.Natural)
updateCanary_failureRetentionPeriodInDays :: (Maybe Natural -> f (Maybe Natural))
-> UpdateCanary -> f UpdateCanary
updateCanary_failureRetentionPeriodInDays = (UpdateCanary -> Maybe Natural)
-> (UpdateCanary -> Maybe Natural -> UpdateCanary)
-> Lens UpdateCanary UpdateCanary (Maybe Natural) (Maybe Natural)
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_artifactConfig :: Lens.Lens' UpdateCanary (Prelude.Maybe ArtifactConfigInput)
updateCanary_artifactConfig :: (Maybe ArtifactConfigInput -> f (Maybe ArtifactConfigInput))
-> UpdateCanary -> f UpdateCanary
updateCanary_artifactConfig = (UpdateCanary -> Maybe ArtifactConfigInput)
-> (UpdateCanary -> Maybe ArtifactConfigInput -> UpdateCanary)
-> Lens
UpdateCanary
UpdateCanary
(Maybe ArtifactConfigInput)
(Maybe ArtifactConfigInput)
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_vpcConfig :: Lens.Lens' UpdateCanary (Prelude.Maybe VpcConfigInput)
updateCanary_vpcConfig :: (Maybe VpcConfigInput -> f (Maybe VpcConfigInput))
-> UpdateCanary -> f UpdateCanary
updateCanary_vpcConfig = (UpdateCanary -> Maybe VpcConfigInput)
-> (UpdateCanary -> Maybe VpcConfigInput -> UpdateCanary)
-> Lens
UpdateCanary
UpdateCanary
(Maybe VpcConfigInput)
(Maybe VpcConfigInput)
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_visualReference :: Lens.Lens' UpdateCanary (Prelude.Maybe VisualReferenceInput)
updateCanary_visualReference :: (Maybe VisualReferenceInput -> f (Maybe VisualReferenceInput))
-> UpdateCanary -> f UpdateCanary
updateCanary_visualReference = (UpdateCanary -> Maybe VisualReferenceInput)
-> (UpdateCanary -> Maybe VisualReferenceInput -> UpdateCanary)
-> Lens
UpdateCanary
UpdateCanary
(Maybe VisualReferenceInput)
(Maybe VisualReferenceInput)
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_code :: Lens.Lens' UpdateCanary (Prelude.Maybe CanaryCodeInput)
updateCanary_code :: (Maybe CanaryCodeInput -> f (Maybe CanaryCodeInput))
-> UpdateCanary -> f UpdateCanary
updateCanary_code = (UpdateCanary -> Maybe CanaryCodeInput)
-> (UpdateCanary -> Maybe CanaryCodeInput -> UpdateCanary)
-> Lens
UpdateCanary
UpdateCanary
(Maybe CanaryCodeInput)
(Maybe CanaryCodeInput)
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_name :: Lens.Lens' UpdateCanary Prelude.Text
updateCanary_name :: (Text -> f Text) -> UpdateCanary -> f UpdateCanary
updateCanary_name = (UpdateCanary -> Text)
-> (UpdateCanary -> Text -> UpdateCanary)
-> Lens UpdateCanary UpdateCanary Text Text
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 :: UpdateCanary -> Request UpdateCanary
request = Service -> UpdateCanary -> Request UpdateCanary
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateCanary
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateCanary)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse UpdateCanary))
-> Logger
-> Service
-> Proxy UpdateCanary
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateCanary)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> UpdateCanaryResponse
UpdateCanaryResponse'
(Int -> UpdateCanaryResponse)
-> Either String Int -> Either String UpdateCanaryResponse
forall (f :: * -> *) a b. Functor 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 UpdateCanary
instance Prelude.NFData UpdateCanary
instance Core.ToHeaders UpdateCanary where
toHeaders :: UpdateCanary -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateCanary -> 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.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
code :: Maybe CanaryCodeInput
visualReference :: Maybe VisualReferenceInput
vpcConfig :: Maybe VpcConfigInput
artifactConfig :: Maybe ArtifactConfigInput
failureRetentionPeriodInDays :: Maybe Natural
runtimeVersion :: Maybe Text
executionRoleArn :: Maybe Text
runConfig :: Maybe CanaryRunConfigInput
artifactS3Location :: Maybe Text
schedule :: Maybe CanaryScheduleInput
successRetentionPeriodInDays :: Maybe Natural
$sel:name:UpdateCanary' :: UpdateCanary -> Text
$sel:code:UpdateCanary' :: UpdateCanary -> Maybe CanaryCodeInput
$sel:visualReference:UpdateCanary' :: UpdateCanary -> Maybe VisualReferenceInput
$sel:vpcConfig:UpdateCanary' :: UpdateCanary -> Maybe VpcConfigInput
$sel:artifactConfig:UpdateCanary' :: UpdateCanary -> Maybe ArtifactConfigInput
$sel:failureRetentionPeriodInDays:UpdateCanary' :: UpdateCanary -> Maybe Natural
$sel:runtimeVersion:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:executionRoleArn:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:runConfig:UpdateCanary' :: UpdateCanary -> Maybe CanaryRunConfigInput
$sel:artifactS3Location:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:schedule:UpdateCanary' :: UpdateCanary -> Maybe CanaryScheduleInput
$sel:successRetentionPeriodInDays:UpdateCanary' :: UpdateCanary -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"SuccessRetentionPeriodInDays" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
successRetentionPeriodInDays,
(Text
"Schedule" Text -> CanaryScheduleInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CanaryScheduleInput -> Pair)
-> Maybe CanaryScheduleInput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CanaryScheduleInput
schedule,
(Text
"ArtifactS3Location" 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
artifactS3Location,
(Text
"RunConfig" Text -> CanaryRunConfigInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CanaryRunConfigInput -> Pair)
-> Maybe CanaryRunConfigInput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CanaryRunConfigInput
runConfig,
(Text
"ExecutionRoleArn" 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
executionRoleArn,
(Text
"RuntimeVersion" 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
runtimeVersion,
(Text
"FailureRetentionPeriodInDays" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
failureRetentionPeriodInDays,
(Text
"ArtifactConfig" Text -> ArtifactConfigInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ArtifactConfigInput -> Pair)
-> Maybe ArtifactConfigInput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ArtifactConfigInput
artifactConfig,
(Text
"VpcConfig" Text -> VpcConfigInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (VpcConfigInput -> Pair) -> Maybe VpcConfigInput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcConfigInput
vpcConfig,
(Text
"VisualReference" Text -> VisualReferenceInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(VisualReferenceInput -> Pair)
-> Maybe VisualReferenceInput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VisualReferenceInput
visualReference,
(Text
"Code" Text -> CanaryCodeInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CanaryCodeInput -> Pair) -> Maybe CanaryCodeInput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CanaryCodeInput
code
]
)
instance Core.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
code :: Maybe CanaryCodeInput
visualReference :: Maybe VisualReferenceInput
vpcConfig :: Maybe VpcConfigInput
artifactConfig :: Maybe ArtifactConfigInput
failureRetentionPeriodInDays :: Maybe Natural
runtimeVersion :: Maybe Text
executionRoleArn :: Maybe Text
runConfig :: Maybe CanaryRunConfigInput
artifactS3Location :: Maybe Text
schedule :: Maybe CanaryScheduleInput
successRetentionPeriodInDays :: Maybe Natural
$sel:name:UpdateCanary' :: UpdateCanary -> Text
$sel:code:UpdateCanary' :: UpdateCanary -> Maybe CanaryCodeInput
$sel:visualReference:UpdateCanary' :: UpdateCanary -> Maybe VisualReferenceInput
$sel:vpcConfig:UpdateCanary' :: UpdateCanary -> Maybe VpcConfigInput
$sel:artifactConfig:UpdateCanary' :: UpdateCanary -> Maybe ArtifactConfigInput
$sel:failureRetentionPeriodInDays:UpdateCanary' :: UpdateCanary -> Maybe Natural
$sel:runtimeVersion:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:executionRoleArn:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:runConfig:UpdateCanary' :: UpdateCanary -> Maybe CanaryRunConfigInput
$sel:artifactS3Location:UpdateCanary' :: UpdateCanary -> Maybe Text
$sel:schedule:UpdateCanary' :: UpdateCanary -> Maybe CanaryScheduleInput
$sel:successRetentionPeriodInDays:UpdateCanary' :: UpdateCanary -> Maybe Natural
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/canary/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name]
instance Core.ToQuery UpdateCanary where
toQuery :: UpdateCanary -> QueryString
toQuery = QueryString -> UpdateCanary -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateCanaryResponse = UpdateCanaryResponse'
{
UpdateCanaryResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateCanaryResponse -> UpdateCanaryResponse -> Bool
(UpdateCanaryResponse -> UpdateCanaryResponse -> Bool)
-> (UpdateCanaryResponse -> UpdateCanaryResponse -> Bool)
-> Eq UpdateCanaryResponse
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]
(Int -> ReadS UpdateCanaryResponse)
-> ReadS [UpdateCanaryResponse]
-> ReadPrec UpdateCanaryResponse
-> ReadPrec [UpdateCanaryResponse]
-> Read 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
(Int -> UpdateCanaryResponse -> ShowS)
-> (UpdateCanaryResponse -> String)
-> ([UpdateCanaryResponse] -> ShowS)
-> Show UpdateCanaryResponse
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. UpdateCanaryResponse -> Rep UpdateCanaryResponse x)
-> (forall x. Rep UpdateCanaryResponse x -> UpdateCanaryResponse)
-> Generic UpdateCanaryResponse
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' :: Int -> UpdateCanaryResponse
UpdateCanaryResponse' {$sel:httpStatus:UpdateCanaryResponse' :: Int
httpStatus = Int
pHttpStatus_}
updateCanaryResponse_httpStatus :: Lens.Lens' UpdateCanaryResponse Prelude.Int
updateCanaryResponse_httpStatus :: (Int -> f Int) -> UpdateCanaryResponse -> f UpdateCanaryResponse
updateCanaryResponse_httpStatus = (UpdateCanaryResponse -> Int)
-> (UpdateCanaryResponse -> Int -> UpdateCanaryResponse)
-> Lens UpdateCanaryResponse UpdateCanaryResponse Int Int
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