Skip to content

Commit

Permalink
Regenerating DirectoryService from latest service definition
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanhay committed May 4, 2016
1 parent 4ccaaf2 commit 35fb573
Show file tree
Hide file tree
Showing 21 changed files with 871 additions and 47 deletions.
4 changes: 4 additions & 0 deletions amazonka-ds/amazonka-ds.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,17 @@ library
, Network.AWS.DirectoryService.ConnectDirectory
, Network.AWS.DirectoryService.CreateAlias
, Network.AWS.DirectoryService.CreateComputer
, Network.AWS.DirectoryService.CreateConditionalForwarder
, Network.AWS.DirectoryService.CreateDirectory
, Network.AWS.DirectoryService.CreateMicrosoftAD
, Network.AWS.DirectoryService.CreateSnapshot
, Network.AWS.DirectoryService.CreateTrust
, Network.AWS.DirectoryService.DeleteConditionalForwarder
, Network.AWS.DirectoryService.DeleteDirectory
, Network.AWS.DirectoryService.DeleteSnapshot
, Network.AWS.DirectoryService.DeleteTrust
, Network.AWS.DirectoryService.DeregisterEventTopic
, Network.AWS.DirectoryService.DescribeConditionalForwarders
, Network.AWS.DirectoryService.DescribeDirectories
, Network.AWS.DirectoryService.DescribeEventTopics
, Network.AWS.DirectoryService.DescribeSnapshots
Expand All @@ -69,6 +72,7 @@ library
, Network.AWS.DirectoryService.RegisterEventTopic
, Network.AWS.DirectoryService.RestoreFromSnapshot
, Network.AWS.DirectoryService.Types
, Network.AWS.DirectoryService.UpdateConditionalForwarder
, Network.AWS.DirectoryService.UpdateRadius
, Network.AWS.DirectoryService.VerifyTrust
, Network.AWS.DirectoryService.Waiters
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
27 changes: 27 additions & 0 deletions amazonka-ds/gen/Network/AWS/DirectoryService.hs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ module Network.AWS.DirectoryService
-- * Operations
-- $operations

-- ** DescribeConditionalForwarders
, module Network.AWS.DirectoryService.DescribeConditionalForwarders

-- ** GetSnapshotLimits
, module Network.AWS.DirectoryService.GetSnapshotLimits

Expand Down Expand Up @@ -99,6 +102,12 @@ module Network.AWS.DirectoryService
-- ** DescribeEventTopics
, module Network.AWS.DirectoryService.DescribeEventTopics

-- ** UpdateConditionalForwarder
, module Network.AWS.DirectoryService.UpdateConditionalForwarder

-- ** DeleteConditionalForwarder
, module Network.AWS.DirectoryService.DeleteConditionalForwarder

-- ** EnableSSO
, module Network.AWS.DirectoryService.EnableSSO

Expand Down Expand Up @@ -135,6 +144,9 @@ module Network.AWS.DirectoryService
-- ** VerifyTrust
, module Network.AWS.DirectoryService.VerifyTrust

-- ** CreateConditionalForwarder
, module Network.AWS.DirectoryService.CreateConditionalForwarder

-- ** GetDirectoryLimits
, module Network.AWS.DirectoryService.GetDirectoryLimits

Expand All @@ -158,6 +170,9 @@ module Network.AWS.DirectoryService
-- ** RadiusStatus
, RadiusStatus (..)

-- ** ReplicationScope
, ReplicationScope (..)

-- ** SnapshotStatus
, SnapshotStatus (..)

Expand Down Expand Up @@ -189,6 +204,13 @@ module Network.AWS.DirectoryService
, cComputerAttributes
, cComputerName

-- ** ConditionalForwarder
, ConditionalForwarder
, conditionalForwarder
, cfDNSIPAddrs
, cfRemoteDomainName
, cfReplicationScope

