-
-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerating Redshift from latest service definition
- Loading branch information
1 parent
488c620
commit baffabf
Showing
12 changed files
with
300 additions
and
5 deletions.
There are no files selected for viewing
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
Empty file.
Empty file.
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
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
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
158 changes: 158 additions & 0 deletions
158
amazonka-redshift/gen/Network/AWS/Redshift/ModifyClusterIAMRoles.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,158 @@ | ||
{-# 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.Redshift.ModifyClusterIAMRoles | ||
-- 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) | ||
-- | ||
-- Modifies the list of AWS Identity and Access Management (IAM) roles that | ||
-- can be used by the cluster to access other AWS services. | ||
-- | ||
-- A cluster can have up to 10 IAM roles associated at any time. | ||
module Network.AWS.Redshift.ModifyClusterIAMRoles | ||
( | ||
-- * Creating a Request | ||
modifyClusterIAMRoles | ||
, ModifyClusterIAMRoles | ||
-- * Request Lenses | ||
, mcirRemoveIAMRoles | ||
, mcirAddIAMRoles | ||
, mcirClusterIdentifier | ||
|
||
-- * Destructuring the Response | ||
, modifyClusterIAMRolesResponse | ||
, ModifyClusterIAMRolesResponse | ||
-- * Response Lenses | ||
, mcirrsCluster | ||
, mcirrsResponseStatus | ||
) where | ||
|
||
import Network.AWS.Lens | ||
import Network.AWS.Prelude | ||
import Network.AWS.Redshift.Types | ||
import Network.AWS.Redshift.Types.Product | ||
import Network.AWS.Request | ||
import Network.AWS.Response | ||
|
||
-- | | ||
-- | ||
-- /See:/ 'modifyClusterIAMRoles' smart constructor. | ||
data ModifyClusterIAMRoles = ModifyClusterIAMRoles' | ||
{ _mcirRemoveIAMRoles :: !(Maybe [Text]) | ||
, _mcirAddIAMRoles :: !(Maybe [Text]) | ||
, _mcirClusterIdentifier :: !Text | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'ModifyClusterIAMRoles' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'mcirRemoveIAMRoles' | ||
-- | ||
-- * 'mcirAddIAMRoles' | ||
-- | ||
-- * 'mcirClusterIdentifier' | ||
modifyClusterIAMRoles | ||
:: Text -- ^ 'mcirClusterIdentifier' | ||
-> ModifyClusterIAMRoles | ||
modifyClusterIAMRoles pClusterIdentifier_ = | ||
ModifyClusterIAMRoles' | ||
{ _mcirRemoveIAMRoles = Nothing | ||
, _mcirAddIAMRoles = Nothing | ||
, _mcirClusterIdentifier = pClusterIdentifier_ | ||
} | ||
|
||
-- | Zero or more IAM roles (in their ARN format) to disassociate from the | ||
-- cluster. You can disassociate up to 10 IAM roles from a single cluster | ||
-- in a single request. | ||
mcirRemoveIAMRoles :: Lens' ModifyClusterIAMRoles [Text] | ||
mcirRemoveIAMRoles = lens _mcirRemoveIAMRoles (\ s a -> s{_mcirRemoveIAMRoles = a}) . _Default . _Coerce; | ||
|
||
-- | Zero or more IAM roles (in their ARN format) to associate with the | ||
-- cluster. You can associate up to 10 IAM roles with a single cluster in a | ||
-- single request. | ||
mcirAddIAMRoles :: Lens' ModifyClusterIAMRoles [Text] | ||
mcirAddIAMRoles = lens _mcirAddIAMRoles (\ s a -> s{_mcirAddIAMRoles = a}) . _Default . _Coerce; | ||
|
||
-- | The unique identifier of the cluster for which you want to associate or | ||
-- disassociate IAM roles. | ||
mcirClusterIdentifier :: Lens' ModifyClusterIAMRoles Text | ||
mcirClusterIdentifier = lens _mcirClusterIdentifier (\ s a -> s{_mcirClusterIdentifier = a}); | ||
|
||
instance AWSRequest ModifyClusterIAMRoles where | ||
type Rs ModifyClusterIAMRoles = | ||
ModifyClusterIAMRolesResponse | ||
request = postQuery redshift | ||
response | ||
= receiveXMLWrapper "ModifyClusterIamRolesResult" | ||
(\ s h x -> | ||
ModifyClusterIAMRolesResponse' <$> | ||
(x .@? "Cluster") <*> (pure (fromEnum s))) | ||
|
||
instance Hashable ModifyClusterIAMRoles | ||
|
||
instance NFData ModifyClusterIAMRoles | ||
|
||
instance ToHeaders ModifyClusterIAMRoles where | ||
toHeaders = const mempty | ||
|
||
instance ToPath ModifyClusterIAMRoles where | ||
toPath = const "/" | ||
|
||
instance ToQuery ModifyClusterIAMRoles where | ||
toQuery ModifyClusterIAMRoles'{..} | ||
= mconcat | ||
["Action" =: ("ModifyClusterIamRoles" :: ByteString), | ||
"Version" =: ("2012-12-01" :: ByteString), | ||
"RemoveIamRoles" =: | ||
toQuery | ||
(toQueryList "IamRoleArn" <$> _mcirRemoveIAMRoles), | ||
"AddIamRoles" =: | ||
toQuery | ||
(toQueryList "IamRoleArn" <$> _mcirAddIAMRoles), | ||
"ClusterIdentifier" =: _mcirClusterIdentifier] | ||
|
||
-- | /See:/ 'modifyClusterIAMRolesResponse' smart constructor. | ||
data ModifyClusterIAMRolesResponse = ModifyClusterIAMRolesResponse' | ||
{ _mcirrsCluster :: !(Maybe Cluster) | ||
, _mcirrsResponseStatus :: !Int | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'ModifyClusterIAMRolesResponse' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'mcirrsCluster' | ||
-- | ||
-- * 'mcirrsResponseStatus' | ||
modifyClusterIAMRolesResponse | ||
:: Int -- ^ 'mcirrsResponseStatus' | ||
-> ModifyClusterIAMRolesResponse | ||
modifyClusterIAMRolesResponse pResponseStatus_ = | ||
ModifyClusterIAMRolesResponse' | ||
{ _mcirrsCluster = Nothing | ||
, _mcirrsResponseStatus = pResponseStatus_ | ||
} | ||
|
||
-- | Undocumented member. | ||
mcirrsCluster :: Lens' ModifyClusterIAMRolesResponse (Maybe Cluster) | ||
mcirrsCluster = lens _mcirrsCluster (\ s a -> s{_mcirrsCluster = a}); | ||
|
||
-- | The response status code. | ||
mcirrsResponseStatus :: Lens' ModifyClusterIAMRolesResponse Int | ||
mcirrsResponseStatus = lens _mcirrsResponseStatus (\ s a -> s{_mcirrsResponseStatus = a}); | ||
|
||
instance NFData ModifyClusterIAMRolesResponse |
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
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
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
Oops, something went wrong.