{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Synthetics.UpdateCanary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Use this operation to change the settings of a canary that has already
-- been created.
--
-- You can\'t use this operation to update the tags of an existing canary.
-- To change the tags of an existing canary, use
-- <https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_TagResource.html TagResource>.
module Amazonka.Synthetics.UpdateCanary
  ( -- * Creating a Request
    UpdateCanary (..),
    newUpdateCanary,

    -- * Request Lenses
    updateCanary_successRetentionPeriodInDays,
    updateCanary_schedule,
    updateCanary_artifactS3Location,
    updateCanary_runConfig,
    updateCanary_executionRoleArn,
    updateCanary_runtimeVersion,
    updateCanary_failureRetentionPeriodInDays,
    updateCanary_artifactConfig,
    updateCanary_vpcConfig,
    updateCanary_visualReference,
    updateCanary_code,
    updateCanary_name,

    -- * Destructuring the Response
    UpdateCanaryResponse (..),
    newUpdateCanaryResponse,

    -- * Response Lenses
    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

-- | /See:/ 'newUpdateCanary' smart constructor.
data UpdateCanary = UpdateCanary'
  { -- | The number of days to retain data about successful runs of this canary.
    UpdateCanary -> Maybe Natural
successRetentionPeriodInDays :: Prelude.Maybe Prelude.Natural,
    -- | A structure that contains information about how often the canary is to
    -- run, and when these runs are to stop.
    UpdateCanary -> Maybe CanaryScheduleInput
schedule :: Prelude.Maybe CanaryScheduleInput,
    -- | The location in Amazon S3 where Synthetics stores artifacts from the
    -- test runs of this canary. Artifacts include the log file, screenshots,
    -- and HAR files. The name of the S3 bucket can\'t include a period (.).
    UpdateCanary -> Maybe Text
artifactS3Location :: Prelude.Maybe Prelude.Text,
    -- | A structure that contains the timeout value that is used for each
    -- individual run of the canary.
    UpdateCanary -> Maybe CanaryRunConfigInput
runConfig :: Prelude.Maybe CanaryRunConfigInput,
    -- | The ARN of the IAM role to be used to run the canary. This role must
    -- already exist, and must include @lambda.amazonaws.com@ as a principal in
    -- the trust policy. The role must also have the following permissions:
    --
    -- -   @s3:PutObject@
    --
    -- -   @s3:GetBucketLocation@
    --
    -- -   @s3:ListAllMyBuckets@
    --
    -- -   @cloudwatch:PutMetricData@
    --
    -- -   @logs:CreateLogGroup@
    --
    -- -   @logs:CreateLogStream@
    --
    -- -   @logs:CreateLogStream@
    UpdateCanary -> Maybe Text
executionRoleArn :: Prelude.Maybe Prelude.Text,
    -- | Specifies the runtime version to use for the canary. For a list of valid
    -- runtime versions and for more information about runtime versions, see
    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html Canary Runtime Versions>.
    UpdateCanary -> Maybe Text
runtimeVersion :: Prelude.Maybe Prelude.Text,
    -- | The number of days to retain data about failed runs of this canary.
    UpdateCanary -> Maybe Natural
failureRetentionPeriodInDays :: Prelude.Maybe Prelude.Natural,
    -- | A structure that contains the configuration for canary artifacts,
    -- including the encryption-at-rest settings for artifacts that the canary
    -- uploads to Amazon S3.
    UpdateCanary -> Maybe ArtifactConfigInput
artifactConfig :: Prelude.Maybe ArtifactConfigInput,
    -- | If this canary is to test an endpoint in a VPC, this structure contains
    -- information about the subnet and security groups of the VPC endpoint.
    -- For more information, see
    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html Running a Canary in a VPC>.
    UpdateCanary -> Maybe VpcConfigInput
vpcConfig :: Prelude.Maybe VpcConfigInput,
    -- | Defines the screenshots to use as the baseline for comparisons during
    -- visual monitoring comparisons during future runs of this canary. If you
    -- omit this parameter, no changes are made to any baseline screenshots
    -- that the canary might be using already.
    --
    -- Visual monitoring is supported only on canaries running the
    -- __syn-puppeteer-node-3.2__ runtime or later. For more information, see
    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_SyntheticsLogger_VisualTesting.html Visual monitoring>
    -- and
    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Blueprints_VisualTesting.html Visual monitoring blueprint>
    UpdateCanary -> Maybe VisualReferenceInput
visualReference :: Prelude.Maybe VisualReferenceInput,
    -- | A structure that includes the entry point from which the canary should
    -- start running your script. If the script is stored in an S3 bucket, the
    -- bucket name, key, and version are also included.
    UpdateCanary -> Maybe CanaryCodeInput
code :: Prelude.Maybe CanaryCodeInput,
    -- | The name of the canary that you want to update. To find the names of
    -- your canaries, use
    -- <https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html DescribeCanaries>.
    --
    -- You cannot change the name of a canary that has already been created.
    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)

-- |
-- Create a value of 'UpdateCanary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'successRetentionPeriodInDays', 'updateCanary_successRetentionPeriodInDays' - The number of days to retain data about successful runs of this canary.
--
-- 'schedule', 'updateCanary_schedule' - A structure that contains information about how often the canary is to
-- run, and when these runs are to stop.
--
-- 'artifactS3Location', 'updateCanary_artifactS3Location' - The location in Amazon S3 where Synthetics stores artifacts from the
-- test runs of this canary. Artifacts include the log file, screenshots,
-- and HAR files. The name of the S3 bucket can\'t include a period (.).
--
-- 'runConfig', 'updateCanary_runConfig' - A structure that contains the timeout value that is used for each
-- individual run of the canary.
--
-- 'executionRoleArn', 'updateCanary_executionRoleArn' - The ARN of the IAM role to be used to run the canary. This role must
-- already exist, and must include @lambda.amazonaws.com@ as a principal in
-- the trust policy. The role must also have the following permissions:
--
-- -   @s3:PutObject@
--
-- -   @s3:GetBucketLocation@
--
-- -   @s3:ListAllMyBuckets@
--
-- -   @cloudwatch:PutMetricData@
--
-- -   @logs:CreateLogGroup@
--
-- -   @logs:CreateLogStream@
--
-- -   @logs:CreateLogStream@
--
-- 'runtimeVersion', 'updateCanary_runtimeVersion' - Specifies the runtime version to use for the canary. For a list of valid
-- runtime versions and for more information about runtime versions, see
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html Canary Runtime Versions>.
--
-- 'failureRetentionPeriodInDays', 'updateCanary_failureRetentionPeriodInDays' - The number of days to retain data about failed runs of this canary.
--
-- 'artifactConfig', 'updateCanary_artifactConfig' - A structure that contains the configuration for canary artifacts,
-- including the encryption-at-rest settings for artifacts that the canary
-- uploads to Amazon S3.
--
-- 'vpcConfig', 'updateCanary_vpcConfig' - If this canary is to test an endpoint in a VPC, this structure contains
-- information about the subnet and security groups of the VPC endpoint.
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html Running a Canary in a VPC>.
--
-- 'visualReference', 'updateCanary_visualReference' - Defines the screenshots to use as the baseline for comparisons during
-- visual monitoring comparisons during future runs of this canary. If you
-- omit this parameter, no changes are made to any baseline screenshots
-- that the canary might be using already.
--
-- Visual monitoring is supported only on canaries running the
-- __syn-puppeteer-node-3.2__ runtime or later. For more information, see
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_SyntheticsLogger_VisualTesting.html Visual monitoring>
-- and
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Blueprints_VisualTesting.html Visual monitoring blueprint>
--
-- 'code', 'updateCanary_code' - A structure that includes the entry point from which the canary should
-- start running your script. If the script is stored in an S3 bucket, the
-- bucket name, key, and version are also included.
--
-- 'name', 'updateCanary_name' - The name of the canary that you want to update. To find the names of
-- your canaries, use
-- <https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html DescribeCanaries>.
--
-- You cannot change the name of a canary that has already been created.
newUpdateCanary ::
  -- | 'name'
  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_
    }

-- | The number of days to retain data about successful runs of this canary.
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)