-- ** DirectoryConnectSettings
, DirectoryConnectSettings
, directoryConnectSettings
Expand Down Expand Up @@ -303,6 +325,7 @@ module Network.AWS.DirectoryService
, tTrustDirection
, tStateLastUpdatedDateTime
, tTrustType
, tTrustStateReason
, tRemoteDomainName
, tTrustId
, tCreatedDateTime
Expand All @@ -311,14 +334,17 @@ module Network.AWS.DirectoryService
import Network.AWS.DirectoryService.ConnectDirectory
import Network.AWS.DirectoryService.CreateAlias
import Network.AWS.DirectoryService.CreateComputer
import Network.AWS.DirectoryService.CreateConditionalForwarder
import Network.AWS.DirectoryService.CreateDirectory
import Network.AWS.DirectoryService.CreateMicrosoftAD
import Network.AWS.DirectoryService.CreateSnapshot
import Network.AWS.DirectoryService.CreateTrust
import Network.AWS.DirectoryService.DeleteConditionalForwarder
import Network.AWS.DirectoryService.DeleteDirectory
import Network.AWS.DirectoryService.DeleteSnapshot
import Network.AWS.DirectoryService.DeleteTrust
import Network.AWS.DirectoryService.DeregisterEventTopic
import Network.AWS.DirectoryService.DescribeConditionalForwarders
import Network.AWS.DirectoryService.DescribeDirectories
import Network.AWS.DirectoryService.DescribeEventTopics
import Network.AWS.DirectoryService.DescribeSnapshots
Expand All @@ -332,6 +358,7 @@ import Network.AWS.DirectoryService.GetSnapshotLimits
import Network.AWS.DirectoryService.RegisterEventTopic
import Network.AWS.DirectoryService.RestoreFromSnapshot
import Network.AWS.DirectoryService.Types
import Network.AWS.DirectoryService.UpdateConditionalForwarder
import Network.AWS.DirectoryService.UpdateRadius
import Network.AWS.DirectoryService.VerifyTrust
import Network.AWS.DirectoryService.Waiters
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}

