forked from brendanhay/amazonka
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding new DirectoryService operations
- Loading branch information
1 parent
752012d
commit 19d8740
Showing
18 changed files
with
909 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
185 changes: 185 additions & 0 deletions
185
amazonka-ds/gen/Network/AWS/DirectoryService/AddIPRoutes.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
{-# 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.AddIPRoutes | ||
-- Copyright : (c) 2013-2016 Brendan Hay | ||
-- License : Mozilla Public License, v. 2.0. | ||
-- Maintainer : Brendan Hay <[email protected]> | ||
-- Stability : auto-generated | ||
-- Portability : non-portable (GHC extensions) | ||
-- | ||
-- If the DNS server for your on-premises domain uses a publicly addressable IP address, you must add a CIDR address block to correctly route traffic to and from your Microsoft AD on Amazon Web Services. /AddIpRoutes/ adds this address block. You can also use /AddIpRoutes/ to facilitate routing traffic that uses public IP ranges from your Microsoft AD on AWS to a peer VPC. | ||
module Network.AWS.DirectoryService.AddIPRoutes | ||
( | ||
-- * Creating a Request | ||
addIPRoutes | ||
, AddIPRoutes | ||
-- * Request Lenses | ||
, airUpdateSecurityGroupForDirectoryControllers | ||
, airDirectoryId | ||
, airIPRoutes | ||
|
||
-- * Destructuring the Response | ||
, addIPRoutesResponse | ||
, AddIPRoutesResponse | ||
-- * Response Lenses | ||
, airrsResponseStatus | ||
) 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 | ||
|
||
-- | /See:/ 'addIPRoutes' smart constructor. | ||
data AddIPRoutes = AddIPRoutes' | ||
{ _airUpdateSecurityGroupForDirectoryControllers :: !(Maybe Bool) | ||
, _airDirectoryId :: !Text | ||
, _airIPRoutes :: ![IPRoute] | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'AddIPRoutes' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'airUpdateSecurityGroupForDirectoryControllers' | ||
-- | ||
-- * 'airDirectoryId' | ||
-- | ||
-- * 'airIPRoutes' | ||
addIPRoutes | ||
:: Text -- ^ 'airDirectoryId' | ||
-> AddIPRoutes | ||
addIPRoutes pDirectoryId_ = | ||
AddIPRoutes' | ||
{ _airUpdateSecurityGroupForDirectoryControllers = Nothing | ||
, _airDirectoryId = pDirectoryId_ | ||
, _airIPRoutes = mempty | ||
} | ||
|
||
-- | If set to true, updates the inbound and outbound rules of the security group that has the description: \"AWS created security group for /directory ID/ directory controllers.\" Following are the new rules: | ||
-- | ||
-- Inbound: | ||
-- | ||
-- - Type: Custom UDP Rule, Protocol: UDP, Range: 88, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: Custom UDP Rule, Protocol: UDP, Range: 123, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: Custom UDP Rule, Protocol: UDP, Range: 138, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: Custom UDP Rule, Protocol: UDP, Range: 389, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: Custom UDP Rule, Protocol: UDP, Range: 464, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: Custom UDP Rule, Protocol: UDP, Range: 445, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: Custom TCP Rule, Protocol: TCP, Range: 88, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: Custom TCP Rule, Protocol: TCP, Range: 135, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: Custom TCP Rule, Protocol: TCP, Range: 445, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: Custom TCP Rule, Protocol: TCP, Range: 464, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: Custom TCP Rule, Protocol: TCP, Range: 636, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: Custom TCP Rule, Protocol: TCP, Range: 1024-65535, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: Custom TCP Rule, Protocol: TCP, Range: 3268-33269, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: DNS (UDP), Protocol: UDP, Range: 53, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: DNS (TCP), Protocol: TCP, Range: 53, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: LDAP, Protocol: TCP, Range: 389, Source: 0.0.0.0\/0 | ||
-- | ||
-- - Type: All ICMP, Protocol: All, Range: N\/A, Source: 0.0.0.0\/0 | ||
-- | ||
-- Outbound: | ||
-- | ||
-- - Type: All traffic, Protocol: All, Range: All, Destination: 0.0.0.0\/0 | ||
-- | ||
-- These security rules impact an internal network interface that is not exposed publicly. | ||
airUpdateSecurityGroupForDirectoryControllers :: Lens' AddIPRoutes (Maybe Bool) | ||
airUpdateSecurityGroupForDirectoryControllers = lens _airUpdateSecurityGroupForDirectoryControllers (\ s a -> s{_airUpdateSecurityGroupForDirectoryControllers = a}); | ||
|
||
-- | Identifier (ID) of the directory to which to add the address block. | ||
airDirectoryId :: Lens' AddIPRoutes Text | ||
airDirectoryId = lens _airDirectoryId (\ s a -> s{_airDirectoryId = a}); | ||
|
||
-- | IP address blocks, using CIDR format, of the traffic to route. This is often the IP address block of the DNS server used for your on-premises domain. | ||
airIPRoutes :: Lens' AddIPRoutes [IPRoute] | ||
airIPRoutes = lens _airIPRoutes (\ s a -> s{_airIPRoutes = a}) . _Coerce; | ||
|
||
instance AWSRequest AddIPRoutes where | ||
type Rs AddIPRoutes = AddIPRoutesResponse | ||
request = postJSON directoryService | ||
response | ||
= receiveEmpty | ||
(\ s h x -> | ||
AddIPRoutesResponse' <$> (pure (fromEnum s))) | ||
|
||
instance Hashable AddIPRoutes | ||
|
||
instance NFData AddIPRoutes | ||
|
||
instance ToHeaders AddIPRoutes where | ||
toHeaders | ||
= const | ||
(mconcat | ||
["X-Amz-Target" =# | ||
("DirectoryService_20150416.AddIpRoutes" :: | ||
ByteString), | ||
"Content-Type" =# | ||
("application/x-amz-json-1.1" :: ByteString)]) | ||
|
||
instance ToJSON AddIPRoutes where | ||
toJSON AddIPRoutes'{..} | ||
= object | ||
(catMaybes | ||
[("UpdateSecurityGroupForDirectoryControllers" .=) | ||
<$> _airUpdateSecurityGroupForDirectoryControllers, | ||
Just ("DirectoryId" .= _airDirectoryId), | ||
Just ("IpRoutes" .= _airIPRoutes)]) | ||
|
||
instance ToPath AddIPRoutes where | ||
toPath = const "/" | ||
|
||
instance ToQuery AddIPRoutes where | ||
toQuery = const mempty | ||
|
||
-- | /See:/ 'addIPRoutesResponse' smart constructor. | ||
newtype AddIPRoutesResponse = AddIPRoutesResponse' | ||
{ _airrsResponseStatus :: Int | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'AddIPRoutesResponse' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'airrsResponseStatus' | ||
addIPRoutesResponse | ||
:: Int -- ^ 'airrsResponseStatus' | ||
-> AddIPRoutesResponse | ||
addIPRoutesResponse pResponseStatus_ = | ||
AddIPRoutesResponse' | ||
{ _airrsResponseStatus = pResponseStatus_ | ||
} | ||
|
||
-- | The response status code. | ||
airrsResponseStatus :: Lens' AddIPRoutesResponse Int | ||
airrsResponseStatus = lens _airrsResponseStatus (\ s a -> s{_airrsResponseStatus = a}); | ||
|
||
instance NFData AddIPRoutesResponse |
132 changes: 132 additions & 0 deletions
132
amazonka-ds/gen/Network/AWS/DirectoryService/AddTagsToResource.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
{-# 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.AddTagsToResource | ||
-- Copyright : (c) 2013-2016 Brendan Hay | ||
-- License : Mozilla Public License, v. 2.0. | ||
-- Maintainer : Brendan Hay <[email protected]> | ||
-- Stability : auto-generated | ||
-- Portability : non-portable (GHC extensions) | ||
-- | ||
-- Adds or overwrites one or more tags for the specified Amazon Directory Services directory. Each directory can have a maximum of 10 tags. Each tag consists of a key and optional value. Tag keys must be unique to each resource. | ||
module Network.AWS.DirectoryService.AddTagsToResource | ||
( | ||
-- * Creating a Request | ||
addTagsToResource | ||
, AddTagsToResource | ||
-- * Request Lenses | ||
, attrResourceId | ||
, attrTags | ||
|
||
-- * Destructuring the Response | ||
, addTagsToResourceResponse | ||
, AddTagsToResourceResponse | ||
-- * Response Lenses | ||
, attrrsResponseStatus | ||
) 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 | ||
|
||
-- | /See:/ 'addTagsToResource' smart constructor. | ||
data AddTagsToResource = AddTagsToResource' | ||
{ _attrResourceId :: !Text | ||
, _attrTags :: ![Tag] | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'AddTagsToResource' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'attrResourceId' | ||
-- | ||
-- * 'attrTags' | ||
addTagsToResource | ||
:: Text -- ^ 'attrResourceId' | ||
-> AddTagsToResource | ||
addTagsToResource pResourceId_ = | ||
AddTagsToResource' | ||
{ _attrResourceId = pResourceId_ | ||
, _attrTags = mempty | ||
} | ||
|
||
-- | Identifier (ID) for the directory to which to add the tag. | ||
attrResourceId :: Lens' AddTagsToResource Text | ||
attrResourceId = lens _attrResourceId (\ s a -> s{_attrResourceId = a}); | ||
|
||
-- | The tags to be assigned to the Amazon Directory Services directory. | ||
attrTags :: Lens' AddTagsToResource [Tag] | ||
attrTags = lens _attrTags (\ s a -> s{_attrTags = a}) . _Coerce; | ||
|
||
instance AWSRequest AddTagsToResource where | ||
type Rs AddTagsToResource = AddTagsToResourceResponse | ||
request = postJSON directoryService | ||
response | ||
= receiveEmpty | ||
(\ s h x -> | ||
AddTagsToResourceResponse' <$> (pure (fromEnum s))) | ||
|
||
instance Hashable AddTagsToResource | ||
|
||
instance NFData AddTagsToResource | ||
|
||
instance ToHeaders AddTagsToResource where | ||
toHeaders | ||
= const | ||
(mconcat | ||
["X-Amz-Target" =# | ||
("DirectoryService_20150416.AddTagsToResource" :: | ||
ByteString), | ||
"Content-Type" =# | ||
("application/x-amz-json-1.1" :: ByteString)]) | ||
|
||
instance ToJSON AddTagsToResource where | ||
toJSON AddTagsToResource'{..} | ||
= object | ||
(catMaybes | ||
[Just ("ResourceId" .= _attrResourceId), | ||
Just ("Tags" .= _attrTags)]) | ||
|
||
instance ToPath AddTagsToResource where | ||
toPath = const "/" | ||
|
||
instance ToQuery AddTagsToResource where | ||
toQuery = const mempty | ||
|
||
-- | /See:/ 'addTagsToResourceResponse' smart constructor. | ||
newtype AddTagsToResourceResponse = AddTagsToResourceResponse' | ||
{ _attrrsResponseStatus :: Int | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'AddTagsToResourceResponse' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'attrrsResponseStatus' | ||
addTagsToResourceResponse | ||
:: Int -- ^ 'attrrsResponseStatus' | ||
-> AddTagsToResourceResponse | ||
addTagsToResourceResponse pResponseStatus_ = | ||
AddTagsToResourceResponse' | ||
{ _attrrsResponseStatus = pResponseStatus_ | ||
} | ||
|
||
-- | The response status code. | ||
attrrsResponseStatus :: Lens' AddTagsToResourceResponse Int | ||
attrrsResponseStatus = lens _attrrsResponseStatus (\ s a -> s{_attrrsResponseStatus = a}); | ||
|
||
instance NFData AddTagsToResourceResponse |
Oops, something went wrong.