{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates the configuration 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_artifactConfig,
    updateCanary_artifactS3Location,
    updateCanary_code,
    updateCanary_executionRoleArn,
    updateCanary_failureRetentionPeriodInDays,
    updateCanary_runConfig,
    updateCanary_runtimeVersion,
    updateCanary_schedule,
    updateCanary_successRetentionPeriodInDays,
    updateCanary_visualReference,
    updateCanary_vpcConfig,
    updateCanary_name,

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

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

-- | /See:/ 'newUpdateCanary' smart constructor.
data UpdateCanary = 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 -> Maybe ArtifactConfigInput
artifactConfig :: Prelude.Maybe ArtifactConfigInput,
    -- | 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 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 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,
    -- | 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 timeout value that is used for each
    -- individual run of the canary.
    --
    -- The environment variables keys and values are not encrypted. Do not
    -- store sensitive information in this field.
    UpdateCanary -> Maybe CanaryRunConfigInput
runConfig :: Prelude.Maybe CanaryRunConfigInput,
    -- | 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,
    -- | 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 number of days to retain data about successful runs of this canary.
    UpdateCanary -> Maybe Natural
successRetentionPeriodInDays :: Prelude.Maybe Prelude.Natural,
    -- | 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,
    -- | 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,
    -- | 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
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)

-- |
-- 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:
--
-- '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.
--
-- '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 (.).
--
-- '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.
--
-- '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@
--
-- 'failureRetentionPeriodInDays', 'updateCanary_failureRetentionPeriodInDays' - The number of days to retain data about failed runs of this canary.
--
-- 'runConfig', 'updateCanary_runConfig' - A structure that contains the timeout value that is used for each
-- individual run of the canary.
--
-- The environment variables keys and values are not encrypted. Do not
-- store sensitive information in this field.
--
-- '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>.
--
-- 'schedule', 'updateCanary_schedule' - A structure that contains information about how often the canary is to
-- run, and when these runs are to stop.
--
-- 'successRetentionPeriodInDays', 'updateCanary_successRetentionPeriodInDays' - The number of days to retain data about successful runs of this canary.
--
-- '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>
--
-- '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>.
--
-- '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'
    { $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_
    }

-- | 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 :: 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)

-- | 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 :: 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)

-- | 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 :: 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)

-- | 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 :: 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)

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

-- | A structure that contains the timeout value that is used for each
-- individual run of the canary.
--
-- The environment variables keys and values are not encrypted. Do not
-- store sensitive information in this field.
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)

-- | 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 :: 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)

-- | 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 :: 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)

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

-- | 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 :: 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)

-- | 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 :: 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)

-- | 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 :: 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

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

-- |
-- 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' {$sel:httpStatus:UpdateCanaryResponse' :: Int
httpStatus = Int
pHttpStatus_}

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