{-# 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.CloudFormation.DescribeStackInstance
-- 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)
--
-- Returns the stack instance that\'s associated with the specified stack
-- set, Amazon Web Services account, and Region.
--
-- For a list of stack instances that are associated with a specific stack
-- set, use ListStackInstances.
module Amazonka.CloudFormation.DescribeStackInstance
  ( -- * Creating a Request
    DescribeStackInstance (..),
    newDescribeStackInstance,

    -- * Request Lenses
    describeStackInstance_callAs,
    describeStackInstance_stackSetName,
    describeStackInstance_stackInstanceAccount,
    describeStackInstance_stackInstanceRegion,

    -- * Destructuring the Response
    DescribeStackInstanceResponse (..),
    newDescribeStackInstanceResponse,

    -- * Response Lenses
    describeStackInstanceResponse_stackInstance,
    describeStackInstanceResponse_httpStatus,
  )
where

import Amazonka.CloudFormation.Types
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

-- | /See:/ 'newDescribeStackInstance' smart constructor.
data DescribeStackInstance = DescribeStackInstance'
  { -- | [Service-managed permissions] Specifies whether you are acting as an
    -- account administrator in the organization\'s management account or as a
    -- delegated administrator in a member account.
    --
    -- By default, @SELF@ is specified. Use @SELF@ for stack sets with
    -- self-managed permissions.
    --
    -- -   If you are signed in to the management account, specify @SELF@.
    --
    -- -   If you are signed in to a delegated administrator account, specify
    --     @DELEGATED_ADMIN@.
    --
    --     Your Amazon Web Services account must be registered as a delegated
    --     administrator in the management account. For more information, see
    --     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html Register a delegated administrator>
    --     in the /CloudFormation User Guide/.
    DescribeStackInstance -> Maybe CallAs
callAs :: Prelude.Maybe CallAs,
    -- | The name or the unique stack ID of the stack set that you want to get
    -- stack instance information for.
    DescribeStackInstance -> Text
stackSetName :: Prelude.Text,
    -- | The ID of an Amazon Web Services account that\'s associated with this
    -- stack instance.
    DescribeStackInstance -> Text
stackInstanceAccount :: Prelude.Text,
    -- | The name of a Region that\'s associated with this stack instance.
    DescribeStackInstance -> Text
stackInstanceRegion :: Prelude.Text
  }
  deriving (DescribeStackInstance -> DescribeStackInstance -> Bool
(DescribeStackInstance -> DescribeStackInstance -> Bool)
-> (DescribeStackInstance -> DescribeStackInstance -> Bool)
-> Eq DescribeStackInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeStackInstance -> DescribeStackInstance -> Bool
$c/= :: DescribeStackInstance -> DescribeStackInstance -> Bool
== :: DescribeStackInstance -> DescribeStackInstance -> Bool
$c== :: DescribeStackInstance -> DescribeStackInstance -> Bool
Prelude.Eq, ReadPrec [DescribeStackInstance]
ReadPrec DescribeStackInstance
Int -> ReadS DescribeStackInstance
ReadS [DescribeStackInstance]
(Int -> ReadS DescribeStackInstance)
-> ReadS [DescribeStackInstance]
-> ReadPrec DescribeStackInstance
-> ReadPrec [DescribeStackInstance]
-> Read DescribeStackInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeStackInstance]
$creadListPrec :: ReadPrec [DescribeStackInstance]
readPrec :: ReadPrec DescribeStackInstance
$creadPrec :: ReadPrec DescribeStackInstance
readList :: ReadS [DescribeStackInstance]
$creadList :: ReadS [DescribeStackInstance]
readsPrec :: Int -> ReadS DescribeStackInstance
$creadsPrec :: Int -> ReadS DescribeStackInstance
Prelude.Read, Int -> DescribeStackInstance -> ShowS
[DescribeStackInstance] -> ShowS
DescribeStackInstance -> String
(Int -> DescribeStackInstance -> ShowS)
-> (DescribeStackInstance -> String)
-> ([DescribeStackInstance] -> ShowS)
-> Show DescribeStackInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeStackInstance] -> ShowS
$cshowList :: [DescribeStackInstance] -> ShowS
show :: DescribeStackInstance -> String
$cshow :: DescribeStackInstance -> String
showsPrec :: Int -> DescribeStackInstance -> ShowS
$cshowsPrec :: Int -> DescribeStackInstance -> ShowS
Prelude.Show, (forall x. DescribeStackInstance -> Rep DescribeStackInstance x)
-> (forall x. Rep DescribeStackInstance x -> DescribeStackInstance)
-> Generic DescribeStackInstance
forall x. Rep DescribeStackInstance x -> DescribeStackInstance
forall x. DescribeStackInstance -> Rep DescribeStackInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeStackInstance x -> DescribeStackInstance
$cfrom :: forall x. DescribeStackInstance -> Rep DescribeStackInstance x
Prelude.Generic)

