{-# 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.IAM.ListInstanceProfileTags
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the tags that are attached to the specified IAM instance profile.
-- The returned list of tags is sorted by tag key. For more information
-- about tagging, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tagging IAM resources>
-- in the /IAM User Guide/.
module Amazonka.IAM.ListInstanceProfileTags
  ( -- * Creating a Request
    ListInstanceProfileTags (..),
    newListInstanceProfileTags,

    -- * Request Lenses
    listInstanceProfileTags_marker,
    listInstanceProfileTags_maxItems,
    listInstanceProfileTags_instanceProfileName,

    -- * Destructuring the Response
    ListInstanceProfileTagsResponse (..),
    newListInstanceProfileTagsResponse,

    -- * Response Lenses
    listInstanceProfileTagsResponse_isTruncated,
    listInstanceProfileTagsResponse_marker,
    listInstanceProfileTagsResponse_httpStatus,
    listInstanceProfileTagsResponse_tags,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IAM.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListInstanceProfileTags' smart constructor.
data ListInstanceProfileTags = ListInstanceProfileTags'
  { -- | Use this parameter only when paginating results and only after you
    -- receive a response indicating that the results are truncated. Set it to
    -- the value of the @Marker@ element in the response that you received to
    -- indicate where the next call should start.
    ListInstanceProfileTags -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Use this only when paginating results to indicate the maximum number of
    -- items you want in the response. If additional items exist beyond the
    -- maximum you specify, the @IsTruncated@ response element is @true@.
    --
    -- If you do not include this parameter, the number of items defaults to
    -- 100. Note that IAM might return fewer results, even when there are more
    -- results available. In that case, the @IsTruncated@ response element
    -- returns @true@, and @Marker@ contains a value to include in the
    -- subsequent call that tells the service where to continue from.
    ListInstanceProfileTags -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
    -- | The name of the IAM instance profile whose tags you want to see.
    --
    -- This parameter allows (through its
    -- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
    -- consisting of upper and lowercase alphanumeric characters with no
    -- spaces. You can also include any of the following characters: _+=,.\@-
    ListInstanceProfileTags -> Text
instanceProfileName :: Prelude.Text
  }
  deriving (ListInstanceProfileTags -> ListInstanceProfileTags -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListInstanceProfileTags -> ListInstanceProfileTags -> Bool
$c/= :: ListInstanceProfileTags -> ListInstanceProfileTags -> Bool
== :: ListInstanceProfileTags -> ListInstanceProfileTags -> Bool
$c== :: ListInstanceProfileTags -> ListInstanceProfileTags -> Bool
Prelude.Eq, ReadPrec [ListInstanceProfileTags]
ReadPrec ListInstanceProfileTags
Int -> ReadS ListInstanceProfileTags
ReadS [ListInstanceProfileTags]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListInstanceProfileTags]
$creadListPrec :: ReadPrec [ListInstanceProfileTags]
readPrec :: ReadPrec ListInstanceProfileTags
$creadPrec :: ReadPrec ListInstanceProfileTags
readList :: ReadS [ListInstanceProfileTags]
$creadList :: ReadS [ListInstanceProfileTags]
readsPrec :: Int -> ReadS ListInstanceProfileTags
$creadsPrec :: Int -> ReadS ListInstanceProfileTags
Prelude.Read, Int -> ListInstanceProfileTags -> ShowS
[ListInstanceProfileTags] -> ShowS
ListInstanceProfileTags -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListInstanceProfileTags] -> ShowS
$cshowList :: [ListInstanceProfileTags] -> ShowS
show :: ListInstanceProfileTags -> String
$cshow :: ListInstanceProfileTags -> String
showsPrec :: Int -> ListInstanceProfileTags -> ShowS
$cshowsPrec :: Int -> ListInstanceProfileTags -> ShowS
Prelude.Show, forall x. Rep ListInstanceProfileTags x -> ListInstanceProfileTags
forall x. ListInstanceProfileTags -> Rep ListInstanceProfileTags x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListInstanceProfileTags x -> ListInstanceProfileTags
$cfrom :: forall x. ListInstanceProfileTags -> Rep ListInstanceProfileTags x
Prelude.Generic)

-- |
-- Create a value of 'ListInstanceProfileTags' 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:
--
-- 'marker', 'listInstanceProfileTags_marker' - Use this parameter only when paginating results and only after you
-- receive a response indicating that the results are truncated. Set it to
-- the value of the @Marker@ element in the response that you received to
-- indicate where the next call should start.
--
-- 'maxItems', 'listInstanceProfileTags_maxItems' - Use this only when paginating results to indicate the maximum number of
-- items you want in the response. If additional items exist beyond the
-- maximum you specify, the @IsTruncated@ response element is @true@.
--
-- If you do not include this parameter, the number of items defaults to
-- 100. Note that IAM might return fewer results, even when there are more
-- results available. In that case, the @IsTruncated@ response element
-- returns @true@, and @Marker@ contains a value to include in the
-- subsequent call that tells the service where to continue from.
--
-- 'instanceProfileName', 'listInstanceProfileTags_instanceProfileName' - The name of the IAM instance profile whose tags you want to see.
--
-- This parameter allows (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- consisting of upper and lowercase alphanumeric characters with no
-- spaces. You can also include any of the following characters: _+=,.\@-
newListInstanceProfileTags ::
  -- | 'instanceProfileName'
  Prelude.Text ->
  ListInstanceProfileTags
newListInstanceProfileTags :: Text -> ListInstanceProfileTags
newListInstanceProfileTags Text
pInstanceProfileName_ =
  ListInstanceProfileTags'
    { $sel:marker:ListInstanceProfileTags' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListInstanceProfileTags' :: Maybe Natural
maxItems = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceProfileName:ListInstanceProfileTags' :: Text
instanceProfileName = Text
pInstanceProfileName_
    }

-- | Use this parameter only when paginating results and only after you
-- receive a response indicating that the results are truncated. Set it to
-- the value of the @Marker@ element in the response that you received to
-- indicate where the next call should start.
listInstanceProfileTags_marker :: Lens.Lens' ListInstanceProfileTags (Prelude.Maybe Prelude.Text)
listInstanceProfileTags_marker :: Lens' ListInstanceProfileTags (Maybe Text)
listInstanceProfileTags_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceProfileTags' {Maybe Text
marker :: Maybe Text
$sel:marker:ListInstanceProfileTags' :: ListInstanceProfileTags -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListInstanceProfileTags
s@ListInstanceProfileTags' {} Maybe Text
a -> ListInstanceProfileTags
s {$sel:marker:ListInstanceProfileTags' :: Maybe Text
marker = Maybe Text
a} :: ListInstanceProfileTags)

-- | Use this only when paginating results to indicate the maximum number of
-- items you want in the response. If additional items exist beyond the
-- maximum you specify, the @IsTruncated@ response element is @true@.
--
-- If you do not include this parameter, the number of items defaults to
-- 100. Note that IAM might return fewer results, even when there are more
-- results available. In that case, the @IsTruncated@ response element
-- returns @true@, and @Marker@ contains a value to include in the
-- subsequent call that tells the service where to continue from.
listInstanceProfileTags_maxItems :: Lens.Lens' ListInstanceProfileTags (Prelude.Maybe Prelude.Natural)
listInstanceProfileTags_maxItems :: Lens' ListInstanceProfileTags (Maybe Natural)
listInstanceProfileTags_maxItems = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceProfileTags' {Maybe Natural
maxItems :: Maybe Natural
$sel:maxItems:ListInstanceProfileTags' :: ListInstanceProfileTags -> Maybe Natural
maxItems} -> Maybe Natural
maxItems) (\s :: ListInstanceProfileTags
s@ListInstanceProfileTags' {} Maybe Natural
a -> ListInstanceProfileTags
s {$sel:maxItems:ListInstanceProfileTags' :: Maybe Natural
maxItems = Maybe Natural
a} :: ListInstanceProfileTags)