{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module : Network.AWS.DirectoryService.CreateConditionalForwarder
-- Copyright : (c) 2013-2016 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a conditional forwarder associated with your AWS directory.
-- Conditional forwarders are required in order to set up a trust
-- relationship with another domain. The conditional forwarder points to
-- the trusted domain.
module Network.AWS.DirectoryService.CreateConditionalForwarder
(
-- * Creating a Request
createConditionalForwarder
, CreateConditionalForwarder
-- * Request Lenses
, ccfDirectoryId
, ccfRemoteDomainName
, ccfDNSIPAddrs

-- * Destructuring the Response
, createConditionalForwarderResponse
, CreateConditionalForwarderResponse
-- * Response Lenses
, ccfrsResponseStatus
) where

import Network.AWS.DirectoryService.Types
import Network.AWS.DirectoryService.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response

-- | Initiates the creation of a conditional forwarder for your AWS Directory
-- Service for Microsoft Active Directory. Conditional forwarders are
-- required in order to set up a trust relationship with another domain.
--
-- /See:/ 'createConditionalForwarder' smart constructor.
data CreateConditionalForwarder = CreateConditionalForwarder'
{ _ccfDirectoryId :: !Text
, _ccfRemoteDomainName :: !Text
, _ccfDNSIPAddrs :: ![Text]
} deriving (Eq,Read,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateConditionalForwarder' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ccfDirectoryId'
--
-- * 'ccfRemoteDomainName'
--
-- * 'ccfDNSIPAddrs'
createConditionalForwarder
:: Text -- ^ 'ccfDirectoryId'
-> Text -- ^ 'ccfRemoteDomainName'
-> CreateConditionalForwarder
createConditionalForwarder pDirectoryId_ pRemoteDomainName_ =
CreateConditionalForwarder'
{ _ccfDirectoryId = pDirectoryId_
, _ccfRemoteDomainName = pRemoteDomainName_
, _ccfDNSIPAddrs = mempty
}

-- | The directory ID of the AWS directory for which you are creating the
-- conditional forwarder.
ccfDirectoryId :: Lens' CreateConditionalForwarder Text
ccfDirectoryId = lens _ccfDirectoryId (\ s a -> s{_ccfDirectoryId = a});

-- | The fully qualified domain name (FQDN) of the remote domain with which
-- you will set up a trust relationship.
ccfRemoteDomainName :: Lens' CreateConditionalForwarder Text
ccfRemoteDomainName = lens _ccfRemoteDomainName (\ s a -> s{_ccfRemoteDomainName = a});

-- | The IP addresses of the remote DNS server associated with
-- RemoteDomainName.
ccfDNSIPAddrs :: Lens' CreateConditionalForwarder [Text]
ccfDNSIPAddrs = lens _ccfDNSIPAddrs (\ s a -> s{_ccfDNSIPAddrs = a}) . _Coerce;

instance AWSRequest CreateConditionalForwarder where
type Rs CreateConditionalForwarder =
CreateConditionalForwarderResponse
request = postJSON directoryService
response
= receiveEmpty
(\ s h x ->
CreateConditionalForwarderResponse' <$>
(pure (fromEnum s)))

instance Hashable CreateConditionalForwarder

instance NFData CreateConditionalForwarder

instance ToHeaders CreateConditionalForwarder where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DirectoryService_20150416.CreateConditionalForwarder"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])

instance ToJSON CreateConditionalForwarder where
toJSON CreateConditionalForwarder'{..}
= object
(catMaybes
[Just ("DirectoryId" .= _ccfDirectoryId),
Just ("RemoteDomainName" .= _ccfRemoteDomainName),
Just ("DnsIpAddrs" .= _ccfDNSIPAddrs)])

instance ToPath CreateConditionalForwarder where
toPath = const "/"

instance ToQuery CreateConditionalForwarder where
toQuery = const mempty

-- | /See:/ 'createConditionalForwarderResponse' smart constructor.
newtype CreateConditionalForwarderResponse = CreateConditionalForwarderResponse'
{ _ccfrsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateConditionalForwarderResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ccfrsResponseStatus'
createConditionalForwarderResponse
:: Int -- ^ 'ccfrsResponseStatus'
-> CreateConditionalForwarderResponse
createConditionalForwarderResponse pResponseStatus_ =
CreateConditionalForwarderResponse'
{ _ccfrsResponseStatus = pResponseStatus_
}

-- | The response status code.
ccfrsResponseStatus :: Lens' CreateConditionalForwarderResponse Int
ccfrsResponseStatus = lens _ccfrsResponseStatus (\ s a -> s{_ccfrsResponseStatus = a});

instance NFData CreateConditionalForwarderResponse
25 changes: 18 additions & 7 deletions amazonka-ds/gen/Network/AWS/DirectoryService/CreateTrust.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module Network.AWS.DirectoryService.CreateTrust
createTrust
, CreateTrust
-- * Request Lenses
, ctConditionalForwarderIPAddrs
, ctTrustType
, ctDirectoryId
, ctRemoteDomainName
Expand Down Expand Up @@ -68,17 +69,20 @@ import Network.AWS.Response
--
-- /See:/ 'createTrust' smart constructor.
data CreateTrust = CreateTrust'
{ _ctTrustType :: !(Maybe TrustType)
, _ctDirectoryId :: !Text
, _ctRemoteDomainName :: !Text
, _ctTrustPassword :: !(Sensitive Text)
, _ctTrustDirection :: !TrustDirection
{ _ctConditionalForwarderIPAddrs :: !(Maybe [Text])
, _ctTrustType :: !(Maybe TrustType)
, _ctDirectoryId :: !Text
, _ctRemoteDomainName :: !Text
, _ctTrustPassword :: !(Sensitive Text)
, _ctTrustDirection :: !TrustDirection
} deriving (Eq,Read,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateTrust' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ctConditionalForwarderIPAddrs'
--
-- * 'ctTrustType'
--
-- * 'ctDirectoryId'
Expand All @@ -96,13 +100,18 @@ createTrust
-> CreateTrust
createTrust pDirectoryId_ pRemoteDomainName_ pTrustPassword_ pTrustDirection_ =
CreateTrust'
{ _ctTrustType = Nothing
{ _ctConditionalForwarderIPAddrs = Nothing
, _ctTrustType = Nothing
, _ctDirectoryId = pDirectoryId_
, _ctRemoteDomainName = pRemoteDomainName_
, _ctTrustPassword = _Sensitive # pTrustPassword_
, _ctTrustDirection = pTrustDirection_
}

-- | Undocumented member.
ctConditionalForwarderIPAddrs :: Lens' CreateTrust [Text]
ctConditionalForwarderIPAddrs = lens _ctConditionalForwarderIPAddrs (\ s a -> s{_ctConditionalForwarderIPAddrs = a}) . _Default . _Coerce;

-- | The trust relationship type.
ctTrustType :: Lens' CreateTrust (Maybe TrustType)
ctTrustType = lens _ctTrustType (\ s a -> s{_ctTrustType = a});
Expand Down Expand Up @@ -153,7 +162,9 @@ instance ToJSON CreateTrust where
toJSON CreateTrust'{..}
= object
(catMaybes
[("TrustType" .=) <$> _ctTrustType,
[("ConditionalForwarderIpAddrs" .=) <$>
_ctConditionalForwarderIPAddrs,
("TrustType" .=) <$> _ctTrustType,
Just ("DirectoryId" .= _ctDirectoryId),
Just ("RemoteDomainName" .= _ctRemoteDomainName),
Just ("TrustPassword" .= _ctTrustPassword),
Expand Down
Loading

0 comments on commit 35fb573

Please sign in to comment.