summaryrefslogtreecommitdiff
path: root/gen
diff options
context:
space:
mode:
authorBrendanHay <>2018-05-16 14:45:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-05-16 14:45:00 (GMT)
commitb0e9b6ab90a8149bc743191406af6a450d621bf9 (patch)
tree44dbdc75c34869676a11d4ae4cbc0585b340c835 /gen
version 1.6.01.6.0
Diffstat (limited to 'gen')
-rw-r--r--gen/Network/AWS/Connect.hs97
-rw-r--r--gen/Network/AWS/Connect/StartOutboundVoiceContact.hs203
-rw-r--r--gen/Network/AWS/Connect/StopContact.hs133
-rw-r--r--gen/Network/AWS/Connect/Types.hs137
-rw-r--r--gen/Network/AWS/Connect/Types/Product.hs22
-rw-r--r--gen/Network/AWS/Connect/Types/Sum.hs20
-rw-r--r--gen/Network/AWS/Connect/Waiters.hs21
7 files changed, 633 insertions, 0 deletions
diff --git a/gen/Network/AWS/Connect.hs b/gen/Network/AWS/Connect.hs
new file mode 100644
index 0000000..7b2ab58
--- /dev/null
+++ b/gen/Network/AWS/Connect.hs
@@ -0,0 +1,97 @@
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
+-- Module : Network.AWS.Connect
+-- Copyright : (c) 2013-2018 Brendan Hay
+-- License : Mozilla Public License, v. 2.0.
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+-- Stability : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+-- The Amazon Connect API Reference provides descriptions, syntax, and usage examples for each of the Amazon Connect actions, data types, parameters, and errors. Amazon Connect is a cloud-based contact center solution that makes it easy to set up and manage a customer contact center and provide reliable customer engagement at any scale.
+--
+--
+module Network.AWS.Connect
+ (
+ -- * Service Configuration
+ connect
+
+ -- * Errors
+ -- $errors
+
+ -- ** OutboundContactNotPermittedException
+ , _OutboundContactNotPermittedException
+
+ -- ** InvalidParameterException
+ , _InvalidParameterException
+
+ -- ** InvalidRequestException
+ , _InvalidRequestException
+
+ -- ** DestinationNotAllowedException
+ , _DestinationNotAllowedException
+
+ -- ** ContactNotFoundException
+ , _ContactNotFoundException
+
+ -- ** InternalServiceException
+ , _InternalServiceException
+
+ -- ** ResourceNotFoundException
+ , _ResourceNotFoundException
+
+ -- ** LimitExceededException
+ , _LimitExceededException
+
+ -- * Waiters
+ -- $waiters
+
+ -- * Operations
+ -- $operations
+
+ -- ** StartOutboundVoiceContact
+ , module Network.AWS.Connect.StartOutboundVoiceContact
+
+ -- ** StopContact
+ , module Network.AWS.Connect.StopContact
+
+ -- * Types
+ ) where
+
+import Network.AWS.Connect.StartOutboundVoiceContact
+import Network.AWS.Connect.StopContact
+import Network.AWS.Connect.Types
+import Network.AWS.Connect.Waiters
+
+{- $errors
+Error matchers are designed for use with the functions provided by
+<http://hackage.haskell.org/package/lens/docs/Control-Exception-Lens.html Control.Exception.Lens>.
+This allows catching (and rethrowing) service specific errors returned
+by 'Connect'.
+-}
+
+{- $operations
+Some AWS operations return results that are incomplete and require subsequent
+requests in order to obtain the entire result set. The process of sending
+subsequent requests to continue where a previous request left off is called
+pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to
+1000 objects at a time, and you must send subsequent requests with the
+appropriate Marker in order to retrieve the next page of results.
+
+Operations that have an 'AWSPager' instance can transparently perform subsequent
+requests, correctly setting Markers and other request facets to iterate through
+the entire result set of a truncated API operation. Operations which support
+this have an additional note in the documentation.
+
+Many operations have the ability to filter results on the server side. See the
+individual operation parameters for details.
+-}
+
+{- $waiters
+Waiters poll by repeatedly sending a request until some remote success condition
+configured by the 'Wait' specification is fulfilled. The 'Wait' specification
+determines how many attempts should be made, in addition to delay and retry strategies.
+-}
diff --git a/gen/Network/AWS/Connect/StartOutboundVoiceContact.hs b/gen/Network/AWS/Connect/StartOutboundVoiceContact.hs
new file mode 100644
index 0000000..dbdbca8
--- /dev/null
+++ b/gen/Network/AWS/Connect/StartOutboundVoiceContact.hs
@@ -0,0 +1,203 @@
+{-# 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.Connect.StartOutboundVoiceContact
+-- Copyright : (c) 2013-2018 Brendan Hay
+-- License : Mozilla Public License, v. 2.0.
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+-- Stability : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+-- The @StartOutboundVoiceContact@ operation initiates a contact flow to place an outbound call to a customer.
+--
+--
+-- There is a throttling limit placed on usage of the API that includes a @RateLimit@ of 2 per second, and a @BurstLimit@ of 5 per second.
+--
+-- If you are using an IAM account, it must have permissions to the @connect:StartOutboundVoiceContact@ action.
+--
+module Network.AWS.Connect.StartOutboundVoiceContact
+ (
+ -- * Creating a Request
+ startOutboundVoiceContact
+ , StartOutboundVoiceContact
+ -- * Request Lenses
+ , sovcClientToken
+ , sovcQueueId
+ , sovcAttributes
+ , sovcSourcePhoneNumber
+ , sovcDestinationPhoneNumber
+ , sovcContactFlowId
+ , sovcInstanceId
+
+ -- * Destructuring the Response
+ , startOutboundVoiceContactResponse
+ , StartOutboundVoiceContactResponse
+ -- * Response Lenses
+ , sovcrsContactId
+ , sovcrsResponseStatus
+ ) where
+
+import Network.AWS.Connect.Types
+import Network.AWS.Connect.Types.Product
+import Network.AWS.Lens
+import Network.AWS.Prelude
+import Network.AWS.Request
+import Network.AWS.Response
+
+-- | /See:/ 'startOutboundVoiceContact' smart constructor.
+data StartOutboundVoiceContact = StartOutboundVoiceContact'
+ { _sovcClientToken :: !(Maybe Text)
+ , _sovcQueueId :: !(Maybe Text)
+ , _sovcAttributes :: !(Maybe (Map Text Text))
+ , _sovcSourcePhoneNumber :: !(Maybe Text)
+ , _sovcDestinationPhoneNumber :: !Text
+ , _sovcContactFlowId :: !Text
+ , _sovcInstanceId :: !Text
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'StartOutboundVoiceContact' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'sovcClientToken' - A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. The token is valid for 7 days after creation. If a contact is already started, the contact ID is returned. If the contact is disconnected, a new contact is started.
+--
+-- * 'sovcQueueId' - The queue to which to add the call. If you specify a queue, the phone displayed for caller ID is the phone number defined for the queue. If you do not specify a queue, the queue used is the queue defined in the contact flow specified by @ContactFlowId@ . To find the @QueueId@ , open the queue to use in the Amazon Connect queue editor. The ID for the queue is displayed in the address bar as part of the URL. For example, the @QueueId@ value is the set of characters at the end of the URL, after "queue/", such as @aeg40574-2d01-51c3-73d6-bf8624d2168c@ .
+--
+-- * 'sovcAttributes' - Specify a custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes. There can be up to 32,768 UTF-8 bytes across all key-value pairs. Attribute keys can include only alphanumeric, dash, and underscore characters. For example, to play a greeting when the customer answers the call, you can pass the customer name in attributes similar to the following:
+--
+-- * 'sovcSourcePhoneNumber' - The phone number, in E.164 format, associated with your Amazon Connect instance to use to place the outbound call.
+--
+-- * 'sovcDestinationPhoneNumber' - The phone number, in E.164 format, of the customer to call with the outbound contact.
+--
+-- * 'sovcContactFlowId' - The identifier for the contact flow to execute for the outbound call. This is a GUID value only. Amazon Resource Name (ARN) values are not supported. To find the @ContactFlowId@ , open the contact flow to use in the Amazon Connect contact flow designer. The ID for the contact flow is displayed in the address bar as part of the URL. For example, an address displayed when you open a contact flow is similar to the following: @https://myconnectinstance.awsapps.com/connect/contact-flows/edit?id=arn:aws:connect:us-east-1:361814831152:instance/2fb42df9-78a2-4b99-b484-f5cf80dc300c/contact-flow//b0b8f2dd-ed1b-4c44-af36-ce189a178181/ @ . At the end of the URL, you see @contact-flow/b0b8f2dd-ed1b-4c44-af36-ce189a178181@ . The @ContactFlowID@ for this contact flow is @/b0b8f2dd-ed1b-4c44-af36-ce189a178181/ @ . Make sure to include only the GUID after the "contact-flow/" in your requests.
+--
+-- * 'sovcInstanceId' - The identifier for your Amazon Connect instance. To find the @InstanceId@ value for your Amazon Connect instance, open the <https://console.aws.amazon.com/connect/ Amazon Connect console> . Select the instance alias of the instance and view the instance ID in the __Overview__ section. For example, the instance ID is the set of characters at the end of the instance ARN, after "instance/", such as 10a4c4eb-f57e-4d4c-b602-bf39176ced07.
+startOutboundVoiceContact
+ :: Text -- ^ 'sovcDestinationPhoneNumber'
+ -> Text -- ^ 'sovcContactFlowId'
+ -> Text -- ^ 'sovcInstanceId'
+ -> StartOutboundVoiceContact
+startOutboundVoiceContact pDestinationPhoneNumber_ pContactFlowId_ pInstanceId_ =
+ StartOutboundVoiceContact'
+ { _sovcClientToken = Nothing
+ , _sovcQueueId = Nothing
+ , _sovcAttributes = Nothing
+ , _sovcSourcePhoneNumber = Nothing
+ , _sovcDestinationPhoneNumber = pDestinationPhoneNumber_
+ , _sovcContactFlowId = pContactFlowId_
+ , _sovcInstanceId = pInstanceId_
+ }
+
+
+-- | A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. The token is valid for 7 days after creation. If a contact is already started, the contact ID is returned. If the contact is disconnected, a new contact is started.
+sovcClientToken :: Lens' StartOutboundVoiceContact (Maybe Text)
+sovcClientToken = lens _sovcClientToken (\ s a -> s{_sovcClientToken = a})
+
+-- | The queue to which to add the call. If you specify a queue, the phone displayed for caller ID is the phone number defined for the queue. If you do not specify a queue, the queue used is the queue defined in the contact flow specified by @ContactFlowId@ . To find the @QueueId@ , open the queue to use in the Amazon Connect queue editor. The ID for the queue is displayed in the address bar as part of the URL. For example, the @QueueId@ value is the set of characters at the end of the URL, after "queue/", such as @aeg40574-2d01-51c3-73d6-bf8624d2168c@ .
+sovcQueueId :: Lens' StartOutboundVoiceContact (Maybe Text)
+sovcQueueId = lens _sovcQueueId (\ s a -> s{_sovcQueueId = a})
+
+-- | Specify a custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes. There can be up to 32,768 UTF-8 bytes across all key-value pairs. Attribute keys can include only alphanumeric, dash, and underscore characters. For example, to play a greeting when the customer answers the call, you can pass the customer name in attributes similar to the following:
+sovcAttributes :: Lens' StartOutboundVoiceContact (HashMap Text Text)
+sovcAttributes = lens _sovcAttributes (\ s a -> s{_sovcAttributes = a}) . _Default . _Map
+
+-- | The phone number, in E.164 format, associated with your Amazon Connect instance to use to place the outbound call.
+sovcSourcePhoneNumber :: Lens' StartOutboundVoiceContact (Maybe Text)
+sovcSourcePhoneNumber = lens _sovcSourcePhoneNumber (\ s a -> s{_sovcSourcePhoneNumber = a})
+
+-- | The phone number, in E.164 format, of the customer to call with the outbound contact.
+sovcDestinationPhoneNumber :: Lens' StartOutboundVoiceContact Text
+sovcDestinationPhoneNumber = lens _sovcDestinationPhoneNumber (\ s a -> s{_sovcDestinationPhoneNumber = a})
+
+-- | The identifier for the contact flow to execute for the outbound call. This is a GUID value only. Amazon Resource Name (ARN) values are not supported. To find the @ContactFlowId@ , open the contact flow to use in the Amazon Connect contact flow designer. The ID for the contact flow is displayed in the address bar as part of the URL. For example, an address displayed when you open a contact flow is similar to the following: @https://myconnectinstance.awsapps.com/connect/contact-flows/edit?id=arn:aws:connect:us-east-1:361814831152:instance/2fb42df9-78a2-4b99-b484-f5cf80dc300c/contact-flow//b0b8f2dd-ed1b-4c44-af36-ce189a178181/ @ . At the end of the URL, you see @contact-flow/b0b8f2dd-ed1b-4c44-af36-ce189a178181@ . The @ContactFlowID@ for this contact flow is @/b0b8f2dd-ed1b-4c44-af36-ce189a178181/ @ . Make sure to include only the GUID after the "contact-flow/" in your requests.
+sovcContactFlowId :: Lens' StartOutboundVoiceContact Text
+sovcContactFlowId = lens _sovcContactFlowId (\ s a -> s{_sovcContactFlowId = a})
+
+-- | The identifier for your Amazon Connect instance. To find the @InstanceId@ value for your Amazon Connect instance, open the <https://console.aws.amazon.com/connect/ Amazon Connect console> . Select the instance alias of the instance and view the instance ID in the __Overview__ section. For example, the instance ID is the set of characters at the end of the instance ARN, after "instance/", such as 10a4c4eb-f57e-4d4c-b602-bf39176ced07.
+sovcInstanceId :: Lens' StartOutboundVoiceContact Text
+sovcInstanceId = lens _sovcInstanceId (\ s a -> s{_sovcInstanceId = a})
+
+instance AWSRequest StartOutboundVoiceContact where
+ type Rs StartOutboundVoiceContact =
+ StartOutboundVoiceContactResponse
+ request = putJSON connect
+ response
+ = receiveJSON
+ (\ s h x ->
+ StartOutboundVoiceContactResponse' <$>
+ (x .?> "ContactId") <*> (pure (fromEnum s)))
+
+instance Hashable StartOutboundVoiceContact where
+
+instance NFData StartOutboundVoiceContact where
+
+instance ToHeaders StartOutboundVoiceContact where
+ toHeaders
+ = const
+ (mconcat
+ ["Content-Type" =#
+ ("application/x-amz-json-1.1" :: ByteString)])
+
+instance ToJSON StartOutboundVoiceContact where
+ toJSON StartOutboundVoiceContact'{..}
+ = object
+ (catMaybes
+ [("ClientToken" .=) <$> _sovcClientToken,
+ ("QueueId" .=) <$> _sovcQueueId,
+ ("Attributes" .=) <$> _sovcAttributes,
+ ("SourcePhoneNumber" .=) <$> _sovcSourcePhoneNumber,
+ Just
+ ("DestinationPhoneNumber" .=
+ _sovcDestinationPhoneNumber),
+ Just ("ContactFlowId" .= _sovcContactFlowId),
+ Just ("InstanceId" .= _sovcInstanceId)])
+
+instance ToPath StartOutboundVoiceContact where
+ toPath = const "/contact/outbound-voice"
+
+instance ToQuery StartOutboundVoiceContact where
+ toQuery = const mempty
+
+-- | /See:/ 'startOutboundVoiceContactResponse' smart constructor.
+data StartOutboundVoiceContactResponse = StartOutboundVoiceContactResponse'
+ { _sovcrsContactId :: !(Maybe Text)
+ , _sovcrsResponseStatus :: !Int
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'StartOutboundVoiceContactResponse' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'sovcrsContactId' - The unique identifier of this contact within your Amazon Connect instance.
+--
+-- * 'sovcrsResponseStatus' - -- | The response status code.
+startOutboundVoiceContactResponse
+ :: Int -- ^ 'sovcrsResponseStatus'
+ -> StartOutboundVoiceContactResponse
+startOutboundVoiceContactResponse pResponseStatus_ =
+ StartOutboundVoiceContactResponse'
+ {_sovcrsContactId = Nothing, _sovcrsResponseStatus = pResponseStatus_}
+
+
+-- | The unique identifier of this contact within your Amazon Connect instance.
+sovcrsContactId :: Lens' StartOutboundVoiceContactResponse (Maybe Text)
+sovcrsContactId = lens _sovcrsContactId (\ s a -> s{_sovcrsContactId = a})
+
+-- | -- | The response status code.
+sovcrsResponseStatus :: Lens' StartOutboundVoiceContactResponse Int
+sovcrsResponseStatus = lens _sovcrsResponseStatus (\ s a -> s{_sovcrsResponseStatus = a})
+
+instance NFData StartOutboundVoiceContactResponse
+ where
diff --git a/gen/Network/AWS/Connect/StopContact.hs b/gen/Network/AWS/Connect/StopContact.hs
new file mode 100644
index 0000000..1cbf1f7
--- /dev/null
+++ b/gen/Network/AWS/Connect/StopContact.hs
@@ -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.Connect.StopContact
+-- Copyright : (c) 2013-2018 Brendan Hay
+-- License : Mozilla Public License, v. 2.0.
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+-- Stability : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+-- Ends the contact initiated by the @StartOutboundVoiceContact@ operation.
+--
+--
+-- If you are using an IAM account, it must have permissions to the @connect:StopContact@ operation.
+--
+module Network.AWS.Connect.StopContact
+ (
+ -- * Creating a Request
+ stopContact
+ , StopContact
+ -- * Request Lenses
+ , scContactId
+ , scInstanceId
+
+ -- * Destructuring the Response
+ , stopContactResponse
+ , StopContactResponse
+ -- * Response Lenses
+ , scrsResponseStatus
+ ) where
+
+import Network.AWS.Connect.Types
+import Network.AWS.Connect.Types.Product
+import Network.AWS.Lens
+import Network.AWS.Prelude
+import Network.AWS.Request
+import Network.AWS.Response
+
+-- | /See:/ 'stopContact' smart constructor.
+data StopContact = StopContact'
+ { _scContactId :: !Text
+ , _scInstanceId :: !Text
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'StopContact' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'scContactId' - The unique identifier of the contact to end. This is the @ContactId@ value returned from the @StartOutboundVoiceContact@ operation.
+--
+-- * 'scInstanceId' - The identifier of the Amazon Connect instance in which the contact is active.
+stopContact
+ :: Text -- ^ 'scContactId'
+ -> Text -- ^ 'scInstanceId'
+ -> StopContact
+stopContact pContactId_ pInstanceId_ =
+ StopContact' {_scContactId = pContactId_, _scInstanceId = pInstanceId_}
+
+
+-- | The unique identifier of the contact to end. This is the @ContactId@ value returned from the @StartOutboundVoiceContact@ operation.
+scContactId :: Lens' StopContact Text
+scContactId = lens _scContactId (\ s a -> s{_scContactId = a})
+
+-- | The identifier of the Amazon Connect instance in which the contact is active.
+scInstanceId :: Lens' StopContact Text
+scInstanceId = lens _scInstanceId (\ s a -> s{_scInstanceId = a})
+
+instance AWSRequest StopContact where
+ type Rs StopContact = StopContactResponse
+ request = postJSON connect
+ response
+ = receiveEmpty
+ (\ s h x ->
+ StopContactResponse' <$> (pure (fromEnum s)))
+
+instance Hashable StopContact where
+
+instance NFData StopContact where
+
+instance ToHeaders StopContact where
+ toHeaders
+ = const
+ (mconcat
+ ["Content-Type" =#
+ ("application/x-amz-json-1.1" :: ByteString)])
+
+instance ToJSON StopContact where
+ toJSON StopContact'{..}
+ = object
+ (catMaybes
+ [Just ("ContactId" .= _scContactId),
+ Just ("InstanceId" .= _scInstanceId)])
+
+instance ToPath StopContact where
+ toPath = const "/contact/stop"
+
+instance ToQuery StopContact where
+ toQuery = const mempty
+
+-- | /See:/ 'stopContactResponse' smart constructor.
+newtype StopContactResponse = StopContactResponse'
+ { _scrsResponseStatus :: Int
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'StopContactResponse' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'scrsResponseStatus' - -- | The response status code.
+stopContactResponse
+ :: Int -- ^ 'scrsResponseStatus'
+ -> StopContactResponse
+stopContactResponse pResponseStatus_ =
+ StopContactResponse' {_scrsResponseStatus = pResponseStatus_}
+
+
+-- | -- | The response status code.
+scrsResponseStatus :: Lens' StopContactResponse Int
+scrsResponseStatus = lens _scrsResponseStatus (\ s a -> s{_scrsResponseStatus = a})
+
+instance NFData StopContactResponse where
diff --git a/gen/Network/AWS/Connect/Types.hs b/gen/Network/AWS/Connect/Types.hs
new file mode 100644
index 0000000..32109e7
--- /dev/null
+++ b/gen/Network/AWS/Connect/Types.hs
@@ -0,0 +1,137 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
+-- Module : Network.AWS.Connect.Types
+-- Copyright : (c) 2013-2018 Brendan Hay
+-- License : Mozilla Public License, v. 2.0.
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+-- Stability : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+module Network.AWS.Connect.Types
+ (
+ -- * Service Configuration
+ connect
+
+ -- * Errors
+ , _OutboundContactNotPermittedException
+ , _InvalidParameterException
+ , _InvalidRequestException
+ , _DestinationNotAllowedException
+ , _ContactNotFoundException
+ , _InternalServiceException
+ , _ResourceNotFoundException
+ , _LimitExceededException
+ ) where
+
+import Network.AWS.Connect.Types.Product
+import Network.AWS.Connect.Types.Sum
+import Network.AWS.Lens
+import Network.AWS.Prelude
+import Network.AWS.Sign.V4
+
+-- | API version @2017-08-08@ of the Amazon Connect Service SDK configuration.
+connect :: Service
+connect =
+ Service
+ { _svcAbbrev = "Connect"
+ , _svcSigner = v4
+ , _svcPrefix = "connect"
+ , _svcVersion = "2017-08-08"
+ , _svcEndpoint = defaultEndpoint connect
+ , _svcTimeout = Just 70
+ , _svcCheck = statusSuccess
+ , _svcError = parseJSONError "Connect"
+ , _svcRetry = retry
+ }
+ where
+ retry =
+ 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"
+ | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
+ | has (hasStatus 504) e = Just "gateway_timeout"
+ | has (hasCode "RequestThrottledException" . hasStatus 400) e =
+ Just "request_throttled_exception"
+ | has (hasStatus 502) e = Just "bad_gateway"
+ | has (hasStatus 503) e = Just "service_unavailable"
+ | has (hasStatus 500) e = Just "general_server_error"
+ | has (hasStatus 509) e = Just "limit_exceeded"
+ | otherwise = Nothing
+
+
+-- | The contact is not permitted because outbound calling is not enabled for the instance.
+--
+--
+_OutboundContactNotPermittedException :: AsError a => Getting (First ServiceError) a ServiceError
+_OutboundContactNotPermittedException =
+ _MatchServiceError connect "OutboundContactNotPermittedException" .
+ hasStatus 403
+
+
+-- | One or more of the parameters provided to the operation are not valid.
+--
+--
+_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
+_InvalidParameterException =
+ _MatchServiceError connect "InvalidParameterException" . hasStatus 400
+
+
+-- | The request is not valid.
+--
+--
+_InvalidRequestException :: AsError a => Getting (First ServiceError) a ServiceError
+_InvalidRequestException =
+ _MatchServiceError connect "InvalidRequestException" . hasStatus 400
+
+
+-- | Outbound calls to the destination number are not allowed for your instance. You can request that the country be included in the allowed countries for your instance by submitting a <https://console.aws.amazon.com/support/v1#/case/create?issueType=service-limit-increase Service Limit Increase> .
+--
+--
+_DestinationNotAllowedException :: AsError a => Getting (First ServiceError) a ServiceError
+_DestinationNotAllowedException =
+ _MatchServiceError connect "DestinationNotAllowedException" . hasStatus 403
+
+
+-- | The contact with the specified ID is not active or does not exist.
+--
+--
+_ContactNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
+_ContactNotFoundException =
+ _MatchServiceError connect "ContactNotFoundException" . hasStatus 410
+
+
+-- | Request processing failed due to an error or failure with the service.
+--
+--
+_InternalServiceException :: AsError a => Getting (First ServiceError) a ServiceError
+_InternalServiceException =
+ _MatchServiceError connect "InternalServiceException" . hasStatus 500
+
+
+-- | The specified resource was not found.
+--
+--
+_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
+_ResourceNotFoundException =
+ _MatchServiceError connect "ResourceNotFoundException" . hasStatus 404
+
+
+-- | The limit exceeded the maximum allowed active calls in a queue.
+--
+--
+_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
+_LimitExceededException =
+ _MatchServiceError connect "LimitExceededException" . hasStatus 429
+
diff --git a/gen/Network/AWS/Connect/Types/Product.hs b/gen/Network/AWS/Connect/Types/Product.hs
new file mode 100644
index 0000000..c27e088
--- /dev/null
+++ b/gen/Network/AWS/Connect/Types/Product.hs
@@ -0,0 +1,22 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE RecordWildCards #-}
+
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
+-- Module : Network.AWS.Connect.Types.Product
+-- Copyright : (c) 2013-2018 Brendan Hay
+-- License : Mozilla Public License, v. 2.0.
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+-- Stability : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+module Network.AWS.Connect.Types.Product where
+
+import Network.AWS.Connect.Types.Sum
+import Network.AWS.Lens
+import Network.AWS.Prelude
diff --git a/gen/Network/AWS/Connect/Types/Sum.hs b/gen/Network/AWS/Connect/Types/Sum.hs
new file mode 100644
index 0000000..b3007f0
--- /dev/null
+++ b/gen/Network/AWS/Connect/Types/Sum.hs
@@ -0,0 +1,20 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE OverloadedStrings #-}
+
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
+-- Module : Network.AWS.Connect.Types.Sum
+-- Copyright : (c) 2013-2018 Brendan Hay
+-- License : Mozilla Public License, v. 2.0.
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+-- Stability : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+module Network.AWS.Connect.Types.Sum where
+
+import Network.AWS.Prelude
diff --git a/gen/Network/AWS/Connect/Waiters.hs b/gen/Network/AWS/Connect/Waiters.hs
new file mode 100644
index 0000000..0598cf8
--- /dev/null
+++ b/gen/Network/AWS/Connect/Waiters.hs
@@ -0,0 +1,21 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE TypeFamilies #-}
+
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
+-- Module : Network.AWS.Connect.Waiters
+-- Copyright : (c) 2013-2018 Brendan Hay
+-- License : Mozilla Public License, v. 2.0.
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+-- Stability : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+module Network.AWS.Connect.Waiters where
+
+import Network.AWS.Connect.Types
+import Network.AWS.Lens
+import Network.AWS.Prelude
+import Network.AWS.Waiter