-- | The name of the IAM instance profile whose tags you want to see.
--
-- This parameter allows (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- consisting of upper and lowercase alphanumeric characters with no
-- spaces. You can also include any of the following characters: _+=,.\@-
listInstanceProfileTags_instanceProfileName :: Lens.Lens' ListInstanceProfileTags Prelude.Text
listInstanceProfileTags_instanceProfileName :: Lens' ListInstanceProfileTags Text
listInstanceProfileTags_instanceProfileName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceProfileTags' {Text
instanceProfileName :: Text
$sel:instanceProfileName:ListInstanceProfileTags' :: ListInstanceProfileTags -> Text
instanceProfileName} -> Text
instanceProfileName) (\s :: ListInstanceProfileTags
s@ListInstanceProfileTags' {} Text
a -> ListInstanceProfileTags
s {$sel:instanceProfileName:ListInstanceProfileTags' :: Text
instanceProfileName = Text
a} :: ListInstanceProfileTags)

instance Core.AWSRequest ListInstanceProfileTags where
  type
    AWSResponse ListInstanceProfileTags =
      ListInstanceProfileTagsResponse
  request :: (Service -> Service)
-> ListInstanceProfileTags -> Request ListInstanceProfileTags
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListInstanceProfileTags
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListInstanceProfileTags)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"ListInstanceProfileTagsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Bool
-> Maybe Text -> Int -> [Tag] -> ListInstanceProfileTagsResponse
ListInstanceProfileTagsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"IsTruncated")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Marker")
            forall (f :: * -> *) a b. Applicative f => 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))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Tags"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member"
                        )
      )

