{-# 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-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)
--
-- 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_marker,
    listInstanceProfileTagsResponse_isTruncated,
    listInstanceProfileTagsResponse_httpStatus,
    listInstanceProfileTagsResponse_tags,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IAM.Types
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:/ '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
(ListInstanceProfileTags -> ListInstanceProfileTags -> Bool)
-> (ListInstanceProfileTags -> ListInstanceProfileTags -> Bool)
-> Eq ListInstanceProfileTags
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]
(Int -> ReadS ListInstanceProfileTags)
-> ReadS [ListInstanceProfileTags]
-> ReadPrec ListInstanceProfileTags
-> ReadPrec [ListInstanceProfileTags]
-> Read 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
(Int -> ListInstanceProfileTags -> ShowS)
-> (ListInstanceProfileTags -> String)
-> ([ListInstanceProfileTags] -> ShowS)
-> Show ListInstanceProfileTags
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.
 ListInstanceProfileTags -> Rep ListInstanceProfileTags x)
-> (forall x.
    Rep ListInstanceProfileTags x -> ListInstanceProfileTags)
-> Generic ListInstanceProfileTags
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' :: Maybe Text -> Maybe Natural -> Text -> ListInstanceProfileTags
ListInstanceProfileTags'
    { $sel:marker:ListInstanceProfileTags' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListInstanceProfileTags' :: Maybe Natural
maxItems = Maybe Natural
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 :: (Maybe Text -> f (Maybe Text))
-> ListInstanceProfileTags -> f ListInstanceProfileTags
listInstanceProfileTags_marker = (ListInstanceProfileTags -> Maybe Text)
-> (ListInstanceProfileTags
    -> Maybe Text -> ListInstanceProfileTags)
-> Lens
     ListInstanceProfileTags
     ListInstanceProfileTags
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe Natural -> f (Maybe Natural))
-> ListInstanceProfileTags -> f ListInstanceProfileTags
listInstanceProfileTags_maxItems = (ListInstanceProfileTags -> Maybe Natural)
-> (ListInstanceProfileTags
    -> Maybe Natural -> ListInstanceProfileTags)
-> Lens
     ListInstanceProfileTags
     ListInstanceProfileTags
     (Maybe Natural)
     (Maybe Natural)
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 :: (Text -> f Text)
-> ListInstanceProfileTags -> f ListInstanceProfileTags
listInstanceProfileTags_instanceProfileName = (ListInstanceProfileTags -> Text)
-> (ListInstanceProfileTags -> Text -> ListInstanceProfileTags)
-> Lens ListInstanceProfileTags ListInstanceProfileTags Text Text
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 :: ListInstanceProfileTags -> Request ListInstanceProfileTags
request = Service
-> ListInstanceProfileTags -> Request ListInstanceProfileTags
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ListInstanceProfileTags
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListInstanceProfileTags)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ListInstanceProfileTags))
-> Logger
-> Service
-> Proxy ListInstanceProfileTags
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListInstanceProfileTags)))
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
"ListInstanceProfileTagsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe Bool -> Int -> [Tag] -> ListInstanceProfileTagsResponse
ListInstanceProfileTagsResponse'
            (Maybe Text
 -> Maybe Bool -> Int -> [Tag] -> ListInstanceProfileTagsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool -> Int -> [Tag] -> ListInstanceProfileTagsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Marker")
            Either
  String
  (Maybe Bool -> Int -> [Tag] -> ListInstanceProfileTagsResponse)
-> Either String (Maybe Bool)
-> Either String (Int -> [Tag] -> ListInstanceProfileTagsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IsTruncated")
            Either String (Int -> [Tag] -> ListInstanceProfileTagsResponse)
-> Either String Int
-> Either String ([Tag] -> ListInstanceProfileTagsResponse)
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))
            Either String ([Tag] -> ListInstanceProfileTagsResponse)
-> Either String [Tag]
-> Either String ListInstanceProfileTagsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Tags" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String [Tag]) -> Either String [Tag]
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= Text -> [Node] -> Either String [Tag]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member"
                        )
      )

instance Prelude.Hashable ListInstanceProfileTags

instance Prelude.NFData ListInstanceProfileTags

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

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

instance Core.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
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ListInstanceProfileTags" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"MaxItems" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxItems,
        ByteString
"InstanceProfileName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
instanceProfileName
      ]

