amazonka-cloudtrail 1.4.5 → 1.5.0
raw patch · 23 files changed
+812/−740 lines, 23 filesdep ~amazonka-cloudtraildep ~amazonka-coredep ~amazonka-testPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: amazonka-cloudtrail, amazonka-core, amazonka-test
API changes (from Hackage documentation)
+ Network.AWS.CloudTrail.LookupEvents: instance Network.AWS.Pager.AWSPager Network.AWS.CloudTrail.LookupEvents.LookupEvents
- Network.AWS.CloudTrail.GetEventSelectors: gesTrailName :: Lens' GetEventSelectors (Maybe Text)
+ Network.AWS.CloudTrail.GetEventSelectors: gesTrailName :: Lens' GetEventSelectors Text
- Network.AWS.CloudTrail.GetEventSelectors: getEventSelectors :: GetEventSelectors
+ Network.AWS.CloudTrail.GetEventSelectors: getEventSelectors :: Text -> GetEventSelectors
- Network.AWS.CloudTrail.PutEventSelectors: pesTrailName :: Lens' PutEventSelectors (Maybe Text)
+ Network.AWS.CloudTrail.PutEventSelectors: pesTrailName :: Lens' PutEventSelectors Text
- Network.AWS.CloudTrail.PutEventSelectors: putEventSelectors :: PutEventSelectors
+ Network.AWS.CloudTrail.PutEventSelectors: putEventSelectors :: Text -> PutEventSelectors
Files
- README.md +1/−1
- amazonka-cloudtrail.cabal +16/−11
- gen/Network/AWS/CloudTrail.hs +19/−19
- gen/Network/AWS/CloudTrail/AddTags.hs +22/−23
- gen/Network/AWS/CloudTrail/CreateTrail.hs +69/−65
- gen/Network/AWS/CloudTrail/DeleteTrail.hs +21/−22
- gen/Network/AWS/CloudTrail/DescribeTrails.hs +24/−25
- gen/Network/AWS/CloudTrail/GetEventSelectors.hs +32/−30
- gen/Network/AWS/CloudTrail/GetTrailStatus.hs +57/−56
- gen/Network/AWS/CloudTrail/ListPublicKeys.hs +30/−29
- gen/Network/AWS/CloudTrail/ListTags.hs +30/−30
- gen/Network/AWS/CloudTrail/LookupEvents.hs +49/−33
- gen/Network/AWS/CloudTrail/PutEventSelectors.hs +42/−40
- gen/Network/AWS/CloudTrail/RemoveTags.hs +22/−23
- gen/Network/AWS/CloudTrail/StartLogging.hs +21/−22
- gen/Network/AWS/CloudTrail/StopLogging.hs +21/−22
- gen/Network/AWS/CloudTrail/Types.hs +101/−60
- gen/Network/AWS/CloudTrail/Types/Product.hs +138/−138
- gen/Network/AWS/CloudTrail/Types/Sum.hs +16/−14
- gen/Network/AWS/CloudTrail/UpdateTrail.hs +69/−65
- gen/Network/AWS/CloudTrail/Waiters.hs +6/−6
- test/Main.hs +2/−2
- test/Test/AWS/Gen/CloudTrail.hs +4/−4
README.md view
@@ -8,7 +8,7 @@ ## Version -`1.4.5`+`1.5.0` ## Description
amazonka-cloudtrail.cabal view
@@ -1,13 +1,13 @@ name: amazonka-cloudtrail-version: 1.4.5+version: 1.5.0 synopsis: Amazon CloudTrail SDK. homepage: https://github.com/brendanhay/amazonka bug-reports: https://github.com/brendanhay/amazonka/issues-license: OtherLicense+license: MPL-2.0 license-file: LICENSE author: Brendan Hay-maintainer: Brendan Hay <brendan.g.hay@gmail.com>-copyright: Copyright (c) 2013-2016 Brendan Hay+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>+copyright: Copyright (c) 2013-2017 Brendan Hay category: Network, AWS, Cloud, Distributed Computing build-type: Simple cabal-version: >= 1.10@@ -29,14 +29,19 @@ to get started. source-repository head- type: git- location: git://github.com/brendanhay/amazonka.git+ type: git+ location: git://github.com/brendanhay/amazonka.git+ subdir: amazonka-cloudtrail library default-language: Haskell2010 hs-source-dirs: src gen - ghc-options: -Wall+ ghc-options:+ -Wall+ -fwarn-incomplete-uni-patterns+ -fwarn-incomplete-record-updates+ -funbox-strict-fields exposed-modules: Network.AWS.CloudTrail@@ -62,7 +67,7 @@ , Network.AWS.CloudTrail.Types.Sum build-depends:- amazonka-core == 1.4.5.*+ amazonka-core == 1.5.0.* , base >= 4.7 && < 5 test-suite amazonka-cloudtrail-test@@ -82,9 +87,9 @@ , Test.AWS.CloudTrail.Internal build-depends:- amazonka-core == 1.4.5.*- , amazonka-test == 1.4.5.*- , amazonka-cloudtrail == 1.4.5.*+ amazonka-core == 1.5.0.*+ , amazonka-test == 1.5.0.*+ , amazonka-cloudtrail , base , bytestring , tasty
gen/Network/AWS/CloudTrail.hs view
@@ -5,9 +5,9 @@ -- | -- Module : Network.AWS.CloudTrail--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -144,7 +144,7 @@ -- ** RemoveTags , module Network.AWS.CloudTrail.RemoveTags - -- ** LookupEvents+ -- ** LookupEvents (Paginated) , module Network.AWS.CloudTrail.LookupEvents -- ** StopLogging@@ -260,22 +260,22 @@ , tIsMultiRegionTrail ) where -import Network.AWS.CloudTrail.AddTags-import Network.AWS.CloudTrail.CreateTrail-import Network.AWS.CloudTrail.DeleteTrail-import Network.AWS.CloudTrail.DescribeTrails-import Network.AWS.CloudTrail.GetEventSelectors-import Network.AWS.CloudTrail.GetTrailStatus-import Network.AWS.CloudTrail.ListPublicKeys-import Network.AWS.CloudTrail.ListTags-import Network.AWS.CloudTrail.LookupEvents-import Network.AWS.CloudTrail.PutEventSelectors-import Network.AWS.CloudTrail.RemoveTags-import Network.AWS.CloudTrail.StartLogging-import Network.AWS.CloudTrail.StopLogging-import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.UpdateTrail-import Network.AWS.CloudTrail.Waiters+import Network.AWS.CloudTrail.AddTags+import Network.AWS.CloudTrail.CreateTrail+import Network.AWS.CloudTrail.DeleteTrail+import Network.AWS.CloudTrail.DescribeTrails+import Network.AWS.CloudTrail.GetEventSelectors+import Network.AWS.CloudTrail.GetTrailStatus+import Network.AWS.CloudTrail.ListPublicKeys+import Network.AWS.CloudTrail.ListTags+import Network.AWS.CloudTrail.LookupEvents+import Network.AWS.CloudTrail.PutEventSelectors+import Network.AWS.CloudTrail.RemoveTags+import Network.AWS.CloudTrail.StartLogging+import Network.AWS.CloudTrail.StopLogging+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.UpdateTrail+import Network.AWS.CloudTrail.Waiters {- $errors Error matchers are designed for use with the functions provided by
gen/Network/AWS/CloudTrail/AddTags.hs view
@@ -12,9 +12,9 @@ -- | -- Module : Network.AWS.CloudTrail.AddTags--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -37,12 +37,12 @@ , atrsResponseStatus ) where -import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response -- | Specifies the tags to add to a trail. --@@ -50,10 +50,11 @@ -- -- /See:/ 'addTags' smart constructor. data AddTags = AddTags'- { _atTagsList :: !(Maybe [Tag])- , _atResourceId :: !Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _atTagsList :: !(Maybe [Tag])+ , _atResourceId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'AddTags' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -65,11 +66,9 @@ :: Text -- ^ 'atResourceId' -> AddTags addTags pResourceId_ =- AddTags'- { _atTagsList = Nothing- , _atResourceId = pResourceId_- }+ AddTags' {_atTagsList = Nothing, _atResourceId = pResourceId_} + -- | Contains a list of CloudTrail tags, up to a limit of 50 atTagsList :: Lens' AddTags [Tag] atTagsList = lens _atTagsList (\ s a -> s{_atTagsList = a}) . _Default . _Coerce;@@ -85,9 +84,9 @@ = receiveEmpty (\ s h x -> AddTagsResponse' <$> (pure (fromEnum s))) -instance Hashable AddTags+instance Hashable AddTags where -instance NFData AddTags+instance NFData AddTags where instance ToHeaders AddTags where toHeaders@@ -118,9 +117,10 @@ -- -- /See:/ 'addTagsResponse' smart constructor. newtype AddTagsResponse = AddTagsResponse'- { _atrsResponseStatus :: Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _atrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'AddTagsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -130,12 +130,11 @@ :: Int -- ^ 'atrsResponseStatus' -> AddTagsResponse addTagsResponse pResponseStatus_ =- AddTagsResponse'- { _atrsResponseStatus = pResponseStatus_- }+ AddTagsResponse' {_atrsResponseStatus = pResponseStatus_} + -- | -- | The response status code. atrsResponseStatus :: Lens' AddTagsResponse Int atrsResponseStatus = lens _atrsResponseStatus (\ s a -> s{_atrsResponseStatus = a}); -instance NFData AddTagsResponse+instance NFData AddTagsResponse where
gen/Network/AWS/CloudTrail/CreateTrail.hs view
@@ -12,9 +12,9 @@ -- | -- Module : Network.AWS.CloudTrail.CreateTrail--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -57,12 +57,12 @@ , ctrsResponseStatus ) where -import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response -- | Specifies the settings for each trail. --@@ -70,18 +70,19 @@ -- -- /See:/ 'createTrail' smart constructor. data CreateTrail = CreateTrail'- { _ctS3KeyPrefix :: !(Maybe Text)- , _ctSNSTopicName :: !(Maybe Text)- , _ctEnableLogFileValidation :: !(Maybe Bool)- , _ctCloudWatchLogsLogGroupARN :: !(Maybe Text)- , _ctKMSKeyId :: !(Maybe Text)- , _ctIncludeGlobalServiceEvents :: !(Maybe Bool)- , _ctCloudWatchLogsRoleARN :: !(Maybe Text)- , _ctIsMultiRegionTrail :: !(Maybe Bool)- , _ctName :: !Text- , _ctS3BucketName :: !Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _ctS3KeyPrefix :: !(Maybe Text)+ , _ctSNSTopicName :: !(Maybe Text)+ , _ctEnableLogFileValidation :: !(Maybe Bool)+ , _ctCloudWatchLogsLogGroupARN :: !(Maybe Text)+ , _ctKMSKeyId :: !(Maybe Text)+ , _ctIncludeGlobalServiceEvents :: !(Maybe Bool)+ , _ctCloudWatchLogsRoleARN :: !(Maybe Text)+ , _ctIsMultiRegionTrail :: !(Maybe Bool)+ , _ctName :: !Text+ , _ctS3BucketName :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'CreateTrail' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -94,7 +95,7 @@ -- -- * 'ctCloudWatchLogsLogGroupARN' - Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. Not required unless you specify CloudWatchLogsRoleArn. ----- * 'ctKMSKeyId' - Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be a an alias name prefixed by "alias/", a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier. Examples: * alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 * 12345678-1234-1234-1234-123456789012+-- * 'ctKMSKeyId' - Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by "alias/", a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier. Examples: * alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 * 12345678-1234-1234-1234-123456789012 -- -- * 'ctIncludeGlobalServiceEvents' - Specifies whether the trail is publishing events from global services such as IAM to the log files. --@@ -110,19 +111,20 @@ -> Text -- ^ 'ctS3BucketName' -> CreateTrail createTrail pName_ pS3BucketName_ =- CreateTrail'- { _ctS3KeyPrefix = Nothing- , _ctSNSTopicName = Nothing- , _ctEnableLogFileValidation = Nothing- , _ctCloudWatchLogsLogGroupARN = Nothing- , _ctKMSKeyId = Nothing- , _ctIncludeGlobalServiceEvents = Nothing- , _ctCloudWatchLogsRoleARN = Nothing- , _ctIsMultiRegionTrail = Nothing- , _ctName = pName_- , _ctS3BucketName = pS3BucketName_- }+ CreateTrail'+ { _ctS3KeyPrefix = Nothing+ , _ctSNSTopicName = Nothing+ , _ctEnableLogFileValidation = Nothing+ , _ctCloudWatchLogsLogGroupARN = Nothing+ , _ctKMSKeyId = Nothing+ , _ctIncludeGlobalServiceEvents = Nothing+ , _ctCloudWatchLogsRoleARN = Nothing+ , _ctIsMultiRegionTrail = Nothing+ , _ctName = pName_+ , _ctS3BucketName = pS3BucketName_+ } + -- | Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html Finding Your CloudTrail Log Files> . The maximum length is 200 characters. ctS3KeyPrefix :: Lens' CreateTrail (Maybe Text) ctS3KeyPrefix = lens _ctS3KeyPrefix (\ s a -> s{_ctS3KeyPrefix = a});@@ -139,7 +141,7 @@ ctCloudWatchLogsLogGroupARN :: Lens' CreateTrail (Maybe Text) ctCloudWatchLogsLogGroupARN = lens _ctCloudWatchLogsLogGroupARN (\ s a -> s{_ctCloudWatchLogsLogGroupARN = a}); --- | Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be a an alias name prefixed by "alias/", a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier. Examples: * alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 * 12345678-1234-1234-1234-123456789012+-- | Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by "alias/", a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier. Examples: * alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 * 12345678-1234-1234-1234-123456789012 ctKMSKeyId :: Lens' CreateTrail (Maybe Text) ctKMSKeyId = lens _ctKMSKeyId (\ s a -> s{_ctKMSKeyId = a}); @@ -184,9 +186,9 @@ <*> (x .?> "IsMultiRegionTrail") <*> (pure (fromEnum s))) -instance Hashable CreateTrail+instance Hashable CreateTrail where -instance NFData CreateTrail+instance NFData CreateTrail where instance ToHeaders CreateTrail where toHeaders@@ -229,21 +231,22 @@ -- -- /See:/ 'createTrailResponse' smart constructor. data CreateTrailResponse = CreateTrailResponse'- { _ctrsLogFileValidationEnabled :: !(Maybe Bool)- , _ctrsTrailARN :: !(Maybe Text)- , _ctrsS3KeyPrefix :: !(Maybe Text)- , _ctrsSNSTopicARN :: !(Maybe Text)- , _ctrsSNSTopicName :: !(Maybe Text)- , _ctrsCloudWatchLogsLogGroupARN :: !(Maybe Text)- , _ctrsKMSKeyId :: !(Maybe Text)- , _ctrsName :: !(Maybe Text)- , _ctrsIncludeGlobalServiceEvents :: !(Maybe Bool)- , _ctrsCloudWatchLogsRoleARN :: !(Maybe Text)- , _ctrsS3BucketName :: !(Maybe Text)- , _ctrsIsMultiRegionTrail :: !(Maybe Bool)- , _ctrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _ctrsLogFileValidationEnabled :: !(Maybe Bool)+ , _ctrsTrailARN :: !(Maybe Text)+ , _ctrsS3KeyPrefix :: !(Maybe Text)+ , _ctrsSNSTopicARN :: !(Maybe Text)+ , _ctrsSNSTopicName :: !(Maybe Text)+ , _ctrsCloudWatchLogsLogGroupARN :: !(Maybe Text)+ , _ctrsKMSKeyId :: !(Maybe Text)+ , _ctrsName :: !(Maybe Text)+ , _ctrsIncludeGlobalServiceEvents :: !(Maybe Bool)+ , _ctrsCloudWatchLogsRoleARN :: !(Maybe Text)+ , _ctrsS3BucketName :: !(Maybe Text)+ , _ctrsIsMultiRegionTrail :: !(Maybe Bool)+ , _ctrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'CreateTrailResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -277,22 +280,23 @@ :: Int -- ^ 'ctrsResponseStatus' -> CreateTrailResponse createTrailResponse pResponseStatus_ =- CreateTrailResponse'- { _ctrsLogFileValidationEnabled = Nothing- , _ctrsTrailARN = Nothing- , _ctrsS3KeyPrefix = Nothing- , _ctrsSNSTopicARN = Nothing- , _ctrsSNSTopicName = Nothing- , _ctrsCloudWatchLogsLogGroupARN = Nothing- , _ctrsKMSKeyId = Nothing- , _ctrsName = Nothing- , _ctrsIncludeGlobalServiceEvents = Nothing- , _ctrsCloudWatchLogsRoleARN = Nothing- , _ctrsS3BucketName = Nothing- , _ctrsIsMultiRegionTrail = Nothing- , _ctrsResponseStatus = pResponseStatus_- }+ CreateTrailResponse'+ { _ctrsLogFileValidationEnabled = Nothing+ , _ctrsTrailARN = Nothing+ , _ctrsS3KeyPrefix = Nothing+ , _ctrsSNSTopicARN = Nothing+ , _ctrsSNSTopicName = Nothing+ , _ctrsCloudWatchLogsLogGroupARN = Nothing+ , _ctrsKMSKeyId = Nothing+ , _ctrsName = Nothing+ , _ctrsIncludeGlobalServiceEvents = Nothing+ , _ctrsCloudWatchLogsRoleARN = Nothing+ , _ctrsS3BucketName = Nothing+ , _ctrsIsMultiRegionTrail = Nothing+ , _ctrsResponseStatus = pResponseStatus_+ } + -- | Specifies whether log file integrity validation is enabled. ctrsLogFileValidationEnabled :: Lens' CreateTrailResponse (Maybe Bool) ctrsLogFileValidationEnabled = lens _ctrsLogFileValidationEnabled (\ s a -> s{_ctrsLogFileValidationEnabled = a});@@ -345,4 +349,4 @@ ctrsResponseStatus :: Lens' CreateTrailResponse Int ctrsResponseStatus = lens _ctrsResponseStatus (\ s a -> s{_ctrsResponseStatus = a}); -instance NFData CreateTrailResponse+instance NFData CreateTrailResponse where
gen/Network/AWS/CloudTrail/DeleteTrail.hs view
@@ -12,9 +12,9 @@ -- | -- Module : Network.AWS.CloudTrail.DeleteTrail--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -36,12 +36,12 @@ , drsResponseStatus ) where -import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response -- | The request that specifies the name of a trail to delete. --@@ -49,9 +49,10 @@ -- -- /See:/ 'deleteTrail' smart constructor. newtype DeleteTrail = DeleteTrail'- { _dtName :: Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _dtName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'DeleteTrail' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -60,11 +61,9 @@ deleteTrail :: Text -- ^ 'dtName' -> DeleteTrail-deleteTrail pName_ =- DeleteTrail'- { _dtName = pName_- }+deleteTrail pName_ = DeleteTrail' {_dtName = pName_} + -- | Specifies the name or the CloudTrail ARN of the trail to be deleted. The format of a trail ARN is: @arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail@ dtName :: Lens' DeleteTrail Text dtName = lens _dtName (\ s a -> s{_dtName = a});@@ -77,9 +76,9 @@ (\ s h x -> DeleteTrailResponse' <$> (pure (fromEnum s))) -instance Hashable DeleteTrail+instance Hashable DeleteTrail where -instance NFData DeleteTrail+instance NFData DeleteTrail where instance ToHeaders DeleteTrail where toHeaders@@ -107,9 +106,10 @@ -- -- /See:/ 'deleteTrailResponse' smart constructor. newtype DeleteTrailResponse = DeleteTrailResponse'- { _drsResponseStatus :: Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _drsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'DeleteTrailResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -119,12 +119,11 @@ :: Int -- ^ 'drsResponseStatus' -> DeleteTrailResponse deleteTrailResponse pResponseStatus_ =- DeleteTrailResponse'- { _drsResponseStatus = pResponseStatus_- }+ DeleteTrailResponse' {_drsResponseStatus = pResponseStatus_} + -- | -- | The response status code. drsResponseStatus :: Lens' DeleteTrailResponse Int drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a}); -instance NFData DeleteTrailResponse+instance NFData DeleteTrailResponse where
gen/Network/AWS/CloudTrail/DescribeTrails.hs view
@@ -12,9 +12,9 @@ -- | -- Module : Network.AWS.CloudTrail.DescribeTrails--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -38,12 +38,12 @@ , dtrsResponseStatus ) where -import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response -- | Returns information about the trail. --@@ -51,10 +51,11 @@ -- -- /See:/ 'describeTrails' smart constructor. data DescribeTrails = DescribeTrails'- { _dtIncludeShadowTrails :: !(Maybe Bool)- , _dtTrailNameList :: !(Maybe [Text])- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _dtIncludeShadowTrails :: !(Maybe Bool)+ , _dtTrailNameList :: !(Maybe [Text])+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'DescribeTrails' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -65,11 +66,9 @@ describeTrails :: DescribeTrails describeTrails =- DescribeTrails'- { _dtIncludeShadowTrails = Nothing- , _dtTrailNameList = Nothing- }+ DescribeTrails' {_dtIncludeShadowTrails = Nothing, _dtTrailNameList = Nothing} + -- | Specifies whether to include shadow trails in the response. A shadow trail is the replication in a region of a trail that was created in a different region. The default is true. dtIncludeShadowTrails :: Lens' DescribeTrails (Maybe Bool) dtIncludeShadowTrails = lens _dtIncludeShadowTrails (\ s a -> s{_dtIncludeShadowTrails = a});@@ -88,9 +87,9 @@ (x .?> "trailList" .!@ mempty) <*> (pure (fromEnum s))) -instance Hashable DescribeTrails+instance Hashable DescribeTrails where -instance NFData DescribeTrails+instance NFData DescribeTrails where instance ToHeaders DescribeTrails where toHeaders@@ -122,10 +121,11 @@ -- -- /See:/ 'describeTrailsResponse' smart constructor. data DescribeTrailsResponse = DescribeTrailsResponse'- { _dtrsTrailList :: !(Maybe [Trail])- , _dtrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _dtrsTrailList :: !(Maybe [Trail])+ , _dtrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'DescribeTrailsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -137,11 +137,10 @@ :: Int -- ^ 'dtrsResponseStatus' -> DescribeTrailsResponse describeTrailsResponse pResponseStatus_ =- DescribeTrailsResponse'- { _dtrsTrailList = Nothing- , _dtrsResponseStatus = pResponseStatus_- }+ DescribeTrailsResponse'+ {_dtrsTrailList = Nothing, _dtrsResponseStatus = pResponseStatus_} + -- | The list of trail objects. dtrsTrailList :: Lens' DescribeTrailsResponse [Trail] dtrsTrailList = lens _dtrsTrailList (\ s a -> s{_dtrsTrailList = a}) . _Default . _Coerce;@@ -150,4 +149,4 @@ dtrsResponseStatus :: Lens' DescribeTrailsResponse Int dtrsResponseStatus = lens _dtrsResponseStatus (\ s a -> s{_dtrsResponseStatus = a}); -instance NFData DescribeTrailsResponse+instance NFData DescribeTrailsResponse where
gen/Network/AWS/CloudTrail/GetEventSelectors.hs view
@@ -12,9 +12,9 @@ -- | -- Module : Network.AWS.CloudTrail.GetEventSelectors--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -29,7 +29,7 @@ -- -- ----- For more information, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-event-selectors-for-a-trail.html Configuring Event Selectors for Trails> in the /AWS CloudTrail User Guide/ .+-- For more information, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html Logging Data and Management Events for Trails > in the /AWS CloudTrail User Guide/ . -- module Network.AWS.CloudTrail.GetEventSelectors (@@ -48,32 +48,32 @@ , gesrsResponseStatus ) where -import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response -- | /See:/ 'getEventSelectors' smart constructor. newtype GetEventSelectors = GetEventSelectors'- { _gesTrailName :: Maybe Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _gesTrailName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'GetEventSelectors' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'gesTrailName' - Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements: * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-) * Start with a letter or number, and end with a letter or number * Be between 3 and 128 characters * Have no adjacent periods, underscores or dashes. Names like @my-_namespace@ and @my--namespace@ are invalid. * Not be in IP address format (for example, 192.168.5.4) If you specify a trail ARN, it must be in the format: @arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail@ getEventSelectors- :: GetEventSelectors-getEventSelectors =- GetEventSelectors'- { _gesTrailName = Nothing- }+ :: Text -- ^ 'gesTrailName'+ -> GetEventSelectors+getEventSelectors pTrailName_ = GetEventSelectors' {_gesTrailName = pTrailName_} + -- | Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements: * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-) * Start with a letter or number, and end with a letter or number * Be between 3 and 128 characters * Have no adjacent periods, underscores or dashes. Names like @my-_namespace@ and @my--namespace@ are invalid. * Not be in IP address format (for example, 192.168.5.4) If you specify a trail ARN, it must be in the format: @arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail@-gesTrailName :: Lens' GetEventSelectors (Maybe Text)+gesTrailName :: Lens' GetEventSelectors Text gesTrailName = lens _gesTrailName (\ s a -> s{_gesTrailName = a}); instance AWSRequest GetEventSelectors where@@ -87,9 +87,9 @@ (x .?> "EventSelectors" .!@ mempty) <*> (pure (fromEnum s))) -instance Hashable GetEventSelectors+instance Hashable GetEventSelectors where -instance NFData GetEventSelectors+instance NFData GetEventSelectors where instance ToHeaders GetEventSelectors where toHeaders@@ -104,7 +104,7 @@ instance ToJSON GetEventSelectors where toJSON GetEventSelectors'{..} = object- (catMaybes [("TrailName" .=) <$> _gesTrailName])+ (catMaybes [Just ("TrailName" .= _gesTrailName)]) instance ToPath GetEventSelectors where toPath = const "/"@@ -114,11 +114,12 @@ -- | /See:/ 'getEventSelectorsResponse' smart constructor. data GetEventSelectorsResponse = GetEventSelectorsResponse'- { _gesrsTrailARN :: !(Maybe Text)- , _gesrsEventSelectors :: !(Maybe [EventSelector])- , _gesrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _gesrsTrailARN :: !(Maybe Text)+ , _gesrsEventSelectors :: !(Maybe [EventSelector])+ , _gesrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'GetEventSelectorsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -132,12 +133,13 @@ :: Int -- ^ 'gesrsResponseStatus' -> GetEventSelectorsResponse getEventSelectorsResponse pResponseStatus_ =- GetEventSelectorsResponse'- { _gesrsTrailARN = Nothing- , _gesrsEventSelectors = Nothing- , _gesrsResponseStatus = pResponseStatus_- }+ GetEventSelectorsResponse'+ { _gesrsTrailARN = Nothing+ , _gesrsEventSelectors = Nothing+ , _gesrsResponseStatus = pResponseStatus_+ } + -- | The specified trail ARN that has the event selectors. gesrsTrailARN :: Lens' GetEventSelectorsResponse (Maybe Text) gesrsTrailARN = lens _gesrsTrailARN (\ s a -> s{_gesrsTrailARN = a});@@ -150,4 +152,4 @@ gesrsResponseStatus :: Lens' GetEventSelectorsResponse Int gesrsResponseStatus = lens _gesrsResponseStatus (\ s a -> s{_gesrsResponseStatus = a}); -instance NFData GetEventSelectorsResponse+instance NFData GetEventSelectorsResponse where
gen/Network/AWS/CloudTrail/GetTrailStatus.hs view
@@ -12,9 +12,9 @@ -- | -- Module : Network.AWS.CloudTrail.GetTrailStatus--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -53,12 +53,12 @@ , gtsrsResponseStatus ) where -import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response -- | The name of a trail about which you want the current status. --@@ -66,9 +66,10 @@ -- -- /See:/ 'getTrailStatus' smart constructor. newtype GetTrailStatus = GetTrailStatus'- { _gtsName :: Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _gtsName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'GetTrailStatus' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -77,11 +78,9 @@ getTrailStatus :: Text -- ^ 'gtsName' -> GetTrailStatus-getTrailStatus pName_ =- GetTrailStatus'- { _gtsName = pName_- }+getTrailStatus pName_ = GetTrailStatus' {_gtsName = pName_} + -- | Specifies the name or the CloudTrail ARN of the trail for which you are requesting status. To get the status of a shadow trail (a replication of the trail in another region), you must specify its ARN. The format of a trail ARN is: @arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail@ gtsName :: Lens' GetTrailStatus Text gtsName = lens _gtsName (\ s a -> s{_gtsName = a});@@ -112,9 +111,9 @@ <*> (x .?> "StopLoggingTime") <*> (pure (fromEnum s))) -instance Hashable GetTrailStatus+instance Hashable GetTrailStatus where -instance NFData GetTrailStatus+instance NFData GetTrailStatus where instance ToHeaders GetTrailStatus where toHeaders@@ -142,26 +141,27 @@ -- -- /See:/ 'getTrailStatusResponse' smart constructor. data GetTrailStatusResponse = GetTrailStatusResponse'- { _gtsrsTimeLoggingStopped :: !(Maybe Text)- , _gtsrsLatestDeliveryError :: !(Maybe Text)- , _gtsrsLatestDigestDeliveryTime :: !(Maybe POSIX)- , _gtsrsLatestNotificationAttemptSucceeded :: !(Maybe Text)- , _gtsrsStartLoggingTime :: !(Maybe POSIX)- , _gtsrsLatestNotificationError :: !(Maybe Text)- , _gtsrsLatestDeliveryAttemptSucceeded :: !(Maybe Text)- , _gtsrsIsLogging :: !(Maybe Bool)- , _gtsrsTimeLoggingStarted :: !(Maybe Text)- , _gtsrsLatestDigestDeliveryError :: !(Maybe Text)- , _gtsrsLatestDeliveryAttemptTime :: !(Maybe Text)- , _gtsrsLatestDeliveryTime :: !(Maybe POSIX)- , _gtsrsLatestCloudWatchLogsDeliveryTime :: !(Maybe POSIX)- , _gtsrsLatestCloudWatchLogsDeliveryError :: !(Maybe Text)- , _gtsrsLatestNotificationTime :: !(Maybe POSIX)- , _gtsrsLatestNotificationAttemptTime :: !(Maybe Text)- , _gtsrsStopLoggingTime :: !(Maybe POSIX)- , _gtsrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _gtsrsTimeLoggingStopped :: !(Maybe Text)+ , _gtsrsLatestDeliveryError :: !(Maybe Text)+ , _gtsrsLatestDigestDeliveryTime :: !(Maybe POSIX)+ , _gtsrsLatestNotificationAttemptSucceeded :: !(Maybe Text)+ , _gtsrsStartLoggingTime :: !(Maybe POSIX)+ , _gtsrsLatestNotificationError :: !(Maybe Text)+ , _gtsrsLatestDeliveryAttemptSucceeded :: !(Maybe Text)+ , _gtsrsIsLogging :: !(Maybe Bool)+ , _gtsrsTimeLoggingStarted :: !(Maybe Text)+ , _gtsrsLatestDigestDeliveryError :: !(Maybe Text)+ , _gtsrsLatestDeliveryAttemptTime :: !(Maybe Text)+ , _gtsrsLatestDeliveryTime :: !(Maybe POSIX)+ , _gtsrsLatestCloudWatchLogsDeliveryTime :: !(Maybe POSIX)+ , _gtsrsLatestCloudWatchLogsDeliveryError :: !(Maybe Text)+ , _gtsrsLatestNotificationTime :: !(Maybe POSIX)+ , _gtsrsLatestNotificationAttemptTime :: !(Maybe Text)+ , _gtsrsStopLoggingTime :: !(Maybe POSIX)+ , _gtsrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'GetTrailStatusResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -205,27 +205,28 @@ :: Int -- ^ 'gtsrsResponseStatus' -> GetTrailStatusResponse getTrailStatusResponse pResponseStatus_ =- GetTrailStatusResponse'- { _gtsrsTimeLoggingStopped = Nothing- , _gtsrsLatestDeliveryError = Nothing- , _gtsrsLatestDigestDeliveryTime = Nothing- , _gtsrsLatestNotificationAttemptSucceeded = Nothing- , _gtsrsStartLoggingTime = Nothing- , _gtsrsLatestNotificationError = Nothing- , _gtsrsLatestDeliveryAttemptSucceeded = Nothing- , _gtsrsIsLogging = Nothing- , _gtsrsTimeLoggingStarted = Nothing- , _gtsrsLatestDigestDeliveryError = Nothing- , _gtsrsLatestDeliveryAttemptTime = Nothing- , _gtsrsLatestDeliveryTime = Nothing- , _gtsrsLatestCloudWatchLogsDeliveryTime = Nothing- , _gtsrsLatestCloudWatchLogsDeliveryError = Nothing- , _gtsrsLatestNotificationTime = Nothing- , _gtsrsLatestNotificationAttemptTime = Nothing- , _gtsrsStopLoggingTime = Nothing- , _gtsrsResponseStatus = pResponseStatus_- }+ GetTrailStatusResponse'+ { _gtsrsTimeLoggingStopped = Nothing+ , _gtsrsLatestDeliveryError = Nothing+ , _gtsrsLatestDigestDeliveryTime = Nothing+ , _gtsrsLatestNotificationAttemptSucceeded = Nothing+ , _gtsrsStartLoggingTime = Nothing+ , _gtsrsLatestNotificationError = Nothing+ , _gtsrsLatestDeliveryAttemptSucceeded = Nothing+ , _gtsrsIsLogging = Nothing+ , _gtsrsTimeLoggingStarted = Nothing+ , _gtsrsLatestDigestDeliveryError = Nothing+ , _gtsrsLatestDeliveryAttemptTime = Nothing+ , _gtsrsLatestDeliveryTime = Nothing+ , _gtsrsLatestCloudWatchLogsDeliveryTime = Nothing+ , _gtsrsLatestCloudWatchLogsDeliveryError = Nothing+ , _gtsrsLatestNotificationTime = Nothing+ , _gtsrsLatestNotificationAttemptTime = Nothing+ , _gtsrsStopLoggingTime = Nothing+ , _gtsrsResponseStatus = pResponseStatus_+ } + -- | This field is deprecated. gtsrsTimeLoggingStopped :: Lens' GetTrailStatusResponse (Maybe Text) gtsrsTimeLoggingStopped = lens _gtsrsTimeLoggingStopped (\ s a -> s{_gtsrsTimeLoggingStopped = a});@@ -298,4 +299,4 @@ gtsrsResponseStatus :: Lens' GetTrailStatusResponse Int gtsrsResponseStatus = lens _gtsrsResponseStatus (\ s a -> s{_gtsrsResponseStatus = a}); -instance NFData GetTrailStatusResponse+instance NFData GetTrailStatusResponse where
gen/Network/AWS/CloudTrail/ListPublicKeys.hs view
@@ -12,9 +12,9 @@ -- | -- Module : Network.AWS.CloudTrail.ListPublicKeys--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -40,12 +40,12 @@ , lpkrsResponseStatus ) where -import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response -- | Requests the public keys for a specified time range. --@@ -53,11 +53,12 @@ -- -- /See:/ 'listPublicKeys' smart constructor. data ListPublicKeys = ListPublicKeys'- { _lpkStartTime :: !(Maybe POSIX)- , _lpkNextToken :: !(Maybe Text)- , _lpkEndTime :: !(Maybe POSIX)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _lpkStartTime :: !(Maybe POSIX)+ , _lpkNextToken :: !(Maybe Text)+ , _lpkEndTime :: !(Maybe POSIX)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'ListPublicKeys' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -70,12 +71,10 @@ listPublicKeys :: ListPublicKeys listPublicKeys =- ListPublicKeys'- { _lpkStartTime = Nothing- , _lpkNextToken = Nothing- , _lpkEndTime = Nothing- }+ ListPublicKeys'+ {_lpkStartTime = Nothing, _lpkNextToken = Nothing, _lpkEndTime = Nothing} + -- | Optionally specifies, in UTC, the start of the time range to look up public keys for CloudTrail digest files. If not specified, the current time is used, and the current public key is returned. lpkStartTime :: Lens' ListPublicKeys (Maybe UTCTime) lpkStartTime = lens _lpkStartTime (\ s a -> s{_lpkStartTime = a}) . mapping _Time;@@ -99,9 +98,9 @@ (x .?> "NextToken") <*> (pure (fromEnum s))) -instance Hashable ListPublicKeys+instance Hashable ListPublicKeys where -instance NFData ListPublicKeys+instance NFData ListPublicKeys where instance ToHeaders ListPublicKeys where toHeaders@@ -133,11 +132,12 @@ -- -- /See:/ 'listPublicKeysResponse' smart constructor. data ListPublicKeysResponse = ListPublicKeysResponse'- { _lpkrsPublicKeyList :: !(Maybe [PublicKey])- , _lpkrsNextToken :: !(Maybe Text)- , _lpkrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _lpkrsPublicKeyList :: !(Maybe [PublicKey])+ , _lpkrsNextToken :: !(Maybe Text)+ , _lpkrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'ListPublicKeysResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -151,12 +151,13 @@ :: Int -- ^ 'lpkrsResponseStatus' -> ListPublicKeysResponse listPublicKeysResponse pResponseStatus_ =- ListPublicKeysResponse'- { _lpkrsPublicKeyList = Nothing- , _lpkrsNextToken = Nothing- , _lpkrsResponseStatus = pResponseStatus_- }+ ListPublicKeysResponse'+ { _lpkrsPublicKeyList = Nothing+ , _lpkrsNextToken = Nothing+ , _lpkrsResponseStatus = pResponseStatus_+ } + -- | Contains an array of PublicKey objects. lpkrsPublicKeyList :: Lens' ListPublicKeysResponse [PublicKey] lpkrsPublicKeyList = lens _lpkrsPublicKeyList (\ s a -> s{_lpkrsPublicKeyList = a}) . _Default . _Coerce;@@ -169,4 +170,4 @@ lpkrsResponseStatus :: Lens' ListPublicKeysResponse Int lpkrsResponseStatus = lens _lpkrsResponseStatus (\ s a -> s{_lpkrsResponseStatus = a}); -instance NFData ListPublicKeysResponse+instance NFData ListPublicKeysResponse where
gen/Network/AWS/CloudTrail/ListTags.hs view
@@ -12,9 +12,9 @@ -- | -- Module : Network.AWS.CloudTrail.ListTags--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -39,12 +39,12 @@ , ltrsResponseStatus ) where -import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response -- | Specifies a list of trail tags to return. --@@ -52,10 +52,11 @@ -- -- /See:/ 'listTags' smart constructor. data ListTags = ListTags'- { _ltNextToken :: !(Maybe Text)- , _ltResourceIdList :: ![Text]- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _ltNextToken :: !(Maybe Text)+ , _ltResourceIdList :: ![Text]+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'ListTags' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -65,12 +66,9 @@ -- * 'ltResourceIdList' - Specifies a list of trail ARNs whose tags will be listed. The list has a limit of 20 ARNs. The format of a trail ARN is: @arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail@ listTags :: ListTags-listTags =- ListTags'- { _ltNextToken = Nothing- , _ltResourceIdList = mempty- }+listTags = ListTags' {_ltNextToken = Nothing, _ltResourceIdList = mempty} + -- | Reserved for future use. ltNextToken :: Lens' ListTags (Maybe Text) ltNextToken = lens _ltNextToken (\ s a -> s{_ltNextToken = a});@@ -90,9 +88,9 @@ (x .?> "ResourceTagList" .!@ mempty) <*> (pure (fromEnum s))) -instance Hashable ListTags+instance Hashable ListTags where -instance NFData ListTags+instance NFData ListTags where instance ToHeaders ListTags where toHeaders@@ -123,35 +121,37 @@ -- -- /See:/ 'listTagsResponse' smart constructor. data ListTagsResponse = ListTagsResponse'- { _ltrsNextToken :: !(Maybe Text)- , _ltrsResourceTagList :: !(Maybe [ResourceTag])- , _ltrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _ltrsNextToken :: !(Maybe Text)+ , _ltrsResourceTagList :: !(Maybe [ResourceTag])+ , _ltrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'ListTagsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ltrsNextToken' - Reserved for future use. ----- * 'ltrsResourceTagList' - Undocumented member.+-- * 'ltrsResourceTagList' - A list of resource tags. -- -- * 'ltrsResponseStatus' - -- | The response status code. listTagsResponse :: Int -- ^ 'ltrsResponseStatus' -> ListTagsResponse listTagsResponse pResponseStatus_ =- ListTagsResponse'- { _ltrsNextToken = Nothing- , _ltrsResourceTagList = Nothing- , _ltrsResponseStatus = pResponseStatus_- }+ ListTagsResponse'+ { _ltrsNextToken = Nothing+ , _ltrsResourceTagList = Nothing+ , _ltrsResponseStatus = pResponseStatus_+ } + -- | Reserved for future use. ltrsNextToken :: Lens' ListTagsResponse (Maybe Text) ltrsNextToken = lens _ltrsNextToken (\ s a -> s{_ltrsNextToken = a}); --- | Undocumented member.+-- | A list of resource tags. ltrsResourceTagList :: Lens' ListTagsResponse [ResourceTag] ltrsResourceTagList = lens _ltrsResourceTagList (\ s a -> s{_ltrsResourceTagList = a}) . _Default . _Coerce; @@ -159,4 +159,4 @@ ltrsResponseStatus :: Lens' ListTagsResponse Int ltrsResponseStatus = lens _ltrsResponseStatus (\ s a -> s{_ltrsResponseStatus = a}); -instance NFData ListTagsResponse+instance NFData ListTagsResponse where
gen/Network/AWS/CloudTrail/LookupEvents.hs view
@@ -12,9 +12,9 @@ -- | -- Module : Network.AWS.CloudTrail.LookupEvents--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -25,6 +25,8 @@ -- -- * Event name --+-- * Event source+-- -- * Resource name -- -- * Resource type@@ -39,6 +41,8 @@ -- -- /Important:/ Events that occurred during the selected time range will not be available for lookup if CloudTrail logging was not enabled when the events occurred. --+--+-- This operation returns paginated results. module Network.AWS.CloudTrail.LookupEvents ( -- * Creating a Request@@ -60,12 +64,13 @@ , lersResponseStatus ) where -import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.Lens+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response -- | Contains a request for LookupEvents. --@@ -73,13 +78,14 @@ -- -- /See:/ 'lookupEvents' smart constructor. data LookupEvents = LookupEvents'- { _leStartTime :: !(Maybe POSIX)- , _leLookupAttributes :: !(Maybe [LookupAttribute])- , _leNextToken :: !(Maybe Text)- , _leEndTime :: !(Maybe POSIX)- , _leMaxResults :: !(Maybe Nat)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _leStartTime :: !(Maybe POSIX)+ , _leLookupAttributes :: !(Maybe [LookupAttribute])+ , _leNextToken :: !(Maybe Text)+ , _leEndTime :: !(Maybe POSIX)+ , _leMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'LookupEvents' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -96,14 +102,15 @@ lookupEvents :: LookupEvents lookupEvents =- LookupEvents'- { _leStartTime = Nothing- , _leLookupAttributes = Nothing- , _leNextToken = Nothing- , _leEndTime = Nothing- , _leMaxResults = Nothing- }+ LookupEvents'+ { _leStartTime = Nothing+ , _leLookupAttributes = Nothing+ , _leNextToken = Nothing+ , _leEndTime = Nothing+ , _leMaxResults = Nothing+ } + -- | Specifies that only events that occur after or at the specified time are returned. If the specified start time is after the specified end time, an error is returned. leStartTime :: Lens' LookupEvents (Maybe UTCTime) leStartTime = lens _leStartTime (\ s a -> s{_leStartTime = a}) . mapping _Time;@@ -124,6 +131,13 @@ leMaxResults :: Lens' LookupEvents (Maybe Natural) leMaxResults = lens _leMaxResults (\ s a -> s{_leMaxResults = a}) . mapping _Nat; +instance AWSPager LookupEvents where+ page rq rs+ | stop (rs ^. lersNextToken) = Nothing+ | stop (rs ^. lersEvents) = Nothing+ | otherwise =+ Just $ rq & leNextToken .~ rs ^. lersNextToken+ instance AWSRequest LookupEvents where type Rs LookupEvents = LookupEventsResponse request = postJSON cloudTrail@@ -134,9 +148,9 @@ (x .?> "NextToken") <*> (x .?> "Events" .!@ mempty) <*> (pure (fromEnum s))) -instance Hashable LookupEvents+instance Hashable LookupEvents where -instance NFData LookupEvents+instance NFData LookupEvents where instance ToHeaders LookupEvents where toHeaders@@ -170,11 +184,12 @@ -- -- /See:/ 'lookupEventsResponse' smart constructor. data LookupEventsResponse = LookupEventsResponse'- { _lersNextToken :: !(Maybe Text)- , _lersEvents :: !(Maybe [Event])- , _lersResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _lersNextToken :: !(Maybe Text)+ , _lersEvents :: !(Maybe [Event])+ , _lersResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'LookupEventsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -188,12 +203,13 @@ :: Int -- ^ 'lersResponseStatus' -> LookupEventsResponse lookupEventsResponse pResponseStatus_ =- LookupEventsResponse'- { _lersNextToken = Nothing- , _lersEvents = Nothing- , _lersResponseStatus = pResponseStatus_- }+ LookupEventsResponse'+ { _lersNextToken = Nothing+ , _lersEvents = Nothing+ , _lersResponseStatus = pResponseStatus_+ } + -- | The token to use to get the next page of results after a previous API call. If the token does not appear, there are no more results to return. The token must be passed in with the same parameters as the previous call. For example, if the original call specified an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters. lersNextToken :: Lens' LookupEventsResponse (Maybe Text) lersNextToken = lens _lersNextToken (\ s a -> s{_lersNextToken = a});@@ -206,4 +222,4 @@ lersResponseStatus :: Lens' LookupEventsResponse Int lersResponseStatus = lens _lersResponseStatus (\ s a -> s{_lersResponseStatus = a}); -instance NFData LookupEventsResponse+instance NFData LookupEventsResponse where
gen/Network/AWS/CloudTrail/PutEventSelectors.hs view
@@ -12,13 +12,13 @@ -- | -- Module : Network.AWS.CloudTrail.PutEventSelectors--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Configures an event selector for your trail. Use event selectors to specify the type of events that you want your trail to log. When an event occurs in your account, CloudTrail evaluates the event selectors in all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event.+-- Configures an event selector for your trail. Use event selectors to specify whether you want your trail to log management and/or data events. When an event occurs in your account, CloudTrail evaluates the event selectors in all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event. -- -- -- Example@@ -37,7 +37,7 @@ -- -- The @PutEventSelectors@ operation must be called from the region in which the trail was created; otherwise, an @InvalidHomeRegionException@ is thrown. ----- You can configure up to five event selectors for each trail. For more information, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-event-selectors-for-a-trail.html Configuring Event Selectors for Trails> in the /AWS CloudTrail User Guide/ .+-- You can configure up to five event selectors for each trail. For more information, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html Logging Data and Management Events for Trails > in the /AWS CloudTrail User Guide/ . -- module Network.AWS.CloudTrail.PutEventSelectors (@@ -45,8 +45,8 @@ putEventSelectors , PutEventSelectors -- * Request Lenses- , pesEventSelectors , pesTrailName+ , pesEventSelectors -- * Destructuring the Response , putEventSelectorsResponse@@ -57,42 +57,42 @@ , pesrsResponseStatus ) where -import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response -- | /See:/ 'putEventSelectors' smart constructor. data PutEventSelectors = PutEventSelectors'- { _pesEventSelectors :: !(Maybe [EventSelector])- , _pesTrailName :: !(Maybe Text)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _pesTrailName :: !Text+ , _pesEventSelectors :: ![EventSelector]+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'PutEventSelectors' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'pesEventSelectors' - Specifies the settings for your event selectors. You can configure up to five event selectors for a trail.--- -- * 'pesTrailName' - Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements: * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-) * Start with a letter or number, and end with a letter or number * Be between 3 and 128 characters * Have no adjacent periods, underscores or dashes. Names like @my-_namespace@ and @my--namespace@ are invalid. * Not be in IP address format (for example, 192.168.5.4) If you specify a trail ARN, it must be in the format: @arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail@+--+-- * 'pesEventSelectors' - Specifies the settings for your event selectors. You can configure up to five event selectors for a trail. putEventSelectors- :: PutEventSelectors-putEventSelectors =- PutEventSelectors'- { _pesEventSelectors = Nothing- , _pesTrailName = Nothing- }+ :: Text -- ^ 'pesTrailName'+ -> PutEventSelectors+putEventSelectors pTrailName_ =+ PutEventSelectors' {_pesTrailName = pTrailName_, _pesEventSelectors = mempty} --- | Specifies the settings for your event selectors. You can configure up to five event selectors for a trail.-pesEventSelectors :: Lens' PutEventSelectors [EventSelector]-pesEventSelectors = lens _pesEventSelectors (\ s a -> s{_pesEventSelectors = a}) . _Default . _Coerce; -- | Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements: * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-) * Start with a letter or number, and end with a letter or number * Be between 3 and 128 characters * Have no adjacent periods, underscores or dashes. Names like @my-_namespace@ and @my--namespace@ are invalid. * Not be in IP address format (for example, 192.168.5.4) If you specify a trail ARN, it must be in the format: @arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail@-pesTrailName :: Lens' PutEventSelectors (Maybe Text)+pesTrailName :: Lens' PutEventSelectors Text pesTrailName = lens _pesTrailName (\ s a -> s{_pesTrailName = a}); +-- | Specifies the settings for your event selectors. You can configure up to five event selectors for a trail.+pesEventSelectors :: Lens' PutEventSelectors [EventSelector]+pesEventSelectors = lens _pesEventSelectors (\ s a -> s{_pesEventSelectors = a}) . _Coerce;+ instance AWSRequest PutEventSelectors where type Rs PutEventSelectors = PutEventSelectorsResponse request = postJSON cloudTrail@@ -104,9 +104,9 @@ (x .?> "EventSelectors" .!@ mempty) <*> (pure (fromEnum s))) -instance Hashable PutEventSelectors+instance Hashable PutEventSelectors where -instance NFData PutEventSelectors+instance NFData PutEventSelectors where instance ToHeaders PutEventSelectors where toHeaders@@ -122,8 +122,8 @@ toJSON PutEventSelectors'{..} = object (catMaybes- [("EventSelectors" .=) <$> _pesEventSelectors,- ("TrailName" .=) <$> _pesTrailName])+ [Just ("TrailName" .= _pesTrailName),+ Just ("EventSelectors" .= _pesEventSelectors)]) instance ToPath PutEventSelectors where toPath = const "/"@@ -133,11 +133,12 @@ -- | /See:/ 'putEventSelectorsResponse' smart constructor. data PutEventSelectorsResponse = PutEventSelectorsResponse'- { _pesrsTrailARN :: !(Maybe Text)- , _pesrsEventSelectors :: !(Maybe [EventSelector])- , _pesrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _pesrsTrailARN :: !(Maybe Text)+ , _pesrsEventSelectors :: !(Maybe [EventSelector])+ , _pesrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'PutEventSelectorsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -151,12 +152,13 @@ :: Int -- ^ 'pesrsResponseStatus' -> PutEventSelectorsResponse putEventSelectorsResponse pResponseStatus_ =- PutEventSelectorsResponse'- { _pesrsTrailARN = Nothing- , _pesrsEventSelectors = Nothing- , _pesrsResponseStatus = pResponseStatus_- }+ PutEventSelectorsResponse'+ { _pesrsTrailARN = Nothing+ , _pesrsEventSelectors = Nothing+ , _pesrsResponseStatus = pResponseStatus_+ } + -- | Specifies the ARN of the trail that was updated with event selectors. The format of a trail ARN is: @arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail@ pesrsTrailARN :: Lens' PutEventSelectorsResponse (Maybe Text) pesrsTrailARN = lens _pesrsTrailARN (\ s a -> s{_pesrsTrailARN = a});@@ -169,4 +171,4 @@ pesrsResponseStatus :: Lens' PutEventSelectorsResponse Int pesrsResponseStatus = lens _pesrsResponseStatus (\ s a -> s{_pesrsResponseStatus = a}); -instance NFData PutEventSelectorsResponse+instance NFData PutEventSelectorsResponse where
gen/Network/AWS/CloudTrail/RemoveTags.hs view
@@ -12,9 +12,9 @@ -- | -- Module : Network.AWS.CloudTrail.RemoveTags--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -37,12 +37,12 @@ , rtrsResponseStatus ) where -import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response -- | Specifies the tags to remove from a trail. --@@ -50,10 +50,11 @@ -- -- /See:/ 'removeTags' smart constructor. data RemoveTags = RemoveTags'- { _rtTagsList :: !(Maybe [Tag])- , _rtResourceId :: !Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _rtTagsList :: !(Maybe [Tag])+ , _rtResourceId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'RemoveTags' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -65,11 +66,9 @@ :: Text -- ^ 'rtResourceId' -> RemoveTags removeTags pResourceId_ =- RemoveTags'- { _rtTagsList = Nothing- , _rtResourceId = pResourceId_- }+ RemoveTags' {_rtTagsList = Nothing, _rtResourceId = pResourceId_} + -- | Specifies a list of tags to be removed. rtTagsList :: Lens' RemoveTags [Tag] rtTagsList = lens _rtTagsList (\ s a -> s{_rtTagsList = a}) . _Default . _Coerce;@@ -86,9 +85,9 @@ (\ s h x -> RemoveTagsResponse' <$> (pure (fromEnum s))) -instance Hashable RemoveTags+instance Hashable RemoveTags where -instance NFData RemoveTags+instance NFData RemoveTags where instance ToHeaders RemoveTags where toHeaders@@ -119,9 +118,10 @@ -- -- /See:/ 'removeTagsResponse' smart constructor. newtype RemoveTagsResponse = RemoveTagsResponse'- { _rtrsResponseStatus :: Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _rtrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'RemoveTagsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -131,12 +131,11 @@ :: Int -- ^ 'rtrsResponseStatus' -> RemoveTagsResponse removeTagsResponse pResponseStatus_ =- RemoveTagsResponse'- { _rtrsResponseStatus = pResponseStatus_- }+ RemoveTagsResponse' {_rtrsResponseStatus = pResponseStatus_} + -- | -- | The response status code. rtrsResponseStatus :: Lens' RemoveTagsResponse Int rtrsResponseStatus = lens _rtrsResponseStatus (\ s a -> s{_rtrsResponseStatus = a}); -instance NFData RemoveTagsResponse+instance NFData RemoveTagsResponse where
gen/Network/AWS/CloudTrail/StartLogging.hs view
@@ -12,9 +12,9 @@ -- | -- Module : Network.AWS.CloudTrail.StartLogging--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -36,12 +36,12 @@ , srsResponseStatus ) where -import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response -- | The request to CloudTrail to start logging AWS API calls for an account. --@@ -49,9 +49,10 @@ -- -- /See:/ 'startLogging' smart constructor. newtype StartLogging = StartLogging'- { _sName :: Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _sName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'StartLogging' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -60,11 +61,9 @@ startLogging :: Text -- ^ 'sName' -> StartLogging-startLogging pName_ =- StartLogging'- { _sName = pName_- }+startLogging pName_ = StartLogging' {_sName = pName_} + -- | Specifies the name or the CloudTrail ARN of the trail for which CloudTrail logs AWS API calls. The format of a trail ARN is: @arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail@ sName :: Lens' StartLogging Text sName = lens _sName (\ s a -> s{_sName = a});@@ -77,9 +76,9 @@ (\ s h x -> StartLoggingResponse' <$> (pure (fromEnum s))) -instance Hashable StartLogging+instance Hashable StartLogging where -instance NFData StartLogging+instance NFData StartLogging where instance ToHeaders StartLogging where toHeaders@@ -107,9 +106,10 @@ -- -- /See:/ 'startLoggingResponse' smart constructor. newtype StartLoggingResponse = StartLoggingResponse'- { _srsResponseStatus :: Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _srsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'StartLoggingResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -119,12 +119,11 @@ :: Int -- ^ 'srsResponseStatus' -> StartLoggingResponse startLoggingResponse pResponseStatus_ =- StartLoggingResponse'- { _srsResponseStatus = pResponseStatus_- }+ StartLoggingResponse' {_srsResponseStatus = pResponseStatus_} + -- | -- | The response status code. srsResponseStatus :: Lens' StartLoggingResponse Int srsResponseStatus = lens _srsResponseStatus (\ s a -> s{_srsResponseStatus = a}); -instance NFData StartLoggingResponse+instance NFData StartLoggingResponse where
gen/Network/AWS/CloudTrail/StopLogging.hs view
@@ -12,9 +12,9 @@ -- | -- Module : Network.AWS.CloudTrail.StopLogging--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -36,12 +36,12 @@ , slrsResponseStatus ) where -import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response -- | Passes the request to CloudTrail to stop logging AWS API calls for the specified account. --@@ -49,9 +49,10 @@ -- -- /See:/ 'stopLogging' smart constructor. newtype StopLogging = StopLogging'- { _slName :: Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _slName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'StopLogging' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -60,11 +61,9 @@ stopLogging :: Text -- ^ 'slName' -> StopLogging-stopLogging pName_ =- StopLogging'- { _slName = pName_- }+stopLogging pName_ = StopLogging' {_slName = pName_} + -- | Specifies the name or the CloudTrail ARN of the trail for which CloudTrail will stop logging AWS API calls. The format of a trail ARN is: @arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail@ slName :: Lens' StopLogging Text slName = lens _slName (\ s a -> s{_slName = a});@@ -77,9 +76,9 @@ (\ s h x -> StopLoggingResponse' <$> (pure (fromEnum s))) -instance Hashable StopLogging+instance Hashable StopLogging where -instance NFData StopLogging+instance NFData StopLogging where instance ToHeaders StopLogging where toHeaders@@ -107,9 +106,10 @@ -- -- /See:/ 'stopLoggingResponse' smart constructor. newtype StopLoggingResponse = StopLoggingResponse'- { _slrsResponseStatus :: Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _slrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'StopLoggingResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -119,12 +119,11 @@ :: Int -- ^ 'slrsResponseStatus' -> StopLoggingResponse stopLoggingResponse pResponseStatus_ =- StopLoggingResponse'- { _slrsResponseStatus = pResponseStatus_- }+ StopLoggingResponse' {_slrsResponseStatus = pResponseStatus_} + -- | -- | The response status code. slrsResponseStatus :: Lens' StopLoggingResponse Int slrsResponseStatus = lens _slrsResponseStatus (\ s a -> s{_slrsResponseStatus = a}); -instance NFData StopLoggingResponse+instance NFData StopLoggingResponse where
gen/Network/AWS/CloudTrail/Types.hs view
@@ -4,9 +4,9 @@ -- | -- Module : Network.AWS.CloudTrail.Types--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -132,38 +132,40 @@ , tIsMultiRegionTrail ) where -import Network.AWS.CloudTrail.Types.Product-import Network.AWS.CloudTrail.Types.Sum-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Sign.V4+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.CloudTrail.Types.Sum+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Sign.V4 -- | API version @2013-11-01@ of the Amazon CloudTrail SDK configuration. cloudTrail :: Service cloudTrail =- Service- { _svcAbbrev = "CloudTrail"- , _svcSigner = v4- , _svcPrefix = "cloudtrail"- , _svcVersion = "2013-11-01"- , _svcEndpoint = defaultEndpoint cloudTrail- , _svcTimeout = Just 70- , _svcCheck = statusSuccess- , _svcError = parseJSONError "CloudTrail"- , _svcRetry = retry- }+ Service+ { _svcAbbrev = "CloudTrail"+ , _svcSigner = v4+ , _svcPrefix = "cloudtrail"+ , _svcVersion = "2013-11-01"+ , _svcEndpoint = defaultEndpoint cloudTrail+ , _svcTimeout = Just 70+ , _svcCheck = statusSuccess+ , _svcError = parseJSONError "CloudTrail"+ , _svcRetry = retry+ } where retry =- Exponential- { _retryBase = 5.0e-2- , _retryGrowth = 2- , _retryAttempts = 5- , _retryCheck = check- }+ Exponential+ { _retryBase = 5.0e-2+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ } check e+ | has (hasCode "ThrottledException" . hasStatus 400) e =+ Just "throttled_exception" | has (hasStatus 429) e = Just "too_many_requests" | has (hasCode "ThrottlingException" . hasStatus 400) e =- Just "throttling_exception"+ Just "throttling_exception" | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling" | has (hasStatus 504) e = Just "gateway_timeout" | has (hasStatus 502) e = Just "bad_gateway"@@ -172,68 +174,79 @@ | has (hasStatus 509) e = Just "limit_exceeded" | otherwise = Nothing + -- | Occurs if the timestamp values are invalid. Either the start time occurs after the end time or the time range is outside the range of possible values. -- -- _InvalidTimeRangeException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidTimeRangeException =- _ServiceError . hasCode "InvalidTimeRangeException"+ _MatchServiceError cloudTrail "InvalidTimeRangeException" + -- | This exception is thrown when the policy on the S3 bucket is not sufficient. -- -- _InsufficientS3BucketPolicyException :: AsError a => Getting (First ServiceError) a ServiceError _InsufficientS3BucketPolicyException =- _ServiceError . hasCode "InsufficientS3BucketPolicyException"+ _MatchServiceError cloudTrail "InsufficientS3BucketPolicyException" + -- | This exception is thrown when the maximum number of trails is reached. -- -- _MaximumNumberOfTrailsExceededException :: AsError a => Getting (First ServiceError) a ServiceError _MaximumNumberOfTrailsExceededException =- _ServiceError . hasCode "MaximumNumberOfTrailsExceededException"+ _MatchServiceError cloudTrail "MaximumNumberOfTrailsExceededException" + -- | This exception is thrown when the requested operation is not supported. -- -- _UnsupportedOperationException :: AsError a => Getting (First ServiceError) a ServiceError _UnsupportedOperationException =- _ServiceError . hasCode "UnsupportedOperationException"+ _MatchServiceError cloudTrail "UnsupportedOperationException" + -- | This exception is deprecated. -- -- _KMSKeyDisabledException :: AsError a => Getting (First ServiceError) a ServiceError-_KMSKeyDisabledException = _ServiceError . hasCode "KmsKeyDisabledException"+_KMSKeyDisabledException =+ _MatchServiceError cloudTrail "KmsKeyDisabledException" + -- | This exception is thrown when the policy on the S3 bucket or KMS key is not sufficient. -- -- _InsufficientEncryptionPolicyException :: AsError a => Getting (First ServiceError) a ServiceError _InsufficientEncryptionPolicyException =- _ServiceError . hasCode "InsufficientEncryptionPolicyException"+ _MatchServiceError cloudTrail "InsufficientEncryptionPolicyException" + -- | This exception is thrown when the policy on the SNS topic is not sufficient. -- -- _InsufficientSNSTopicPolicyException :: AsError a => Getting (First ServiceError) a ServiceError _InsufficientSNSTopicPolicyException =- _ServiceError . hasCode "InsufficientSnsTopicPolicyException"+ _MatchServiceError cloudTrail "InsufficientSnsTopicPolicyException" + -- | This exception is thrown when the provided role is not valid. -- -- _InvalidCloudWatchLogsRoleARNException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidCloudWatchLogsRoleARNException =- _ServiceError . hasCode "InvalidCloudWatchLogsRoleArnException"+ _MatchServiceError cloudTrail "InvalidCloudWatchLogsRoleArnException" + -- | The number of tags per trail has exceeded the permitted amount. Currently, the limit is 50. -- -- _TagsLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError _TagsLimitExceededException =- _ServiceError . hasCode "TagsLimitExceededException"+ _MatchServiceError cloudTrail "TagsLimitExceededException" + -- | This exception is thrown when an operation is called with an invalid trail ARN. The format of a trail ARN is: -- --@@ -241,15 +254,17 @@ -- _CloudTrailARNInvalidException :: AsError a => Getting (First ServiceError) a ServiceError _CloudTrailARNInvalidException =- _ServiceError . hasCode "CloudTrailARNInvalidException"+ _MatchServiceError cloudTrail "CloudTrailARNInvalidException" + -- | Occurs when an invalid lookup attribute is specified. -- -- _InvalidLookupAttributesException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidLookupAttributesException =- _ServiceError . hasCode "InvalidLookupAttributesException"+ _MatchServiceError cloudTrail "InvalidLookupAttributesException" + -- | This exception is thrown when the provided trail name is not valid. Trail names must meet the following requirements: -- --@@ -267,47 +282,54 @@ -- _InvalidTrailNameException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidTrailNameException =- _ServiceError . hasCode "InvalidTrailNameException"+ _MatchServiceError cloudTrail "InvalidTrailNameException" + -- | This exception is thrown when the provided SNS topic name is not valid. -- -- _InvalidSNSTopicNameException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidSNSTopicNameException =- _ServiceError . hasCode "InvalidSnsTopicNameException"+ _MatchServiceError cloudTrail "InvalidSnsTopicNameException" + -- | This exception is thrown when the specified resource type is not supported by CloudTrail. -- -- _ResourceTypeNotSupportedException :: AsError a => Getting (First ServiceError) a ServiceError _ResourceTypeNotSupportedException =- _ServiceError . hasCode "ResourceTypeNotSupportedException"+ _MatchServiceError cloudTrail "ResourceTypeNotSupportedException" + -- | Cannot set a CloudWatch Logs delivery for this region. -- -- _CloudWatchLogsDeliveryUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError _CloudWatchLogsDeliveryUnavailableException =- _ServiceError . hasCode "CloudWatchLogsDeliveryUnavailableException"+ _MatchServiceError cloudTrail "CloudWatchLogsDeliveryUnavailableException" + -- | This exception is thrown when the KMS key does not exist, or when the S3 bucket and the KMS key are not in the same region. -- -- _KMSKeyNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError-_KMSKeyNotFoundException = _ServiceError . hasCode "KmsKeyNotFoundException"+_KMSKeyNotFoundException =+ _MatchServiceError cloudTrail "KmsKeyNotFoundException" + -- | This exception is thrown when the trail with the given name is not found. -- -- _TrailNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError-_TrailNotFoundException = _ServiceError . hasCode "TrailNotFoundException"+_TrailNotFoundException = _MatchServiceError cloudTrail "TrailNotFoundException" + -- | This exception is thrown when the @PutEventSelectors@ operation is called with an invalid number of event selectors, data resources, or an invalid value for a parameter: -- -- -- * Specify a valid number of event selectors (1 to 5) for a trail. ----- * Specify a valid number of data resources (1 to 50) for an event selector.+-- * Specify a valid number of data resources (1 to 250) for an event selector. -- -- * Specify a valid value for a parameter. For example, specifying the @ReadWriteType@ parameter with a value of @read-only@ is invalid. --@@ -315,112 +337,131 @@ -- _InvalidEventSelectorsException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidEventSelectorsException =- _ServiceError . hasCode "InvalidEventSelectorsException"+ _MatchServiceError cloudTrail "InvalidEventSelectorsException" + -- | This exception is deprecated. -- -- _TrailNotProvidedException :: AsError a => Getting (First ServiceError) a ServiceError _TrailNotProvidedException =- _ServiceError . hasCode "TrailNotProvidedException"+ _MatchServiceError cloudTrail "TrailNotProvidedException" + -- | This exception is thrown when the provided S3 bucket name is not valid. -- -- _InvalidS3BucketNameException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidS3BucketNameException =- _ServiceError . hasCode "InvalidS3BucketNameException"+ _MatchServiceError cloudTrail "InvalidS3BucketNameException" + -- | This exception is thrown when the provided CloudWatch log group is not valid. -- -- _InvalidCloudWatchLogsLogGroupARNException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidCloudWatchLogsLogGroupARNException =- _ServiceError . hasCode "InvalidCloudWatchLogsLogGroupArnException"+ _MatchServiceError cloudTrail "InvalidCloudWatchLogsLogGroupArnException" + -- | This exception is thrown when there is an issue with the specified KMS key and the trail can’t be updated. -- -- _KMSException :: AsError a => Getting (First ServiceError) a ServiceError-_KMSException = _ServiceError . hasCode "KmsException"+_KMSException = _MatchServiceError cloudTrail "KmsException" + -- | This exception is thrown when the specified S3 bucket does not exist. -- -- _S3BucketDoesNotExistException :: AsError a => Getting (First ServiceError) a ServiceError _S3BucketDoesNotExistException =- _ServiceError . hasCode "S3BucketDoesNotExistException"+ _MatchServiceError cloudTrail "S3BucketDoesNotExistException" + -- | Invalid token or token that was previously used in a request with different parameters. This exception is thrown if the token is invalid. -- -- _InvalidNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidNextTokenException =- _ServiceError . hasCode "InvalidNextTokenException"+ _MatchServiceError cloudTrail "InvalidNextTokenException" + -- | This exception is thrown when the key or value specified for the tag does not match the regular expression @^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$@ . -- -- _InvalidTagParameterException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidTagParameterException =- _ServiceError . hasCode "InvalidTagParameterException"+ _MatchServiceError cloudTrail "InvalidTagParameterException" + -- | This exception is thrown when the requested operation is not permitted. -- -- _OperationNotPermittedException :: AsError a => Getting (First ServiceError) a ServiceError _OperationNotPermittedException =- _ServiceError . hasCode "OperationNotPermittedException"+ _MatchServiceError cloudTrail "OperationNotPermittedException" + -- | Reserved for future use. -- -- _InvalidTokenException :: AsError a => Getting (First ServiceError) a ServiceError-_InvalidTokenException = _ServiceError . hasCode "InvalidTokenException"+_InvalidTokenException = _MatchServiceError cloudTrail "InvalidTokenException" + -- | This exception is thrown if the limit specified is invalid. -- -- _InvalidMaxResultsException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidMaxResultsException =- _ServiceError . hasCode "InvalidMaxResultsException"+ _MatchServiceError cloudTrail "InvalidMaxResultsException" + -- | This exception is thrown when the specified trail already exists. -- -- _TrailAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError _TrailAlreadyExistsException =- _ServiceError . hasCode "TrailAlreadyExistsException"+ _MatchServiceError cloudTrail "TrailAlreadyExistsException" + -- | This exception is thrown when the provided S3 prefix is not valid. -- -- _InvalidS3PrefixException :: AsError a => Getting (First ServiceError) a ServiceError-_InvalidS3PrefixException = _ServiceError . hasCode "InvalidS3PrefixException"+_InvalidS3PrefixException =+ _MatchServiceError cloudTrail "InvalidS3PrefixException" + -- | This exception is thrown when the specified resource is not found. -- -- _ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError _ResourceNotFoundException =- _ServiceError . hasCode "ResourceNotFoundException"+ _MatchServiceError cloudTrail "ResourceNotFoundException" + -- | This exception is thrown when the combination of parameters provided is not valid. -- -- _InvalidParameterCombinationException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidParameterCombinationException =- _ServiceError . hasCode "InvalidParameterCombinationException"+ _MatchServiceError cloudTrail "InvalidParameterCombinationException" + -- | This exception is thrown when the KMS key ARN is invalid. -- -- _InvalidKMSKeyIdException :: AsError a => Getting (First ServiceError) a ServiceError-_InvalidKMSKeyIdException = _ServiceError . hasCode "InvalidKmsKeyIdException"+_InvalidKMSKeyIdException =+ _MatchServiceError cloudTrail "InvalidKmsKeyIdException" + -- | This exception is thrown when an operation is called on a trail from a region other than the region in which the trail was created. -- -- _InvalidHomeRegionException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidHomeRegionException =- _ServiceError . hasCode "InvalidHomeRegionException"+ _MatchServiceError cloudTrail "InvalidHomeRegionException"+
gen/Network/AWS/CloudTrail/Types/Product.hs view
@@ -9,19 +9,19 @@ -- | -- Module : Network.AWS.CloudTrail.Types.Product--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Network.AWS.CloudTrail.Types.Product where -import Network.AWS.CloudTrail.Types.Sum-import Network.AWS.Lens-import Network.AWS.Prelude+import Network.AWS.CloudTrail.Types.Sum+import Network.AWS.Lens+import Network.AWS.Prelude --- | The Amazon S3 objects that you specify in your event selectors for your trail to log data events. Data events are object level API operations that access S3 objects, such as @GetObject@ , @DeleteObject@ , and @PutObject@ . You can specify up to 50 S3 buckets and object prefixes for an event selector.+-- | The Amazon S3 objects that you specify in your event selectors for your trail to log data events. Data events are object-level API operations that access S3 objects, such as @GetObject@ , @DeleteObject@ , and @PutObject@ . You can specify up to 250 S3 buckets and object prefixes for a trail. -- -- -- Example@@ -41,10 +41,11 @@ -- -- /See:/ 'dataResource' smart constructor. data DataResource = DataResource'- { _drValues :: !(Maybe [Text])- , _drType :: !(Maybe Text)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _drValues :: !(Maybe [Text])+ , _drType :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'DataResource' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -54,12 +55,9 @@ -- * 'drType' - The resource type in which you want to log data events. You can specify only the following value: @AWS::S3::Object@ . dataResource :: DataResource-dataResource =- DataResource'- { _drValues = Nothing- , _drType = Nothing- }+dataResource = DataResource' {_drValues = Nothing, _drType = Nothing} + -- | A list of ARN-like strings for the specified S3 objects. To log data events for all objects in an S3 bucket, specify the bucket and an empty object prefix such as @arn:aws:s3:::bucket-1/@ . The trail logs data events for all objects in this S3 bucket. To log data events for specific objects, specify the S3 bucket and object prefix such as @arn:aws:s3:::bucket-1/example-images@ . The trail logs data events for objects in this S3 bucket that match the prefix. drValues :: Lens' DataResource [Text] drValues = lens _drValues (\ s a -> s{_drValues = a}) . _Default . _Coerce;@@ -75,9 +73,9 @@ DataResource' <$> (x .:? "Values" .!= mempty) <*> (x .:? "Type")) -instance Hashable DataResource+instance Hashable DataResource where -instance NFData DataResource+instance NFData DataResource where instance ToJSON DataResource where toJSON DataResource'{..}@@ -92,15 +90,16 @@ -- -- /See:/ 'event' smart constructor. data Event = Event'- { _eUsername :: !(Maybe Text)- , _eResources :: !(Maybe [Resource])- , _eEventTime :: !(Maybe POSIX)- , _eCloudTrailEvent :: !(Maybe Text)- , _eEventName :: !(Maybe Text)- , _eEventSource :: !(Maybe Text)- , _eEventId :: !(Maybe Text)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _eUsername :: !(Maybe Text)+ , _eResources :: !(Maybe [Resource])+ , _eEventTime :: !(Maybe POSIX)+ , _eCloudTrailEvent :: !(Maybe Text)+ , _eEventName :: !(Maybe Text)+ , _eEventSource :: !(Maybe Text)+ , _eEventId :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'Event' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -121,16 +120,17 @@ event :: Event event =- Event'- { _eUsername = Nothing- , _eResources = Nothing- , _eEventTime = Nothing- , _eCloudTrailEvent = Nothing- , _eEventName = Nothing- , _eEventSource = Nothing- , _eEventId = Nothing- }+ Event'+ { _eUsername = Nothing+ , _eResources = Nothing+ , _eEventTime = Nothing+ , _eCloudTrailEvent = Nothing+ , _eEventName = Nothing+ , _eEventSource = Nothing+ , _eEventId = Nothing+ } + -- | A user name or role name of the requester that called the API in the event returned. eUsername :: Lens' Event (Maybe Text) eUsername = lens _eUsername (\ s a -> s{_eUsername = a});@@ -171,11 +171,11 @@ <*> (x .:? "EventSource") <*> (x .:? "EventId")) -instance Hashable Event+instance Hashable Event where -instance NFData Event+instance NFData Event where --- | Use event selectors to specify the types of events that you want your trail to log. When an event occurs in your account, CloudTrail evaluates the event selector for all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event.+-- | Use event selectors to specify whether you want your trail to log management and/or data events. When an event occurs in your account, CloudTrail evaluates the event selector for all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event. -- -- -- You can configure up to five event selectors for a trail.@@ -183,30 +183,32 @@ -- -- /See:/ 'eventSelector' smart constructor. data EventSelector = EventSelector'- { _esDataResources :: !(Maybe [DataResource])- , _esReadWriteType :: !(Maybe ReadWriteType)- , _esIncludeManagementEvents :: !(Maybe Bool)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _esDataResources :: !(Maybe [DataResource])+ , _esReadWriteType :: !(Maybe ReadWriteType)+ , _esIncludeManagementEvents :: !(Maybe Bool)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'EventSelector' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'esDataResources' - CloudTrail supports logging only data events for S3 objects. You can specify up to 50 S3 buckets and object prefixes for an event selector. For more information, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-event-selectors-for-a-trail.html#data-events-resources Data Events> in the /AWS CloudTrail User Guide/ .+-- * 'esDataResources' - CloudTrail supports logging only data events for S3 objects. You can specify up to 250 S3 buckets and object prefixes for a trail. For more information, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-data-events Data Events> in the /AWS CloudTrail User Guide/ . -- -- * 'esReadWriteType' - Specify if you want your trail to log read-only events, write-only events, or all. For example, the EC2 @GetConsoleOutput@ is a read-only API operation and @RunInstances@ is a write-only API operation. By default, the value is @All@ . ----- * 'esIncludeManagementEvents' - Specify if you want your event selector to include management events for your trail. For more information, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-event-selectors-for-a-trail.html#event-selector-for-management-events Management Events> in the /AWS CloudTrail User Guide/ . By default, the value is @true@ .+-- * 'esIncludeManagementEvents' - Specify if you want your event selector to include management events for your trail. For more information, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-management-events Management Events> in the /AWS CloudTrail User Guide/ . By default, the value is @true@ . eventSelector :: EventSelector eventSelector =- EventSelector'- { _esDataResources = Nothing- , _esReadWriteType = Nothing- , _esIncludeManagementEvents = Nothing- }+ EventSelector'+ { _esDataResources = Nothing+ , _esReadWriteType = Nothing+ , _esIncludeManagementEvents = Nothing+ } --- | CloudTrail supports logging only data events for S3 objects. You can specify up to 50 S3 buckets and object prefixes for an event selector. For more information, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-event-selectors-for-a-trail.html#data-events-resources Data Events> in the /AWS CloudTrail User Guide/ .++-- | CloudTrail supports logging only data events for S3 objects. You can specify up to 250 S3 buckets and object prefixes for a trail. For more information, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-data-events Data Events> in the /AWS CloudTrail User Guide/ . esDataResources :: Lens' EventSelector [DataResource] esDataResources = lens _esDataResources (\ s a -> s{_esDataResources = a}) . _Default . _Coerce; @@ -214,7 +216,7 @@ esReadWriteType :: Lens' EventSelector (Maybe ReadWriteType) esReadWriteType = lens _esReadWriteType (\ s a -> s{_esReadWriteType = a}); --- | Specify if you want your event selector to include management events for your trail. For more information, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-event-selectors-for-a-trail.html#event-selector-for-management-events Management Events> in the /AWS CloudTrail User Guide/ . By default, the value is @true@ .+-- | Specify if you want your event selector to include management events for your trail. For more information, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-management-events Management Events> in the /AWS CloudTrail User Guide/ . By default, the value is @true@ . esIncludeManagementEvents :: Lens' EventSelector (Maybe Bool) esIncludeManagementEvents = lens _esIncludeManagementEvents (\ s a -> s{_esIncludeManagementEvents = a}); @@ -227,9 +229,9 @@ (x .:? "ReadWriteType") <*> (x .:? "IncludeManagementEvents")) -instance Hashable EventSelector+instance Hashable EventSelector where -instance NFData EventSelector+instance NFData EventSelector where instance ToJSON EventSelector where toJSON EventSelector'{..}@@ -246,10 +248,11 @@ -- -- /See:/ 'lookupAttribute' smart constructor. data LookupAttribute = LookupAttribute'- { _laAttributeKey :: !LookupAttributeKey- , _laAttributeValue :: !Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _laAttributeKey :: !LookupAttributeKey+ , _laAttributeValue :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'LookupAttribute' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -262,11 +265,10 @@ -> Text -- ^ 'laAttributeValue' -> LookupAttribute lookupAttribute pAttributeKey_ pAttributeValue_ =- LookupAttribute'- { _laAttributeKey = pAttributeKey_- , _laAttributeValue = pAttributeValue_- }+ LookupAttribute'+ {_laAttributeKey = pAttributeKey_, _laAttributeValue = pAttributeValue_} + -- | Specifies an attribute on which to filter the events returned. laAttributeKey :: Lens' LookupAttribute LookupAttributeKey laAttributeKey = lens _laAttributeKey (\ s a -> s{_laAttributeKey = a});@@ -275,9 +277,9 @@ laAttributeValue :: Lens' LookupAttribute Text laAttributeValue = lens _laAttributeValue (\ s a -> s{_laAttributeValue = a}); -instance Hashable LookupAttribute+instance Hashable LookupAttribute where -instance NFData LookupAttribute+instance NFData LookupAttribute where instance ToJSON LookupAttribute where toJSON LookupAttribute'{..}@@ -292,12 +294,13 @@ -- -- /See:/ 'publicKey' smart constructor. data PublicKey = PublicKey'- { _pkFingerprint :: !(Maybe Text)- , _pkValidityEndTime :: !(Maybe POSIX)- , _pkValue :: !(Maybe Base64)- , _pkValidityStartTime :: !(Maybe POSIX)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _pkFingerprint :: !(Maybe Text)+ , _pkValidityEndTime :: !(Maybe POSIX)+ , _pkValue :: !(Maybe Base64)+ , _pkValidityStartTime :: !(Maybe POSIX)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'PublicKey' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -312,13 +315,14 @@ publicKey :: PublicKey publicKey =- PublicKey'- { _pkFingerprint = Nothing- , _pkValidityEndTime = Nothing- , _pkValue = Nothing- , _pkValidityStartTime = Nothing- }+ PublicKey'+ { _pkFingerprint = Nothing+ , _pkValidityEndTime = Nothing+ , _pkValue = Nothing+ , _pkValidityStartTime = Nothing+ } + -- | The fingerprint of the public key. pkFingerprint :: Lens' PublicKey (Maybe Text) pkFingerprint = lens _pkFingerprint (\ s a -> s{_pkFingerprint = a});@@ -344,9 +348,9 @@ <*> (x .:? "Value") <*> (x .:? "ValidityStartTime")) -instance Hashable PublicKey+instance Hashable PublicKey where -instance NFData PublicKey+instance NFData PublicKey where -- | Specifies the type and name of a resource referenced by an event. --@@ -354,10 +358,11 @@ -- -- /See:/ 'resource' smart constructor. data Resource = Resource'- { _rResourceType :: !(Maybe Text)- , _rResourceName :: !(Maybe Text)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _rResourceType :: !(Maybe Text)+ , _rResourceName :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'Resource' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -367,12 +372,9 @@ -- * 'rResourceName' - The name of the resource referenced by the event returned. These are user-created names whose values will depend on the environment. For example, the resource name might be "auto-scaling-test-group" for an Auto Scaling Group or "i-1234567" for an EC2 Instance. resource :: Resource-resource =- Resource'- { _rResourceType = Nothing- , _rResourceName = Nothing- }+resource = Resource' {_rResourceType = Nothing, _rResourceName = Nothing} + -- | The type of a resource referenced by the event returned. When the resource type cannot be determined, null is returned. Some examples of resource types are: __Instance__ for EC2, __Trail__ for CloudTrail, __DBInstance__ for RDS, and __AccessKey__ for IAM. For a list of resource types supported for event lookup, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/lookup_supported_resourcetypes.html Resource Types Supported for Event Lookup> . rResourceType :: Lens' Resource (Maybe Text) rResourceType = lens _rResourceType (\ s a -> s{_rResourceType = a});@@ -388,9 +390,9 @@ Resource' <$> (x .:? "ResourceType") <*> (x .:? "ResourceName")) -instance Hashable Resource+instance Hashable Resource where -instance NFData Resource+instance NFData Resource where -- | A resource tag. --@@ -398,30 +400,28 @@ -- -- /See:/ 'resourceTag' smart constructor. data ResourceTag = ResourceTag'- { _rResourceId :: !(Maybe Text)- , _rTagsList :: !(Maybe [Tag])- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _rResourceId :: !(Maybe Text)+ , _rTagsList :: !(Maybe [Tag])+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'ResourceTag' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'rResourceId' - Specifies the ARN of the resource. ----- * 'rTagsList' - Undocumented member.+-- * 'rTagsList' - A list of tags. resourceTag :: ResourceTag-resourceTag =- ResourceTag'- { _rResourceId = Nothing- , _rTagsList = Nothing- }+resourceTag = ResourceTag' {_rResourceId = Nothing, _rTagsList = Nothing} + -- | Specifies the ARN of the resource. rResourceId :: Lens' ResourceTag (Maybe Text) rResourceId = lens _rResourceId (\ s a -> s{_rResourceId = a}); --- | Undocumented member.+-- | A list of tags. rTagsList :: Lens' ResourceTag [Tag] rTagsList = lens _rTagsList (\ s a -> s{_rTagsList = a}) . _Default . _Coerce; @@ -433,9 +433,9 @@ (x .:? "ResourceId") <*> (x .:? "TagsList" .!= mempty)) -instance Hashable ResourceTag+instance Hashable ResourceTag where -instance NFData ResourceTag+instance NFData ResourceTag where -- | A custom key-value pair associated with a resource such as a CloudTrail trail. --@@ -443,10 +443,11 @@ -- -- /See:/ 'tag' smart constructor. data Tag = Tag'- { _tagValue :: !(Maybe Text)- , _tagKey :: !Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _tagValue :: !(Maybe Text)+ , _tagKey :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'Tag' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -457,12 +458,9 @@ tag :: Text -- ^ 'tagKey' -> Tag-tag pKey_ =- Tag'- { _tagValue = Nothing- , _tagKey = pKey_- }+tag pKey_ = Tag' {_tagValue = Nothing, _tagKey = pKey_} + -- | The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters. tagValue :: Lens' Tag (Maybe Text) tagValue = lens _tagValue (\ s a -> s{_tagValue = a});@@ -476,9 +474,9 @@ = withObject "Tag" (\ x -> Tag' <$> (x .:? "Value") <*> (x .: "Key")) -instance Hashable Tag+instance Hashable Tag where -instance NFData Tag+instance NFData Tag where instance ToJSON Tag where toJSON Tag'{..}@@ -493,22 +491,23 @@ -- -- /See:/ 'trail' smart constructor. data Trail = Trail'- { _tLogFileValidationEnabled :: !(Maybe Bool)- , _tTrailARN :: !(Maybe Text)- , _tS3KeyPrefix :: !(Maybe Text)- , _tSNSTopicARN :: !(Maybe Text)- , _tSNSTopicName :: !(Maybe Text)- , _tCloudWatchLogsLogGroupARN :: !(Maybe Text)- , _tKMSKeyId :: !(Maybe Text)- , _tHomeRegion :: !(Maybe Text)- , _tName :: !(Maybe Text)- , _tIncludeGlobalServiceEvents :: !(Maybe Bool)- , _tHasCustomEventSelectors :: !(Maybe Bool)- , _tCloudWatchLogsRoleARN :: !(Maybe Text)- , _tS3BucketName :: !(Maybe Text)- , _tIsMultiRegionTrail :: !(Maybe Bool)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _tLogFileValidationEnabled :: !(Maybe Bool)+ , _tTrailARN :: !(Maybe Text)+ , _tS3KeyPrefix :: !(Maybe Text)+ , _tSNSTopicARN :: !(Maybe Text)+ , _tSNSTopicName :: !(Maybe Text)+ , _tCloudWatchLogsLogGroupARN :: !(Maybe Text)+ , _tKMSKeyId :: !(Maybe Text)+ , _tHomeRegion :: !(Maybe Text)+ , _tName :: !(Maybe Text)+ , _tIncludeGlobalServiceEvents :: !(Maybe Bool)+ , _tHasCustomEventSelectors :: !(Maybe Bool)+ , _tCloudWatchLogsRoleARN :: !(Maybe Text)+ , _tS3BucketName :: !(Maybe Text)+ , _tIsMultiRegionTrail :: !(Maybe Bool)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'Trail' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -543,23 +542,24 @@ trail :: Trail trail =- Trail'- { _tLogFileValidationEnabled = Nothing- , _tTrailARN = Nothing- , _tS3KeyPrefix = Nothing- , _tSNSTopicARN = Nothing- , _tSNSTopicName = Nothing- , _tCloudWatchLogsLogGroupARN = Nothing- , _tKMSKeyId = Nothing- , _tHomeRegion = Nothing- , _tName = Nothing- , _tIncludeGlobalServiceEvents = Nothing- , _tHasCustomEventSelectors = Nothing- , _tCloudWatchLogsRoleARN = Nothing- , _tS3BucketName = Nothing- , _tIsMultiRegionTrail = Nothing- }+ Trail'+ { _tLogFileValidationEnabled = Nothing+ , _tTrailARN = Nothing+ , _tS3KeyPrefix = Nothing+ , _tSNSTopicARN = Nothing+ , _tSNSTopicName = Nothing+ , _tCloudWatchLogsLogGroupARN = Nothing+ , _tKMSKeyId = Nothing+ , _tHomeRegion = Nothing+ , _tName = Nothing+ , _tIncludeGlobalServiceEvents = Nothing+ , _tHasCustomEventSelectors = Nothing+ , _tCloudWatchLogsRoleARN = Nothing+ , _tS3BucketName = Nothing+ , _tIsMultiRegionTrail = Nothing+ } + -- | Specifies whether log file validation is enabled. tLogFileValidationEnabled :: Lens' Trail (Maybe Bool) tLogFileValidationEnabled = lens _tLogFileValidationEnabled (\ s a -> s{_tLogFileValidationEnabled = a});@@ -636,6 +636,6 @@ <*> (x .:? "S3BucketName") <*> (x .:? "IsMultiRegionTrail")) -instance Hashable Trail+instance Hashable Trail where -instance NFData Trail+instance NFData Trail where
gen/Network/AWS/CloudTrail/Types/Sum.hs view
@@ -9,25 +9,26 @@ -- | -- Module : Network.AWS.CloudTrail.Types.Sum--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Network.AWS.CloudTrail.Types.Sum where -import Network.AWS.Prelude+import Network.AWS.Prelude data LookupAttributeKey- = EventId- | EventName- | EventSource- | ResourceName- | ResourceType- | Username- deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)+ = EventId+ | EventName+ | EventSource+ | ResourceName+ | ResourceType+ | Username+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic) + instance FromText LookupAttributeKey where parser = takeLowerText >>= \case "eventid" -> pure EventId@@ -58,10 +59,11 @@ toJSON = toJSONText data ReadWriteType- = All- | ReadOnly- | WriteOnly- deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)+ = All+ | ReadOnly+ | WriteOnly+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+ instance FromText ReadWriteType where parser = takeLowerText >>= \case
gen/Network/AWS/CloudTrail/UpdateTrail.hs view
@@ -12,9 +12,9 @@ -- | -- Module : Network.AWS.CloudTrail.UpdateTrail--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -57,12 +57,12 @@ , utrsResponseStatus ) where -import Network.AWS.CloudTrail.Types-import Network.AWS.CloudTrail.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudTrail.Types+import Network.AWS.CloudTrail.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response -- | Specifies settings to update for the trail. --@@ -70,18 +70,19 @@ -- -- /See:/ 'updateTrail' smart constructor. data UpdateTrail = UpdateTrail'- { _utS3KeyPrefix :: !(Maybe Text)- , _utSNSTopicName :: !(Maybe Text)- , _utEnableLogFileValidation :: !(Maybe Bool)- , _utCloudWatchLogsLogGroupARN :: !(Maybe Text)- , _utKMSKeyId :: !(Maybe Text)- , _utIncludeGlobalServiceEvents :: !(Maybe Bool)- , _utCloudWatchLogsRoleARN :: !(Maybe Text)- , _utS3BucketName :: !(Maybe Text)- , _utIsMultiRegionTrail :: !(Maybe Bool)- , _utName :: !Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _utS3KeyPrefix :: !(Maybe Text)+ , _utSNSTopicName :: !(Maybe Text)+ , _utEnableLogFileValidation :: !(Maybe Bool)+ , _utCloudWatchLogsLogGroupARN :: !(Maybe Text)+ , _utKMSKeyId :: !(Maybe Text)+ , _utIncludeGlobalServiceEvents :: !(Maybe Bool)+ , _utCloudWatchLogsRoleARN :: !(Maybe Text)+ , _utS3BucketName :: !(Maybe Text)+ , _utIsMultiRegionTrail :: !(Maybe Bool)+ , _utName :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'UpdateTrail' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -94,7 +95,7 @@ -- -- * 'utCloudWatchLogsLogGroupARN' - Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. Not required unless you specify CloudWatchLogsRoleArn. ----- * 'utKMSKeyId' - Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be a an alias name prefixed by "alias/", a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier. Examples: * alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 * 12345678-1234-1234-1234-123456789012+-- * 'utKMSKeyId' - Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by "alias/", a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier. Examples: * alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 * 12345678-1234-1234-1234-123456789012 -- -- * 'utIncludeGlobalServiceEvents' - Specifies whether the trail is publishing events from global services such as IAM to the log files. --@@ -109,19 +110,20 @@ :: Text -- ^ 'utName' -> UpdateTrail updateTrail pName_ =- UpdateTrail'- { _utS3KeyPrefix = Nothing- , _utSNSTopicName = Nothing- , _utEnableLogFileValidation = Nothing- , _utCloudWatchLogsLogGroupARN = Nothing- , _utKMSKeyId = Nothing- , _utIncludeGlobalServiceEvents = Nothing- , _utCloudWatchLogsRoleARN = Nothing- , _utS3BucketName = Nothing- , _utIsMultiRegionTrail = Nothing- , _utName = pName_- }+ UpdateTrail'+ { _utS3KeyPrefix = Nothing+ , _utSNSTopicName = Nothing+ , _utEnableLogFileValidation = Nothing+ , _utCloudWatchLogsLogGroupARN = Nothing+ , _utKMSKeyId = Nothing+ , _utIncludeGlobalServiceEvents = Nothing+ , _utCloudWatchLogsRoleARN = Nothing+ , _utS3BucketName = Nothing+ , _utIsMultiRegionTrail = Nothing+ , _utName = pName_+ } + -- | Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html Finding Your CloudTrail Log Files> . The maximum length is 200 characters. utS3KeyPrefix :: Lens' UpdateTrail (Maybe Text) utS3KeyPrefix = lens _utS3KeyPrefix (\ s a -> s{_utS3KeyPrefix = a});@@ -138,7 +140,7 @@ utCloudWatchLogsLogGroupARN :: Lens' UpdateTrail (Maybe Text) utCloudWatchLogsLogGroupARN = lens _utCloudWatchLogsLogGroupARN (\ s a -> s{_utCloudWatchLogsLogGroupARN = a}); --- | Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be a an alias name prefixed by "alias/", a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier. Examples: * alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 * 12345678-1234-1234-1234-123456789012+-- | Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by "alias/", a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier. Examples: * alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 * 12345678-1234-1234-1234-123456789012 utKMSKeyId :: Lens' UpdateTrail (Maybe Text) utKMSKeyId = lens _utKMSKeyId (\ s a -> s{_utKMSKeyId = a}); @@ -183,9 +185,9 @@ <*> (x .?> "IsMultiRegionTrail") <*> (pure (fromEnum s))) -instance Hashable UpdateTrail+instance Hashable UpdateTrail where -instance NFData UpdateTrail+instance NFData UpdateTrail where instance ToHeaders UpdateTrail where toHeaders@@ -228,21 +230,22 @@ -- -- /See:/ 'updateTrailResponse' smart constructor. data UpdateTrailResponse = UpdateTrailResponse'- { _utrsLogFileValidationEnabled :: !(Maybe Bool)- , _utrsTrailARN :: !(Maybe Text)- , _utrsS3KeyPrefix :: !(Maybe Text)- , _utrsSNSTopicARN :: !(Maybe Text)- , _utrsSNSTopicName :: !(Maybe Text)- , _utrsCloudWatchLogsLogGroupARN :: !(Maybe Text)- , _utrsKMSKeyId :: !(Maybe Text)- , _utrsName :: !(Maybe Text)- , _utrsIncludeGlobalServiceEvents :: !(Maybe Bool)- , _utrsCloudWatchLogsRoleARN :: !(Maybe Text)- , _utrsS3BucketName :: !(Maybe Text)- , _utrsIsMultiRegionTrail :: !(Maybe Bool)- , _utrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _utrsLogFileValidationEnabled :: !(Maybe Bool)+ , _utrsTrailARN :: !(Maybe Text)+ , _utrsS3KeyPrefix :: !(Maybe Text)+ , _utrsSNSTopicARN :: !(Maybe Text)+ , _utrsSNSTopicName :: !(Maybe Text)+ , _utrsCloudWatchLogsLogGroupARN :: !(Maybe Text)+ , _utrsKMSKeyId :: !(Maybe Text)+ , _utrsName :: !(Maybe Text)+ , _utrsIncludeGlobalServiceEvents :: !(Maybe Bool)+ , _utrsCloudWatchLogsRoleARN :: !(Maybe Text)+ , _utrsS3BucketName :: !(Maybe Text)+ , _utrsIsMultiRegionTrail :: !(Maybe Bool)+ , _utrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'UpdateTrailResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -276,22 +279,23 @@ :: Int -- ^ 'utrsResponseStatus' -> UpdateTrailResponse updateTrailResponse pResponseStatus_ =- UpdateTrailResponse'- { _utrsLogFileValidationEnabled = Nothing- , _utrsTrailARN = Nothing- , _utrsS3KeyPrefix = Nothing- , _utrsSNSTopicARN = Nothing- , _utrsSNSTopicName = Nothing- , _utrsCloudWatchLogsLogGroupARN = Nothing- , _utrsKMSKeyId = Nothing- , _utrsName = Nothing- , _utrsIncludeGlobalServiceEvents = Nothing- , _utrsCloudWatchLogsRoleARN = Nothing- , _utrsS3BucketName = Nothing- , _utrsIsMultiRegionTrail = Nothing- , _utrsResponseStatus = pResponseStatus_- }+ UpdateTrailResponse'+ { _utrsLogFileValidationEnabled = Nothing+ , _utrsTrailARN = Nothing+ , _utrsS3KeyPrefix = Nothing+ , _utrsSNSTopicARN = Nothing+ , _utrsSNSTopicName = Nothing+ , _utrsCloudWatchLogsLogGroupARN = Nothing+ , _utrsKMSKeyId = Nothing+ , _utrsName = Nothing+ , _utrsIncludeGlobalServiceEvents = Nothing+ , _utrsCloudWatchLogsRoleARN = Nothing+ , _utrsS3BucketName = Nothing+ , _utrsIsMultiRegionTrail = Nothing+ , _utrsResponseStatus = pResponseStatus_+ } + -- | Specifies whether log file integrity validation is enabled. utrsLogFileValidationEnabled :: Lens' UpdateTrailResponse (Maybe Bool) utrsLogFileValidationEnabled = lens _utrsLogFileValidationEnabled (\ s a -> s{_utrsLogFileValidationEnabled = a});@@ -344,4 +348,4 @@ utrsResponseStatus :: Lens' UpdateTrailResponse Int utrsResponseStatus = lens _utrsResponseStatus (\ s a -> s{_utrsResponseStatus = a}); -instance NFData UpdateTrailResponse+instance NFData UpdateTrailResponse where
gen/Network/AWS/CloudTrail/Waiters.hs view
@@ -7,15 +7,15 @@ -- | -- Module : Network.AWS.CloudTrail.Waiters--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Network.AWS.CloudTrail.Waiters where -import Network.AWS.CloudTrail.Types-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Waiter+import Network.AWS.CloudTrail.Types+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Waiter
test/Main.hs view
@@ -2,9 +2,9 @@ -- | -- Module : Main--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --
test/Test/AWS/Gen/CloudTrail.hs view
@@ -5,20 +5,20 @@ -- | -- Module : Test.AWS.Gen.CloudTrail--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Test.AWS.Gen.CloudTrail where import Data.Proxy+import Network.AWS.CloudTrail+import Test.AWS.CloudTrail.Internal import Test.AWS.Fixture import Test.AWS.Prelude import Test.Tasty-import Network.AWS.CloudTrail-import Test.AWS.CloudTrail.Internal -- Auto-generated: the actual test selection needs to be manually placed into -- the top-level so that real test data can be incrementally added.