instance Prelude.Hashable ListInstanceProfileTags where
  hashWithSalt :: Int -> ListInstanceProfileTags -> Int
hashWithSalt Int
_salt ListInstanceProfileTags' {Maybe Natural
Maybe Text
Text
instanceProfileName :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:instanceProfileName:ListInstanceProfileTags' :: ListInstanceProfileTags -> Text
$sel:maxItems:ListInstanceProfileTags' :: ListInstanceProfileTags -> Maybe Natural
$sel:marker:ListInstanceProfileTags' :: ListInstanceProfileTags -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxItems
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceProfileName

instance Prelude.NFData ListInstanceProfileTags where
  rnf :: ListInstanceProfileTags -> ()
rnf ListInstanceProfileTags' {Maybe Natural
Maybe Text
Text
instanceProfileName :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:instanceProfileName:ListInstanceProfileTags' :: ListInstanceProfileTags -> Text
$sel:maxItems:ListInstanceProfileTags' :: ListInstanceProfileTags -> Maybe Natural
$sel:marker:ListInstanceProfileTags' :: ListInstanceProfileTags -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxItems
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
instanceProfileName

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

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

instance Data.ToQuery ListInstanceProfileTags where
  toQuery :: ListInstanceProfileTags -> QueryString
toQuery ListInstanceProfileTags' {Maybe Natural
Maybe Text
Text
instanceProfileName :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:instanceProfileName:ListInstanceProfileTags' :: ListInstanceProfileTags -> Text
$sel:maxItems:ListInstanceProfileTags' :: ListInstanceProfileTags -> Maybe Natural
$sel:marker:ListInstanceProfileTags' :: ListInstanceProfileTags -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ListInstanceProfileTags" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
        ByteString
"MaxItems" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxItems,
        ByteString
"InstanceProfileName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
instanceProfileName
      ]

-- | /See:/ 'newListInstanceProfileTagsResponse' smart constructor.
data ListInstanceProfileTagsResponse = ListInstanceProfileTagsResponse'
  { -- | A flag that indicates whether there are more items to return. If your
    -- results were truncated, you can make a subsequent pagination request
    -- using the @Marker@ request parameter to retrieve more items. Note that
    -- IAM might return fewer than the @MaxItems@ number of results even when
    -- there are more results available. We recommend that you check
    -- @IsTruncated@ after every call to ensure that you receive all your
    -- results.
    ListInstanceProfileTagsResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
    -- | When @IsTruncated@ is @true@, this element is present and contains the
    -- value to use for the @Marker@ parameter in a subsequent pagination
    -- request.
    ListInstanceProfileTagsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListInstanceProfileTagsResponse -> Int
httpStatus :: Prelude.Int,
    -- | The list of tags that are currently attached to the IAM instance
    -- profile. Each tag consists of a key name and an associated value. If no
    -- tags are attached to the specified resource, the response contains an
    -- empty list.
    ListInstanceProfileTagsResponse -> [Tag]
tags :: [Tag]
  }
  deriving (ListInstanceProfileTagsResponse
-> ListInstanceProfileTagsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListInstanceProfileTagsResponse
-> ListInstanceProfileTagsResponse -> Bool
$c/= :: ListInstanceProfileTagsResponse
-> ListInstanceProfileTagsResponse -> Bool
== :: ListInstanceProfileTagsResponse
-> ListInstanceProfileTagsResponse -> Bool
$c== :: ListInstanceProfileTagsResponse
-> ListInstanceProfileTagsResponse -> Bool
Prelude.Eq, ReadPrec [ListInstanceProfileTagsResponse]
ReadPrec ListInstanceProfileTagsResponse
Int -> ReadS ListInstanceProfileTagsResponse
ReadS [ListInstanceProfileTagsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListInstanceProfileTagsResponse]
$creadListPrec :: ReadPrec [ListInstanceProfileTagsResponse]
readPrec :: ReadPrec ListInstanceProfileTagsResponse
$creadPrec :: ReadPrec ListInstanceProfileTagsResponse
readList :: ReadS [ListInstanceProfileTagsResponse]
$creadList :: ReadS [ListInstanceProfileTagsResponse]
readsPrec :: Int -> ReadS ListInstanceProfileTagsResponse
$creadsPrec :: Int -> ReadS ListInstanceProfileTagsResponse
Prelude.Read, Int -> ListInstanceProfileTagsResponse -> ShowS
[ListInstanceProfileTagsResponse] -> ShowS
ListInstanceProfileTagsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListInstanceProfileTagsResponse] -> ShowS
$cshowList :: [ListInstanceProfileTagsResponse] -> ShowS
show :: ListInstanceProfileTagsResponse -> String
$cshow :: ListInstanceProfileTagsResponse -> String
showsPrec :: Int -> ListInstanceProfileTagsResponse -> ShowS
$cshowsPrec :: Int -> ListInstanceProfileTagsResponse -> ShowS
Prelude.Show, forall x.
Rep ListInstanceProfileTagsResponse x
-> ListInstanceProfileTagsResponse
forall x.
ListInstanceProfileTagsResponse
-> Rep ListInstanceProfileTagsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListInstanceProfileTagsResponse x
-> ListInstanceProfileTagsResponse
$cfrom :: forall x.
ListInstanceProfileTagsResponse
-> Rep ListInstanceProfileTagsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListInstanceProfileTagsResponse' 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:
--
-- 'isTruncated', 'listInstanceProfileTagsResponse_isTruncated' - A flag that indicates whether there are more items to return. If your
-- results were truncated, you can make a subsequent pagination request
-- using the @Marker@ request parameter to retrieve more items. Note that
-- IAM might return fewer than the @MaxItems@ number of results even when
-- there are more results available. We recommend that you check
-- @IsTruncated@ after every call to ensure that you receive all your
-- results.
--
-- 'marker', 'listInstanceProfileTagsResponse_marker' - When @IsTruncated@ is @true@, this element is present and contains the
-- value to use for the @Marker@ parameter in a subsequent pagination
-- request.
--
-- 'httpStatus', 'listInstanceProfileTagsResponse_httpStatus' - The response's http status code.
--
-- 'tags', 'listInstanceProfileTagsResponse_tags' - The list of tags that are currently attached to the IAM instance
-- profile. Each tag consists of a key name and an associated value. If no
-- tags are attached to the specified resource, the response contains an
-- empty list.
newListInstanceProfileTagsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListInstanceProfileTagsResponse
newListInstanceProfileTagsResponse :: Int -> ListInstanceProfileTagsResponse
newListInstanceProfileTagsResponse Int
pHttpStatus_ =
  ListInstanceProfileTagsResponse'
    { $sel:isTruncated:ListInstanceProfileTagsResponse' :: Maybe Bool
isTruncated =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListInstanceProfileTagsResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListInstanceProfileTagsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:tags:ListInstanceProfileTagsResponse' :: [Tag]
tags = forall a. Monoid a => a
Prelude.mempty
    }

