{-# 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.SSOAdmin.DeleteInlinePolicyFromPermissionSet
(
DeleteInlinePolicyFromPermissionSet (..),
newDeleteInlinePolicyFromPermissionSet,
deleteInlinePolicyFromPermissionSet_instanceArn,
deleteInlinePolicyFromPermissionSet_permissionSetArn,
DeleteInlinePolicyFromPermissionSetResponse (..),
newDeleteInlinePolicyFromPermissionSetResponse,
deleteInlinePolicyFromPermissionSetResponse_httpStatus,
)
where
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
import Amazonka.SSOAdmin.Types
data DeleteInlinePolicyFromPermissionSet = DeleteInlinePolicyFromPermissionSet'
{
DeleteInlinePolicyFromPermissionSet -> Text
instanceArn :: Prelude.Text,
DeleteInlinePolicyFromPermissionSet -> Text
permissionSetArn :: Prelude.Text
}
deriving (DeleteInlinePolicyFromPermissionSet
-> DeleteInlinePolicyFromPermissionSet -> Bool
(DeleteInlinePolicyFromPermissionSet
-> DeleteInlinePolicyFromPermissionSet -> Bool)
-> (DeleteInlinePolicyFromPermissionSet
-> DeleteInlinePolicyFromPermissionSet -> Bool)
-> Eq DeleteInlinePolicyFromPermissionSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteInlinePolicyFromPermissionSet
-> DeleteInlinePolicyFromPermissionSet -> Bool
$c/= :: DeleteInlinePolicyFromPermissionSet
-> DeleteInlinePolicyFromPermissionSet -> Bool
== :: DeleteInlinePolicyFromPermissionSet
-> DeleteInlinePolicyFromPermissionSet -> Bool
$c== :: DeleteInlinePolicyFromPermissionSet
-> DeleteInlinePolicyFromPermissionSet -> Bool
Prelude.Eq, ReadPrec [DeleteInlinePolicyFromPermissionSet]
ReadPrec DeleteInlinePolicyFromPermissionSet
Int -> ReadS DeleteInlinePolicyFromPermissionSet
ReadS [DeleteInlinePolicyFromPermissionSet]
(Int -> ReadS DeleteInlinePolicyFromPermissionSet)
-> ReadS [DeleteInlinePolicyFromPermissionSet]
-> ReadPrec DeleteInlinePolicyFromPermissionSet
-> ReadPrec [DeleteInlinePolicyFromPermissionSet]
-> Read DeleteInlinePolicyFromPermissionSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteInlinePolicyFromPermissionSet]
$creadListPrec :: ReadPrec [DeleteInlinePolicyFromPermissionSet]
readPrec :: ReadPrec DeleteInlinePolicyFromPermissionSet
$creadPrec :: ReadPrec DeleteInlinePolicyFromPermissionSet
readList :: ReadS [DeleteInlinePolicyFromPermissionSet]
$creadList :: ReadS [DeleteInlinePolicyFromPermissionSet]
readsPrec :: Int -> ReadS DeleteInlinePolicyFromPermissionSet
$creadsPrec :: Int -> ReadS DeleteInlinePolicyFromPermissionSet
Prelude.Read, Int -> DeleteInlinePolicyFromPermissionSet -> ShowS
[DeleteInlinePolicyFromPermissionSet] -> ShowS
DeleteInlinePolicyFromPermissionSet -> String
(Int -> DeleteInlinePolicyFromPermissionSet -> ShowS)
-> (DeleteInlinePolicyFromPermissionSet -> String)
-> ([DeleteInlinePolicyFromPermissionSet] -> ShowS)
-> Show DeleteInlinePolicyFromPermissionSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteInlinePolicyFromPermissionSet] -> ShowS
$cshowList :: [DeleteInlinePolicyFromPermissionSet] -> ShowS
show :: DeleteInlinePolicyFromPermissionSet -> String
$cshow :: DeleteInlinePolicyFromPermissionSet -> String
showsPrec :: Int -> DeleteInlinePolicyFromPermissionSet -> ShowS
$cshowsPrec :: Int -> DeleteInlinePolicyFromPermissionSet -> ShowS
Prelude.Show, (forall x.
DeleteInlinePolicyFromPermissionSet
-> Rep DeleteInlinePolicyFromPermissionSet x)
-> (forall x.
Rep DeleteInlinePolicyFromPermissionSet x
-> DeleteInlinePolicyFromPermissionSet)
-> Generic DeleteInlinePolicyFromPermissionSet
forall x.
Rep DeleteInlinePolicyFromPermissionSet x
-> DeleteInlinePolicyFromPermissionSet
forall x.
DeleteInlinePolicyFromPermissionSet
-> Rep DeleteInlinePolicyFromPermissionSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteInlinePolicyFromPermissionSet x
-> DeleteInlinePolicyFromPermissionSet
$cfrom :: forall x.
DeleteInlinePolicyFromPermissionSet
-> Rep DeleteInlinePolicyFromPermissionSet x
Prelude.Generic)
newDeleteInlinePolicyFromPermissionSet ::
Prelude.Text ->
Prelude.Text ->
DeleteInlinePolicyFromPermissionSet
newDeleteInlinePolicyFromPermissionSet :: Text -> Text -> DeleteInlinePolicyFromPermissionSet
newDeleteInlinePolicyFromPermissionSet
Text
pInstanceArn_
Text
pPermissionSetArn_ =
DeleteInlinePolicyFromPermissionSet' :: Text -> Text -> DeleteInlinePolicyFromPermissionSet
DeleteInlinePolicyFromPermissionSet'
{ $sel:instanceArn:DeleteInlinePolicyFromPermissionSet' :: Text
instanceArn =
Text
pInstanceArn_,
$sel:permissionSetArn:DeleteInlinePolicyFromPermissionSet' :: Text
permissionSetArn = Text
pPermissionSetArn_
}
deleteInlinePolicyFromPermissionSet_instanceArn :: Lens.Lens' DeleteInlinePolicyFromPermissionSet Prelude.Text
deleteInlinePolicyFromPermissionSet_instanceArn :: (Text -> f Text)
-> DeleteInlinePolicyFromPermissionSet
-> f DeleteInlinePolicyFromPermissionSet
deleteInlinePolicyFromPermissionSet_instanceArn = (DeleteInlinePolicyFromPermissionSet -> Text)
-> (DeleteInlinePolicyFromPermissionSet
-> Text -> DeleteInlinePolicyFromPermissionSet)
-> Lens
DeleteInlinePolicyFromPermissionSet
DeleteInlinePolicyFromPermissionSet
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInlinePolicyFromPermissionSet' {Text
instanceArn :: Text
$sel:instanceArn:DeleteInlinePolicyFromPermissionSet' :: DeleteInlinePolicyFromPermissionSet -> Text
instanceArn} -> Text
instanceArn) (\s :: DeleteInlinePolicyFromPermissionSet
s@DeleteInlinePolicyFromPermissionSet' {} Text
a -> DeleteInlinePolicyFromPermissionSet
s {$sel:instanceArn:DeleteInlinePolicyFromPermissionSet' :: Text
instanceArn = Text
a} :: DeleteInlinePolicyFromPermissionSet)
deleteInlinePolicyFromPermissionSet_permissionSetArn :: Lens.Lens' DeleteInlinePolicyFromPermissionSet Prelude.Text
deleteInlinePolicyFromPermissionSet_permissionSetArn :: (Text -> f Text)
-> DeleteInlinePolicyFromPermissionSet
-> f DeleteInlinePolicyFromPermissionSet
deleteInlinePolicyFromPermissionSet_permissionSetArn = (DeleteInlinePolicyFromPermissionSet -> Text)
-> (DeleteInlinePolicyFromPermissionSet
-> Text -> DeleteInlinePolicyFromPermissionSet)
-> Lens
DeleteInlinePolicyFromPermissionSet
DeleteInlinePolicyFromPermissionSet
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInlinePolicyFromPermissionSet' {Text
permissionSetArn :: Text
$sel:permissionSetArn:DeleteInlinePolicyFromPermissionSet' :: DeleteInlinePolicyFromPermissionSet -> Text
permissionSetArn} -> Text
permissionSetArn) (\s :: DeleteInlinePolicyFromPermissionSet
s@DeleteInlinePolicyFromPermissionSet' {} Text
a -> DeleteInlinePolicyFromPermissionSet
s {$sel:permissionSetArn:DeleteInlinePolicyFromPermissionSet' :: Text
permissionSetArn = Text
a} :: DeleteInlinePolicyFromPermissionSet)
instance
Core.AWSRequest
DeleteInlinePolicyFromPermissionSet
where
type
AWSResponse DeleteInlinePolicyFromPermissionSet =
DeleteInlinePolicyFromPermissionSetResponse
request :: DeleteInlinePolicyFromPermissionSet
-> Request DeleteInlinePolicyFromPermissionSet
request = Service
-> DeleteInlinePolicyFromPermissionSet
-> Request DeleteInlinePolicyFromPermissionSet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteInlinePolicyFromPermissionSet
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteInlinePolicyFromPermissionSet)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteInlinePolicyFromPermissionSet))
-> Logger
-> Service
-> Proxy DeleteInlinePolicyFromPermissionSet
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteInlinePolicyFromPermissionSet)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteInlinePolicyFromPermissionSetResponse
DeleteInlinePolicyFromPermissionSetResponse'
(Int -> DeleteInlinePolicyFromPermissionSetResponse)
-> Either String Int
-> Either String DeleteInlinePolicyFromPermissionSetResponse
forall (f :: * -> *) a b. Functor 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
DeleteInlinePolicyFromPermissionSet
instance
Prelude.NFData
DeleteInlinePolicyFromPermissionSet
instance
Core.ToHeaders
DeleteInlinePolicyFromPermissionSet
where
toHeaders :: DeleteInlinePolicyFromPermissionSet -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DeleteInlinePolicyFromPermissionSet -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"SWBExternalService.DeleteInlinePolicyFromPermissionSet" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance
Core.ToJSON
DeleteInlinePolicyFromPermissionSet
where
toJSON :: DeleteInlinePolicyFromPermissionSet -> Value
toJSON DeleteInlinePolicyFromPermissionSet' {Text
permissionSetArn :: Text
instanceArn :: Text
$sel:permissionSetArn:DeleteInlinePolicyFromPermissionSet' :: DeleteInlinePolicyFromPermissionSet -> Text
$sel:instanceArn:DeleteInlinePolicyFromPermissionSet' :: DeleteInlinePolicyFromPermissionSet -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"InstanceArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
instanceArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"PermissionSetArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
permissionSetArn)
]
)
instance
Core.ToPath
DeleteInlinePolicyFromPermissionSet
where
toPath :: DeleteInlinePolicyFromPermissionSet -> ByteString
toPath = ByteString -> DeleteInlinePolicyFromPermissionSet -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
DeleteInlinePolicyFromPermissionSet
where
toQuery :: DeleteInlinePolicyFromPermissionSet -> QueryString
toQuery = QueryString -> DeleteInlinePolicyFromPermissionSet -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteInlinePolicyFromPermissionSetResponse = DeleteInlinePolicyFromPermissionSetResponse'
{
DeleteInlinePolicyFromPermissionSetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteInlinePolicyFromPermissionSetResponse
-> DeleteInlinePolicyFromPermissionSetResponse -> Bool
(DeleteInlinePolicyFromPermissionSetResponse
-> DeleteInlinePolicyFromPermissionSetResponse -> Bool)
-> (DeleteInlinePolicyFromPermissionSetResponse
-> DeleteInlinePolicyFromPermissionSetResponse -> Bool)
-> Eq DeleteInlinePolicyFromPermissionSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteInlinePolicyFromPermissionSetResponse
-> DeleteInlinePolicyFromPermissionSetResponse -> Bool
$c/= :: DeleteInlinePolicyFromPermissionSetResponse
-> DeleteInlinePolicyFromPermissionSetResponse -> Bool
== :: DeleteInlinePolicyFromPermissionSetResponse
-> DeleteInlinePolicyFromPermissionSetResponse -> Bool
$c== :: DeleteInlinePolicyFromPermissionSetResponse
-> DeleteInlinePolicyFromPermissionSetResponse -> Bool
Prelude.Eq, ReadPrec [DeleteInlinePolicyFromPermissionSetResponse]
ReadPrec DeleteInlinePolicyFromPermissionSetResponse
Int -> ReadS DeleteInlinePolicyFromPermissionSetResponse
ReadS [DeleteInlinePolicyFromPermissionSetResponse]
(Int -> ReadS DeleteInlinePolicyFromPermissionSetResponse)
-> ReadS [DeleteInlinePolicyFromPermissionSetResponse]
-> ReadPrec DeleteInlinePolicyFromPermissionSetResponse
-> ReadPrec [DeleteInlinePolicyFromPermissionSetResponse]
-> Read DeleteInlinePolicyFromPermissionSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteInlinePolicyFromPermissionSetResponse]
$creadListPrec :: ReadPrec [DeleteInlinePolicyFromPermissionSetResponse]
readPrec :: ReadPrec DeleteInlinePolicyFromPermissionSetResponse
$creadPrec :: ReadPrec DeleteInlinePolicyFromPermissionSetResponse
readList :: ReadS [DeleteInlinePolicyFromPermissionSetResponse]
$creadList :: ReadS [DeleteInlinePolicyFromPermissionSetResponse]
readsPrec :: Int -> ReadS DeleteInlinePolicyFromPermissionSetResponse
$creadsPrec :: Int -> ReadS DeleteInlinePolicyFromPermissionSetResponse
Prelude.Read, Int -> DeleteInlinePolicyFromPermissionSetResponse -> ShowS
[DeleteInlinePolicyFromPermissionSetResponse] -> ShowS
DeleteInlinePolicyFromPermissionSetResponse -> String
(Int -> DeleteInlinePolicyFromPermissionSetResponse -> ShowS)
-> (DeleteInlinePolicyFromPermissionSetResponse -> String)
-> ([DeleteInlinePolicyFromPermissionSetResponse] -> ShowS)
-> Show DeleteInlinePolicyFromPermissionSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteInlinePolicyFromPermissionSetResponse] -> ShowS
$cshowList :: [DeleteInlinePolicyFromPermissionSetResponse] -> ShowS
show :: DeleteInlinePolicyFromPermissionSetResponse -> String
$cshow :: DeleteInlinePolicyFromPermissionSetResponse -> String
showsPrec :: Int -> DeleteInlinePolicyFromPermissionSetResponse -> ShowS
$cshowsPrec :: Int -> DeleteInlinePolicyFromPermissionSetResponse -> ShowS
Prelude.Show, (forall x.
DeleteInlinePolicyFromPermissionSetResponse
-> Rep DeleteInlinePolicyFromPermissionSetResponse x)
-> (forall x.
Rep DeleteInlinePolicyFromPermissionSetResponse x
-> DeleteInlinePolicyFromPermissionSetResponse)
-> Generic DeleteInlinePolicyFromPermissionSetResponse
forall x.
Rep DeleteInlinePolicyFromPermissionSetResponse x
-> DeleteInlinePolicyFromPermissionSetResponse
forall x.
DeleteInlinePolicyFromPermissionSetResponse
-> Rep DeleteInlinePolicyFromPermissionSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteInlinePolicyFromPermissionSetResponse x
-> DeleteInlinePolicyFromPermissionSetResponse
$cfrom :: forall x.
DeleteInlinePolicyFromPermissionSetResponse
-> Rep DeleteInlinePolicyFromPermissionSetResponse x
Prelude.Generic)
newDeleteInlinePolicyFromPermissionSetResponse ::
Prelude.Int ->
DeleteInlinePolicyFromPermissionSetResponse
newDeleteInlinePolicyFromPermissionSetResponse :: Int -> DeleteInlinePolicyFromPermissionSetResponse
newDeleteInlinePolicyFromPermissionSetResponse
Int
pHttpStatus_ =
DeleteInlinePolicyFromPermissionSetResponse' :: Int -> DeleteInlinePolicyFromPermissionSetResponse
DeleteInlinePolicyFromPermissionSetResponse'
{ $sel:httpStatus:DeleteInlinePolicyFromPermissionSetResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteInlinePolicyFromPermissionSetResponse_httpStatus :: Lens.Lens' DeleteInlinePolicyFromPermissionSetResponse Prelude.Int
deleteInlinePolicyFromPermissionSetResponse_httpStatus :: (Int -> f Int)
-> DeleteInlinePolicyFromPermissionSetResponse
-> f DeleteInlinePolicyFromPermissionSetResponse
deleteInlinePolicyFromPermissionSetResponse_httpStatus = (DeleteInlinePolicyFromPermissionSetResponse -> Int)
-> (DeleteInlinePolicyFromPermissionSetResponse
-> Int -> DeleteInlinePolicyFromPermissionSetResponse)
-> Lens
DeleteInlinePolicyFromPermissionSetResponse
DeleteInlinePolicyFromPermissionSetResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteInlinePolicyFromPermissionSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteInlinePolicyFromPermissionSetResponse' :: DeleteInlinePolicyFromPermissionSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteInlinePolicyFromPermissionSetResponse
s@DeleteInlinePolicyFromPermissionSetResponse' {} Int
a -> DeleteInlinePolicyFromPermissionSetResponse
s {$sel:httpStatus:DeleteInlinePolicyFromPermissionSetResponse' :: Int
httpStatus = Int
a} :: DeleteInlinePolicyFromPermissionSetResponse)
instance
Prelude.NFData
DeleteInlinePolicyFromPermissionSetResponse