-- |
-- Create a value of 'DescribeStackInstance' 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:
--
-- 'callAs', 'describeStackInstance_callAs' - [Service-managed permissions] Specifies whether you are acting as an
-- account administrator in the organization\'s management account or as a
-- delegated administrator in a member account.
--
-- By default, @SELF@ is specified. Use @SELF@ for stack sets with
-- self-managed permissions.
--
-- -   If you are signed in to the management account, specify @SELF@.
--
-- -   If you are signed in to a delegated administrator account, specify
--     @DELEGATED_ADMIN@.
--
--     Your Amazon Web Services account must be registered as a delegated
--     administrator in the management account. For more information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html Register a delegated administrator>
--     in the /CloudFormation User Guide/.
--
-- 'stackSetName', 'describeStackInstance_stackSetName' - The name or the unique stack ID of the stack set that you want to get
-- stack instance information for.
--
-- 'stackInstanceAccount', 'describeStackInstance_stackInstanceAccount' - The ID of an Amazon Web Services account that\'s associated with this
-- stack instance.
--
-- 'stackInstanceRegion', 'describeStackInstance_stackInstanceRegion' - The name of a Region that\'s associated with this stack instance.
newDescribeStackInstance ::
  -- | 'stackSetName'
  Prelude.Text ->
  -- | 'stackInstanceAccount'
  Prelude.Text ->
  -- | 'stackInstanceRegion'
  Prelude.Text ->
  DescribeStackInstance
newDescribeStackInstance :: Text -> Text -> Text -> DescribeStackInstance
newDescribeStackInstance
  Text
pStackSetName_
  Text
pStackInstanceAccount_
  Text
pStackInstanceRegion_ =
    DescribeStackInstance' :: Maybe CallAs -> Text -> Text -> Text -> DescribeStackInstance
DescribeStackInstance'
      { $sel:callAs:DescribeStackInstance' :: Maybe CallAs
callAs = Maybe CallAs
forall a. Maybe a
Prelude.Nothing,
        $sel:stackSetName:DescribeStackInstance' :: Text
stackSetName = Text
pStackSetName_,
        $sel:stackInstanceAccount:DescribeStackInstance' :: Text
stackInstanceAccount = Text
pStackInstanceAccount_,
        $sel:stackInstanceRegion:DescribeStackInstance' :: Text
stackInstanceRegion = Text
pStackInstanceRegion_
      }

-- | [Service-managed permissions] Specifies whether you are acting as an
-- account administrator in the organization\'s management account or as a
-- delegated administrator in a member account.
--
-- By default, @SELF@ is specified. Use @SELF@ for stack sets with
-- self-managed permissions.
--
-- -   If you are signed in to the management account, specify @SELF@.
--
-- -   If you are signed in to a delegated administrator account, specify
--     @DELEGATED_ADMIN@.
--
--     Your Amazon Web Services account must be registered as a delegated
--     administrator in the management account. For more information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html Register a delegated administrator>
--     in the /CloudFormation User Guide/.
describeStackInstance_callAs :: Lens.Lens' DescribeStackInstance (Prelude.Maybe CallAs)
describeStackInstance_callAs :: (Maybe CallAs -> f (Maybe CallAs))
-> DescribeStackInstance -> f DescribeStackInstance
describeStackInstance_callAs = (DescribeStackInstance -> Maybe CallAs)
-> (DescribeStackInstance -> Maybe CallAs -> DescribeStackInstance)
-> Lens
     DescribeStackInstance
     DescribeStackInstance
     (Maybe CallAs)
     (Maybe CallAs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStackInstance' {Maybe CallAs
callAs :: Maybe CallAs
$sel:callAs:DescribeStackInstance' :: DescribeStackInstance -> Maybe CallAs
callAs} -> Maybe CallAs
callAs) (\s :: DescribeStackInstance
s@DescribeStackInstance' {} Maybe CallAs
a -> DescribeStackInstance
s {$sel:callAs:DescribeStackInstance' :: Maybe CallAs
callAs = Maybe CallAs
a} :: DescribeStackInstance)