-- | A flag that indicates whether there are more items to return. If your
-- results were truncated, you can make a subsequent pagination request
-- using the @Marker@ request parameter to retrieve more items. Note that
-- IAM might return fewer than the @MaxItems@ number of results even when
-- there are more results available. We recommend that you check
-- @IsTruncated@ after every call to ensure that you receive all your
-- results.
listInstanceProfileTagsResponse_isTruncated :: Lens.Lens' ListInstanceProfileTagsResponse (Prelude.Maybe Prelude.Bool)
listInstanceProfileTagsResponse_isTruncated :: Lens' ListInstanceProfileTagsResponse (Maybe Bool)
listInstanceProfileTagsResponse_isTruncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceProfileTagsResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListInstanceProfileTagsResponse' :: ListInstanceProfileTagsResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListInstanceProfileTagsResponse
s@ListInstanceProfileTagsResponse' {} Maybe Bool
a -> ListInstanceProfileTagsResponse
s {$sel:isTruncated:ListInstanceProfileTagsResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListInstanceProfileTagsResponse)

-- | When @IsTruncated@ is @true@, this element is present and contains the
-- value to use for the @Marker@ parameter in a subsequent pagination
-- request.
listInstanceProfileTagsResponse_marker :: Lens.Lens' ListInstanceProfileTagsResponse (Prelude.Maybe Prelude.Text)
listInstanceProfileTagsResponse_marker :: Lens' ListInstanceProfileTagsResponse (Maybe Text)
listInstanceProfileTagsResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceProfileTagsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:ListInstanceProfileTagsResponse' :: ListInstanceProfileTagsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListInstanceProfileTagsResponse
s@ListInstanceProfileTagsResponse' {} Maybe Text
a -> ListInstanceProfileTagsResponse
s {$sel:marker:ListInstanceProfileTagsResponse' :: Maybe Text
marker = Maybe Text
a} :: ListInstanceProfileTagsResponse)

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

-- | The list of tags that are currently attached to the IAM instance
-- profile. Each tag consists of a key name and an associated value. If no
-- tags are attached to the specified resource, the response contains an
-- empty list.
listInstanceProfileTagsResponse_tags :: Lens.Lens' ListInstanceProfileTagsResponse [Tag]
listInstanceProfileTagsResponse_tags :: Lens' ListInstanceProfileTagsResponse [Tag]
listInstanceProfileTagsResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInstanceProfileTagsResponse' {[Tag]
tags :: [Tag]
$sel:tags:ListInstanceProfileTagsResponse' :: ListInstanceProfileTagsResponse -> [Tag]
tags} -> [Tag]
tags) (\s :: ListInstanceProfileTagsResponse
s@ListInstanceProfileTagsResponse' {} [Tag]
a -> ListInstanceProfileTagsResponse
s {$sel:tags:ListInstanceProfileTagsResponse' :: [Tag]
tags = [Tag]
a} :: ListInstanceProfileTagsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListInstanceProfileTagsResponse
  where
  rnf :: ListInstanceProfileTagsResponse -> ()
rnf ListInstanceProfileTagsResponse' {Int
[Tag]
Maybe Bool
Maybe Text
tags :: [Tag]
httpStatus :: Int
marker :: Maybe Text
isTruncated :: Maybe Bool
$sel:tags:ListInstanceProfileTagsResponse' :: ListInstanceProfileTagsResponse -> [Tag]
$sel:httpStatus:ListInstanceProfileTagsResponse' :: ListInstanceProfileTagsResponse -> Int
$sel:marker:ListInstanceProfileTagsResponse' :: ListInstanceProfileTagsResponse -> Maybe Text
$sel:isTruncated:ListInstanceProfileTagsResponse' :: ListInstanceProfileTagsResponse -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isTruncated
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Tag]
tags