{-# 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 #-}
module Amazonka.IAM.ListInstanceProfileTags
(
ListInstanceProfileTags (..),
newListInstanceProfileTags,
listInstanceProfileTags_marker,
listInstanceProfileTags_maxItems,
listInstanceProfileTags_instanceProfileName,
ListInstanceProfileTagsResponse (..),
newListInstanceProfileTagsResponse,
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
data ListInstanceProfileTags = ListInstanceProfileTags'
{
ListInstanceProfileTags -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListInstanceProfileTags -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
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)
newListInstanceProfileTags ::
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_
}
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)
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)
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
]
data ListInstanceProfileTagsResponse = ListInstanceProfileTagsResponse'
{
ListInstanceProfileTagsResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
ListInstanceProfileTagsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListInstanceProfileTagsResponse -> Int
httpStatus :: Prelude.Int,
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)
newListInstanceProfileTagsResponse ::
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
}
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)
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)
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)
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