{-# 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.ElasticBeanstalk.AssociateEnvironmentOperationsRole
(
AssociateEnvironmentOperationsRole (..),
newAssociateEnvironmentOperationsRole,
associateEnvironmentOperationsRole_environmentName,
associateEnvironmentOperationsRole_operationsRole,
AssociateEnvironmentOperationsRoleResponse (..),
newAssociateEnvironmentOperationsRoleResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ElasticBeanstalk.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
data AssociateEnvironmentOperationsRole = AssociateEnvironmentOperationsRole'
{
AssociateEnvironmentOperationsRole -> Text
environmentName :: Prelude.Text,
AssociateEnvironmentOperationsRole -> Text
operationsRole :: Prelude.Text
}
deriving (AssociateEnvironmentOperationsRole
-> AssociateEnvironmentOperationsRole -> Bool
(AssociateEnvironmentOperationsRole
-> AssociateEnvironmentOperationsRole -> Bool)
-> (AssociateEnvironmentOperationsRole
-> AssociateEnvironmentOperationsRole -> Bool)
-> Eq AssociateEnvironmentOperationsRole
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateEnvironmentOperationsRole
-> AssociateEnvironmentOperationsRole -> Bool
$c/= :: AssociateEnvironmentOperationsRole
-> AssociateEnvironmentOperationsRole -> Bool
== :: AssociateEnvironmentOperationsRole
-> AssociateEnvironmentOperationsRole -> Bool
$c== :: AssociateEnvironmentOperationsRole
-> AssociateEnvironmentOperationsRole -> Bool
Prelude.Eq, ReadPrec [AssociateEnvironmentOperationsRole]
ReadPrec AssociateEnvironmentOperationsRole
Int -> ReadS AssociateEnvironmentOperationsRole
ReadS [AssociateEnvironmentOperationsRole]
(Int -> ReadS AssociateEnvironmentOperationsRole)
-> ReadS [AssociateEnvironmentOperationsRole]
-> ReadPrec AssociateEnvironmentOperationsRole
-> ReadPrec [AssociateEnvironmentOperationsRole]
-> Read AssociateEnvironmentOperationsRole
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateEnvironmentOperationsRole]
$creadListPrec :: ReadPrec [AssociateEnvironmentOperationsRole]
readPrec :: ReadPrec AssociateEnvironmentOperationsRole
$creadPrec :: ReadPrec AssociateEnvironmentOperationsRole
readList :: ReadS [AssociateEnvironmentOperationsRole]
$creadList :: ReadS [AssociateEnvironmentOperationsRole]
readsPrec :: Int -> ReadS AssociateEnvironmentOperationsRole
$creadsPrec :: Int -> ReadS AssociateEnvironmentOperationsRole
Prelude.Read, Int -> AssociateEnvironmentOperationsRole -> ShowS
[AssociateEnvironmentOperationsRole] -> ShowS
AssociateEnvironmentOperationsRole -> String
(Int -> AssociateEnvironmentOperationsRole -> ShowS)
-> (AssociateEnvironmentOperationsRole -> String)
-> ([AssociateEnvironmentOperationsRole] -> ShowS)
-> Show AssociateEnvironmentOperationsRole
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateEnvironmentOperationsRole] -> ShowS
$cshowList :: [AssociateEnvironmentOperationsRole] -> ShowS
show :: AssociateEnvironmentOperationsRole -> String
$cshow :: AssociateEnvironmentOperationsRole -> String
showsPrec :: Int -> AssociateEnvironmentOperationsRole -> ShowS
$cshowsPrec :: Int -> AssociateEnvironmentOperationsRole -> ShowS
Prelude.Show, (forall x.
AssociateEnvironmentOperationsRole
-> Rep AssociateEnvironmentOperationsRole x)
-> (forall x.
Rep AssociateEnvironmentOperationsRole x
-> AssociateEnvironmentOperationsRole)
-> Generic AssociateEnvironmentOperationsRole
forall x.
Rep AssociateEnvironmentOperationsRole x
-> AssociateEnvironmentOperationsRole
forall x.
AssociateEnvironmentOperationsRole
-> Rep AssociateEnvironmentOperationsRole x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateEnvironmentOperationsRole x
-> AssociateEnvironmentOperationsRole
$cfrom :: forall x.
AssociateEnvironmentOperationsRole
-> Rep AssociateEnvironmentOperationsRole x
Prelude.Generic)
newAssociateEnvironmentOperationsRole ::
Prelude.Text ->
Prelude.Text ->
AssociateEnvironmentOperationsRole
newAssociateEnvironmentOperationsRole :: Text -> Text -> AssociateEnvironmentOperationsRole
newAssociateEnvironmentOperationsRole
Text
pEnvironmentName_
Text
pOperationsRole_ =
AssociateEnvironmentOperationsRole' :: Text -> Text -> AssociateEnvironmentOperationsRole
AssociateEnvironmentOperationsRole'
{ $sel:environmentName:AssociateEnvironmentOperationsRole' :: Text
environmentName =
Text
pEnvironmentName_,
$sel:operationsRole:AssociateEnvironmentOperationsRole' :: Text
operationsRole = Text
pOperationsRole_
}
associateEnvironmentOperationsRole_environmentName :: Lens.Lens' AssociateEnvironmentOperationsRole Prelude.Text
associateEnvironmentOperationsRole_environmentName :: (Text -> f Text)
-> AssociateEnvironmentOperationsRole
-> f AssociateEnvironmentOperationsRole
associateEnvironmentOperationsRole_environmentName = (AssociateEnvironmentOperationsRole -> Text)
-> (AssociateEnvironmentOperationsRole
-> Text -> AssociateEnvironmentOperationsRole)
-> Lens
AssociateEnvironmentOperationsRole
AssociateEnvironmentOperationsRole
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateEnvironmentOperationsRole' {Text
environmentName :: Text
$sel:environmentName:AssociateEnvironmentOperationsRole' :: AssociateEnvironmentOperationsRole -> Text
environmentName} -> Text
environmentName) (\s :: AssociateEnvironmentOperationsRole
s@AssociateEnvironmentOperationsRole' {} Text
a -> AssociateEnvironmentOperationsRole
s {$sel:environmentName:AssociateEnvironmentOperationsRole' :: Text
environmentName = Text
a} :: AssociateEnvironmentOperationsRole)
associateEnvironmentOperationsRole_operationsRole :: Lens.Lens' AssociateEnvironmentOperationsRole Prelude.Text
associateEnvironmentOperationsRole_operationsRole :: (Text -> f Text)
-> AssociateEnvironmentOperationsRole
-> f AssociateEnvironmentOperationsRole
associateEnvironmentOperationsRole_operationsRole = (AssociateEnvironmentOperationsRole -> Text)
-> (AssociateEnvironmentOperationsRole
-> Text -> AssociateEnvironmentOperationsRole)
-> Lens
AssociateEnvironmentOperationsRole
AssociateEnvironmentOperationsRole
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateEnvironmentOperationsRole' {Text
operationsRole :: Text
$sel:operationsRole:AssociateEnvironmentOperationsRole' :: AssociateEnvironmentOperationsRole -> Text
operationsRole} -> Text
operationsRole) (\s :: AssociateEnvironmentOperationsRole
s@AssociateEnvironmentOperationsRole' {} Text
a -> AssociateEnvironmentOperationsRole
s {$sel:operationsRole:AssociateEnvironmentOperationsRole' :: Text
operationsRole = Text
a} :: AssociateEnvironmentOperationsRole)
instance
Core.AWSRequest
AssociateEnvironmentOperationsRole
where
type
AWSResponse AssociateEnvironmentOperationsRole =
AssociateEnvironmentOperationsRoleResponse
request :: AssociateEnvironmentOperationsRole
-> Request AssociateEnvironmentOperationsRole
request = Service
-> AssociateEnvironmentOperationsRole
-> Request AssociateEnvironmentOperationsRole
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy AssociateEnvironmentOperationsRole
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse AssociateEnvironmentOperationsRole)))
response =
AWSResponse AssociateEnvironmentOperationsRole
-> Logger
-> Service
-> Proxy AssociateEnvironmentOperationsRole
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse AssociateEnvironmentOperationsRole)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse AssociateEnvironmentOperationsRole
AssociateEnvironmentOperationsRoleResponse
AssociateEnvironmentOperationsRoleResponse'
instance
Prelude.Hashable
AssociateEnvironmentOperationsRole
instance
Prelude.NFData
AssociateEnvironmentOperationsRole
instance
Core.ToHeaders
AssociateEnvironmentOperationsRole
where
toHeaders :: AssociateEnvironmentOperationsRole -> [Header]
toHeaders = [Header] -> AssociateEnvironmentOperationsRole -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
AssociateEnvironmentOperationsRole
where
toPath :: AssociateEnvironmentOperationsRole -> ByteString
toPath = ByteString -> AssociateEnvironmentOperationsRole -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
AssociateEnvironmentOperationsRole
where
toQuery :: AssociateEnvironmentOperationsRole -> QueryString
toQuery AssociateEnvironmentOperationsRole' {Text
operationsRole :: Text
environmentName :: Text
$sel:operationsRole:AssociateEnvironmentOperationsRole' :: AssociateEnvironmentOperationsRole -> Text
$sel:environmentName:AssociateEnvironmentOperationsRole' :: AssociateEnvironmentOperationsRole -> 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
"AssociateEnvironmentOperationsRole" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"EnvironmentName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
environmentName,
ByteString
"OperationsRole" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
operationsRole
]
data AssociateEnvironmentOperationsRoleResponse = AssociateEnvironmentOperationsRoleResponse'
{
}
deriving (AssociateEnvironmentOperationsRoleResponse
-> AssociateEnvironmentOperationsRoleResponse -> Bool
(AssociateEnvironmentOperationsRoleResponse
-> AssociateEnvironmentOperationsRoleResponse -> Bool)
-> (AssociateEnvironmentOperationsRoleResponse
-> AssociateEnvironmentOperationsRoleResponse -> Bool)
-> Eq AssociateEnvironmentOperationsRoleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateEnvironmentOperationsRoleResponse
-> AssociateEnvironmentOperationsRoleResponse -> Bool
$c/= :: AssociateEnvironmentOperationsRoleResponse
-> AssociateEnvironmentOperationsRoleResponse -> Bool
== :: AssociateEnvironmentOperationsRoleResponse
-> AssociateEnvironmentOperationsRoleResponse -> Bool
$c== :: AssociateEnvironmentOperationsRoleResponse
-> AssociateEnvironmentOperationsRoleResponse -> Bool
Prelude.Eq, ReadPrec [AssociateEnvironmentOperationsRoleResponse]
ReadPrec AssociateEnvironmentOperationsRoleResponse
Int -> ReadS AssociateEnvironmentOperationsRoleResponse
ReadS [AssociateEnvironmentOperationsRoleResponse]
(Int -> ReadS AssociateEnvironmentOperationsRoleResponse)
-> ReadS [AssociateEnvironmentOperationsRoleResponse]
-> ReadPrec AssociateEnvironmentOperationsRoleResponse
-> ReadPrec [AssociateEnvironmentOperationsRoleResponse]
-> Read AssociateEnvironmentOperationsRoleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateEnvironmentOperationsRoleResponse]
$creadListPrec :: ReadPrec [AssociateEnvironmentOperationsRoleResponse]
readPrec :: ReadPrec AssociateEnvironmentOperationsRoleResponse
$creadPrec :: ReadPrec AssociateEnvironmentOperationsRoleResponse
readList :: ReadS [AssociateEnvironmentOperationsRoleResponse]
$creadList :: ReadS [AssociateEnvironmentOperationsRoleResponse]
readsPrec :: Int -> ReadS AssociateEnvironmentOperationsRoleResponse
$creadsPrec :: Int -> ReadS AssociateEnvironmentOperationsRoleResponse
Prelude.Read, Int -> AssociateEnvironmentOperationsRoleResponse -> ShowS
[AssociateEnvironmentOperationsRoleResponse] -> ShowS
AssociateEnvironmentOperationsRoleResponse -> String
(Int -> AssociateEnvironmentOperationsRoleResponse -> ShowS)
-> (AssociateEnvironmentOperationsRoleResponse -> String)
-> ([AssociateEnvironmentOperationsRoleResponse] -> ShowS)
-> Show AssociateEnvironmentOperationsRoleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateEnvironmentOperationsRoleResponse] -> ShowS
$cshowList :: [AssociateEnvironmentOperationsRoleResponse] -> ShowS
show :: AssociateEnvironmentOperationsRoleResponse -> String
$cshow :: AssociateEnvironmentOperationsRoleResponse -> String
showsPrec :: Int -> AssociateEnvironmentOperationsRoleResponse -> ShowS
$cshowsPrec :: Int -> AssociateEnvironmentOperationsRoleResponse -> ShowS
Prelude.Show, (forall x.
AssociateEnvironmentOperationsRoleResponse
-> Rep AssociateEnvironmentOperationsRoleResponse x)
-> (forall x.
Rep AssociateEnvironmentOperationsRoleResponse x
-> AssociateEnvironmentOperationsRoleResponse)
-> Generic AssociateEnvironmentOperationsRoleResponse
forall x.
Rep AssociateEnvironmentOperationsRoleResponse x
-> AssociateEnvironmentOperationsRoleResponse
forall x.
AssociateEnvironmentOperationsRoleResponse
-> Rep AssociateEnvironmentOperationsRoleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateEnvironmentOperationsRoleResponse x
-> AssociateEnvironmentOperationsRoleResponse
$cfrom :: forall x.
AssociateEnvironmentOperationsRoleResponse
-> Rep AssociateEnvironmentOperationsRoleResponse x
Prelude.Generic)
newAssociateEnvironmentOperationsRoleResponse ::
AssociateEnvironmentOperationsRoleResponse
newAssociateEnvironmentOperationsRoleResponse :: AssociateEnvironmentOperationsRoleResponse
newAssociateEnvironmentOperationsRoleResponse =
AssociateEnvironmentOperationsRoleResponse
AssociateEnvironmentOperationsRoleResponse'
instance
Prelude.NFData
AssociateEnvironmentOperationsRoleResponse