-- | A structure that contains information about how often the canary is to
-- run, and when these runs are to stop.
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)

-- | The location in Amazon S3 where Synthetics stores artifacts from the
-- test runs of this canary. Artifacts include the log file, screenshots,
-- and HAR files. The name of the S3 bucket can\'t include a period (.).
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)

-- | A structure that contains the timeout value that is used for each
-- individual run of the canary.
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)

-- | The ARN of the IAM role to be used to run the canary. This role must
-- already exist, and must include @lambda.amazonaws.com@ as a principal in
-- the trust policy. The role must also have the following permissions:
--
-- -   @s3:PutObject@
--
-- -   @s3:GetBucketLocation@
--
-- -   @s3:ListAllMyBuckets@
--
-- -   @cloudwatch:PutMetricData@
--
-- -   @logs:CreateLogGroup@
--
-- -   @logs:CreateLogStream@
--
-- -   @logs:CreateLogStream@
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)

-- | Specifies the runtime version to use for the canary. For a list of valid
-- runtime versions and for more information about runtime versions, see
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html Canary Runtime Versions>.
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)

-- | The number of days to retain data about failed runs of this canary.
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)

-- | A structure that contains the configuration for canary artifacts,
-- including the encryption-at-rest settings for artifacts that the canary
-- uploads to Amazon S3.
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)

-- | If this canary is to test an endpoint in a VPC, this structure contains
-- information about the subnet and security groups of the VPC endpoint.
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html Running a Canary in a VPC>.
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)

-- | Defines the screenshots to use as the baseline for comparisons during
-- visual monitoring comparisons during future runs of this canary. If you
-- omit this parameter, no changes are made to any baseline screenshots
-- that the canary might be using already.
--
-- Visual monitoring is supported only on canaries running the
-- __syn-puppeteer-node-3.2__ runtime or later. For more information, see
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_SyntheticsLogger_VisualTesting.html Visual monitoring>
-- and
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Blueprints_VisualTesting.html Visual monitoring blueprint>
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)

-- | A structure that includes the entry point from which the canary should
-- start running your script. If the script is stored in an S3 bucket, the
-- bucket name, key, and version are also included.
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)

-- | The name of the canary that you want to update. To find the names of
-- your canaries, use
-- <https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html DescribeCanaries>.
--
-- You cannot change the name of a canary that has already been created.
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

-- | /See:/ 'newUpdateCanaryResponse' smart constructor.
data UpdateCanaryResponse = UpdateCanaryResponse'
  { -- | The response's http status code.
    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)

-- |
-- Create a value of 'UpdateCanaryResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'updateCanaryResponse_httpStatus' - The response's http status code.
newUpdateCanaryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateCanaryResponse
newUpdateCanaryResponse :: Int -> UpdateCanaryResponse
newUpdateCanaryResponse Int
pHttpStatus_ =
  UpdateCanaryResponse' :: Int -> UpdateCanaryResponse
UpdateCanaryResponse' {$sel:httpStatus:UpdateCanaryResponse' :: Int
httpStatus = Int
pHttpStatus_}

-- | The response's http status code.
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