Skip to content

Commit

Permalink
Regenerating amazonka-cloudtrail from latest service definition
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanhay committed Nov 29, 2016
1 parent 4e292a8 commit fc26b72
Show file tree
Hide file tree
Showing 14 changed files with 630 additions and 7 deletions.
2 changes: 2 additions & 0 deletions amazonka-cloudtrail/amazonka-cloudtrail.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ library
, Network.AWS.CloudTrail.CreateTrail
, Network.AWS.CloudTrail.DeleteTrail
, Network.AWS.CloudTrail.DescribeTrails
, Network.AWS.CloudTrail.GetEventSelectors
, Network.AWS.CloudTrail.GetTrailStatus
, Network.AWS.CloudTrail.ListPublicKeys
, Network.AWS.CloudTrail.ListTags
, Network.AWS.CloudTrail.LookupEvents
, Network.AWS.CloudTrail.PutEventSelectors
, Network.AWS.CloudTrail.RemoveTags
, Network.AWS.CloudTrail.StartLogging
, Network.AWS.CloudTrail.StopLogging
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
31 changes: 30 additions & 1 deletion amazonka-cloudtrail/gen/Network/AWS/CloudTrail.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
--
-- CloudTrail is a web service that records AWS API calls for your AWS account and delivers log files to an Amazon S3 bucket. The recorded information includes the identity of the user, the start time of the AWS API call, the source IP address, the request parameters, and the response elements returned by the service.
--
-- See the CloudTrail User Guide for information about the data that is included with each AWS API call listed in the log files.
-- See the <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html AWS CloudTrail User Guide> for information about the data that is included with each AWS API call listed in the log files.
--
module Network.AWS.CloudTrail
(
Expand Down Expand Up @@ -78,6 +78,9 @@ module Network.AWS.CloudTrail
-- ** TrailNotFoundException
, _TrailNotFoundException

-- ** InvalidEventSelectorsException
, _InvalidEventSelectorsException

-- ** TrailNotProvidedException
, _TrailNotProvidedException

Expand Down Expand Up @@ -156,6 +159,9 @@ module Network.AWS.CloudTrail
-- ** CreateTrail
, module Network.AWS.CloudTrail.CreateTrail

-- ** GetEventSelectors
, module Network.AWS.CloudTrail.GetEventSelectors

-- ** GetTrailStatus
, module Network.AWS.CloudTrail.GetTrailStatus

Expand All @@ -165,6 +171,9 @@ module Network.AWS.CloudTrail
-- ** ListTags
, module Network.AWS.CloudTrail.ListTags

-- ** PutEventSelectors
, module Network.AWS.CloudTrail.PutEventSelectors

-- ** StartLogging
, module Network.AWS.CloudTrail.StartLogging

Expand All @@ -173,6 +182,15 @@ module Network.AWS.CloudTrail
-- ** LookupAttributeKey
, LookupAttributeKey (..)

-- ** ReadWriteType
, ReadWriteType (..)

-- ** DataResource
, DataResource
, dataResource
, drValues
, drType

-- ** Event
, Event
, event
Expand All @@ -181,8 +199,16 @@ module Network.AWS.CloudTrail
, eEventTime
, eCloudTrailEvent
, eEventName
, eEventSource
, eEventId

-- ** EventSelector
, EventSelector
, eventSelector
, esDataResources
, esReadWriteType
, esIncludeManagementEvents

-- ** LookupAttribute
, LookupAttribute
, lookupAttribute
Expand Down Expand Up @@ -228,6 +254,7 @@ module Network.AWS.CloudTrail
, tHomeRegion
, tName
, tIncludeGlobalServiceEvents
, tHasCustomEventSelectors
, tCloudWatchLogsRoleARN
, tS3BucketName
, tIsMultiRegionTrail
Expand All @@ -237,10 +264,12 @@ 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
Expand Down
6 changes: 3 additions & 3 deletions amazonka-cloudtrail/gen/Network/AWS/CloudTrail/AddTags.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Adds one or more tags to a trail, up to a limit of 10. Tags must be unique per trail. Overwrites an existing tag's value when a new value is specified for an existing tag key. If you specify a key without a value, the tag will be created with the specified key and a value of null. You can tag a trail that applies to all regions only from the region in which the trail was created (that is, from its home region).
-- Adds one or more tags to a trail, up to a limit of 50. Tags must be unique per trail. Overwrites an existing tag's value when a new value is specified for an existing tag key. If you specify a key without a value, the tag will be created with the specified key and a value of null. You can tag a trail that applies to all regions only from the region in which the trail was created (that is, from its home region).
--
--
module Network.AWS.CloudTrail.AddTags
Expand Down Expand Up @@ -58,7 +58,7 @@ data AddTags = AddTags'
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'atTagsList' - Contains a list of CloudTrail tags, up to a limit of 10.
-- * 'atTagsList' - Contains a list of CloudTrail tags, up to a limit of 50
--
-- * 'atResourceId' - Specifies the ARN of the trail to which one or more tags will be added. The format of a trail ARN is: @arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail@
addTags
Expand All @@ -70,7 +70,7 @@ addTags pResourceId_ =
, _atResourceId = pResourceId_
}

-- | Contains a list of CloudTrail tags, up to a limit of 10.
-- | 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;

Expand Down
153 changes: 153 additions & 0 deletions amazonka-cloudtrail/gen/Network/AWS/CloudTrail/GetEventSelectors.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}

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

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

-- |
-- Module : Network.AWS.CloudTrail.GetEventSelectors
-- Copyright : (c) 2013-2016 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the settings for the event selectors that you configured for your trail. The information returned for your event selectors includes the following:
--
--
-- * The S3 objects that you are logging for data events.
--
-- * If your event selector includes management events.
--
-- * If your event selector includes read-only events, write-only events, or all.
--
--
--
-- 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/ .
--
module Network.AWS.CloudTrail.GetEventSelectors
(
-- * Creating a Request
getEventSelectors
, GetEventSelectors
-- * Request Lenses
, gesTrailName

-- * Destructuring the Response
, getEventSelectorsResponse
, GetEventSelectorsResponse
-- * Response Lenses
, gesrsTrailARN
, gesrsEventSelectors
, 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

-- | /See:/ 'getEventSelectors' smart constructor.
newtype GetEventSelectors = GetEventSelectors'
{ _gesTrailName :: Maybe 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
}

-- | 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 _gesTrailName (\ s a -> s{_gesTrailName = a});

instance AWSRequest GetEventSelectors where
type Rs GetEventSelectors = GetEventSelectorsResponse
request = postJSON cloudTrail
response
= receiveJSON
(\ s h x ->
GetEventSelectorsResponse' <$>
(x .?> "TrailARN") <*>
(x .?> "EventSelectors" .!@ mempty)
<*> (pure (fromEnum s)))

instance Hashable GetEventSelectors

instance NFData GetEventSelectors

instance ToHeaders GetEventSelectors where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101.GetEventSelectors"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])

instance ToJSON GetEventSelectors where
toJSON GetEventSelectors'{..}
= object
(catMaybes [("TrailName" .=) <$> _gesTrailName])

instance ToPath GetEventSelectors where
toPath = const "/"

instance ToQuery GetEventSelectors where
toQuery = const mempty

-- | /See:/ 'getEventSelectorsResponse' smart constructor.
data GetEventSelectorsResponse = GetEventSelectorsResponse'
{ _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:
--
-- * 'gesrsTrailARN' - The specified trail ARN that has the event selectors.
--
-- * 'gesrsEventSelectors' - The event selectors that are configured for the trail.
--
-- * 'gesrsResponseStatus' - -- | The response status code.
getEventSelectorsResponse
:: Int -- ^ 'gesrsResponseStatus'
-> GetEventSelectorsResponse
getEventSelectorsResponse 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});

-- | The event selectors that are configured for the trail.
gesrsEventSelectors :: Lens' GetEventSelectorsResponse [EventSelector]
gesrsEventSelectors = lens _gesrsEventSelectors (\ s a -> s{_gesrsEventSelectors = a}) . _Default . _Coerce;

-- | -- | The response status code.
gesrsResponseStatus :: Lens' GetEventSelectorsResponse Int
gesrsResponseStatus = lens _gesrsResponseStatus (\ s a -> s{_gesrsResponseStatus = a});

instance NFData GetEventSelectorsResponse
16 changes: 15 additions & 1 deletion amazonka-cloudtrail/gen/Network/AWS/CloudTrail/LookupEvents.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,23 @@
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Looks up API activity events captured by CloudTrail that create, update, or delete resources in your account. Events for a region can be looked up for the times in which you had CloudTrail turned on in that region during the last seven days. Lookup supports five different attributes: time range (defined by a start time and end time), user name, event name, resource type, and resource name. All attributes are optional. The maximum number of attributes that can be specified in any one lookup request are time range and one other attribute. The default number of results returned is 10, with a maximum of 50 possible. The response includes a token that you can use to get the next page of results.
-- Looks up API activity events captured by CloudTrail that create, update, or delete resources in your account. Events for a region can be looked up for the times in which you had CloudTrail turned on in that region during the last seven days. Lookup supports the following attributes:
--
--
-- * Event ID
--
-- * Event name
--
-- * Resource name
--
-- * Resource type
--
-- * User name
--
--
--
-- All attributes are optional. The default number of results returned is 10, with a maximum of 50 possible. The response includes a token that you can use to get the next page of results.
--
-- /Important:/ The rate of lookup requests is limited to one per second per account. If this limit is exceeded, a throttling error occurs.
--
-- /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.
Expand Down
Loading

0 comments on commit fc26b72

Please sign in to comment.