forked from brendanhay/amazonka
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerating amazonka-cloudwatch-events from latest service definition
- Loading branch information
1 parent
8400fe9
commit 101538e
Showing
19 changed files
with
540 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
method: POST | ||
headers: | ||
Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/events/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=? | ||
Host: events.us-east-1.amazonaws.com | ||
Content-Type: application/x-www-form-urlencoded; charset=utf-8 | ||
X-Amz-Content-SHA256: abcdef | ||
X-Amz-Date: 20091028T223200Z | ||
body: | ||
'' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
method: POST | ||
headers: | ||
Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/events/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=? | ||
Host: events.us-east-1.amazonaws.com | ||
Content-Type: application/x-www-form-urlencoded; charset=utf-8 | ||
X-Amz-Content-SHA256: abcdef | ||
X-Amz-Date: 20091028T223200Z | ||
body: | ||
'' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
method: POST | ||
headers: | ||
Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/events/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=? | ||
Host: events.us-east-1.amazonaws.com | ||
Content-Type: application/x-www-form-urlencoded; charset=utf-8 | ||
X-Amz-Content-SHA256: abcdef | ||
X-Amz-Date: 20091028T223200Z | ||
body: | ||
'' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 136 additions & 0 deletions
136
amazonka-cloudwatch-events/gen/Network/AWS/CloudWatchEvents/DescribeEventBus.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
{-# 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.CloudWatchEvents.DescribeEventBus | ||
-- Copyright : (c) 2013-2016 Brendan Hay | ||
-- License : Mozilla Public License, v. 2.0. | ||
-- Maintainer : Brendan Hay <[email protected]> | ||
-- Stability : auto-generated | ||
-- Portability : non-portable (GHC extensions) | ||
-- | ||
-- Displays the external AWS accounts that are permitted to write events to your account using your account's event bus, and the associated policy. To enable your account to receive events from other accounts, use 'PutPermission' . | ||
-- | ||
-- | ||
module Network.AWS.CloudWatchEvents.DescribeEventBus | ||
( | ||
-- * Creating a Request | ||
describeEventBus | ||
, DescribeEventBus | ||
|
||
-- * Destructuring the Response | ||
, describeEventBusResponse | ||
, DescribeEventBusResponse | ||
-- * Response Lenses | ||
, debrsARN | ||
, debrsName | ||
, debrsPolicy | ||
, debrsResponseStatus | ||
) where | ||
|
||
import Network.AWS.CloudWatchEvents.Types | ||
import Network.AWS.CloudWatchEvents.Types.Product | ||
import Network.AWS.Lens | ||
import Network.AWS.Prelude | ||
import Network.AWS.Request | ||
import Network.AWS.Response | ||
|
||
-- | /See:/ 'describeEventBus' smart constructor. | ||
data DescribeEventBus = | ||
DescribeEventBus' | ||
deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'DescribeEventBus' with the minimum fields required to make a request. | ||
-- | ||
describeEventBus | ||
:: DescribeEventBus | ||
describeEventBus = DescribeEventBus' | ||
|
||
instance AWSRequest DescribeEventBus where | ||
type Rs DescribeEventBus = DescribeEventBusResponse | ||
request = postJSON cloudWatchEvents | ||
response | ||
= receiveJSON | ||
(\ s h x -> | ||
DescribeEventBusResponse' <$> | ||
(x .?> "Arn") <*> (x .?> "Name") <*> (x .?> "Policy") | ||
<*> (pure (fromEnum s))) | ||
|
||
instance Hashable DescribeEventBus | ||
|
||
instance NFData DescribeEventBus | ||
|
||
instance ToHeaders DescribeEventBus where | ||
toHeaders | ||
= const | ||
(mconcat | ||
["X-Amz-Target" =# | ||
("AWSEvents.DescribeEventBus" :: ByteString), | ||
"Content-Type" =# | ||
("application/x-amz-json-1.1" :: ByteString)]) | ||
|
||
instance ToJSON DescribeEventBus where | ||
toJSON = const (Object mempty) | ||
|
||
instance ToPath DescribeEventBus where | ||
toPath = const "/" | ||
|
||
instance ToQuery DescribeEventBus where | ||
toQuery = const mempty | ||
|
||
-- | /See:/ 'describeEventBusResponse' smart constructor. | ||
data DescribeEventBusResponse = DescribeEventBusResponse' | ||
{ _debrsARN :: !(Maybe Text) | ||
, _debrsName :: !(Maybe Text) | ||
, _debrsPolicy :: !(Maybe Text) | ||
, _debrsResponseStatus :: !Int | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'DescribeEventBusResponse' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'debrsARN' - The Amazon Resource Name (ARN) of the account permitted to write events to the current account. | ||
-- | ||
-- * 'debrsName' - The name of the event bus. Currently, this is always @default@ . | ||
-- | ||
-- * 'debrsPolicy' - The policy that enables the external account to send events to your account. | ||
-- | ||
-- * 'debrsResponseStatus' - -- | The response status code. | ||
describeEventBusResponse | ||
:: Int -- ^ 'debrsResponseStatus' | ||
-> DescribeEventBusResponse | ||
describeEventBusResponse pResponseStatus_ = | ||
DescribeEventBusResponse' | ||
{ _debrsARN = Nothing | ||
, _debrsName = Nothing | ||
, _debrsPolicy = Nothing | ||
, _debrsResponseStatus = pResponseStatus_ | ||
} | ||
|
||
-- | The Amazon Resource Name (ARN) of the account permitted to write events to the current account. | ||
debrsARN :: Lens' DescribeEventBusResponse (Maybe Text) | ||
debrsARN = lens _debrsARN (\ s a -> s{_debrsARN = a}); | ||
|
||
-- | The name of the event bus. Currently, this is always @default@ . | ||
debrsName :: Lens' DescribeEventBusResponse (Maybe Text) | ||
debrsName = lens _debrsName (\ s a -> s{_debrsName = a}); | ||
|
||
-- | The policy that enables the external account to send events to your account. | ||
debrsPolicy :: Lens' DescribeEventBusResponse (Maybe Text) | ||
debrsPolicy = lens _debrsPolicy (\ s a -> s{_debrsPolicy = a}); | ||
|
||
-- | -- | The response status code. | ||
debrsResponseStatus :: Lens' DescribeEventBusResponse Int | ||
debrsResponseStatus = lens _debrsResponseStatus (\ s a -> s{_debrsResponseStatus = a}); | ||
|
||
instance NFData DescribeEventBusResponse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 133 additions & 0 deletions
133
amazonka-cloudwatch-events/gen/Network/AWS/CloudWatchEvents/PutPermission.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
{-# 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.CloudWatchEvents.PutPermission | ||
-- Copyright : (c) 2013-2016 Brendan Hay | ||
-- License : Mozilla Public License, v. 2.0. | ||
-- Maintainer : Brendan Hay <[email protected]> | ||
-- Stability : auto-generated | ||
-- Portability : non-portable (GHC extensions) | ||
-- | ||
-- Running @PutPermission@ permits the specified AWS account to put events to your account's default /event bus/ . CloudWatch Events rules in your account are triggered by these events arriving to your default event bus. | ||
-- | ||
-- | ||
-- For another account to send events to your account, that external account must have a CloudWatch Events rule with your account's default event bus as a target. | ||
-- | ||
-- To enable multiple AWS accounts to put events to your default event bus, run @PutPermission@ once for each of these accounts. | ||
-- | ||
module Network.AWS.CloudWatchEvents.PutPermission | ||
( | ||
-- * Creating a Request | ||
putPermission | ||
, PutPermission | ||
-- * Request Lenses | ||
, ppAction | ||
, ppPrincipal | ||
, ppStatementId | ||
|
||
-- * Destructuring the Response | ||
, putPermissionResponse | ||
, PutPermissionResponse | ||
) where | ||
|
||
import Network.AWS.CloudWatchEvents.Types | ||
import Network.AWS.CloudWatchEvents.Types.Product | ||
import Network.AWS.Lens | ||
import Network.AWS.Prelude | ||
import Network.AWS.Request | ||
import Network.AWS.Response | ||
|
||
-- | /See:/ 'putPermission' smart constructor. | ||
data PutPermission = PutPermission' | ||
{ _ppAction :: !Text | ||
, _ppPrincipal :: !Text | ||
, _ppStatementId :: !Text | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'PutPermission' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'ppAction' - The action that you are enabling the other account to perform. Currently, this must be @events:PutEvents@ . | ||
-- | ||
-- * 'ppPrincipal' - The 12-digit AWS account ID that you are permitting to put events to your default event bus. Specify "*" to permit any account to put events to your default event bus. If you specify "*", avoid creating rules that may match undesirable events. To create more secure rules, make sure that the event pattern for each rule contains an @account@ field with a specific account ID from which to receive events. Rules with an account field do not match any events sent from other accounts. | ||
-- | ||
-- * 'ppStatementId' - An identifier string for the external account that you are granting permissions to. If you later want to revoke the permission for this external account, specify this @StatementId@ when you run 'RemovePermission' . | ||
putPermission | ||
:: Text -- ^ 'ppAction' | ||
-> Text -- ^ 'ppPrincipal' | ||
-> Text -- ^ 'ppStatementId' | ||
-> PutPermission | ||
putPermission pAction_ pPrincipal_ pStatementId_ = | ||
PutPermission' | ||
{ _ppAction = pAction_ | ||
, _ppPrincipal = pPrincipal_ | ||
, _ppStatementId = pStatementId_ | ||
} | ||
|
||
-- | The action that you are enabling the other account to perform. Currently, this must be @events:PutEvents@ . | ||
ppAction :: Lens' PutPermission Text | ||
ppAction = lens _ppAction (\ s a -> s{_ppAction = a}); | ||
|
||
-- | The 12-digit AWS account ID that you are permitting to put events to your default event bus. Specify "*" to permit any account to put events to your default event bus. If you specify "*", avoid creating rules that may match undesirable events. To create more secure rules, make sure that the event pattern for each rule contains an @account@ field with a specific account ID from which to receive events. Rules with an account field do not match any events sent from other accounts. | ||
ppPrincipal :: Lens' PutPermission Text | ||
ppPrincipal = lens _ppPrincipal (\ s a -> s{_ppPrincipal = a}); | ||
|
||
-- | An identifier string for the external account that you are granting permissions to. If you later want to revoke the permission for this external account, specify this @StatementId@ when you run 'RemovePermission' . | ||
ppStatementId :: Lens' PutPermission Text | ||
ppStatementId = lens _ppStatementId (\ s a -> s{_ppStatementId = a}); | ||
|
||
instance AWSRequest PutPermission where | ||
type Rs PutPermission = PutPermissionResponse | ||
request = postJSON cloudWatchEvents | ||
response = receiveNull PutPermissionResponse' | ||
|
||
instance Hashable PutPermission | ||
|
||
instance NFData PutPermission | ||
|
||
instance ToHeaders PutPermission where | ||
toHeaders | ||
= const | ||
(mconcat | ||
["X-Amz-Target" =# | ||
("AWSEvents.PutPermission" :: ByteString), | ||
"Content-Type" =# | ||
("application/x-amz-json-1.1" :: ByteString)]) | ||
|
||
instance ToJSON PutPermission where | ||
toJSON PutPermission'{..} | ||
= object | ||
(catMaybes | ||
[Just ("Action" .= _ppAction), | ||
Just ("Principal" .= _ppPrincipal), | ||
Just ("StatementId" .= _ppStatementId)]) | ||
|
||
instance ToPath PutPermission where | ||
toPath = const "/" | ||
|
||
instance ToQuery PutPermission where | ||
toQuery = const mempty | ||
|
||
-- | /See:/ 'putPermissionResponse' smart constructor. | ||
data PutPermissionResponse = | ||
PutPermissionResponse' | ||
deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'PutPermissionResponse' with the minimum fields required to make a request. | ||
-- | ||
putPermissionResponse | ||
:: PutPermissionResponse | ||
putPermissionResponse = PutPermissionResponse' | ||
|
||
instance NFData PutPermissionResponse |
Oops, something went wrong.