-- | The name or the unique stack ID of the stack set that you want to get
-- stack instance information for.
describeStackInstance_stackSetName :: Lens.Lens' DescribeStackInstance Prelude.Text
describeStackInstance_stackSetName :: (Text -> f Text)
-> DescribeStackInstance -> f DescribeStackInstance
describeStackInstance_stackSetName = (DescribeStackInstance -> Text)
-> (DescribeStackInstance -> Text -> DescribeStackInstance)
-> Lens DescribeStackInstance DescribeStackInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStackInstance' {Text
stackSetName :: Text
$sel:stackSetName:DescribeStackInstance' :: DescribeStackInstance -> Text
stackSetName} -> Text
stackSetName) (\s :: DescribeStackInstance
s@DescribeStackInstance' {} Text
a -> DescribeStackInstance
s {$sel:stackSetName:DescribeStackInstance' :: Text
stackSetName = Text
a} :: DescribeStackInstance)

-- | The ID of an Amazon Web Services account that\'s associated with this
-- stack instance.
describeStackInstance_stackInstanceAccount :: Lens.Lens' DescribeStackInstance Prelude.Text
describeStackInstance_stackInstanceAccount :: (Text -> f Text)
-> DescribeStackInstance -> f DescribeStackInstance
describeStackInstance_stackInstanceAccount = (DescribeStackInstance -> Text)
-> (DescribeStackInstance -> Text -> DescribeStackInstance)
-> Lens DescribeStackInstance DescribeStackInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStackInstance' {Text
stackInstanceAccount :: Text
$sel:stackInstanceAccount:DescribeStackInstance' :: DescribeStackInstance -> Text
stackInstanceAccount} -> Text
stackInstanceAccount) (\s :: DescribeStackInstance
s@DescribeStackInstance' {} Text
a -> DescribeStackInstance
s {$sel:stackInstanceAccount:DescribeStackInstance' :: Text
stackInstanceAccount = Text
a} :: DescribeStackInstance)

-- | The name of a Region that\'s associated with this stack instance.
describeStackInstance_stackInstanceRegion :: Lens.Lens' DescribeStackInstance Prelude.Text
describeStackInstance_stackInstanceRegion :: (Text -> f Text)
-> DescribeStackInstance -> f DescribeStackInstance
describeStackInstance_stackInstanceRegion = (DescribeStackInstance -> Text)
-> (DescribeStackInstance -> Text -> DescribeStackInstance)
-> Lens DescribeStackInstance DescribeStackInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStackInstance' {Text
stackInstanceRegion :: Text
$sel:stackInstanceRegion:DescribeStackInstance' :: DescribeStackInstance -> Text
stackInstanceRegion} -> Text
stackInstanceRegion) (\s :: DescribeStackInstance
s@DescribeStackInstance' {} Text
a -> DescribeStackInstance
s {$sel:stackInstanceRegion:DescribeStackInstance' :: Text
stackInstanceRegion = Text
a} :: DescribeStackInstance)

instance Core.AWSRequest DescribeStackInstance where
  type
    AWSResponse DescribeStackInstance =
      DescribeStackInstanceResponse
  request :: DescribeStackInstance -> Request DescribeStackInstance
request = Service -> DescribeStackInstance -> Request DescribeStackInstance
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeStackInstance
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeStackInstance)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeStackInstance))
-> Logger
-> Service
-> Proxy DescribeStackInstance
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeStackInstance)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeStackInstanceResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe StackInstance -> Int -> DescribeStackInstanceResponse
DescribeStackInstanceResponse'
            (Maybe StackInstance -> Int -> DescribeStackInstanceResponse)