-- | /See:/ 'newListInstanceProfileTagsResponse' smart constructor.
data ListInstanceProfileTagsResponse = 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 -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | 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
(ListInstanceProfileTagsResponse
 -> ListInstanceProfileTagsResponse -> Bool)
-> (ListInstanceProfileTagsResponse
    -> ListInstanceProfileTagsResponse -> Bool)
-> Eq ListInstanceProfileTagsResponse
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]
(Int -> ReadS ListInstanceProfileTagsResponse)
-> ReadS [ListInstanceProfileTagsResponse]
-> ReadPrec ListInstanceProfileTagsResponse
-> ReadPrec [ListInstanceProfileTagsResponse]
-> Read 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
(Int -> ListInstanceProfileTagsResponse -> ShowS)
-> (ListInstanceProfileTagsResponse -> String)
-> ([ListInstanceProfileTagsResponse] -> ShowS)
-> Show ListInstanceProfileTagsResponse
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.
 ListInstanceProfileTagsResponse
 -> Rep ListInstanceProfileTagsResponse x)
-> (forall x.
    Rep ListInstanceProfileTagsResponse x
    -> ListInstanceProfileTagsResponse)
-> Generic ListInstanceProfileTagsResponse
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:
--
-- '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.
--
-- '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.
--
-- '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' :: Maybe Text
-> Maybe Bool -> Int -> [Tag] -> ListInstanceProfileTagsResponse
ListInstanceProfileTagsResponse'
    { $sel:marker:ListInstanceProfileTagsResponse' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isTruncated:ListInstanceProfileTagsResponse' :: Maybe Bool
isTruncated = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListInstanceProfileTagsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:tags:ListInstanceProfileTagsResponse' :: [Tag]
tags = [Tag]
forall a. Monoid a => a
Prelude.mempty
    }

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> ListInstanceProfileTagsResponse
-> f ListInstanceProfileTagsResponse
listInstanceProfileTagsResponse_marker = (ListInstanceProfileTagsResponse -> Maybe Text)
-> (ListInstanceProfileTagsResponse
    -> Maybe Text -> ListInstanceProfileTagsResponse)
-> Lens
     ListInstanceProfileTagsResponse
     ListInstanceProfileTagsResponse
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool))
-> ListInstanceProfileTagsResponse
-> f ListInstanceProfileTagsResponse
listInstanceProfileTagsResponse_isTruncated = (ListInstanceProfileTagsResponse -> Maybe Bool)
-> (ListInstanceProfileTagsResponse
    -> Maybe Bool -> ListInstanceProfileTagsResponse)
-> Lens
     ListInstanceProfileTagsResponse
     ListInstanceProfileTagsResponse
     (Maybe Bool)
     (Maybe Bool)
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)

-- | The response's http status code.
listInstanceProfileTagsResponse_httpStatus :: Lens.Lens' ListInstanceProfileTagsResponse Prelude.Int
listInstanceProfileTagsResponse_httpStatus :: (Int -> f Int)
-> ListInstanceProfileTagsResponse
-> f ListInstanceProfileTagsResponse
listInstanceProfileTagsResponse_httpStatus = (ListInstanceProfileTagsResponse -> Int)
-> (ListInstanceProfileTagsResponse
    -> Int -> ListInstanceProfileTagsResponse)
-> Lens
     ListInstanceProfileTagsResponse
     ListInstanceProfileTagsResponse
     Int
     Int
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 :: ([Tag] -> f [Tag])
-> ListInstanceProfileTagsResponse
-> f ListInstanceProfileTagsResponse
listInstanceProfileTagsResponse_tags = (ListInstanceProfileTagsResponse -> [Tag])
-> (ListInstanceProfileTagsResponse
    -> [Tag] -> ListInstanceProfileTagsResponse)
-> Lens
     ListInstanceProfileTagsResponse
     ListInstanceProfileTagsResponse
     [Tag]
     [Tag]
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) (([Tag] -> f [Tag])
 -> ListInstanceProfileTagsResponse
 -> f ListInstanceProfileTagsResponse)
-> (([Tag] -> f [Tag]) -> [Tag] -> f [Tag])
-> ([Tag] -> f [Tag])
-> ListInstanceProfileTagsResponse
-> f ListInstanceProfileTagsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Tag] -> f [Tag]) -> [Tag] -> f [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListInstanceProfileTagsResponse