forked from brendanhay/amazonka
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerating amazonka-codepipeline from latest service definition
- Loading branch information
1 parent
55a0389
commit 3ee4d95
Showing
16 changed files
with
348 additions
and
61 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/codepipeline/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=? | ||
Host: codepipeline.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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
174 changes: 174 additions & 0 deletions
174
amazonka-codepipeline/gen/Network/AWS/CodePipeline/ListPipelineExecutions.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,174 @@ | ||
{-# 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.CodePipeline.ListPipelineExecutions | ||
-- 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) | ||
-- | ||
-- Gets a summary of the most recent executions for a pipeline. | ||
-- | ||
-- | ||
module Network.AWS.CodePipeline.ListPipelineExecutions | ||
( | ||
-- * Creating a Request | ||
listPipelineExecutions | ||
, ListPipelineExecutions | ||
-- * Request Lenses | ||
, lpeNextToken | ||
, lpeMaxResults | ||
, lpePipelineName | ||
|
||
-- * Destructuring the Response | ||
, listPipelineExecutionsResponse | ||
, ListPipelineExecutionsResponse | ||
-- * Response Lenses | ||
, lpersNextToken | ||
, lpersPipelineExecutionSummaries | ||
, lpersResponseStatus | ||
) where | ||
|
||
import Network.AWS.CodePipeline.Types | ||
import Network.AWS.CodePipeline.Types.Product | ||
import Network.AWS.Lens | ||
import Network.AWS.Prelude | ||
import Network.AWS.Request | ||
import Network.AWS.Response | ||
|
||
-- | Represents the input of a list pipeline executions action. | ||
-- | ||
-- | ||
-- | ||
-- /See:/ 'listPipelineExecutions' smart constructor. | ||
data ListPipelineExecutions = ListPipelineExecutions' | ||
{ _lpeNextToken :: !(Maybe Text) | ||
, _lpeMaxResults :: !(Maybe Nat) | ||
, _lpePipelineName :: !Text | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'ListPipelineExecutions' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'lpeNextToken' - The token that was returned from the previous list pipeline executions call, which can be used to return the next set of pipeline executions in the list. | ||
-- | ||
-- * 'lpeMaxResults' - The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. The available pipeline execution history is limited to the most recent 12 months, based on pipeline execution start times. Default value is 100. | ||
-- | ||
-- * 'lpePipelineName' - The name of the pipeline for which you want to get execution summary information. | ||
listPipelineExecutions | ||
:: Text -- ^ 'lpePipelineName' | ||
-> ListPipelineExecutions | ||
listPipelineExecutions pPipelineName_ = | ||
ListPipelineExecutions' | ||
{ _lpeNextToken = Nothing | ||
, _lpeMaxResults = Nothing | ||
, _lpePipelineName = pPipelineName_ | ||
} | ||
|
||
-- | The token that was returned from the previous list pipeline executions call, which can be used to return the next set of pipeline executions in the list. | ||
lpeNextToken :: Lens' ListPipelineExecutions (Maybe Text) | ||
lpeNextToken = lens _lpeNextToken (\ s a -> s{_lpeNextToken = a}); | ||
|
||
-- | The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. The available pipeline execution history is limited to the most recent 12 months, based on pipeline execution start times. Default value is 100. | ||
lpeMaxResults :: Lens' ListPipelineExecutions (Maybe Natural) | ||
lpeMaxResults = lens _lpeMaxResults (\ s a -> s{_lpeMaxResults = a}) . mapping _Nat; | ||
|
||
-- | The name of the pipeline for which you want to get execution summary information. | ||
lpePipelineName :: Lens' ListPipelineExecutions Text | ||
lpePipelineName = lens _lpePipelineName (\ s a -> s{_lpePipelineName = a}); | ||
|
||
instance AWSRequest ListPipelineExecutions where | ||
type Rs ListPipelineExecutions = | ||
ListPipelineExecutionsResponse | ||
request = postJSON codePipeline | ||
response | ||
= receiveJSON | ||
(\ s h x -> | ||
ListPipelineExecutionsResponse' <$> | ||
(x .?> "nextToken") <*> | ||
(x .?> "pipelineExecutionSummaries" .!@ mempty) | ||
<*> (pure (fromEnum s))) | ||
|
||
instance Hashable ListPipelineExecutions | ||
|
||
instance NFData ListPipelineExecutions | ||
|
||
instance ToHeaders ListPipelineExecutions where | ||
toHeaders | ||
= const | ||
(mconcat | ||
["X-Amz-Target" =# | ||
("CodePipeline_20150709.ListPipelineExecutions" :: | ||
ByteString), | ||
"Content-Type" =# | ||
("application/x-amz-json-1.1" :: ByteString)]) | ||
|
||
instance ToJSON ListPipelineExecutions where | ||
toJSON ListPipelineExecutions'{..} | ||
= object | ||
(catMaybes | ||
[("nextToken" .=) <$> _lpeNextToken, | ||
("maxResults" .=) <$> _lpeMaxResults, | ||
Just ("pipelineName" .= _lpePipelineName)]) | ||
|
||
instance ToPath ListPipelineExecutions where | ||
toPath = const "/" | ||
|
||
instance ToQuery ListPipelineExecutions where | ||
toQuery = const mempty | ||
|
||
-- | Represents the output of a list pipeline executions action. | ||
-- | ||
-- | ||
-- | ||
-- /See:/ 'listPipelineExecutionsResponse' smart constructor. | ||
data ListPipelineExecutionsResponse = ListPipelineExecutionsResponse' | ||
{ _lpersNextToken :: !(Maybe Text) | ||
, _lpersPipelineExecutionSummaries :: !(Maybe [PipelineExecutionSummary]) | ||
, _lpersResponseStatus :: !Int | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'ListPipelineExecutionsResponse' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'lpersNextToken' - A token that can be used in the next list pipeline executions call to return the next set of pipeline executions. To view all items in the list, continue to call this operation with each subsequent token until no more nextToken values are returned. | ||
-- | ||
-- * 'lpersPipelineExecutionSummaries' - A list of executions in the history of a pipeline. | ||
-- | ||
-- * 'lpersResponseStatus' - -- | The response status code. | ||
listPipelineExecutionsResponse | ||
:: Int -- ^ 'lpersResponseStatus' | ||
-> ListPipelineExecutionsResponse | ||
listPipelineExecutionsResponse pResponseStatus_ = | ||
ListPipelineExecutionsResponse' | ||
{ _lpersNextToken = Nothing | ||
, _lpersPipelineExecutionSummaries = Nothing | ||
, _lpersResponseStatus = pResponseStatus_ | ||
} | ||
|
||
-- | A token that can be used in the next list pipeline executions call to return the next set of pipeline executions. To view all items in the list, continue to call this operation with each subsequent token until no more nextToken values are returned. | ||
lpersNextToken :: Lens' ListPipelineExecutionsResponse (Maybe Text) | ||
lpersNextToken = lens _lpersNextToken (\ s a -> s{_lpersNextToken = a}); | ||
|
||
-- | A list of executions in the history of a pipeline. | ||
lpersPipelineExecutionSummaries :: Lens' ListPipelineExecutionsResponse [PipelineExecutionSummary] | ||
lpersPipelineExecutionSummaries = lens _lpersPipelineExecutionSummaries (\ s a -> s{_lpersPipelineExecutionSummaries = a}) . _Default . _Coerce; | ||
|
||
-- | -- | The response status code. | ||
lpersResponseStatus :: Lens' ListPipelineExecutionsResponse Int | ||
lpersResponseStatus = lens _lpersResponseStatus (\ s a -> s{_lpersResponseStatus = a}); | ||
|
||
instance NFData ListPipelineExecutionsResponse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.