-> Either String (Maybe StackInstance)
-> Either String (Int -> DescribeStackInstanceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe StackInstance)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StackInstance")
            Either String (Int -> DescribeStackInstanceResponse)
-> Either String Int -> Either String DescribeStackInstanceResponse
forall (f :: * -> *) a b. Applicative f => 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 DescribeStackInstance

instance Prelude.NFData DescribeStackInstance

instance Core.ToHeaders DescribeStackInstance where
  toHeaders :: DescribeStackInstance -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeStackInstance -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath DescribeStackInstance where
  toPath :: DescribeStackInstance -> ByteString
toPath = ByteString -> DescribeStackInstance -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery DescribeStackInstance where
  toQuery :: DescribeStackInstance -> QueryString
toQuery DescribeStackInstance' {Maybe CallAs
Text
stackInstanceRegion :: Text
stackInstanceAccount :: Text
stackSetName :: Text
callAs :: Maybe CallAs
$sel:stackInstanceRegion:DescribeStackInstance' :: DescribeStackInstance -> Text
$sel:stackInstanceAccount:DescribeStackInstance' :: DescribeStackInstance -> Text
$sel:stackSetName:DescribeStackInstance' :: DescribeStackInstance -> Text
$sel:callAs:DescribeStackInstance' :: DescribeStackInstance -> Maybe CallAs
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeStackInstance" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"CallAs" ByteString -> Maybe CallAs -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe CallAs
callAs,
        ByteString
"StackSetName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
stackSetName,
        ByteString
"StackInstanceAccount" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
stackInstanceAccount,
        ByteString
"StackInstanceRegion" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
stackInstanceRegion
      ]

-- | /See:/ 'newDescribeStackInstanceResponse' smart constructor.
data DescribeStackInstanceResponse = DescribeStackInstanceResponse'
  { -- | The stack instance that matches the specified request parameters.
    DescribeStackInstanceResponse -> Maybe StackInstance
stackInstance :: Prelude.Maybe StackInstance,
    -- | The response's http status code.
    DescribeStackInstanceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeStackInstanceResponse
-> DescribeStackInstanceResponse -> Bool
(DescribeStackInstanceResponse
 -> DescribeStackInstanceResponse -> Bool)
-> (DescribeStackInstanceResponse
    -> DescribeStackInstanceResponse -> Bool)
-> Eq DescribeStackInstanceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeStackInstanceResponse
-> DescribeStackInstanceResponse -> Bool
$c/= :: DescribeStackInstanceResponse
-> DescribeStackInstanceResponse -> Bool
== :: DescribeStackInstanceResponse
-> DescribeStackInstanceResponse -> Bool
$c== :: DescribeStackInstanceResponse
-> DescribeStackInstanceResponse -> Bool
Prelude.Eq, ReadPrec [DescribeStackInstanceResponse]
ReadPrec DescribeStackInstanceResponse
Int -> ReadS DescribeStackInstanceResponse
ReadS [DescribeStackInstanceResponse]
(Int -> ReadS DescribeStackInstanceResponse)
-> ReadS [DescribeStackInstanceResponse]
-> ReadPrec DescribeStackInstanceResponse
-> ReadPrec [DescribeStackInstanceResponse]
-> Read DescribeStackInstanceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeStackInstanceResponse]
$creadListPrec :: ReadPrec [DescribeStackInstanceResponse]
readPrec :: ReadPrec DescribeStackInstanceResponse
$creadPrec :: ReadPrec DescribeStackInstanceResponse
readList :: ReadS [DescribeStackInstanceResponse]
$creadList :: ReadS [DescribeStackInstanceResponse]
readsPrec :: Int -> ReadS DescribeStackInstanceResponse
$creadsPrec :: Int -> ReadS DescribeStackInstanceResponse
Prelude.Read, Int -> DescribeStackInstanceResponse -> ShowS
[DescribeStackInstanceResponse] -> ShowS
DescribeStackInstanceResponse -> String
(Int -> DescribeStackInstanceResponse -> ShowS)
-> (DescribeStackInstanceResponse -> String)
-> ([DescribeStackInstanceResponse] -> ShowS)
-> Show DescribeStackInstanceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeStackInstanceResponse] -> ShowS
$cshowList :: [DescribeStackInstanceResponse] -> ShowS
show :: DescribeStackInstanceResponse -> String
$cshow :: DescribeStackInstanceResponse -> String
showsPrec :: Int -> DescribeStackInstanceResponse -> ShowS
$cshowsPrec :: Int -> DescribeStackInstanceResponse -> ShowS
Prelude.Show, (forall x.
 DescribeStackInstanceResponse
 -> Rep DescribeStackInstanceResponse x)
-> (forall x.
    Rep DescribeStackInstanceResponse x
    -> DescribeStackInstanceResponse)
-> Generic DescribeStackInstanceResponse
forall x.
Rep DescribeStackInstanceResponse x
-> DescribeStackInstanceResponse
forall x.
DescribeStackInstanceResponse
-> Rep DescribeStackInstanceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeStackInstanceResponse x
-> DescribeStackInstanceResponse
$cfrom :: forall x.
DescribeStackInstanceResponse
-> Rep DescribeStackInstanceResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeStackInstanceResponse' 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:
--
-- 'stackInstance', 'describeStackInstanceResponse_stackInstance' - The stack instance that matches the specified request parameters.
--
-- 'httpStatus', 'describeStackInstanceResponse_httpStatus' - The response's http status code.
newDescribeStackInstanceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeStackInstanceResponse
newDescribeStackInstanceResponse :: Int -> DescribeStackInstanceResponse
newDescribeStackInstanceResponse Int
pHttpStatus_ =
  DescribeStackInstanceResponse' :: Maybe StackInstance -> Int -> DescribeStackInstanceResponse
DescribeStackInstanceResponse'
    { $sel:stackInstance:DescribeStackInstanceResponse' :: Maybe StackInstance
stackInstance =
        Maybe StackInstance
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeStackInstanceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The stack instance that matches the specified request parameters.
describeStackInstanceResponse_stackInstance :: Lens.Lens' DescribeStackInstanceResponse (Prelude.Maybe StackInstance)
describeStackInstanceResponse_stackInstance :: (Maybe StackInstance -> f (Maybe StackInstance))
-> DescribeStackInstanceResponse -> f DescribeStackInstanceResponse
describeStackInstanceResponse_stackInstance = (DescribeStackInstanceResponse -> Maybe StackInstance)
-> (DescribeStackInstanceResponse
    -> Maybe StackInstance -> DescribeStackInstanceResponse)
-> Lens
     DescribeStackInstanceResponse
     DescribeStackInstanceResponse
     (Maybe StackInstance)
     (Maybe StackInstance)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStackInstanceResponse' {Maybe StackInstance
stackInstance :: Maybe StackInstance
$sel:stackInstance:DescribeStackInstanceResponse' :: DescribeStackInstanceResponse -> Maybe StackInstance
stackInstance} -> Maybe StackInstance
stackInstance) (\s :: DescribeStackInstanceResponse
s@DescribeStackInstanceResponse' {} Maybe StackInstance
a -> DescribeStackInstanceResponse
s {$sel:stackInstance:DescribeStackInstanceResponse' :: Maybe StackInstance
stackInstance = Maybe StackInstance
a} :: DescribeStackInstanceResponse)

-- | The response's http status code.
describeStackInstanceResponse_httpStatus :: Lens.Lens' DescribeStackInstanceResponse Prelude.Int
describeStackInstanceResponse_httpStatus :: (Int -> f Int)
-> DescribeStackInstanceResponse -> f DescribeStackInstanceResponse
describeStackInstanceResponse_httpStatus = (DescribeStackInstanceResponse -> Int)
-> (DescribeStackInstanceResponse
    -> Int -> DescribeStackInstanceResponse)
-> Lens
     DescribeStackInstanceResponse DescribeStackInstanceResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStackInstanceResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeStackInstanceResponse' :: DescribeStackInstanceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeStackInstanceResponse
s@DescribeStackInstanceResponse' {} Int
a -> DescribeStackInstanceResponse
s {$sel:httpStatus:DescribeStackInstanceResponse' :: Int
httpStatus = Int
a} :: DescribeStackInstanceResponse)

instance Prelude.NFData DescribeStackInstanceResponse