amazonka-sns 0.3.6 → 1.0.0
raw patch · 36 files changed
+3918/−2631 lines, 36 filesdep +amazonka-snsdep +amazonka-testdep +bytestringdep ~amazonka-coredep ~basePVP ok
version bump matches the API change (PVP)
Dependencies added: amazonka-sns, amazonka-test, bytestring, lens, tasty, tasty-hunit, text, time, unordered-containers
Dependency ranges changed: amazonka-core, base
API changes (from Hackage documentation)
- Network.AWS.SNS.AddPermission: apTopicArn :: Lens' AddPermission Text
- Network.AWS.SNS.AddPermission: instance Ord AddPermission
- Network.AWS.SNS.AddPermission: instance Ord AddPermissionResponse
- Network.AWS.SNS.ConfirmSubscription: csTopicArn :: Lens' ConfirmSubscription Text
- Network.AWS.SNS.ConfirmSubscription: csrSubscriptionArn :: Lens' ConfirmSubscriptionResponse (Maybe Text)
- Network.AWS.SNS.ConfirmSubscription: instance FromXML ConfirmSubscriptionResponse
- Network.AWS.SNS.ConfirmSubscription: instance Monoid ConfirmSubscriptionResponse
- Network.AWS.SNS.ConfirmSubscription: instance Ord ConfirmSubscription
- Network.AWS.SNS.ConfirmSubscription: instance Ord ConfirmSubscriptionResponse
- Network.AWS.SNS.CreatePlatformApplication: cparPlatformApplicationArn :: Lens' CreatePlatformApplicationResponse (Maybe Text)
- Network.AWS.SNS.CreatePlatformApplication: instance FromXML CreatePlatformApplicationResponse
- Network.AWS.SNS.CreatePlatformApplication: instance Monoid CreatePlatformApplicationResponse
- Network.AWS.SNS.CreatePlatformApplication: instance Ord CreatePlatformApplicationResponse
- Network.AWS.SNS.CreatePlatformEndpoint: cpePlatformApplicationArn :: Lens' CreatePlatformEndpoint Text
- Network.AWS.SNS.CreatePlatformEndpoint: cperEndpointArn :: Lens' CreatePlatformEndpointResponse (Maybe Text)
- Network.AWS.SNS.CreatePlatformEndpoint: instance FromXML CreatePlatformEndpointResponse
- Network.AWS.SNS.CreatePlatformEndpoint: instance Monoid CreatePlatformEndpointResponse
- Network.AWS.SNS.CreatePlatformEndpoint: instance Ord CreatePlatformEndpointResponse
- Network.AWS.SNS.CreateTopic: ctrTopicArn :: Lens' CreateTopicResponse (Maybe Text)
- Network.AWS.SNS.CreateTopic: instance FromXML CreateTopicResponse
- Network.AWS.SNS.CreateTopic: instance IsString CreateTopic
- Network.AWS.SNS.CreateTopic: instance Monoid CreateTopic
- Network.AWS.SNS.CreateTopic: instance Monoid CreateTopicResponse
- Network.AWS.SNS.CreateTopic: instance Ord CreateTopic
- Network.AWS.SNS.CreateTopic: instance Ord CreateTopicResponse
- Network.AWS.SNS.DeleteEndpoint: deEndpointArn :: Lens' DeleteEndpoint Text
- Network.AWS.SNS.DeleteEndpoint: instance IsString DeleteEndpoint
- Network.AWS.SNS.DeleteEndpoint: instance Monoid DeleteEndpoint
- Network.AWS.SNS.DeleteEndpoint: instance Ord DeleteEndpoint
- Network.AWS.SNS.DeleteEndpoint: instance Ord DeleteEndpointResponse
- Network.AWS.SNS.DeletePlatformApplication: dpaPlatformApplicationArn :: Lens' DeletePlatformApplication Text
- Network.AWS.SNS.DeletePlatformApplication: instance IsString DeletePlatformApplication
- Network.AWS.SNS.DeletePlatformApplication: instance Monoid DeletePlatformApplication
- Network.AWS.SNS.DeletePlatformApplication: instance Ord DeletePlatformApplication
- Network.AWS.SNS.DeletePlatformApplication: instance Ord DeletePlatformApplicationResponse
- Network.AWS.SNS.DeleteTopic: dtTopicArn :: Lens' DeleteTopic Text
- Network.AWS.SNS.DeleteTopic: instance IsString DeleteTopic
- Network.AWS.SNS.DeleteTopic: instance Monoid DeleteTopic
- Network.AWS.SNS.DeleteTopic: instance Ord DeleteTopic
- Network.AWS.SNS.DeleteTopic: instance Ord DeleteTopicResponse
- Network.AWS.SNS.GetEndpointAttributes: geaEndpointArn :: Lens' GetEndpointAttributes Text
- Network.AWS.SNS.GetEndpointAttributes: gearAttributes :: Lens' GetEndpointAttributesResponse (HashMap Text Text)
- Network.AWS.SNS.GetEndpointAttributes: instance FromXML GetEndpointAttributesResponse
- Network.AWS.SNS.GetEndpointAttributes: instance IsString GetEndpointAttributes
- Network.AWS.SNS.GetEndpointAttributes: instance Monoid GetEndpointAttributes
- Network.AWS.SNS.GetEndpointAttributes: instance Monoid GetEndpointAttributesResponse
- Network.AWS.SNS.GetEndpointAttributes: instance Ord GetEndpointAttributes
- Network.AWS.SNS.GetEndpointAttributes: instance Semigroup GetEndpointAttributesResponse
- Network.AWS.SNS.GetPlatformApplicationAttributes: gpaaPlatformApplicationArn :: Lens' GetPlatformApplicationAttributes Text
- Network.AWS.SNS.GetPlatformApplicationAttributes: gpaarAttributes :: Lens' GetPlatformApplicationAttributesResponse (HashMap Text Text)
- Network.AWS.SNS.GetPlatformApplicationAttributes: instance FromXML GetPlatformApplicationAttributesResponse
- Network.AWS.SNS.GetPlatformApplicationAttributes: instance IsString GetPlatformApplicationAttributes
- Network.AWS.SNS.GetPlatformApplicationAttributes: instance Monoid GetPlatformApplicationAttributes
- Network.AWS.SNS.GetPlatformApplicationAttributes: instance Monoid GetPlatformApplicationAttributesResponse
- Network.AWS.SNS.GetPlatformApplicationAttributes: instance Ord GetPlatformApplicationAttributes
- Network.AWS.SNS.GetPlatformApplicationAttributes: instance Semigroup GetPlatformApplicationAttributesResponse
- Network.AWS.SNS.GetSubscriptionAttributes: gsaSubscriptionArn :: Lens' GetSubscriptionAttributes Text
- Network.AWS.SNS.GetSubscriptionAttributes: gsarAttributes :: Lens' GetSubscriptionAttributesResponse (HashMap Text Text)
- Network.AWS.SNS.GetSubscriptionAttributes: instance FromXML GetSubscriptionAttributesResponse
- Network.AWS.SNS.GetSubscriptionAttributes: instance IsString GetSubscriptionAttributes
- Network.AWS.SNS.GetSubscriptionAttributes: instance Monoid GetSubscriptionAttributes
- Network.AWS.SNS.GetSubscriptionAttributes: instance Monoid GetSubscriptionAttributesResponse
- Network.AWS.SNS.GetSubscriptionAttributes: instance Ord GetSubscriptionAttributes
- Network.AWS.SNS.GetSubscriptionAttributes: instance Semigroup GetSubscriptionAttributesResponse
- Network.AWS.SNS.GetTopicAttributes: gtaTopicArn :: Lens' GetTopicAttributes Text
- Network.AWS.SNS.GetTopicAttributes: gtarAttributes :: Lens' GetTopicAttributesResponse (HashMap Text Text)
- Network.AWS.SNS.GetTopicAttributes: instance FromXML GetTopicAttributesResponse
- Network.AWS.SNS.GetTopicAttributes: instance IsString GetTopicAttributes
- Network.AWS.SNS.GetTopicAttributes: instance Monoid GetTopicAttributes
- Network.AWS.SNS.GetTopicAttributes: instance Monoid GetTopicAttributesResponse
- Network.AWS.SNS.GetTopicAttributes: instance Ord GetTopicAttributes
- Network.AWS.SNS.GetTopicAttributes: instance Semigroup GetTopicAttributesResponse
- Network.AWS.SNS.ListEndpointsByPlatformApplication: instance FromXML ListEndpointsByPlatformApplicationResponse
- Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Ord ListEndpointsByPlatformApplication
- Network.AWS.SNS.ListEndpointsByPlatformApplication: lebpaPlatformApplicationArn :: Lens' ListEndpointsByPlatformApplication Text
- Network.AWS.SNS.ListEndpointsByPlatformApplication: lebparEndpoints :: Lens' ListEndpointsByPlatformApplicationResponse [Endpoint]
- Network.AWS.SNS.ListEndpointsByPlatformApplication: lebparNextToken :: Lens' ListEndpointsByPlatformApplicationResponse (Maybe Text)
- Network.AWS.SNS.ListPlatformApplications: instance FromXML ListPlatformApplicationsResponse
- Network.AWS.SNS.ListPlatformApplications: instance Monoid ListPlatformApplications
- Network.AWS.SNS.ListPlatformApplications: instance Ord ListPlatformApplications
- Network.AWS.SNS.ListPlatformApplications: lparNextToken :: Lens' ListPlatformApplicationsResponse (Maybe Text)
- Network.AWS.SNS.ListPlatformApplications: lparPlatformApplications :: Lens' ListPlatformApplicationsResponse [PlatformApplication]
- Network.AWS.SNS.ListSubscriptions: instance FromXML ListSubscriptionsResponse
- Network.AWS.SNS.ListSubscriptions: instance Monoid ListSubscriptions
- Network.AWS.SNS.ListSubscriptions: instance Ord ListSubscriptions
- Network.AWS.SNS.ListSubscriptions: lsrNextToken :: Lens' ListSubscriptionsResponse (Maybe Text)
- Network.AWS.SNS.ListSubscriptions: lsrSubscriptions :: Lens' ListSubscriptionsResponse [Subscription]
- Network.AWS.SNS.ListSubscriptionsByTopic: instance FromXML ListSubscriptionsByTopicResponse
- Network.AWS.SNS.ListSubscriptionsByTopic: instance Ord ListSubscriptionsByTopic
- Network.AWS.SNS.ListSubscriptionsByTopic: lsbtTopicArn :: Lens' ListSubscriptionsByTopic Text
- Network.AWS.SNS.ListSubscriptionsByTopic: lsbtrNextToken :: Lens' ListSubscriptionsByTopicResponse (Maybe Text)
- Network.AWS.SNS.ListSubscriptionsByTopic: lsbtrSubscriptions :: Lens' ListSubscriptionsByTopicResponse [Subscription]
- Network.AWS.SNS.ListTopics: instance FromXML ListTopicsResponse
- Network.AWS.SNS.ListTopics: instance Monoid ListTopics
- Network.AWS.SNS.ListTopics: instance Ord ListTopics
- Network.AWS.SNS.ListTopics: ltrNextToken :: Lens' ListTopicsResponse (Maybe Text)
- Network.AWS.SNS.ListTopics: ltrTopics :: Lens' ListTopicsResponse [Topic]
- Network.AWS.SNS.Publish: instance FromXML PublishResponse
- Network.AWS.SNS.Publish: instance Monoid PublishResponse
- Network.AWS.SNS.Publish: instance Ord PublishResponse
- Network.AWS.SNS.Publish: pTargetArn :: Lens' Publish (Maybe Text)
- Network.AWS.SNS.Publish: pTopicArn :: Lens' Publish (Maybe Text)
- Network.AWS.SNS.Publish: prMessageId :: Lens' PublishResponse (Maybe Text)
- Network.AWS.SNS.RemovePermission: instance Ord RemovePermission
- Network.AWS.SNS.RemovePermission: instance Ord RemovePermissionResponse
- Network.AWS.SNS.RemovePermission: rpTopicArn :: Lens' RemovePermission Text
- Network.AWS.SNS.SetEndpointAttributes: instance Ord SetEndpointAttributesResponse
- Network.AWS.SNS.SetEndpointAttributes: seaEndpointArn :: Lens' SetEndpointAttributes Text
- Network.AWS.SNS.SetPlatformApplicationAttributes: instance Ord SetPlatformApplicationAttributesResponse
- Network.AWS.SNS.SetPlatformApplicationAttributes: spaaPlatformApplicationArn :: Lens' SetPlatformApplicationAttributes Text
- Network.AWS.SNS.SetSubscriptionAttributes: instance Ord SetSubscriptionAttributes
- Network.AWS.SNS.SetSubscriptionAttributes: instance Ord SetSubscriptionAttributesResponse
- Network.AWS.SNS.SetSubscriptionAttributes: ssaSubscriptionArn :: Lens' SetSubscriptionAttributes Text
- Network.AWS.SNS.SetTopicAttributes: instance Ord SetTopicAttributes
- Network.AWS.SNS.SetTopicAttributes: instance Ord SetTopicAttributesResponse
- Network.AWS.SNS.SetTopicAttributes: staTopicArn :: Lens' SetTopicAttributes Text
- Network.AWS.SNS.Subscribe: instance FromXML SubscribeResponse
- Network.AWS.SNS.Subscribe: instance Monoid SubscribeResponse
- Network.AWS.SNS.Subscribe: instance Ord Subscribe
- Network.AWS.SNS.Subscribe: instance Ord SubscribeResponse
- Network.AWS.SNS.Subscribe: sEndpoint :: Lens' Subscribe (Maybe Text)
- Network.AWS.SNS.Subscribe: sProtocol :: Lens' Subscribe Text
- Network.AWS.SNS.Subscribe: sTopicArn :: Lens' Subscribe Text
- Network.AWS.SNS.Subscribe: srSubscriptionArn :: Lens' SubscribeResponse (Maybe Text)
- Network.AWS.SNS.Types: data RESTError :: *
- Network.AWS.SNS.Types: eEndpointArn :: Lens' Endpoint (Maybe Text)
- Network.AWS.SNS.Types: instance Eq Endpoint
- Network.AWS.SNS.Types: instance Eq MessageAttributeValue
- Network.AWS.SNS.Types: instance Eq PlatformApplication
- Network.AWS.SNS.Types: instance Eq Subscription
- Network.AWS.SNS.Types: instance Eq Topic
- Network.AWS.SNS.Types: instance FromXML Endpoint
- Network.AWS.SNS.Types: instance FromXML MessageAttributeValue
- Network.AWS.SNS.Types: instance FromXML PlatformApplication
- Network.AWS.SNS.Types: instance FromXML Subscription
- Network.AWS.SNS.Types: instance FromXML Topic
- Network.AWS.SNS.Types: instance Monoid Topic
- Network.AWS.SNS.Types: instance Ord Subscription
- Network.AWS.SNS.Types: instance Ord Topic
- Network.AWS.SNS.Types: instance Read Endpoint
- Network.AWS.SNS.Types: instance Read MessageAttributeValue
- Network.AWS.SNS.Types: instance Read PlatformApplication
- Network.AWS.SNS.Types: instance Read Subscription
- Network.AWS.SNS.Types: instance Read Topic
- Network.AWS.SNS.Types: instance Show Endpoint
- Network.AWS.SNS.Types: instance Show MessageAttributeValue
- Network.AWS.SNS.Types: instance Show PlatformApplication
- Network.AWS.SNS.Types: instance Show Subscription
- Network.AWS.SNS.Types: instance Show Topic
- Network.AWS.SNS.Types: instance ToQuery Endpoint
- Network.AWS.SNS.Types: instance ToQuery MessageAttributeValue
- Network.AWS.SNS.Types: instance ToQuery PlatformApplication
- Network.AWS.SNS.Types: instance ToQuery Subscription
- Network.AWS.SNS.Types: instance ToQuery Topic
- Network.AWS.SNS.Types: ns :: Text
- Network.AWS.SNS.Types: paPlatformApplicationArn :: Lens' PlatformApplication (Maybe Text)
- Network.AWS.SNS.Types: s1Endpoint :: Lens' Subscription (Maybe Text)
- Network.AWS.SNS.Types: s1Owner :: Lens' Subscription (Maybe Text)
- Network.AWS.SNS.Types: s1Protocol :: Lens' Subscription (Maybe Text)
- Network.AWS.SNS.Types: s1SubscriptionArn :: Lens' Subscription (Maybe Text)
- Network.AWS.SNS.Types: s1TopicArn :: Lens' Subscription (Maybe Text)
- Network.AWS.SNS.Types: tTopicArn :: Lens' Topic (Maybe Text)
- Network.AWS.SNS.Unsubscribe: instance IsString Unsubscribe
- Network.AWS.SNS.Unsubscribe: instance Monoid Unsubscribe
- Network.AWS.SNS.Unsubscribe: instance Ord Unsubscribe
- Network.AWS.SNS.Unsubscribe: instance Ord UnsubscribeResponse
- Network.AWS.SNS.Unsubscribe: uSubscriptionArn :: Lens' Unsubscribe Text
+ Network.AWS.SNS: _AuthorizationErrorException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS: _EndpointDisabledException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS: _InternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS: _InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS: _InvalidParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS: _NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS: _PlatformApplicationDisabledException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS: _SubscriptionLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS: _TopicLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS: data Endpoint
+ Network.AWS.SNS: data MessageAttributeValue
+ Network.AWS.SNS: data PlatformApplication
+ Network.AWS.SNS: data SNS
+ Network.AWS.SNS: data Subscription
+ Network.AWS.SNS: data Topic
+ Network.AWS.SNS: eAttributes :: Lens' Endpoint (HashMap Text Text)
+ Network.AWS.SNS: eEndpointARN :: Lens' Endpoint (Maybe Text)
+ Network.AWS.SNS: endpoint :: Endpoint
+ Network.AWS.SNS: mavBinaryValue :: Lens' MessageAttributeValue (Maybe ByteString)
+ Network.AWS.SNS: mavDataType :: Lens' MessageAttributeValue Text
+ Network.AWS.SNS: mavStringValue :: Lens' MessageAttributeValue (Maybe Text)
+ Network.AWS.SNS: messageAttributeValue :: Text -> MessageAttributeValue
+ Network.AWS.SNS: paAttributes :: Lens' PlatformApplication (HashMap Text Text)
+ Network.AWS.SNS: paPlatformApplicationARN :: Lens' PlatformApplication (Maybe Text)
+ Network.AWS.SNS: platformApplication :: PlatformApplication
+ Network.AWS.SNS: sEndpoint :: Lens' Subscription (Maybe Endpoint)
+ Network.AWS.SNS: sOwner :: Lens' Subscription (Maybe Text)
+ Network.AWS.SNS: sProtocol :: Lens' Subscription (Maybe Text)
+ Network.AWS.SNS: sSubscriptionARN :: Lens' Subscription (Maybe Text)
+ Network.AWS.SNS: sTopicARN :: Lens' Subscription (Maybe Text)
+ Network.AWS.SNS: subscription :: Subscription
+ Network.AWS.SNS: tTopicARN :: Lens' Topic (Maybe Text)
+ Network.AWS.SNS: topic :: Topic
+ Network.AWS.SNS.AddPermission: apTopicARN :: Lens' AddPermission Text
+ Network.AWS.SNS.AddPermission: instance Constructor C1_0AddPermission
+ Network.AWS.SNS.AddPermission: instance Data AddPermission
+ Network.AWS.SNS.AddPermission: instance Data AddPermissionResponse
+ Network.AWS.SNS.AddPermission: instance Datatype D1AddPermission
+ Network.AWS.SNS.AddPermission: instance Generic AddPermission
+ Network.AWS.SNS.AddPermission: instance Selector S1_0_0AddPermission
+ Network.AWS.SNS.AddPermission: instance Selector S1_0_1AddPermission
+ Network.AWS.SNS.AddPermission: instance Selector S1_0_2AddPermission
+ Network.AWS.SNS.AddPermission: instance Selector S1_0_3AddPermission
+ Network.AWS.SNS.AddPermission: instance Typeable AddPermission
+ Network.AWS.SNS.AddPermission: instance Typeable AddPermissionResponse
+ Network.AWS.SNS.ConfirmSubscription: csTopicARN :: Lens' ConfirmSubscription Text
+ Network.AWS.SNS.ConfirmSubscription: csrsStatus :: Lens' ConfirmSubscriptionResponse Int
+ Network.AWS.SNS.ConfirmSubscription: csrsSubscriptionARN :: Lens' ConfirmSubscriptionResponse (Maybe Text)
+ Network.AWS.SNS.ConfirmSubscription: instance Constructor C1_0ConfirmSubscription
+ Network.AWS.SNS.ConfirmSubscription: instance Constructor C1_0ConfirmSubscriptionResponse
+ Network.AWS.SNS.ConfirmSubscription: instance Data ConfirmSubscription
+ Network.AWS.SNS.ConfirmSubscription: instance Data ConfirmSubscriptionResponse
+ Network.AWS.SNS.ConfirmSubscription: instance Datatype D1ConfirmSubscription
+ Network.AWS.SNS.ConfirmSubscription: instance Datatype D1ConfirmSubscriptionResponse
+ Network.AWS.SNS.ConfirmSubscription: instance Generic ConfirmSubscription
+ Network.AWS.SNS.ConfirmSubscription: instance Generic ConfirmSubscriptionResponse
+ Network.AWS.SNS.ConfirmSubscription: instance Selector S1_0_0ConfirmSubscription
+ Network.AWS.SNS.ConfirmSubscription: instance Selector S1_0_0ConfirmSubscriptionResponse
+ Network.AWS.SNS.ConfirmSubscription: instance Selector S1_0_1ConfirmSubscription
+ Network.AWS.SNS.ConfirmSubscription: instance Selector S1_0_1ConfirmSubscriptionResponse
+ Network.AWS.SNS.ConfirmSubscription: instance Selector S1_0_2ConfirmSubscription
+ Network.AWS.SNS.ConfirmSubscription: instance Typeable ConfirmSubscription
+ Network.AWS.SNS.ConfirmSubscription: instance Typeable ConfirmSubscriptionResponse
+ Network.AWS.SNS.CreatePlatformApplication: cparsPlatformApplicationARN :: Lens' CreatePlatformApplicationResponse (Maybe Text)
+ Network.AWS.SNS.CreatePlatformApplication: cparsStatus :: Lens' CreatePlatformApplicationResponse Int
+ Network.AWS.SNS.CreatePlatformApplication: instance Constructor C1_0CreatePlatformApplication
+ Network.AWS.SNS.CreatePlatformApplication: instance Constructor C1_0CreatePlatformApplicationResponse
+ Network.AWS.SNS.CreatePlatformApplication: instance Data CreatePlatformApplication
+ Network.AWS.SNS.CreatePlatformApplication: instance Data CreatePlatformApplicationResponse
+ Network.AWS.SNS.CreatePlatformApplication: instance Datatype D1CreatePlatformApplication
+ Network.AWS.SNS.CreatePlatformApplication: instance Datatype D1CreatePlatformApplicationResponse
+ Network.AWS.SNS.CreatePlatformApplication: instance Generic CreatePlatformApplication
+ Network.AWS.SNS.CreatePlatformApplication: instance Generic CreatePlatformApplicationResponse
+ Network.AWS.SNS.CreatePlatformApplication: instance Selector S1_0_0CreatePlatformApplication
+ Network.AWS.SNS.CreatePlatformApplication: instance Selector S1_0_0CreatePlatformApplicationResponse
+ Network.AWS.SNS.CreatePlatformApplication: instance Selector S1_0_1CreatePlatformApplication
+ Network.AWS.SNS.CreatePlatformApplication: instance Selector S1_0_1CreatePlatformApplicationResponse
+ Network.AWS.SNS.CreatePlatformApplication: instance Selector S1_0_2CreatePlatformApplication
+ Network.AWS.SNS.CreatePlatformApplication: instance Typeable CreatePlatformApplication
+ Network.AWS.SNS.CreatePlatformApplication: instance Typeable CreatePlatformApplicationResponse
+ Network.AWS.SNS.CreatePlatformEndpoint: cpePlatformApplicationARN :: Lens' CreatePlatformEndpoint Text
+ Network.AWS.SNS.CreatePlatformEndpoint: cpersEndpointARN :: Lens' CreatePlatformEndpointResponse (Maybe Text)
+ Network.AWS.SNS.CreatePlatformEndpoint: cpersStatus :: Lens' CreatePlatformEndpointResponse Int
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Constructor C1_0CreatePlatformEndpoint
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Constructor C1_0CreatePlatformEndpointResponse
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Data CreatePlatformEndpoint
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Data CreatePlatformEndpointResponse
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Datatype D1CreatePlatformEndpoint
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Datatype D1CreatePlatformEndpointResponse
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Generic CreatePlatformEndpoint
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Generic CreatePlatformEndpointResponse
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Selector S1_0_0CreatePlatformEndpoint
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Selector S1_0_0CreatePlatformEndpointResponse
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Selector S1_0_1CreatePlatformEndpoint
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Selector S1_0_1CreatePlatformEndpointResponse
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Selector S1_0_2CreatePlatformEndpoint
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Selector S1_0_3CreatePlatformEndpoint
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Typeable CreatePlatformEndpoint
+ Network.AWS.SNS.CreatePlatformEndpoint: instance Typeable CreatePlatformEndpointResponse
+ Network.AWS.SNS.CreateTopic: ctrsStatus :: Lens' CreateTopicResponse Int
+ Network.AWS.SNS.CreateTopic: ctrsTopicARN :: Lens' CreateTopicResponse (Maybe Text)
+ Network.AWS.SNS.CreateTopic: instance Constructor C1_0CreateTopic
+ Network.AWS.SNS.CreateTopic: instance Constructor C1_0CreateTopicResponse
+ Network.AWS.SNS.CreateTopic: instance Data CreateTopic
+ Network.AWS.SNS.CreateTopic: instance Data CreateTopicResponse
+ Network.AWS.SNS.CreateTopic: instance Datatype D1CreateTopic
+ Network.AWS.SNS.CreateTopic: instance Datatype D1CreateTopicResponse
+ Network.AWS.SNS.CreateTopic: instance Generic CreateTopic
+ Network.AWS.SNS.CreateTopic: instance Generic CreateTopicResponse
+ Network.AWS.SNS.CreateTopic: instance Selector S1_0_0CreateTopic
+ Network.AWS.SNS.CreateTopic: instance Selector S1_0_0CreateTopicResponse
+ Network.AWS.SNS.CreateTopic: instance Selector S1_0_1CreateTopicResponse
+ Network.AWS.SNS.CreateTopic: instance Typeable CreateTopic
+ Network.AWS.SNS.CreateTopic: instance Typeable CreateTopicResponse
+ Network.AWS.SNS.DeleteEndpoint: deEndpointARN :: Lens' DeleteEndpoint Text
+ Network.AWS.SNS.DeleteEndpoint: instance Constructor C1_0DeleteEndpoint
+ Network.AWS.SNS.DeleteEndpoint: instance Data DeleteEndpoint
+ Network.AWS.SNS.DeleteEndpoint: instance Data DeleteEndpointResponse
+ Network.AWS.SNS.DeleteEndpoint: instance Datatype D1DeleteEndpoint
+ Network.AWS.SNS.DeleteEndpoint: instance Generic DeleteEndpoint
+ Network.AWS.SNS.DeleteEndpoint: instance Selector S1_0_0DeleteEndpoint
+ Network.AWS.SNS.DeleteEndpoint: instance Typeable DeleteEndpoint
+ Network.AWS.SNS.DeleteEndpoint: instance Typeable DeleteEndpointResponse
+ Network.AWS.SNS.DeletePlatformApplication: dpaPlatformApplicationARN :: Lens' DeletePlatformApplication Text
+ Network.AWS.SNS.DeletePlatformApplication: instance Constructor C1_0DeletePlatformApplication
+ Network.AWS.SNS.DeletePlatformApplication: instance Data DeletePlatformApplication
+ Network.AWS.SNS.DeletePlatformApplication: instance Data DeletePlatformApplicationResponse
+ Network.AWS.SNS.DeletePlatformApplication: instance Datatype D1DeletePlatformApplication
+ Network.AWS.SNS.DeletePlatformApplication: instance Generic DeletePlatformApplication
+ Network.AWS.SNS.DeletePlatformApplication: instance Selector S1_0_0DeletePlatformApplication
+ Network.AWS.SNS.DeletePlatformApplication: instance Typeable DeletePlatformApplication
+ Network.AWS.SNS.DeletePlatformApplication: instance Typeable DeletePlatformApplicationResponse
+ Network.AWS.SNS.DeleteTopic: dtTopicARN :: Lens' DeleteTopic Text
+ Network.AWS.SNS.DeleteTopic: instance Constructor C1_0DeleteTopic
+ Network.AWS.SNS.DeleteTopic: instance Data DeleteTopic
+ Network.AWS.SNS.DeleteTopic: instance Data DeleteTopicResponse
+ Network.AWS.SNS.DeleteTopic: instance Datatype D1DeleteTopic
+ Network.AWS.SNS.DeleteTopic: instance Generic DeleteTopic
+ Network.AWS.SNS.DeleteTopic: instance Selector S1_0_0DeleteTopic
+ Network.AWS.SNS.DeleteTopic: instance Typeable DeleteTopic
+ Network.AWS.SNS.DeleteTopic: instance Typeable DeleteTopicResponse
+ Network.AWS.SNS.GetEndpointAttributes: geaEndpointARN :: Lens' GetEndpointAttributes Text
+ Network.AWS.SNS.GetEndpointAttributes: gearsAttributes :: Lens' GetEndpointAttributesResponse (HashMap Text Text)
+ Network.AWS.SNS.GetEndpointAttributes: gearsStatus :: Lens' GetEndpointAttributesResponse Int
+ Network.AWS.SNS.GetEndpointAttributes: instance Constructor C1_0GetEndpointAttributes
+ Network.AWS.SNS.GetEndpointAttributes: instance Constructor C1_0GetEndpointAttributesResponse
+ Network.AWS.SNS.GetEndpointAttributes: instance Data GetEndpointAttributes
+ Network.AWS.SNS.GetEndpointAttributes: instance Data GetEndpointAttributesResponse
+ Network.AWS.SNS.GetEndpointAttributes: instance Datatype D1GetEndpointAttributes
+ Network.AWS.SNS.GetEndpointAttributes: instance Datatype D1GetEndpointAttributesResponse
+ Network.AWS.SNS.GetEndpointAttributes: instance Generic GetEndpointAttributes
+ Network.AWS.SNS.GetEndpointAttributes: instance Generic GetEndpointAttributesResponse
+ Network.AWS.SNS.GetEndpointAttributes: instance Selector S1_0_0GetEndpointAttributes
+ Network.AWS.SNS.GetEndpointAttributes: instance Selector S1_0_0GetEndpointAttributesResponse
+ Network.AWS.SNS.GetEndpointAttributes: instance Selector S1_0_1GetEndpointAttributesResponse
+ Network.AWS.SNS.GetEndpointAttributes: instance Typeable GetEndpointAttributes
+ Network.AWS.SNS.GetEndpointAttributes: instance Typeable GetEndpointAttributesResponse
+ Network.AWS.SNS.GetPlatformApplicationAttributes: gpaaPlatformApplicationARN :: Lens' GetPlatformApplicationAttributes Text
+ Network.AWS.SNS.GetPlatformApplicationAttributes: gpaarsAttributes :: Lens' GetPlatformApplicationAttributesResponse (HashMap Text Text)
+ Network.AWS.SNS.GetPlatformApplicationAttributes: gpaarsStatus :: Lens' GetPlatformApplicationAttributesResponse Int
+ Network.AWS.SNS.GetPlatformApplicationAttributes: instance Constructor C1_0GetPlatformApplicationAttributes
+ Network.AWS.SNS.GetPlatformApplicationAttributes: instance Constructor C1_0GetPlatformApplicationAttributesResponse
+ Network.AWS.SNS.GetPlatformApplicationAttributes: instance Data GetPlatformApplicationAttributes
+ Network.AWS.SNS.GetPlatformApplicationAttributes: instance Data GetPlatformApplicationAttributesResponse
+ Network.AWS.SNS.GetPlatformApplicationAttributes: instance Datatype D1GetPlatformApplicationAttributes
+ Network.AWS.SNS.GetPlatformApplicationAttributes: instance Datatype D1GetPlatformApplicationAttributesResponse
+ Network.AWS.SNS.GetPlatformApplicationAttributes: instance Generic GetPlatformApplicationAttributes
+ Network.AWS.SNS.GetPlatformApplicationAttributes: instance Generic GetPlatformApplicationAttributesResponse
+ Network.AWS.SNS.GetPlatformApplicationAttributes: instance Selector S1_0_0GetPlatformApplicationAttributes
+ Network.AWS.SNS.GetPlatformApplicationAttributes: instance Selector S1_0_0GetPlatformApplicationAttributesResponse
+ Network.AWS.SNS.GetPlatformApplicationAttributes: instance Selector S1_0_1GetPlatformApplicationAttributesResponse
+ Network.AWS.SNS.GetPlatformApplicationAttributes: instance Typeable GetPlatformApplicationAttributes
+ Network.AWS.SNS.GetPlatformApplicationAttributes: instance Typeable GetPlatformApplicationAttributesResponse
+ Network.AWS.SNS.GetSubscriptionAttributes: gsaSubscriptionARN :: Lens' GetSubscriptionAttributes Text
+ Network.AWS.SNS.GetSubscriptionAttributes: gsarsAttributes :: Lens' GetSubscriptionAttributesResponse (HashMap Text Text)
+ Network.AWS.SNS.GetSubscriptionAttributes: gsarsStatus :: Lens' GetSubscriptionAttributesResponse Int
+ Network.AWS.SNS.GetSubscriptionAttributes: instance Constructor C1_0GetSubscriptionAttributes
+ Network.AWS.SNS.GetSubscriptionAttributes: instance Constructor C1_0GetSubscriptionAttributesResponse
+ Network.AWS.SNS.GetSubscriptionAttributes: instance Data GetSubscriptionAttributes
+ Network.AWS.SNS.GetSubscriptionAttributes: instance Data GetSubscriptionAttributesResponse
+ Network.AWS.SNS.GetSubscriptionAttributes: instance Datatype D1GetSubscriptionAttributes
+ Network.AWS.SNS.GetSubscriptionAttributes: instance Datatype D1GetSubscriptionAttributesResponse
+ Network.AWS.SNS.GetSubscriptionAttributes: instance Generic GetSubscriptionAttributes
+ Network.AWS.SNS.GetSubscriptionAttributes: instance Generic GetSubscriptionAttributesResponse
+ Network.AWS.SNS.GetSubscriptionAttributes: instance Selector S1_0_0GetSubscriptionAttributes
+ Network.AWS.SNS.GetSubscriptionAttributes: instance Selector S1_0_0GetSubscriptionAttributesResponse
+ Network.AWS.SNS.GetSubscriptionAttributes: instance Selector S1_0_1GetSubscriptionAttributesResponse
+ Network.AWS.SNS.GetSubscriptionAttributes: instance Typeable GetSubscriptionAttributes
+ Network.AWS.SNS.GetSubscriptionAttributes: instance Typeable GetSubscriptionAttributesResponse
+ Network.AWS.SNS.GetTopicAttributes: gtaTopicARN :: Lens' GetTopicAttributes Text
+ Network.AWS.SNS.GetTopicAttributes: gtarsAttributes :: Lens' GetTopicAttributesResponse (HashMap Text Text)
+ Network.AWS.SNS.GetTopicAttributes: gtarsStatus :: Lens' GetTopicAttributesResponse Int
+ Network.AWS.SNS.GetTopicAttributes: instance Constructor C1_0GetTopicAttributes
+ Network.AWS.SNS.GetTopicAttributes: instance Constructor C1_0GetTopicAttributesResponse
+ Network.AWS.SNS.GetTopicAttributes: instance Data GetTopicAttributes
+ Network.AWS.SNS.GetTopicAttributes: instance Data GetTopicAttributesResponse
+ Network.AWS.SNS.GetTopicAttributes: instance Datatype D1GetTopicAttributes
+ Network.AWS.SNS.GetTopicAttributes: instance Datatype D1GetTopicAttributesResponse
+ Network.AWS.SNS.GetTopicAttributes: instance Generic GetTopicAttributes
+ Network.AWS.SNS.GetTopicAttributes: instance Generic GetTopicAttributesResponse
+ Network.AWS.SNS.GetTopicAttributes: instance Selector S1_0_0GetTopicAttributes
+ Network.AWS.SNS.GetTopicAttributes: instance Selector S1_0_0GetTopicAttributesResponse
+ Network.AWS.SNS.GetTopicAttributes: instance Selector S1_0_1GetTopicAttributesResponse
+ Network.AWS.SNS.GetTopicAttributes: instance Typeable GetTopicAttributes
+ Network.AWS.SNS.GetTopicAttributes: instance Typeable GetTopicAttributesResponse
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Constructor C1_0ListEndpointsByPlatformApplication
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Constructor C1_0ListEndpointsByPlatformApplicationResponse
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Data ListEndpointsByPlatformApplication
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Data ListEndpointsByPlatformApplicationResponse
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Datatype D1ListEndpointsByPlatformApplication
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Datatype D1ListEndpointsByPlatformApplicationResponse
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Generic ListEndpointsByPlatformApplication
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Generic ListEndpointsByPlatformApplicationResponse
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Selector S1_0_0ListEndpointsByPlatformApplication
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Selector S1_0_0ListEndpointsByPlatformApplicationResponse
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Selector S1_0_1ListEndpointsByPlatformApplication
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Selector S1_0_1ListEndpointsByPlatformApplicationResponse
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Selector S1_0_2ListEndpointsByPlatformApplicationResponse
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Typeable ListEndpointsByPlatformApplication
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: instance Typeable ListEndpointsByPlatformApplicationResponse
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: lebpaPlatformApplicationARN :: Lens' ListEndpointsByPlatformApplication Text
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: lebparsEndpoints :: Lens' ListEndpointsByPlatformApplicationResponse [Endpoint]
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: lebparsNextToken :: Lens' ListEndpointsByPlatformApplicationResponse (Maybe Text)
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: lebparsStatus :: Lens' ListEndpointsByPlatformApplicationResponse Int
+ Network.AWS.SNS.ListPlatformApplications: instance Constructor C1_0ListPlatformApplications
+ Network.AWS.SNS.ListPlatformApplications: instance Constructor C1_0ListPlatformApplicationsResponse
+ Network.AWS.SNS.ListPlatformApplications: instance Data ListPlatformApplications
+ Network.AWS.SNS.ListPlatformApplications: instance Data ListPlatformApplicationsResponse
+ Network.AWS.SNS.ListPlatformApplications: instance Datatype D1ListPlatformApplications
+ Network.AWS.SNS.ListPlatformApplications: instance Datatype D1ListPlatformApplicationsResponse
+ Network.AWS.SNS.ListPlatformApplications: instance Generic ListPlatformApplications
+ Network.AWS.SNS.ListPlatformApplications: instance Generic ListPlatformApplicationsResponse
+ Network.AWS.SNS.ListPlatformApplications: instance Selector S1_0_0ListPlatformApplications
+ Network.AWS.SNS.ListPlatformApplications: instance Selector S1_0_0ListPlatformApplicationsResponse
+ Network.AWS.SNS.ListPlatformApplications: instance Selector S1_0_1ListPlatformApplicationsResponse
+ Network.AWS.SNS.ListPlatformApplications: instance Selector S1_0_2ListPlatformApplicationsResponse
+ Network.AWS.SNS.ListPlatformApplications: instance Typeable ListPlatformApplications
+ Network.AWS.SNS.ListPlatformApplications: instance Typeable ListPlatformApplicationsResponse
+ Network.AWS.SNS.ListPlatformApplications: lparsNextToken :: Lens' ListPlatformApplicationsResponse (Maybe Text)
+ Network.AWS.SNS.ListPlatformApplications: lparsPlatformApplications :: Lens' ListPlatformApplicationsResponse [PlatformApplication]
+ Network.AWS.SNS.ListPlatformApplications: lparsStatus :: Lens' ListPlatformApplicationsResponse Int
+ Network.AWS.SNS.ListSubscriptions: instance Constructor C1_0ListSubscriptions
+ Network.AWS.SNS.ListSubscriptions: instance Constructor C1_0ListSubscriptionsResponse
+ Network.AWS.SNS.ListSubscriptions: instance Data ListSubscriptions
+ Network.AWS.SNS.ListSubscriptions: instance Data ListSubscriptionsResponse
+ Network.AWS.SNS.ListSubscriptions: instance Datatype D1ListSubscriptions
+ Network.AWS.SNS.ListSubscriptions: instance Datatype D1ListSubscriptionsResponse
+ Network.AWS.SNS.ListSubscriptions: instance Generic ListSubscriptions
+ Network.AWS.SNS.ListSubscriptions: instance Generic ListSubscriptionsResponse
+ Network.AWS.SNS.ListSubscriptions: instance Selector S1_0_0ListSubscriptions
+ Network.AWS.SNS.ListSubscriptions: instance Selector S1_0_0ListSubscriptionsResponse
+ Network.AWS.SNS.ListSubscriptions: instance Selector S1_0_1ListSubscriptionsResponse
+ Network.AWS.SNS.ListSubscriptions: instance Selector S1_0_2ListSubscriptionsResponse
+ Network.AWS.SNS.ListSubscriptions: instance Typeable ListSubscriptions
+ Network.AWS.SNS.ListSubscriptions: instance Typeable ListSubscriptionsResponse
+ Network.AWS.SNS.ListSubscriptions: lsrsNextToken :: Lens' ListSubscriptionsResponse (Maybe Text)
+ Network.AWS.SNS.ListSubscriptions: lsrsStatus :: Lens' ListSubscriptionsResponse Int
+ Network.AWS.SNS.ListSubscriptions: lsrsSubscriptions :: Lens' ListSubscriptionsResponse [Subscription]
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Constructor C1_0ListSubscriptionsByTopic
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Constructor C1_0ListSubscriptionsByTopicResponse
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Data ListSubscriptionsByTopic
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Data ListSubscriptionsByTopicResponse
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Datatype D1ListSubscriptionsByTopic
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Datatype D1ListSubscriptionsByTopicResponse
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Generic ListSubscriptionsByTopic
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Generic ListSubscriptionsByTopicResponse
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Selector S1_0_0ListSubscriptionsByTopic
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Selector S1_0_0ListSubscriptionsByTopicResponse
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Selector S1_0_1ListSubscriptionsByTopic
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Selector S1_0_1ListSubscriptionsByTopicResponse
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Selector S1_0_2ListSubscriptionsByTopicResponse
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Typeable ListSubscriptionsByTopic
+ Network.AWS.SNS.ListSubscriptionsByTopic: instance Typeable ListSubscriptionsByTopicResponse
+ Network.AWS.SNS.ListSubscriptionsByTopic: lsbtTopicARN :: Lens' ListSubscriptionsByTopic Text
+ Network.AWS.SNS.ListSubscriptionsByTopic: lsbtrsNextToken :: Lens' ListSubscriptionsByTopicResponse (Maybe Text)
+ Network.AWS.SNS.ListSubscriptionsByTopic: lsbtrsStatus :: Lens' ListSubscriptionsByTopicResponse Int
+ Network.AWS.SNS.ListSubscriptionsByTopic: lsbtrsSubscriptions :: Lens' ListSubscriptionsByTopicResponse [Subscription]
+ Network.AWS.SNS.ListTopics: instance Constructor C1_0ListTopics
+ Network.AWS.SNS.ListTopics: instance Constructor C1_0ListTopicsResponse
+ Network.AWS.SNS.ListTopics: instance Data ListTopics
+ Network.AWS.SNS.ListTopics: instance Data ListTopicsResponse
+ Network.AWS.SNS.ListTopics: instance Datatype D1ListTopics
+ Network.AWS.SNS.ListTopics: instance Datatype D1ListTopicsResponse
+ Network.AWS.SNS.ListTopics: instance Generic ListTopics
+ Network.AWS.SNS.ListTopics: instance Generic ListTopicsResponse
+ Network.AWS.SNS.ListTopics: instance Selector S1_0_0ListTopics
+ Network.AWS.SNS.ListTopics: instance Selector S1_0_0ListTopicsResponse
+ Network.AWS.SNS.ListTopics: instance Selector S1_0_1ListTopicsResponse
+ Network.AWS.SNS.ListTopics: instance Selector S1_0_2ListTopicsResponse
+ Network.AWS.SNS.ListTopics: instance Typeable ListTopics
+ Network.AWS.SNS.ListTopics: instance Typeable ListTopicsResponse
+ Network.AWS.SNS.ListTopics: ltrsNextToken :: Lens' ListTopicsResponse (Maybe Text)
+ Network.AWS.SNS.ListTopics: ltrsStatus :: Lens' ListTopicsResponse Int
+ Network.AWS.SNS.ListTopics: ltrsTopics :: Lens' ListTopicsResponse [Topic]
+ Network.AWS.SNS.Publish: instance Constructor C1_0Publish
+ Network.AWS.SNS.Publish: instance Constructor C1_0PublishResponse
+ Network.AWS.SNS.Publish: instance Data Publish
+ Network.AWS.SNS.Publish: instance Data PublishResponse
+ Network.AWS.SNS.Publish: instance Datatype D1Publish
+ Network.AWS.SNS.Publish: instance Datatype D1PublishResponse
+ Network.AWS.SNS.Publish: instance Generic Publish
+ Network.AWS.SNS.Publish: instance Generic PublishResponse
+ Network.AWS.SNS.Publish: instance Selector S1_0_0Publish
+ Network.AWS.SNS.Publish: instance Selector S1_0_0PublishResponse
+ Network.AWS.SNS.Publish: instance Selector S1_0_1Publish
+ Network.AWS.SNS.Publish: instance Selector S1_0_1PublishResponse
+ Network.AWS.SNS.Publish: instance Selector S1_0_2Publish
+ Network.AWS.SNS.Publish: instance Selector S1_0_3Publish
+ Network.AWS.SNS.Publish: instance Selector S1_0_4Publish
+ Network.AWS.SNS.Publish: instance Selector S1_0_5Publish
+ Network.AWS.SNS.Publish: instance Typeable Publish
+ Network.AWS.SNS.Publish: instance Typeable PublishResponse
+ Network.AWS.SNS.Publish: pTargetARN :: Lens' Publish (Maybe Text)
+ Network.AWS.SNS.Publish: pTopicARN :: Lens' Publish (Maybe Text)
+ Network.AWS.SNS.Publish: prsMessageId :: Lens' PublishResponse (Maybe Text)
+ Network.AWS.SNS.Publish: prsStatus :: Lens' PublishResponse Int
+ Network.AWS.SNS.RemovePermission: instance Constructor C1_0RemovePermission
+ Network.AWS.SNS.RemovePermission: instance Data RemovePermission
+ Network.AWS.SNS.RemovePermission: instance Data RemovePermissionResponse
+ Network.AWS.SNS.RemovePermission: instance Datatype D1RemovePermission
+ Network.AWS.SNS.RemovePermission: instance Generic RemovePermission
+ Network.AWS.SNS.RemovePermission: instance Selector S1_0_0RemovePermission
+ Network.AWS.SNS.RemovePermission: instance Selector S1_0_1RemovePermission
+ Network.AWS.SNS.RemovePermission: instance Typeable RemovePermission
+ Network.AWS.SNS.RemovePermission: instance Typeable RemovePermissionResponse
+ Network.AWS.SNS.RemovePermission: rpTopicARN :: Lens' RemovePermission Text
+ Network.AWS.SNS.SetEndpointAttributes: instance Constructor C1_0SetEndpointAttributes
+ Network.AWS.SNS.SetEndpointAttributes: instance Data SetEndpointAttributes
+ Network.AWS.SNS.SetEndpointAttributes: instance Data SetEndpointAttributesResponse
+ Network.AWS.SNS.SetEndpointAttributes: instance Datatype D1SetEndpointAttributes
+ Network.AWS.SNS.SetEndpointAttributes: instance Generic SetEndpointAttributes
+ Network.AWS.SNS.SetEndpointAttributes: instance Selector S1_0_0SetEndpointAttributes
+ Network.AWS.SNS.SetEndpointAttributes: instance Selector S1_0_1SetEndpointAttributes
+ Network.AWS.SNS.SetEndpointAttributes: instance Typeable SetEndpointAttributes
+ Network.AWS.SNS.SetEndpointAttributes: instance Typeable SetEndpointAttributesResponse
+ Network.AWS.SNS.SetEndpointAttributes: seaEndpointARN :: Lens' SetEndpointAttributes Text
+ Network.AWS.SNS.SetPlatformApplicationAttributes: instance Constructor C1_0SetPlatformApplicationAttributes
+ Network.AWS.SNS.SetPlatformApplicationAttributes: instance Data SetPlatformApplicationAttributes
+ Network.AWS.SNS.SetPlatformApplicationAttributes: instance Data SetPlatformApplicationAttributesResponse
+ Network.AWS.SNS.SetPlatformApplicationAttributes: instance Datatype D1SetPlatformApplicationAttributes
+ Network.AWS.SNS.SetPlatformApplicationAttributes: instance Generic SetPlatformApplicationAttributes
+ Network.AWS.SNS.SetPlatformApplicationAttributes: instance Selector S1_0_0SetPlatformApplicationAttributes
+ Network.AWS.SNS.SetPlatformApplicationAttributes: instance Selector S1_0_1SetPlatformApplicationAttributes
+ Network.AWS.SNS.SetPlatformApplicationAttributes: instance Typeable SetPlatformApplicationAttributes
+ Network.AWS.SNS.SetPlatformApplicationAttributes: instance Typeable SetPlatformApplicationAttributesResponse
+ Network.AWS.SNS.SetPlatformApplicationAttributes: spaaPlatformApplicationARN :: Lens' SetPlatformApplicationAttributes Text
+ Network.AWS.SNS.SetSubscriptionAttributes: instance Constructor C1_0SetSubscriptionAttributes
+ Network.AWS.SNS.SetSubscriptionAttributes: instance Data SetSubscriptionAttributes
+ Network.AWS.SNS.SetSubscriptionAttributes: instance Data SetSubscriptionAttributesResponse
+ Network.AWS.SNS.SetSubscriptionAttributes: instance Datatype D1SetSubscriptionAttributes
+ Network.AWS.SNS.SetSubscriptionAttributes: instance Generic SetSubscriptionAttributes
+ Network.AWS.SNS.SetSubscriptionAttributes: instance Selector S1_0_0SetSubscriptionAttributes
+ Network.AWS.SNS.SetSubscriptionAttributes: instance Selector S1_0_1SetSubscriptionAttributes
+ Network.AWS.SNS.SetSubscriptionAttributes: instance Selector S1_0_2SetSubscriptionAttributes
+ Network.AWS.SNS.SetSubscriptionAttributes: instance Typeable SetSubscriptionAttributes
+ Network.AWS.SNS.SetSubscriptionAttributes: instance Typeable SetSubscriptionAttributesResponse
+ Network.AWS.SNS.SetSubscriptionAttributes: ssaSubscriptionARN :: Lens' SetSubscriptionAttributes Text
+ Network.AWS.SNS.SetTopicAttributes: instance Constructor C1_0SetTopicAttributes
+ Network.AWS.SNS.SetTopicAttributes: instance Data SetTopicAttributes
+ Network.AWS.SNS.SetTopicAttributes: instance Data SetTopicAttributesResponse
+ Network.AWS.SNS.SetTopicAttributes: instance Datatype D1SetTopicAttributes
+ Network.AWS.SNS.SetTopicAttributes: instance Generic SetTopicAttributes
+ Network.AWS.SNS.SetTopicAttributes: instance Selector S1_0_0SetTopicAttributes
+ Network.AWS.SNS.SetTopicAttributes: instance Selector S1_0_1SetTopicAttributes
+ Network.AWS.SNS.SetTopicAttributes: instance Selector S1_0_2SetTopicAttributes
+ Network.AWS.SNS.SetTopicAttributes: instance Typeable SetTopicAttributes
+ Network.AWS.SNS.SetTopicAttributes: instance Typeable SetTopicAttributesResponse
+ Network.AWS.SNS.SetTopicAttributes: staTopicARN :: Lens' SetTopicAttributes Text
+ Network.AWS.SNS.Subscribe: instance Constructor C1_0Subscribe
+ Network.AWS.SNS.Subscribe: instance Constructor C1_0SubscribeResponse
+ Network.AWS.SNS.Subscribe: instance Data Subscribe
+ Network.AWS.SNS.Subscribe: instance Data SubscribeResponse
+ Network.AWS.SNS.Subscribe: instance Datatype D1Subscribe
+ Network.AWS.SNS.Subscribe: instance Datatype D1SubscribeResponse
+ Network.AWS.SNS.Subscribe: instance Generic Subscribe
+ Network.AWS.SNS.Subscribe: instance Generic SubscribeResponse
+ Network.AWS.SNS.Subscribe: instance Selector S1_0_0Subscribe
+ Network.AWS.SNS.Subscribe: instance Selector S1_0_0SubscribeResponse
+ Network.AWS.SNS.Subscribe: instance Selector S1_0_1Subscribe
+ Network.AWS.SNS.Subscribe: instance Selector S1_0_1SubscribeResponse
+ Network.AWS.SNS.Subscribe: instance Selector S1_0_2Subscribe
+ Network.AWS.SNS.Subscribe: instance Typeable Subscribe
+ Network.AWS.SNS.Subscribe: instance Typeable SubscribeResponse
+ Network.AWS.SNS.Subscribe: srsStatus :: Lens' SubscribeResponse Int
+ Network.AWS.SNS.Subscribe: srsSubscriptionARN :: Lens' SubscribeResponse (Maybe Text)
+ Network.AWS.SNS.Subscribe: subEndpoint :: Lens' Subscribe (Maybe Endpoint)
+ Network.AWS.SNS.Subscribe: subProtocol :: Lens' Subscribe Text
+ Network.AWS.SNS.Subscribe: subTopicARN :: Lens' Subscribe Text
+ Network.AWS.SNS.Types: _AuthorizationErrorException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS.Types: _EndpointDisabledException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS.Types: _InternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS.Types: _InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS.Types: _InvalidParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS.Types: _NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS.Types: _PlatformApplicationDisabledException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS.Types: _SubscriptionLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS.Types: _TopicLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.SNS.Types: eEndpointARN :: Lens' Endpoint (Maybe Text)
+ Network.AWS.SNS.Types: paPlatformApplicationARN :: Lens' PlatformApplication (Maybe Text)
+ Network.AWS.SNS.Types: sEndpoint :: Lens' Subscription (Maybe Endpoint)
+ Network.AWS.SNS.Types: sOwner :: Lens' Subscription (Maybe Text)
+ Network.AWS.SNS.Types: sProtocol :: Lens' Subscription (Maybe Text)
+ Network.AWS.SNS.Types: sSubscriptionARN :: Lens' Subscription (Maybe Text)
+ Network.AWS.SNS.Types: sTopicARN :: Lens' Subscription (Maybe Text)
+ Network.AWS.SNS.Types: tTopicARN :: Lens' Topic (Maybe Text)
+ Network.AWS.SNS.Unsubscribe: instance Constructor C1_0Unsubscribe
+ Network.AWS.SNS.Unsubscribe: instance Data Unsubscribe
+ Network.AWS.SNS.Unsubscribe: instance Data UnsubscribeResponse
+ Network.AWS.SNS.Unsubscribe: instance Datatype D1Unsubscribe
+ Network.AWS.SNS.Unsubscribe: instance Generic Unsubscribe
+ Network.AWS.SNS.Unsubscribe: instance Selector S1_0_0Unsubscribe
+ Network.AWS.SNS.Unsubscribe: instance Typeable Unsubscribe
+ Network.AWS.SNS.Unsubscribe: instance Typeable UnsubscribeResponse
+ Network.AWS.SNS.Unsubscribe: uSubscriptionARN :: Lens' Unsubscribe Text
- Network.AWS.SNS.ConfirmSubscription: confirmSubscriptionResponse :: ConfirmSubscriptionResponse
+ Network.AWS.SNS.ConfirmSubscription: confirmSubscriptionResponse :: Int -> ConfirmSubscriptionResponse
- Network.AWS.SNS.CreatePlatformApplication: createPlatformApplicationResponse :: CreatePlatformApplicationResponse
+ Network.AWS.SNS.CreatePlatformApplication: createPlatformApplicationResponse :: Int -> CreatePlatformApplicationResponse
- Network.AWS.SNS.CreatePlatformEndpoint: createPlatformEndpointResponse :: CreatePlatformEndpointResponse
+ Network.AWS.SNS.CreatePlatformEndpoint: createPlatformEndpointResponse :: Int -> CreatePlatformEndpointResponse
- Network.AWS.SNS.CreateTopic: createTopicResponse :: CreateTopicResponse
+ Network.AWS.SNS.CreateTopic: createTopicResponse :: Int -> CreateTopicResponse
- Network.AWS.SNS.GetEndpointAttributes: getEndpointAttributesResponse :: GetEndpointAttributesResponse
+ Network.AWS.SNS.GetEndpointAttributes: getEndpointAttributesResponse :: Int -> GetEndpointAttributesResponse
- Network.AWS.SNS.GetPlatformApplicationAttributes: getPlatformApplicationAttributesResponse :: GetPlatformApplicationAttributesResponse
+ Network.AWS.SNS.GetPlatformApplicationAttributes: getPlatformApplicationAttributesResponse :: Int -> GetPlatformApplicationAttributesResponse
- Network.AWS.SNS.GetSubscriptionAttributes: getSubscriptionAttributesResponse :: GetSubscriptionAttributesResponse
+ Network.AWS.SNS.GetSubscriptionAttributes: getSubscriptionAttributesResponse :: Int -> GetSubscriptionAttributesResponse
- Network.AWS.SNS.GetTopicAttributes: getTopicAttributesResponse :: GetTopicAttributesResponse
+ Network.AWS.SNS.GetTopicAttributes: getTopicAttributesResponse :: Int -> GetTopicAttributesResponse
- Network.AWS.SNS.ListEndpointsByPlatformApplication: listEndpointsByPlatformApplicationResponse :: ListEndpointsByPlatformApplicationResponse
+ Network.AWS.SNS.ListEndpointsByPlatformApplication: listEndpointsByPlatformApplicationResponse :: Int -> ListEndpointsByPlatformApplicationResponse
- Network.AWS.SNS.ListPlatformApplications: listPlatformApplicationsResponse :: ListPlatformApplicationsResponse
+ Network.AWS.SNS.ListPlatformApplications: listPlatformApplicationsResponse :: Int -> ListPlatformApplicationsResponse
- Network.AWS.SNS.ListSubscriptions: listSubscriptionsResponse :: ListSubscriptionsResponse
+ Network.AWS.SNS.ListSubscriptions: listSubscriptionsResponse :: Int -> ListSubscriptionsResponse
- Network.AWS.SNS.ListSubscriptionsByTopic: listSubscriptionsByTopicResponse :: ListSubscriptionsByTopicResponse
+ Network.AWS.SNS.ListSubscriptionsByTopic: listSubscriptionsByTopicResponse :: Int -> ListSubscriptionsByTopicResponse
- Network.AWS.SNS.ListTopics: listTopicsResponse :: ListTopicsResponse
+ Network.AWS.SNS.ListTopics: listTopicsResponse :: Int -> ListTopicsResponse
- Network.AWS.SNS.Publish: publishResponse :: PublishResponse
+ Network.AWS.SNS.Publish: publishResponse :: Int -> PublishResponse
- Network.AWS.SNS.Subscribe: subscribeResponse :: SubscribeResponse
+ Network.AWS.SNS.Subscribe: subscribeResponse :: Int -> SubscribeResponse
- Network.AWS.SNS.Types: mavBinaryValue :: Lens' MessageAttributeValue (Maybe Base64)
+ Network.AWS.SNS.Types: mavBinaryValue :: Lens' MessageAttributeValue (Maybe ByteString)
Files
- README.md +33/−12
- amazonka-sns.cabal +63/−16
- gen/Network/AWS/SNS.hs +228/−63
- gen/Network/AWS/SNS/AddPermission.hs +89/−86
- gen/Network/AWS/SNS/ConfirmSubscription.hs +114/−100
- gen/Network/AWS/SNS/CreatePlatformApplication.hs +126/−106
- gen/Network/AWS/SNS/CreatePlatformEndpoint.hs +141/−119
- gen/Network/AWS/SNS/CreateTopic.hs +96/−79
- gen/Network/AWS/SNS/DeleteEndpoint.hs +68/−62
- gen/Network/AWS/SNS/DeletePlatformApplication.hs +72/−64
- gen/Network/AWS/SNS/DeleteTopic.hs +67/−64
- gen/Network/AWS/SNS/GetEndpointAttributes.hs +110/−88
- gen/Network/AWS/SNS/GetPlatformApplicationAttributes.hs +115/−87
- gen/Network/AWS/SNS/GetSubscriptionAttributes.hs +108/−86
- gen/Network/AWS/SNS/GetTopicAttributes.hs +114/−87
- gen/Network/AWS/SNS/ListEndpointsByPlatformApplication.hs +143/−109
- gen/Network/AWS/SNS/ListPlatformApplications.hs +121/−97
- gen/Network/AWS/SNS/ListSubscriptions.hs +111/−90
- gen/Network/AWS/SNS/ListSubscriptionsByTopic.hs +123/−99
- gen/Network/AWS/SNS/ListTopics.hs +109/−89
- gen/Network/AWS/SNS/Publish.hs +190/−161
- gen/Network/AWS/SNS/RemovePermission.hs +73/−69
- gen/Network/AWS/SNS/SetEndpointAttributes.hs +89/−78
- gen/Network/AWS/SNS/SetPlatformApplicationAttributes.hs +108/−86
- gen/Network/AWS/SNS/SetSubscriptionAttributes.hs +88/−81
- gen/Network/AWS/SNS/SetTopicAttributes.hs +85/−80
- gen/Network/AWS/SNS/Subscribe.hs +134/−110
- gen/Network/AWS/SNS/Types.hs +103/−296
- gen/Network/AWS/SNS/Types/Product.hs +258/−0
- gen/Network/AWS/SNS/Types/Sum.hs +20/−0
- gen/Network/AWS/SNS/Unsubscribe.hs +72/−67
- gen/Network/AWS/SNS/Waiters.hs +20/−0
- test/Main.hs +21/−0
- test/Test/AWS/Gen/SNS.hs +464/−0
- test/Test/AWS/SNS.hs +26/−0
- test/Test/AWS/SNS/Internal.hs +16/−0
README.md view
@@ -1,27 +1,48 @@ # Amazon Simple Notification Service SDK -> _Warning:_ This is an experimental preview release which is still under heavy development and not intended for public consumption, _caveat emptor_!-+* [Version](#version) * [Description](#description) * [Contribute](#contribute) * [Licence](#licence) ++## Version++`1.0.0`++ ## Description -Amazon Simple Notification Service (Amazon SNS) is a fast, flexible, fully-managed push messaging service. Amazon SNS makes it simple and cost-effective-to push notifications to Apple, Google, Fire OS, and Windows devices, as well-as Android devices in China with Baidu Cloud Push. You can also use SNS to-push notifications to internet connected smart devices, as well as other-distributed services. Besides pushing cloud notifications directly to mobile-devices, Amazon SNS can also deliver notifications by SMS text message or-email, to Amazon Simple Queue Service (SQS) queues, or to any HTTP endpoint.-To prevent messages from being lost, all messages published to Amazon SNS are-stored redundantly across multiple availability zones.+Amazon Simple Notification Service +Amazon Simple Notification Service (Amazon SNS) is a web service that+enables you to build distributed web-enabled applications. Applications+can use Amazon SNS to easily push real-time notification messages to+interested subscribers over multiple delivery protocols. For more+information about this product see+<http://aws.amazon.com/sns/ http:\/\/aws.amazon.com\/sns>. For detailed+information about Amazon SNS features and their associated API calls,+see the+<http://docs.aws.amazon.com/sns/latest/dg/ Amazon SNS Developer Guide>.++We also provide SDKs that enable you to access Amazon SNS from your+preferred programming language. The SDKs contain functionality that+automatically takes care of tasks such as: cryptographically signing+your service requests, retrying requests, and handling error responses.+For a list of available SDKs, go to+<http://aws.amazon.com/tools/ Tools for Amazon Web Services>.+ Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-sns) and the [AWS API Reference](http://docs.aws.amazon.com/sns/latest/api/Welcome.html). +The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),+which provides mechanisms for specifying AuthN/AuthZ information and sending requests.++Use of lenses is required for constructing and manipulating types.+This is due to the amount of nesting of AWS types and transparency regarding+de/serialisation into more palatable Haskell values.+The provided lenses should be compatible with any of the major lens libraries+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core). ## Contribute
amazonka-sns.cabal view
@@ -1,34 +1,50 @@ name: amazonka-sns-version: 0.3.6+version: 1.0.0 synopsis: Amazon Simple Notification Service SDK. homepage: https://github.com/brendanhay/amazonka license: OtherLicense license-file: LICENSE author: Brendan Hay maintainer: Brendan Hay <brendan.g.hay@gmail.com>-copyright: Copyright (c) 2013-2014 Brendan Hay+copyright: Copyright (c) 2013-2015 Brendan Hay category: Network, AWS, Cloud, Distributed Computing build-type: Simple extra-source-files: README.md cabal-version: >= 1.10 description:- Amazon Simple Notification Service (Amazon SNS) is a fast, flexible, fully- managed push messaging service. Amazon SNS makes it simple and cost-effective- to push notifications to Apple, Google, Fire OS, and Windows devices, as well- as Android devices in China with Baidu Cloud Push. You can also use SNS to- push notifications to internet connected smart devices, as well as other- distributed services. Besides pushing cloud notifications directly to mobile- devices, Amazon SNS can also deliver notifications by SMS text message or- email, to Amazon Simple Queue Service (SQS) queues, or to any HTTP endpoint.- To prevent messages from being lost, all messages published to Amazon SNS are- stored redundantly across multiple availability zones.+ Amazon Simple Notification Service + Amazon Simple Notification Service (Amazon SNS) is a web service that+ enables you to build distributed web-enabled applications. Applications+ can use Amazon SNS to easily push real-time notification messages to+ interested subscribers over multiple delivery protocols. For more+ information about this product see+ <http://aws.amazon.com/sns/ http:\/\/aws.amazon.com\/sns>. For detailed+ information about Amazon SNS features and their associated API calls,+ see the+ <http://docs.aws.amazon.com/sns/latest/dg/ Amazon SNS Developer Guide>.++ We also provide SDKs that enable you to access Amazon SNS from your+ preferred programming language. The SDKs contain functionality that+ automatically takes care of tasks such as: cryptographically signing+ your service requests, retrying requests, and handling error responses.+ For a list of available SDKs, go to+ <http://aws.amazon.com/tools/ Tools for Amazon Web Services>. .- /See:/ <http://docs.aws.amazon.com/sns/latest/api/Welcome.html AWS API Reference>+ The types from this library are intended to be used with+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides+ mechanisms for specifying AuthN/AuthZ information and sending requests. .- /Warning:/ This is an experimental preview release which is still under- heavy development and not intended for public consumption, caveat emptor!+ Use of lenses is required for constructing and manipulating types.+ This is due to the amount of nesting of AWS types and transparency regarding+ de/serialisation into more palatable Haskell values.+ The provided lenses should be compatible with any of the major lens libraries+ such as <http://hackage.haskell.org/package/lens lens> or+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+ .+ See "Network.AWS.SNS" and the <http://docs.aws.amazon.com/sns/latest/api/Welcome.html AWS API Reference>+ to get started. source-repository head type: git@@ -68,9 +84,40 @@ , Network.AWS.SNS.Subscribe , Network.AWS.SNS.Types , Network.AWS.SNS.Unsubscribe+ , Network.AWS.SNS.Waiters other-modules:+ Network.AWS.SNS.Types.Product+ , Network.AWS.SNS.Types.Sum build-depends:- amazonka-core == 0.3.6.*+ amazonka-core == 1.0.0.* , base >= 4.7 && < 5++test-suite amazonka-sns-test+ type: exitcode-stdio-1.0+ default-language: Haskell2010+ hs-source-dirs: test+ main-is: Main.hs++ ghc-options: -Wall -threaded++ -- This is not comprehensive if modules have manually been added.+ -- It exists to ensure cabal 'somewhat' detects test module changes.+ other-modules:+ Test.AWS.SNS+ , Test.AWS.Gen.SNS+ , Test.AWS.SNS.Internal++ build-depends:+ amazonka-core == 1.0.0+ , amazonka-test == 1.0.0+ , amazonka-sns == 1.0.0+ , base+ , bytestring+ , lens+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
gen/Network/AWS/SNS.hs view
@@ -1,77 +1,242 @@+{-# 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.SNS--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Amazon Simple Notification Service (Amazon SNS) is a fast, flexible, fully--- managed push messaging service. Amazon SNS makes it simple and cost-effective--- to push notifications to Apple, Google, Fire OS, and Windows devices, as well--- as Android devices in China with Baidu Cloud Push. You can also use SNS to--- push notifications to internet connected smart devices, as well as other--- distributed services. Besides pushing cloud notifications directly to mobile--- devices, Amazon SNS can also deliver notifications by SMS text message or--- email, to Amazon Simple Queue Service (SQS) queues, or to any HTTP endpoint.--- To prevent messages from being lost, all messages published to Amazon SNS are--- stored redundantly across multiple availability zones.+-- Amazon Simple Notification Service+--+-- Amazon Simple Notification Service (Amazon SNS) is a web service that+-- enables you to build distributed web-enabled applications. Applications+-- can use Amazon SNS to easily push real-time notification messages to+-- interested subscribers over multiple delivery protocols. For more+-- information about this product see+-- <http://aws.amazon.com/sns/ http:\/\/aws.amazon.com\/sns>. For detailed+-- information about Amazon SNS features and their associated API calls,+-- see the+-- <http://docs.aws.amazon.com/sns/latest/dg/ Amazon SNS Developer Guide>.+--+-- We also provide SDKs that enable you to access Amazon SNS from your+-- preferred programming language. The SDKs contain functionality that+-- automatically takes care of tasks such as: cryptographically signing+-- your service requests, retrying requests, and handling error responses.+-- For a list of available SDKs, go to+-- <http://aws.amazon.com/tools/ Tools for Amazon Web Services>.+--+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/Welcome.html AWS API Reference> module Network.AWS.SNS- ( module Network.AWS.SNS.AddPermission- , module Network.AWS.SNS.ConfirmSubscription- , module Network.AWS.SNS.CreatePlatformApplication- , module Network.AWS.SNS.CreatePlatformEndpoint- , module Network.AWS.SNS.CreateTopic+ (+ -- * Service+ SNS++ -- * Errors+ -- $errors++ -- ** EndpointDisabledException+ , _EndpointDisabledException++ -- ** AuthorizationErrorException+ , _AuthorizationErrorException++ -- ** InvalidParameterException+ , _InvalidParameterException++ -- ** SubscriptionLimitExceededException+ , _SubscriptionLimitExceededException++ -- ** PlatformApplicationDisabledException+ , _PlatformApplicationDisabledException++ -- ** InternalErrorException+ , _InternalErrorException++ -- ** NotFoundException+ , _NotFoundException++ -- ** InvalidParameterValueException+ , _InvalidParameterValueException++ -- ** TopicLimitExceededException+ , _TopicLimitExceededException++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** DeleteEndpoint , module Network.AWS.SNS.DeleteEndpoint- , module Network.AWS.SNS.DeletePlatformApplication- , module Network.AWS.SNS.DeleteTopic- , module Network.AWS.SNS.GetEndpointAttributes- , module Network.AWS.SNS.GetPlatformApplicationAttributes- , module Network.AWS.SNS.GetSubscriptionAttributes++ -- ** RemovePermission+ , module Network.AWS.SNS.RemovePermission++ -- ** SetPlatformApplicationAttributes+ , module Network.AWS.SNS.SetPlatformApplicationAttributes++ -- ** CreatePlatformEndpoint+ , module Network.AWS.SNS.CreatePlatformEndpoint++ -- ** ListSubscriptionsByTopic (Paginated)+ , module Network.AWS.SNS.ListSubscriptionsByTopic++ -- ** GetTopicAttributes , module Network.AWS.SNS.GetTopicAttributes++ -- ** DeleteTopic+ , module Network.AWS.SNS.DeleteTopic++ -- ** ListTopics (Paginated)+ , module Network.AWS.SNS.ListTopics++ -- ** CreatePlatformApplication+ , module Network.AWS.SNS.CreatePlatformApplication++ -- ** ListEndpointsByPlatformApplication (Paginated) , module Network.AWS.SNS.ListEndpointsByPlatformApplication++ -- ** GetPlatformApplicationAttributes+ , module Network.AWS.SNS.GetPlatformApplicationAttributes++ -- ** DeletePlatformApplication+ , module Network.AWS.SNS.DeletePlatformApplication++ -- ** ListPlatformApplications (Paginated) , module Network.AWS.SNS.ListPlatformApplications- , module Network.AWS.SNS.ListSubscriptions- , module Network.AWS.SNS.ListSubscriptionsByTopic- , module Network.AWS.SNS.ListTopics- , module Network.AWS.SNS.Publish- , module Network.AWS.SNS.RemovePermission- , module Network.AWS.SNS.SetEndpointAttributes- , module Network.AWS.SNS.SetPlatformApplicationAttributes- , module Network.AWS.SNS.SetSubscriptionAttributes++ -- ** SetTopicAttributes , module Network.AWS.SNS.SetTopicAttributes++ -- ** GetEndpointAttributes+ , module Network.AWS.SNS.GetEndpointAttributes++ -- ** AddPermission+ , module Network.AWS.SNS.AddPermission++ -- ** GetSubscriptionAttributes+ , module Network.AWS.SNS.GetSubscriptionAttributes++ -- ** ListSubscriptions (Paginated)+ , module Network.AWS.SNS.ListSubscriptions++ -- ** CreateTopic+ , module Network.AWS.SNS.CreateTopic++ -- ** Subscribe , module Network.AWS.SNS.Subscribe- , module Network.AWS.SNS.Types++ -- ** Unsubscribe , module Network.AWS.SNS.Unsubscribe++ -- ** SetEndpointAttributes+ , module Network.AWS.SNS.SetEndpointAttributes++ -- ** SetSubscriptionAttributes+ , module Network.AWS.SNS.SetSubscriptionAttributes++ -- ** ConfirmSubscription+ , module Network.AWS.SNS.ConfirmSubscription++ -- ** Publish+ , module Network.AWS.SNS.Publish++ -- * Types++ -- ** Endpoint+ , Endpoint+ , endpoint+ , eAttributes+ , eEndpointARN++ -- ** MessageAttributeValue+ , MessageAttributeValue+ , messageAttributeValue+ , mavBinaryValue+ , mavStringValue+ , mavDataType++ -- ** PlatformApplication+ , PlatformApplication+ , platformApplication+ , paPlatformApplicationARN+ , paAttributes++ -- ** Subscription+ , Subscription+ , subscription+ , sProtocol+ , sOwner+ , sTopicARN+ , sEndpoint+ , sSubscriptionARN++ -- ** Topic+ , Topic+ , topic+ , tTopicARN ) where -import Network.AWS.SNS.AddPermission-import Network.AWS.SNS.ConfirmSubscription-import Network.AWS.SNS.CreatePlatformApplication-import Network.AWS.SNS.CreatePlatformEndpoint-import Network.AWS.SNS.CreateTopic-import Network.AWS.SNS.DeleteEndpoint-import Network.AWS.SNS.DeletePlatformApplication-import Network.AWS.SNS.DeleteTopic-import Network.AWS.SNS.GetEndpointAttributes-import Network.AWS.SNS.GetPlatformApplicationAttributes-import Network.AWS.SNS.GetSubscriptionAttributes-import Network.AWS.SNS.GetTopicAttributes-import Network.AWS.SNS.ListEndpointsByPlatformApplication-import Network.AWS.SNS.ListPlatformApplications-import Network.AWS.SNS.ListSubscriptions-import Network.AWS.SNS.ListSubscriptionsByTopic-import Network.AWS.SNS.ListTopics-import Network.AWS.SNS.Publish-import Network.AWS.SNS.RemovePermission-import Network.AWS.SNS.SetEndpointAttributes-import Network.AWS.SNS.SetPlatformApplicationAttributes-import Network.AWS.SNS.SetSubscriptionAttributes-import Network.AWS.SNS.SetTopicAttributes-import Network.AWS.SNS.Subscribe-import Network.AWS.SNS.Types-import Network.AWS.SNS.Unsubscribe+import Network.AWS.SNS.AddPermission+import Network.AWS.SNS.ConfirmSubscription+import Network.AWS.SNS.CreatePlatformApplication+import Network.AWS.SNS.CreatePlatformEndpoint+import Network.AWS.SNS.CreateTopic+import Network.AWS.SNS.DeleteEndpoint+import Network.AWS.SNS.DeletePlatformApplication+import Network.AWS.SNS.DeleteTopic+import Network.AWS.SNS.GetEndpointAttributes+import Network.AWS.SNS.GetPlatformApplicationAttributes+import Network.AWS.SNS.GetSubscriptionAttributes+import Network.AWS.SNS.GetTopicAttributes+import Network.AWS.SNS.ListEndpointsByPlatformApplication+import Network.AWS.SNS.ListPlatformApplications+import Network.AWS.SNS.ListSubscriptions+import Network.AWS.SNS.ListSubscriptionsByTopic+import Network.AWS.SNS.ListTopics+import Network.AWS.SNS.Publish+import Network.AWS.SNS.RemovePermission+import Network.AWS.SNS.SetEndpointAttributes+import Network.AWS.SNS.SetPlatformApplicationAttributes+import Network.AWS.SNS.SetSubscriptionAttributes+import Network.AWS.SNS.SetTopicAttributes+import Network.AWS.SNS.Subscribe+import Network.AWS.SNS.Types+import Network.AWS.SNS.Unsubscribe+import Network.AWS.SNS.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 'SNS'.+-}++{- $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.+-}
gen/Network/AWS/SNS/AddPermission.hs view
@@ -1,126 +1,129 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.AddPermission--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Adds a statement to a topic's access control policy, granting access for the--- specified AWS accounts to the specified actions.+-- Adds a statement to a topic\'s access control policy, granting access+-- for the specified AWS accounts to the specified actions. ----- <http://docs.aws.amazon.com/sns/latest/api/API_AddPermission.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_AddPermission.html AWS API Reference> for AddPermission. module Network.AWS.SNS.AddPermission (- -- * Request- AddPermission- -- ** Request constructor- , addPermission- -- ** Request lenses+ -- * Creating a Request+ addPermission+ , AddPermission+ -- * Request Lenses+ , apTopicARN+ , apLabel , apAWSAccountId , apActionName- , apLabel- , apTopicArn - -- * Response- , AddPermissionResponse- -- ** Response constructor+ -- * Destructuring the Response , addPermissionResponse+ , AddPermissionResponse ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product -data AddPermission = AddPermission- { _apAWSAccountId :: List "member" Text- , _apActionName :: List "member" Text- , _apLabel :: Text- , _apTopicArn :: Text- } deriving (Eq, Ord, Read, Show)+-- | /See:/ 'addPermission' smart constructor.+data AddPermission = AddPermission'+ { _apTopicARN :: !Text+ , _apLabel :: !Text+ , _apAWSAccountId :: ![Text]+ , _apActionName :: ![Text]+ } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'AddPermission' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'AddPermission' with the minimum fields required to make a request. ----- * 'apAWSAccountId' @::@ ['Text']+-- Use one of the following lenses to modify other fields as desired: ----- * 'apActionName' @::@ ['Text']+-- * 'apTopicARN' ----- * 'apLabel' @::@ 'Text'+-- * 'apLabel' ----- * 'apTopicArn' @::@ 'Text'+-- * 'apAWSAccountId' ---addPermission :: Text -- ^ 'apTopicArn'- -> Text -- ^ 'apLabel'- -> AddPermission-addPermission p1 p2 = AddPermission- { _apTopicArn = p1- , _apLabel = p2+-- * 'apActionName'+addPermission+ :: Text -- ^ 'apTopicARN'+ -> Text -- ^ 'apLabel'+ -> AddPermission+addPermission pTopicARN_ pLabel_ =+ AddPermission'+ { _apTopicARN = pTopicARN_+ , _apLabel = pLabel_ , _apAWSAccountId = mempty- , _apActionName = mempty+ , _apActionName = mempty } --- | The AWS account IDs of the users (principals) who will be given access to the--- specified actions. The users must have AWS accounts, but do not need to be--- signed up for this service.+-- | The ARN of the topic whose access control policy you wish to modify.+apTopicARN :: Lens' AddPermission Text+apTopicARN = lens _apTopicARN (\ s a -> s{_apTopicARN = a});++-- | A unique identifier for the new policy statement.+apLabel :: Lens' AddPermission Text+apLabel = lens _apLabel (\ s a -> s{_apLabel = a});++-- | The AWS account IDs of the users (principals) who will be given access+-- to the specified actions. The users must have AWS accounts, but do not+-- need to be signed up for this service. apAWSAccountId :: Lens' AddPermission [Text]-apAWSAccountId = lens _apAWSAccountId (\s a -> s { _apAWSAccountId = a }) . _List+apAWSAccountId = lens _apAWSAccountId (\ s a -> s{_apAWSAccountId = a}) . _Coerce; -- | The action you want to allow for the specified principal(s). -- -- Valid values: any Amazon SNS action name. apActionName :: Lens' AddPermission [Text]-apActionName = lens _apActionName (\s a -> s { _apActionName = a }) . _List---- | A unique identifier for the new policy statement.-apLabel :: Lens' AddPermission Text-apLabel = lens _apLabel (\s a -> s { _apLabel = a })---- | The ARN of the topic whose access control policy you wish to modify.-apTopicArn :: Lens' AddPermission Text-apTopicArn = lens _apTopicArn (\s a -> s { _apTopicArn = a })+apActionName = lens _apActionName (\ s a -> s{_apActionName = a}) . _Coerce; -data AddPermissionResponse = AddPermissionResponse- deriving (Eq, Ord, Read, Show, Generic)+instance AWSRequest AddPermission where+ type Sv AddPermission = SNS+ type Rs AddPermission = AddPermissionResponse+ request = postQuery+ response = receiveNull AddPermissionResponse' --- | 'AddPermissionResponse' constructor.-addPermissionResponse :: AddPermissionResponse-addPermissionResponse = AddPermissionResponse+instance ToHeaders AddPermission where+ toHeaders = const mempty instance ToPath AddPermission where- toPath = const "/"+ toPath = const "/" instance ToQuery AddPermission where- toQuery AddPermission{..} = mconcat- [ "AWSAccountId" =? _apAWSAccountId- , "ActionName" =? _apActionName- , "Label" =? _apLabel- , "TopicArn" =? _apTopicArn- ]--instance ToHeaders AddPermission+ toQuery AddPermission'{..}+ = mconcat+ ["Action" =: ("AddPermission" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "TopicArn" =: _apTopicARN, "Label" =: _apLabel,+ "AWSAccountId" =:+ toQueryList "member" _apAWSAccountId,+ "ActionName" =: toQueryList "member" _apActionName] -instance AWSRequest AddPermission where- type Sv AddPermission = SNS- type Rs AddPermission = AddPermissionResponse+-- | /See:/ 'addPermissionResponse' smart constructor.+data AddPermissionResponse =+ AddPermissionResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic) - request = post "AddPermission"- response = nullResponse AddPermissionResponse+-- | Creates a value of 'AddPermissionResponse' with the minimum fields required to make a request.+--+addPermissionResponse+ :: AddPermissionResponse+addPermissionResponse = AddPermissionResponse'
gen/Network/AWS/SNS/ConfirmSubscription.hs view
@@ -1,138 +1,152 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.ConfirmSubscription--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Verifies an endpoint owner's intent to receive messages by validating the--- token sent to the endpoint by an earlier 'Subscribe' action. If the token is--- valid, the action creates a new subscription and returns its Amazon Resource--- Name (ARN). This call requires an AWS signature only when the 'AuthenticateOnUnsubscribe' flag is set to "true".+-- Verifies an endpoint owner\'s intent to receive messages by validating+-- the token sent to the endpoint by an earlier 'Subscribe' action. If the+-- token is valid, the action creates a new subscription and returns its+-- Amazon Resource Name (ARN). This call requires an AWS signature only+-- when the 'AuthenticateOnUnsubscribe' flag is set to \"true\". ----- <http://docs.aws.amazon.com/sns/latest/api/API_ConfirmSubscription.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_ConfirmSubscription.html AWS API Reference> for ConfirmSubscription. module Network.AWS.SNS.ConfirmSubscription (- -- * Request- ConfirmSubscription- -- ** Request constructor- , confirmSubscription- -- ** Request lenses+ -- * Creating a Request+ confirmSubscription+ , ConfirmSubscription+ -- * Request Lenses , csAuthenticateOnUnsubscribe+ , csTopicARN , csToken- , csTopicArn - -- * Response- , ConfirmSubscriptionResponse- -- ** Response constructor+ -- * Destructuring the Response , confirmSubscriptionResponse- -- ** Response lenses- , csrSubscriptionArn+ , ConfirmSubscriptionResponse+ -- * Response Lenses+ , csrsSubscriptionARN+ , csrsStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--data ConfirmSubscription = ConfirmSubscription- { _csAuthenticateOnUnsubscribe :: Maybe Text- , _csToken :: Text- , _csTopicArn :: Text- } deriving (Eq, Ord, Read, Show)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'ConfirmSubscription' constructor.+-- | Input for ConfirmSubscription action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'confirmSubscription' smart constructor.+data ConfirmSubscription = ConfirmSubscription'+ { _csAuthenticateOnUnsubscribe :: !(Maybe Text)+ , _csTopicARN :: !Text+ , _csToken :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ConfirmSubscription' with the minimum fields required to make a request. ----- * 'csAuthenticateOnUnsubscribe' @::@ 'Maybe' 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'csToken' @::@ 'Text'+-- * 'csAuthenticateOnUnsubscribe' ----- * 'csTopicArn' @::@ 'Text'+-- * 'csTopicARN' ---confirmSubscription :: Text -- ^ 'csTopicArn'- -> Text -- ^ 'csToken'- -> ConfirmSubscription-confirmSubscription p1 p2 = ConfirmSubscription- { _csTopicArn = p1- , _csToken = p2- , _csAuthenticateOnUnsubscribe = Nothing+-- * 'csToken'+confirmSubscription+ :: Text -- ^ 'csTopicARN'+ -> Text -- ^ 'csToken'+ -> ConfirmSubscription+confirmSubscription pTopicARN_ pToken_ =+ ConfirmSubscription'+ { _csAuthenticateOnUnsubscribe = Nothing+ , _csTopicARN = pTopicARN_+ , _csToken = pToken_ } --- | Disallows unauthenticated unsubscribes of the subscription. If the value of--- this parameter is 'true' and the request has an AWS signature, then only the--- topic owner and the subscription owner can unsubscribe the endpoint. The--- unsubscribe action requires AWS authentication.+-- | Disallows unauthenticated unsubscribes of the subscription. If the value+-- of this parameter is 'true' and the request has an AWS signature, then+-- only the topic owner and the subscription owner can unsubscribe the+-- endpoint. The unsubscribe action requires AWS authentication. csAuthenticateOnUnsubscribe :: Lens' ConfirmSubscription (Maybe Text)-csAuthenticateOnUnsubscribe =- lens _csAuthenticateOnUnsubscribe- (\s a -> s { _csAuthenticateOnUnsubscribe = a })---- | Short-lived token sent to an endpoint during the 'Subscribe' action.-csToken :: Lens' ConfirmSubscription Text-csToken = lens _csToken (\s a -> s { _csToken = a })+csAuthenticateOnUnsubscribe = lens _csAuthenticateOnUnsubscribe (\ s a -> s{_csAuthenticateOnUnsubscribe = a}); -- | The ARN of the topic for which you wish to confirm a subscription.-csTopicArn :: Lens' ConfirmSubscription Text-csTopicArn = lens _csTopicArn (\s a -> s { _csTopicArn = a })+csTopicARN :: Lens' ConfirmSubscription Text+csTopicARN = lens _csTopicARN (\ s a -> s{_csTopicARN = a}); -newtype ConfirmSubscriptionResponse = ConfirmSubscriptionResponse- { _csrSubscriptionArn :: Maybe Text- } deriving (Eq, Ord, Read, Show, Monoid)+-- | Short-lived token sent to an endpoint during the 'Subscribe' action.+csToken :: Lens' ConfirmSubscription Text+csToken = lens _csToken (\ s a -> s{_csToken = a}); --- | 'ConfirmSubscriptionResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'csrSubscriptionArn' @::@ 'Maybe' 'Text'----confirmSubscriptionResponse :: ConfirmSubscriptionResponse-confirmSubscriptionResponse = ConfirmSubscriptionResponse- { _csrSubscriptionArn = Nothing- }+instance AWSRequest ConfirmSubscription where+ type Sv ConfirmSubscription = SNS+ type Rs ConfirmSubscription =+ ConfirmSubscriptionResponse+ request = postQuery+ response+ = receiveXMLWrapper "ConfirmSubscriptionResult"+ (\ s h x ->+ ConfirmSubscriptionResponse' <$>+ (x .@? "SubscriptionArn") <*> (pure (fromEnum s))) --- | The ARN of the created subscription.-csrSubscriptionArn :: Lens' ConfirmSubscriptionResponse (Maybe Text)-csrSubscriptionArn =- lens _csrSubscriptionArn (\s a -> s { _csrSubscriptionArn = a })+instance ToHeaders ConfirmSubscription where+ toHeaders = const mempty instance ToPath ConfirmSubscription where- toPath = const "/"+ toPath = const "/" instance ToQuery ConfirmSubscription where- toQuery ConfirmSubscription{..} = mconcat- [ "AuthenticateOnUnsubscribe" =? _csAuthenticateOnUnsubscribe- , "Token" =? _csToken- , "TopicArn" =? _csTopicArn- ]+ toQuery ConfirmSubscription'{..}+ = mconcat+ ["Action" =: ("ConfirmSubscription" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "AuthenticateOnUnsubscribe" =:+ _csAuthenticateOnUnsubscribe,+ "TopicArn" =: _csTopicARN, "Token" =: _csToken] -instance ToHeaders ConfirmSubscription+-- | Response for ConfirmSubscriptions action.+--+-- /See:/ 'confirmSubscriptionResponse' smart constructor.+data ConfirmSubscriptionResponse = ConfirmSubscriptionResponse'+ { _csrsSubscriptionARN :: !(Maybe Text)+ , _csrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest ConfirmSubscription where- type Sv ConfirmSubscription = SNS- type Rs ConfirmSubscription = ConfirmSubscriptionResponse+-- | Creates a value of 'ConfirmSubscriptionResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'csrsSubscriptionARN'+--+-- * 'csrsStatus'+confirmSubscriptionResponse+ :: Int -- ^ 'csrsStatus'+ -> ConfirmSubscriptionResponse+confirmSubscriptionResponse pStatus_ =+ ConfirmSubscriptionResponse'+ { _csrsSubscriptionARN = Nothing+ , _csrsStatus = pStatus_+ } - request = post "ConfirmSubscription"- response = xmlResponse+-- | The ARN of the created subscription.+csrsSubscriptionARN :: Lens' ConfirmSubscriptionResponse (Maybe Text)+csrsSubscriptionARN = lens _csrsSubscriptionARN (\ s a -> s{_csrsSubscriptionARN = a}); -instance FromXML ConfirmSubscriptionResponse where- parseXML = withElement "ConfirmSubscriptionResult" $ \x -> ConfirmSubscriptionResponse- <$> x .@? "SubscriptionArn"+-- | The response status code.+csrsStatus :: Lens' ConfirmSubscriptionResponse Int+csrsStatus = lens _csrsStatus (\ s a -> s{_csrsStatus = a});
gen/Network/AWS/SNS/CreatePlatformApplication.hs view
@@ -1,146 +1,166 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.CreatePlatformApplication--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Creates a platform application object for one of the supported push--- notification services, such as APNS and GCM, to which devices and mobile apps--- may register. You must specify PlatformPrincipal and PlatformCredential--- attributes when using the 'CreatePlatformApplication' action. The--- PlatformPrincipal is received from the notification service. For--- APNS/APNS_SANDBOX, PlatformPrincipal is "SSL certificate". For GCM,--- PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is "client--- id". The PlatformCredential is also received from the notification service.--- For APNS/APNS_SANDBOX, PlatformCredential is "private key". For GCM,--- PlatformCredential is "API key". For ADM, PlatformCredential is "client--- secret". The PlatformApplicationArn that is returned when using 'CreatePlatformApplication' is then used as an attribute for the 'CreatePlatformEndpoint' action. For more--- information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>.+-- Creates a platform application object for one of the supported push+-- notification services, such as APNS and GCM, to which devices and mobile+-- apps may register. You must specify PlatformPrincipal and+-- PlatformCredential attributes when using the 'CreatePlatformApplication'+-- action. The PlatformPrincipal is received from the notification service.+-- For APNS\/APNS_SANDBOX, PlatformPrincipal is \"SSL certificate\". For+-- GCM, PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is+-- \"client id\". The PlatformCredential is also received from the+-- notification service. For APNS\/APNS_SANDBOX, PlatformCredential is+-- \"private key\". For GCM, PlatformCredential is \"API key\". For ADM,+-- PlatformCredential is \"client secret\". The PlatformApplicationArn that+-- is returned when using 'CreatePlatformApplication' is then used as an+-- attribute for the 'CreatePlatformEndpoint' action. For more information,+-- see+-- <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>. ----- <http://docs.aws.amazon.com/sns/latest/api/API_CreatePlatformApplication.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_CreatePlatformApplication.html AWS API Reference> for CreatePlatformApplication. module Network.AWS.SNS.CreatePlatformApplication (- -- * Request- CreatePlatformApplication- -- ** Request constructor- , createPlatformApplication- -- ** Request lenses- , cpaAttributes+ -- * Creating a Request+ createPlatformApplication+ , CreatePlatformApplication+ -- * Request Lenses , cpaName , cpaPlatform+ , cpaAttributes - -- * Response- , CreatePlatformApplicationResponse- -- ** Response constructor+ -- * Destructuring the Response , createPlatformApplicationResponse- -- ** Response lenses- , cparPlatformApplicationArn+ , CreatePlatformApplicationResponse+ -- * Response Lenses+ , cparsPlatformApplicationARN+ , cparsStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--data CreatePlatformApplication = CreatePlatformApplication- { _cpaAttributes :: EMap "entry" "key" "value" Text Text- , _cpaName :: Text- , _cpaPlatform :: Text- } deriving (Eq, Read, Show)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'CreatePlatformApplication' constructor.+-- | Input for CreatePlatformApplication action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'createPlatformApplication' smart constructor.+data CreatePlatformApplication = CreatePlatformApplication'+ { _cpaName :: !Text+ , _cpaPlatform :: !Text+ , _cpaAttributes :: !(Map Text Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreatePlatformApplication' with the minimum fields required to make a request. ----- * 'cpaAttributes' @::@ 'HashMap' 'Text' 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'cpaName' @::@ 'Text'+-- * 'cpaName' ----- * 'cpaPlatform' @::@ 'Text'+-- * 'cpaPlatform' ---createPlatformApplication :: Text -- ^ 'cpaName'- -> Text -- ^ 'cpaPlatform'- -> CreatePlatformApplication-createPlatformApplication p1 p2 = CreatePlatformApplication- { _cpaName = p1- , _cpaPlatform = p2+-- * 'cpaAttributes'+createPlatformApplication+ :: Text -- ^ 'cpaName'+ -> Text -- ^ 'cpaPlatform'+ -> CreatePlatformApplication+createPlatformApplication pName_ pPlatform_ =+ CreatePlatformApplication'+ { _cpaName = pName_+ , _cpaPlatform = pPlatform_ , _cpaAttributes = mempty } --- | For a list of attributes, see <http://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html SetPlatformApplicationAttributes>-cpaAttributes :: Lens' CreatePlatformApplication (HashMap Text Text)-cpaAttributes = lens _cpaAttributes (\s a -> s { _cpaAttributes = a }) . _EMap- -- | Application names must be made up of only uppercase and lowercase ASCII--- letters, numbers, underscores, hyphens, and periods, and must be between 1--- and 256 characters long.+-- letters, numbers, underscores, hyphens, and periods, and must be between+-- 1 and 256 characters long. cpaName :: Lens' CreatePlatformApplication Text-cpaName = lens _cpaName (\s a -> s { _cpaName = a })+cpaName = lens _cpaName (\ s a -> s{_cpaName = a}); --- | The following platforms are supported: ADM (Amazon Device Messaging), APNS--- (Apple Push Notification Service), APNS_SANDBOX, and GCM (Google Cloud--- Messaging).+-- | The following platforms are supported: ADM (Amazon Device Messaging),+-- APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Google+-- Cloud Messaging). cpaPlatform :: Lens' CreatePlatformApplication Text-cpaPlatform = lens _cpaPlatform (\s a -> s { _cpaPlatform = a })+cpaPlatform = lens _cpaPlatform (\ s a -> s{_cpaPlatform = a}); -newtype CreatePlatformApplicationResponse = CreatePlatformApplicationResponse- { _cparPlatformApplicationArn :: Maybe Text- } deriving (Eq, Ord, Read, Show, Monoid)+-- | For a list of attributes, see+-- <http://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html SetPlatformApplicationAttributes>+cpaAttributes :: Lens' CreatePlatformApplication (HashMap Text Text)+cpaAttributes = lens _cpaAttributes (\ s a -> s{_cpaAttributes = a}) . _Map; --- | 'CreatePlatformApplicationResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'cparPlatformApplicationArn' @::@ 'Maybe' 'Text'----createPlatformApplicationResponse :: CreatePlatformApplicationResponse-createPlatformApplicationResponse = CreatePlatformApplicationResponse- { _cparPlatformApplicationArn = Nothing- }+instance AWSRequest CreatePlatformApplication where+ type Sv CreatePlatformApplication = SNS+ type Rs CreatePlatformApplication =+ CreatePlatformApplicationResponse+ request = postQuery+ response+ = receiveXMLWrapper "CreatePlatformApplicationResult"+ (\ s h x ->+ CreatePlatformApplicationResponse' <$>+ (x .@? "PlatformApplicationArn") <*>+ (pure (fromEnum s))) --- | PlatformApplicationArn is returned.-cparPlatformApplicationArn :: Lens' CreatePlatformApplicationResponse (Maybe Text)-cparPlatformApplicationArn =- lens _cparPlatformApplicationArn- (\s a -> s { _cparPlatformApplicationArn = a })+instance ToHeaders CreatePlatformApplication where+ toHeaders = const mempty instance ToPath CreatePlatformApplication where- toPath = const "/"+ toPath = const "/" instance ToQuery CreatePlatformApplication where- toQuery CreatePlatformApplication{..} = mconcat- [ "Attributes" =? _cpaAttributes- , "Name" =? _cpaName- , "Platform" =? _cpaPlatform- ]+ toQuery CreatePlatformApplication'{..}+ = mconcat+ ["Action" =:+ ("CreatePlatformApplication" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "Name" =: _cpaName, "Platform" =: _cpaPlatform,+ "Attributes" =:+ toQueryMap "entry" "key" "value" _cpaAttributes] -instance ToHeaders CreatePlatformApplication+-- | Response from CreatePlatformApplication action.+--+-- /See:/ 'createPlatformApplicationResponse' smart constructor.+data CreatePlatformApplicationResponse = CreatePlatformApplicationResponse'+ { _cparsPlatformApplicationARN :: !(Maybe Text)+ , _cparsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest CreatePlatformApplication where- type Sv CreatePlatformApplication = SNS- type Rs CreatePlatformApplication = CreatePlatformApplicationResponse+-- | Creates a value of 'CreatePlatformApplicationResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cparsPlatformApplicationARN'+--+-- * 'cparsStatus'+createPlatformApplicationResponse+ :: Int -- ^ 'cparsStatus'+ -> CreatePlatformApplicationResponse+createPlatformApplicationResponse pStatus_ =+ CreatePlatformApplicationResponse'+ { _cparsPlatformApplicationARN = Nothing+ , _cparsStatus = pStatus_+ } - request = post "CreatePlatformApplication"- response = xmlResponse+-- | PlatformApplicationArn is returned.+cparsPlatformApplicationARN :: Lens' CreatePlatformApplicationResponse (Maybe Text)+cparsPlatformApplicationARN = lens _cparsPlatformApplicationARN (\ s a -> s{_cparsPlatformApplicationARN = a}); -instance FromXML CreatePlatformApplicationResponse where- parseXML = withElement "CreatePlatformApplicationResult" $ \x -> CreatePlatformApplicationResponse- <$> x .@? "PlatformApplicationArn"+-- | The response status code.+cparsStatus :: Lens' CreatePlatformApplicationResponse Int+cparsStatus = lens _cparsStatus (\ s a -> s{_cparsStatus = a});
gen/Network/AWS/SNS/CreatePlatformEndpoint.hs view
@@ -1,161 +1,183 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.CreatePlatformEndpoint--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Creates an endpoint for a device and mobile app on one of the supported push--- notification services, such as GCM and APNS. 'CreatePlatformEndpoint' requires--- the PlatformApplicationArn that is returned from 'CreatePlatformApplication'.--- The EndpointArn that is returned when using 'CreatePlatformEndpoint' can then--- be used by the 'Publish' action to send a message to a mobile app or by the 'Subscribe' action for subscription to a topic. The 'CreatePlatformEndpoint' action is--- idempotent, so if the requester already owns an endpoint with the same device--- token and attributes, that endpoint's ARN is returned without creating a new--- endpoint. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>--- .+-- Creates an endpoint for a device and mobile app on one of the supported+-- push notification services, such as GCM and APNS.+-- 'CreatePlatformEndpoint' requires the PlatformApplicationArn that is+-- returned from 'CreatePlatformApplication'. The EndpointArn that is+-- returned when using 'CreatePlatformEndpoint' can then be used by the+-- 'Publish' action to send a message to a mobile app or by the 'Subscribe'+-- action for subscription to a topic. The 'CreatePlatformEndpoint' action+-- is idempotent, so if the requester already owns an endpoint with the+-- same device token and attributes, that endpoint\'s ARN is returned+-- without creating a new endpoint. For more information, see+-- <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>. -- -- When using 'CreatePlatformEndpoint' with Baidu, two attributes must be -- provided: ChannelId and UserId. The token field must also contain the--- ChannelId. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html Creating an Amazon SNS Endpoint for Baidu>--- .+-- ChannelId. For more information, see+-- <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html Creating an Amazon SNS Endpoint for Baidu>. ----- <http://docs.aws.amazon.com/sns/latest/api/API_CreatePlatformEndpoint.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_CreatePlatformEndpoint.html AWS API Reference> for CreatePlatformEndpoint. module Network.AWS.SNS.CreatePlatformEndpoint (- -- * Request- CreatePlatformEndpoint- -- ** Request constructor- , createPlatformEndpoint- -- ** Request lenses- , cpeAttributes+ -- * Creating a Request+ createPlatformEndpoint+ , CreatePlatformEndpoint+ -- * Request Lenses , cpeCustomUserData- , cpePlatformApplicationArn+ , cpeAttributes+ , cpePlatformApplicationARN , cpeToken - -- * Response- , CreatePlatformEndpointResponse- -- ** Response constructor+ -- * Destructuring the Response , createPlatformEndpointResponse- -- ** Response lenses- , cperEndpointArn+ , CreatePlatformEndpointResponse+ -- * Response Lenses+ , cpersEndpointARN+ , cpersStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--data CreatePlatformEndpoint = CreatePlatformEndpoint- { _cpeAttributes :: EMap "entry" "key" "value" Text Text- , _cpeCustomUserData :: Maybe Text- , _cpePlatformApplicationArn :: Text- , _cpeToken :: Text- } deriving (Eq, Read, Show)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'CreatePlatformEndpoint' constructor.+-- | Input for CreatePlatformEndpoint action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'createPlatformEndpoint' smart constructor.+data CreatePlatformEndpoint = CreatePlatformEndpoint'+ { _cpeCustomUserData :: !(Maybe Text)+ , _cpeAttributes :: !(Maybe (Map Text Text))+ , _cpePlatformApplicationARN :: !Text+ , _cpeToken :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreatePlatformEndpoint' with the minimum fields required to make a request. ----- * 'cpeAttributes' @::@ 'HashMap' 'Text' 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'cpeCustomUserData' @::@ 'Maybe' 'Text'+-- * 'cpeCustomUserData' ----- * 'cpePlatformApplicationArn' @::@ 'Text'+-- * 'cpeAttributes' ----- * 'cpeToken' @::@ 'Text'+-- * 'cpePlatformApplicationARN' ---createPlatformEndpoint :: Text -- ^ 'cpePlatformApplicationArn'- -> Text -- ^ 'cpeToken'- -> CreatePlatformEndpoint-createPlatformEndpoint p1 p2 = CreatePlatformEndpoint- { _cpePlatformApplicationArn = p1- , _cpeToken = p2- , _cpeCustomUserData = Nothing- , _cpeAttributes = mempty+-- * 'cpeToken'+createPlatformEndpoint+ :: Text -- ^ 'cpePlatformApplicationARN'+ -> Text -- ^ 'cpeToken'+ -> CreatePlatformEndpoint+createPlatformEndpoint pPlatformApplicationARN_ pToken_ =+ CreatePlatformEndpoint'+ { _cpeCustomUserData = Nothing+ , _cpeAttributes = Nothing+ , _cpePlatformApplicationARN = pPlatformApplicationARN_+ , _cpeToken = pToken_ } --- | For a list of attributes, see <http://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html SetEndpointAttributes>.-cpeAttributes :: Lens' CreatePlatformEndpoint (HashMap Text Text)-cpeAttributes = lens _cpeAttributes (\s a -> s { _cpeAttributes = a }) . _EMap---- | Arbitrary user data to associate with the endpoint. Amazon SNS does not use--- this data. The data must be in UTF-8 format and less than 2KB.+-- | Arbitrary user data to associate with the endpoint. Amazon SNS does not+-- use this data. The data must be in UTF-8 format and less than 2KB. cpeCustomUserData :: Lens' CreatePlatformEndpoint (Maybe Text)-cpeCustomUserData =- lens _cpeCustomUserData (\s a -> s { _cpeCustomUserData = a })+cpeCustomUserData = lens _cpeCustomUserData (\ s a -> s{_cpeCustomUserData = a}); --- | PlatformApplicationArn returned from CreatePlatformApplication is used to--- create a an endpoint.-cpePlatformApplicationArn :: Lens' CreatePlatformEndpoint Text-cpePlatformApplicationArn =- lens _cpePlatformApplicationArn- (\s a -> s { _cpePlatformApplicationArn = a })+-- | For a list of attributes, see+-- <http://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html SetEndpointAttributes>.+cpeAttributes :: Lens' CreatePlatformEndpoint (HashMap Text Text)+cpeAttributes = lens _cpeAttributes (\ s a -> s{_cpeAttributes = a}) . _Default . _Map; --- | Unique identifier created by the notification service for an app on a device.--- The specific name for Token will vary, depending on which notification--- service is being used. For example, when using APNS as the notification--- service, you need the device token. Alternatively, when using GCM or ADM, the--- device token equivalent is called the registration ID.-cpeToken :: Lens' CreatePlatformEndpoint Text-cpeToken = lens _cpeToken (\s a -> s { _cpeToken = a })+-- | PlatformApplicationArn returned from CreatePlatformApplication is used+-- to create a an endpoint.+cpePlatformApplicationARN :: Lens' CreatePlatformEndpoint Text+cpePlatformApplicationARN = lens _cpePlatformApplicationARN (\ s a -> s{_cpePlatformApplicationARN = a}); -newtype CreatePlatformEndpointResponse = CreatePlatformEndpointResponse- { _cperEndpointArn :: Maybe Text- } deriving (Eq, Ord, Read, Show, Monoid)+-- | Unique identifier created by the notification service for an app on a+-- device. The specific name for Token will vary, depending on which+-- notification service is being used. For example, when using APNS as the+-- notification service, you need the device token. Alternatively, when+-- using GCM or ADM, the device token equivalent is called the registration+-- ID.+cpeToken :: Lens' CreatePlatformEndpoint Text+cpeToken = lens _cpeToken (\ s a -> s{_cpeToken = a}); --- | 'CreatePlatformEndpointResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'cperEndpointArn' @::@ 'Maybe' 'Text'----createPlatformEndpointResponse :: CreatePlatformEndpointResponse-createPlatformEndpointResponse = CreatePlatformEndpointResponse- { _cperEndpointArn = Nothing- }+instance AWSRequest CreatePlatformEndpoint where+ type Sv CreatePlatformEndpoint = SNS+ type Rs CreatePlatformEndpoint =+ CreatePlatformEndpointResponse+ request = postQuery+ response+ = receiveXMLWrapper "CreatePlatformEndpointResult"+ (\ s h x ->+ CreatePlatformEndpointResponse' <$>+ (x .@? "EndpointArn") <*> (pure (fromEnum s))) --- | EndpointArn returned from CreateEndpoint action.-cperEndpointArn :: Lens' CreatePlatformEndpointResponse (Maybe Text)-cperEndpointArn = lens _cperEndpointArn (\s a -> s { _cperEndpointArn = a })+instance ToHeaders CreatePlatformEndpoint where+ toHeaders = const mempty instance ToPath CreatePlatformEndpoint where- toPath = const "/"+ toPath = const "/" instance ToQuery CreatePlatformEndpoint where- toQuery CreatePlatformEndpoint{..} = mconcat- [ "Attributes" =? _cpeAttributes- , "CustomUserData" =? _cpeCustomUserData- , "PlatformApplicationArn" =? _cpePlatformApplicationArn- , "Token" =? _cpeToken- ]+ toQuery CreatePlatformEndpoint'{..}+ = mconcat+ ["Action" =:+ ("CreatePlatformEndpoint" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "CustomUserData" =: _cpeCustomUserData,+ "Attributes" =:+ toQuery+ (toQueryMap "entry" "key" "value" <$>+ _cpeAttributes),+ "PlatformApplicationArn" =:+ _cpePlatformApplicationARN,+ "Token" =: _cpeToken] -instance ToHeaders CreatePlatformEndpoint+-- | Response from CreateEndpoint action.+--+-- /See:/ 'createPlatformEndpointResponse' smart constructor.+data CreatePlatformEndpointResponse = CreatePlatformEndpointResponse'+ { _cpersEndpointARN :: !(Maybe Text)+ , _cpersStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest CreatePlatformEndpoint where- type Sv CreatePlatformEndpoint = SNS- type Rs CreatePlatformEndpoint = CreatePlatformEndpointResponse+-- | Creates a value of 'CreatePlatformEndpointResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cpersEndpointARN'+--+-- * 'cpersStatus'+createPlatformEndpointResponse+ :: Int -- ^ 'cpersStatus'+ -> CreatePlatformEndpointResponse+createPlatformEndpointResponse pStatus_ =+ CreatePlatformEndpointResponse'+ { _cpersEndpointARN = Nothing+ , _cpersStatus = pStatus_+ } - request = post "CreatePlatformEndpoint"- response = xmlResponse+-- | EndpointArn returned from CreateEndpoint action.+cpersEndpointARN :: Lens' CreatePlatformEndpointResponse (Maybe Text)+cpersEndpointARN = lens _cpersEndpointARN (\ s a -> s{_cpersEndpointARN = a}); -instance FromXML CreatePlatformEndpointResponse where- parseXML = withElement "CreatePlatformEndpointResult" $ \x -> CreatePlatformEndpointResponse- <$> x .@? "EndpointArn"+-- | The response status code.+cpersStatus :: Lens' CreatePlatformEndpointResponse Int+cpersStatus = lens _cpersStatus (\ s a -> s{_cpersStatus = a});
gen/Network/AWS/SNS/CreateTopic.hs view
@@ -1,115 +1,132 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.CreateTopic--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Creates a topic to which notifications can be published. Users can create at--- most 3000 topics. For more information, see <http://aws.amazon.com/sns/ http://aws.amazon.com/sns>. This--- action is idempotent, so if the requester already owns a topic with the--- specified name, that topic's ARN is returned without creating a new topic.+-- Creates a topic to which notifications can be published. Users can+-- create at most 3000 topics. For more information, see+-- <http://aws.amazon.com/sns/ http:\/\/aws.amazon.com\/sns>. This action+-- is idempotent, so if the requester already owns a topic with the+-- specified name, that topic\'s ARN is returned without creating a new+-- topic. ----- <http://docs.aws.amazon.com/sns/latest/api/API_CreateTopic.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_CreateTopic.html AWS API Reference> for CreateTopic. module Network.AWS.SNS.CreateTopic (- -- * Request- CreateTopic- -- ** Request constructor- , createTopic- -- ** Request lenses+ -- * Creating a Request+ createTopic+ , CreateTopic+ -- * Request Lenses , ctName - -- * Response- , CreateTopicResponse- -- ** Response constructor+ -- * Destructuring the Response , createTopicResponse- -- ** Response lenses- , ctrTopicArn+ , CreateTopicResponse+ -- * Response Lenses+ , ctrsTopicARN+ , ctrsStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product -newtype CreateTopic = CreateTopic+-- | Input for CreateTopic action.+--+-- /See:/ 'createTopic' smart constructor.+newtype CreateTopic = CreateTopic' { _ctName :: Text- } deriving (Eq, Ord, Read, Show, Monoid, IsString)+ } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'CreateTopic' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'CreateTopic' with the minimum fields required to make a request. ----- * 'ctName' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---createTopic :: Text -- ^ 'ctName'- -> CreateTopic-createTopic p1 = CreateTopic- { _ctName = p1+-- * 'ctName'+createTopic+ :: Text -- ^ 'ctName'+ -> CreateTopic+createTopic pName_ =+ CreateTopic'+ { _ctName = pName_ } -- | The name of the topic you want to create. -- -- Constraints: Topic names must be made up of only uppercase and lowercase--- ASCII letters, numbers, underscores, and hyphens, and must be between 1 and--- 256 characters long.+-- ASCII letters, numbers, underscores, and hyphens, and must be between 1+-- and 256 characters long. ctName :: Lens' CreateTopic Text-ctName = lens _ctName (\s a -> s { _ctName = a })--newtype CreateTopicResponse = CreateTopicResponse- { _ctrTopicArn :: Maybe Text- } deriving (Eq, Ord, Read, Show, Monoid)+ctName = lens _ctName (\ s a -> s{_ctName = a}); --- | 'CreateTopicResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'ctrTopicArn' @::@ 'Maybe' 'Text'----createTopicResponse :: CreateTopicResponse-createTopicResponse = CreateTopicResponse- { _ctrTopicArn = Nothing- }+instance AWSRequest CreateTopic where+ type Sv CreateTopic = SNS+ type Rs CreateTopic = CreateTopicResponse+ request = postQuery+ response+ = receiveXMLWrapper "CreateTopicResult"+ (\ s h x ->+ CreateTopicResponse' <$>+ (x .@? "TopicArn") <*> (pure (fromEnum s))) --- | The Amazon Resource Name (ARN) assigned to the created topic.-ctrTopicArn :: Lens' CreateTopicResponse (Maybe Text)-ctrTopicArn = lens _ctrTopicArn (\s a -> s { _ctrTopicArn = a })+instance ToHeaders CreateTopic where+ toHeaders = const mempty instance ToPath CreateTopic where- toPath = const "/"+ toPath = const "/" instance ToQuery CreateTopic where- toQuery CreateTopic{..} = mconcat- [ "Name" =? _ctName- ]+ toQuery CreateTopic'{..}+ = mconcat+ ["Action" =: ("CreateTopic" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "Name" =: _ctName] -instance ToHeaders CreateTopic+-- | Response from CreateTopic action.+--+-- /See:/ 'createTopicResponse' smart constructor.+data CreateTopicResponse = CreateTopicResponse'+ { _ctrsTopicARN :: !(Maybe Text)+ , _ctrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest CreateTopic where- type Sv CreateTopic = SNS- type Rs CreateTopic = CreateTopicResponse+-- | Creates a value of 'CreateTopicResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ctrsTopicARN'+--+-- * 'ctrsStatus'+createTopicResponse+ :: Int -- ^ 'ctrsStatus'+ -> CreateTopicResponse+createTopicResponse pStatus_ =+ CreateTopicResponse'+ { _ctrsTopicARN = Nothing+ , _ctrsStatus = pStatus_+ } - request = post "CreateTopic"- response = xmlResponse+-- | The Amazon Resource Name (ARN) assigned to the created topic.+ctrsTopicARN :: Lens' CreateTopicResponse (Maybe Text)+ctrsTopicARN = lens _ctrsTopicARN (\ s a -> s{_ctrsTopicARN = a}); -instance FromXML CreateTopicResponse where- parseXML = withElement "CreateTopicResult" $ \x -> CreateTopicResponse- <$> x .@? "TopicArn"+-- | The response status code.+ctrsStatus :: Lens' CreateTopicResponse Int+ctrsStatus = lens _ctrsStatus (\ s a -> s{_ctrsStatus = a});
gen/Network/AWS/SNS/DeleteEndpoint.hs view
@@ -1,91 +1,97 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.DeleteEndpoint--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Deletes the endpoint from Amazon SNS. This action is idempotent. For more--- information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>.+-- Deletes the endpoint from Amazon SNS. This action is idempotent. For+-- more information, see+-- <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>. ----- <http://docs.aws.amazon.com/sns/latest/api/API_DeleteEndpoint.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_DeleteEndpoint.html AWS API Reference> for DeleteEndpoint. module Network.AWS.SNS.DeleteEndpoint (- -- * Request- DeleteEndpoint- -- ** Request constructor- , deleteEndpoint- -- ** Request lenses- , deEndpointArn+ -- * Creating a Request+ deleteEndpoint+ , DeleteEndpoint+ -- * Request Lenses+ , deEndpointARN - -- * Response- , DeleteEndpointResponse- -- ** Response constructor+ -- * Destructuring the Response , deleteEndpointResponse+ , DeleteEndpointResponse ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--newtype DeleteEndpoint = DeleteEndpoint- { _deEndpointArn :: Text- } deriving (Eq, Ord, Read, Show, Monoid, IsString)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'DeleteEndpoint' constructor.+-- | Input for DeleteEndpoint action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'deleteEndpoint' smart constructor.+newtype DeleteEndpoint = DeleteEndpoint'+ { _deEndpointARN :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteEndpoint' with the minimum fields required to make a request. ----- * 'deEndpointArn' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---deleteEndpoint :: Text -- ^ 'deEndpointArn'- -> DeleteEndpoint-deleteEndpoint p1 = DeleteEndpoint- { _deEndpointArn = p1+-- * 'deEndpointARN'+deleteEndpoint+ :: Text -- ^ 'deEndpointARN'+ -> DeleteEndpoint+deleteEndpoint pEndpointARN_ =+ DeleteEndpoint'+ { _deEndpointARN = pEndpointARN_ } -- | EndpointArn of endpoint to delete.-deEndpointArn :: Lens' DeleteEndpoint Text-deEndpointArn = lens _deEndpointArn (\s a -> s { _deEndpointArn = a })+deEndpointARN :: Lens' DeleteEndpoint Text+deEndpointARN = lens _deEndpointARN (\ s a -> s{_deEndpointARN = a}); -data DeleteEndpointResponse = DeleteEndpointResponse- deriving (Eq, Ord, Read, Show, Generic)+instance AWSRequest DeleteEndpoint where+ type Sv DeleteEndpoint = SNS+ type Rs DeleteEndpoint = DeleteEndpointResponse+ request = postQuery+ response = receiveNull DeleteEndpointResponse' --- | 'DeleteEndpointResponse' constructor.-deleteEndpointResponse :: DeleteEndpointResponse-deleteEndpointResponse = DeleteEndpointResponse+instance ToHeaders DeleteEndpoint where+ toHeaders = const mempty instance ToPath DeleteEndpoint where- toPath = const "/"+ toPath = const "/" instance ToQuery DeleteEndpoint where- toQuery DeleteEndpoint{..} = mconcat- [ "EndpointArn" =? _deEndpointArn- ]--instance ToHeaders DeleteEndpoint+ toQuery DeleteEndpoint'{..}+ = mconcat+ ["Action" =: ("DeleteEndpoint" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "EndpointArn" =: _deEndpointARN] -instance AWSRequest DeleteEndpoint where- type Sv DeleteEndpoint = SNS- type Rs DeleteEndpoint = DeleteEndpointResponse+-- | /See:/ 'deleteEndpointResponse' smart constructor.+data DeleteEndpointResponse =+ DeleteEndpointResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic) - request = post "DeleteEndpoint"- response = nullResponse DeleteEndpointResponse+-- | Creates a value of 'DeleteEndpointResponse' with the minimum fields required to make a request.+--+deleteEndpointResponse+ :: DeleteEndpointResponse+deleteEndpointResponse = DeleteEndpointResponse'
gen/Network/AWS/SNS/DeletePlatformApplication.hs view
@@ -1,93 +1,101 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.DeletePlatformApplication--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Deletes a platform application object for one of the supported push--- notification services, such as APNS and GCM. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html UsingAmazon SNS Mobile Push Notifications>.+-- Deletes a platform application object for one of the supported push+-- notification services, such as APNS and GCM. For more information, see+-- <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>. ----- <http://docs.aws.amazon.com/sns/latest/api/API_DeletePlatformApplication.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_DeletePlatformApplication.html AWS API Reference> for DeletePlatformApplication. module Network.AWS.SNS.DeletePlatformApplication (- -- * Request- DeletePlatformApplication- -- ** Request constructor- , deletePlatformApplication- -- ** Request lenses- , dpaPlatformApplicationArn+ -- * Creating a Request+ deletePlatformApplication+ , DeletePlatformApplication+ -- * Request Lenses+ , dpaPlatformApplicationARN - -- * Response- , DeletePlatformApplicationResponse- -- ** Response constructor+ -- * Destructuring the Response , deletePlatformApplicationResponse+ , DeletePlatformApplicationResponse ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--newtype DeletePlatformApplication = DeletePlatformApplication- { _dpaPlatformApplicationArn :: Text- } deriving (Eq, Ord, Read, Show, Monoid, IsString)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'DeletePlatformApplication' constructor.+-- | Input for DeletePlatformApplication action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'deletePlatformApplication' smart constructor.+newtype DeletePlatformApplication = DeletePlatformApplication'+ { _dpaPlatformApplicationARN :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeletePlatformApplication' with the minimum fields required to make a request. ----- * 'dpaPlatformApplicationArn' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---deletePlatformApplication :: Text -- ^ 'dpaPlatformApplicationArn'- -> DeletePlatformApplication-deletePlatformApplication p1 = DeletePlatformApplication- { _dpaPlatformApplicationArn = p1+-- * 'dpaPlatformApplicationARN'+deletePlatformApplication+ :: Text -- ^ 'dpaPlatformApplicationARN'+ -> DeletePlatformApplication+deletePlatformApplication pPlatformApplicationARN_ =+ DeletePlatformApplication'+ { _dpaPlatformApplicationARN = pPlatformApplicationARN_ } -- | PlatformApplicationArn of platform application object to delete.-dpaPlatformApplicationArn :: Lens' DeletePlatformApplication Text-dpaPlatformApplicationArn =- lens _dpaPlatformApplicationArn- (\s a -> s { _dpaPlatformApplicationArn = a })+dpaPlatformApplicationARN :: Lens' DeletePlatformApplication Text+dpaPlatformApplicationARN = lens _dpaPlatformApplicationARN (\ s a -> s{_dpaPlatformApplicationARN = a}); -data DeletePlatformApplicationResponse = DeletePlatformApplicationResponse- deriving (Eq, Ord, Read, Show, Generic)+instance AWSRequest DeletePlatformApplication where+ type Sv DeletePlatformApplication = SNS+ type Rs DeletePlatformApplication =+ DeletePlatformApplicationResponse+ request = postQuery+ response+ = receiveNull DeletePlatformApplicationResponse' --- | 'DeletePlatformApplicationResponse' constructor.-deletePlatformApplicationResponse :: DeletePlatformApplicationResponse-deletePlatformApplicationResponse = DeletePlatformApplicationResponse+instance ToHeaders DeletePlatformApplication where+ toHeaders = const mempty instance ToPath DeletePlatformApplication where- toPath = const "/"+ toPath = const "/" instance ToQuery DeletePlatformApplication where- toQuery DeletePlatformApplication{..} = mconcat- [ "PlatformApplicationArn" =? _dpaPlatformApplicationArn- ]--instance ToHeaders DeletePlatformApplication+ toQuery DeletePlatformApplication'{..}+ = mconcat+ ["Action" =:+ ("DeletePlatformApplication" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "PlatformApplicationArn" =:+ _dpaPlatformApplicationARN] -instance AWSRequest DeletePlatformApplication where- type Sv DeletePlatformApplication = SNS- type Rs DeletePlatformApplication = DeletePlatformApplicationResponse+-- | /See:/ 'deletePlatformApplicationResponse' smart constructor.+data DeletePlatformApplicationResponse =+ DeletePlatformApplicationResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic) - request = post "DeletePlatformApplication"- response = nullResponse DeletePlatformApplicationResponse+-- | Creates a value of 'DeletePlatformApplicationResponse' with the minimum fields required to make a request.+--+deletePlatformApplicationResponse+ :: DeletePlatformApplicationResponse+deletePlatformApplicationResponse = DeletePlatformApplicationResponse'
gen/Network/AWS/SNS/DeleteTopic.hs view
@@ -1,93 +1,96 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.DeleteTopic--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Deletes a topic and all its subscriptions. Deleting a topic might prevent--- some messages previously sent to the topic from being delivered to--- subscribers. This action is idempotent, so deleting a topic that does not--- exist does not result in an error.+-- Deletes a topic and all its subscriptions. Deleting a topic might+-- prevent some messages previously sent to the topic from being delivered+-- to subscribers. This action is idempotent, so deleting a topic that does+-- not exist does not result in an error. ----- <http://docs.aws.amazon.com/sns/latest/api/API_DeleteTopic.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_DeleteTopic.html AWS API Reference> for DeleteTopic. module Network.AWS.SNS.DeleteTopic (- -- * Request- DeleteTopic- -- ** Request constructor- , deleteTopic- -- ** Request lenses- , dtTopicArn+ -- * Creating a Request+ deleteTopic+ , DeleteTopic+ -- * Request Lenses+ , dtTopicARN - -- * Response- , DeleteTopicResponse- -- ** Response constructor+ -- * Destructuring the Response , deleteTopicResponse+ , DeleteTopicResponse ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product -newtype DeleteTopic = DeleteTopic- { _dtTopicArn :: Text- } deriving (Eq, Ord, Read, Show, Monoid, IsString)+-- | /See:/ 'deleteTopic' smart constructor.+newtype DeleteTopic = DeleteTopic'+ { _dtTopicARN :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'DeleteTopic' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'DeleteTopic' with the minimum fields required to make a request. ----- * 'dtTopicArn' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---deleteTopic :: Text -- ^ 'dtTopicArn'- -> DeleteTopic-deleteTopic p1 = DeleteTopic- { _dtTopicArn = p1+-- * 'dtTopicARN'+deleteTopic+ :: Text -- ^ 'dtTopicARN'+ -> DeleteTopic+deleteTopic pTopicARN_ =+ DeleteTopic'+ { _dtTopicARN = pTopicARN_ } -- | The ARN of the topic you want to delete.-dtTopicArn :: Lens' DeleteTopic Text-dtTopicArn = lens _dtTopicArn (\s a -> s { _dtTopicArn = a })+dtTopicARN :: Lens' DeleteTopic Text+dtTopicARN = lens _dtTopicARN (\ s a -> s{_dtTopicARN = a}); -data DeleteTopicResponse = DeleteTopicResponse- deriving (Eq, Ord, Read, Show, Generic)+instance AWSRequest DeleteTopic where+ type Sv DeleteTopic = SNS+ type Rs DeleteTopic = DeleteTopicResponse+ request = postQuery+ response = receiveNull DeleteTopicResponse' --- | 'DeleteTopicResponse' constructor.-deleteTopicResponse :: DeleteTopicResponse-deleteTopicResponse = DeleteTopicResponse+instance ToHeaders DeleteTopic where+ toHeaders = const mempty instance ToPath DeleteTopic where- toPath = const "/"+ toPath = const "/" instance ToQuery DeleteTopic where- toQuery DeleteTopic{..} = mconcat- [ "TopicArn" =? _dtTopicArn- ]--instance ToHeaders DeleteTopic+ toQuery DeleteTopic'{..}+ = mconcat+ ["Action" =: ("DeleteTopic" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "TopicArn" =: _dtTopicARN] -instance AWSRequest DeleteTopic where- type Sv DeleteTopic = SNS- type Rs DeleteTopic = DeleteTopicResponse+-- | /See:/ 'deleteTopicResponse' smart constructor.+data DeleteTopicResponse =+ DeleteTopicResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic) - request = post "DeleteTopic"- response = nullResponse DeleteTopicResponse+-- | Creates a value of 'DeleteTopicResponse' with the minimum fields required to make a request.+--+deleteTopicResponse+ :: DeleteTopicResponse+deleteTopicResponse = DeleteTopicResponse'
gen/Network/AWS/SNS/GetEndpointAttributes.hs view
@@ -1,119 +1,141 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.GetEndpointAttributes--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Retrieves the endpoint attributes for a device on one of the supported push--- notification services, such as GCM and APNS. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html UsingAmazon SNS Mobile Push Notifications>.+-- Retrieves the endpoint attributes for a device on one of the supported+-- push notification services, such as GCM and APNS. For more information,+-- see+-- <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>. ----- <http://docs.aws.amazon.com/sns/latest/api/API_GetEndpointAttributes.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_GetEndpointAttributes.html AWS API Reference> for GetEndpointAttributes. module Network.AWS.SNS.GetEndpointAttributes (- -- * Request- GetEndpointAttributes- -- ** Request constructor- , getEndpointAttributes- -- ** Request lenses- , geaEndpointArn+ -- * Creating a Request+ getEndpointAttributes+ , GetEndpointAttributes+ -- * Request Lenses+ , geaEndpointARN - -- * Response- , GetEndpointAttributesResponse- -- ** Response constructor+ -- * Destructuring the Response , getEndpointAttributesResponse- -- ** Response lenses- , gearAttributes+ , GetEndpointAttributesResponse+ -- * Response Lenses+ , gearsAttributes+ , gearsStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--newtype GetEndpointAttributes = GetEndpointAttributes- { _geaEndpointArn :: Text- } deriving (Eq, Ord, Read, Show, Monoid, IsString)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'GetEndpointAttributes' constructor.+-- | Input for GetEndpointAttributes action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'getEndpointAttributes' smart constructor.+newtype GetEndpointAttributes = GetEndpointAttributes'+ { _geaEndpointARN :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetEndpointAttributes' with the minimum fields required to make a request. ----- * 'geaEndpointArn' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---getEndpointAttributes :: Text -- ^ 'geaEndpointArn'- -> GetEndpointAttributes-getEndpointAttributes p1 = GetEndpointAttributes- { _geaEndpointArn = p1+-- * 'geaEndpointARN'+getEndpointAttributes+ :: Text -- ^ 'geaEndpointARN'+ -> GetEndpointAttributes+getEndpointAttributes pEndpointARN_ =+ GetEndpointAttributes'+ { _geaEndpointARN = pEndpointARN_ } -- | EndpointArn for GetEndpointAttributes input.-geaEndpointArn :: Lens' GetEndpointAttributes Text-geaEndpointArn = lens _geaEndpointArn (\s a -> s { _geaEndpointArn = a })--newtype GetEndpointAttributesResponse = GetEndpointAttributesResponse- { _gearAttributes :: EMap "entry" "key" "value" Text Text- } deriving (Eq, Read, Show, Monoid, Semigroup)+geaEndpointARN :: Lens' GetEndpointAttributes Text+geaEndpointARN = lens _geaEndpointARN (\ s a -> s{_geaEndpointARN = a}); --- | 'GetEndpointAttributesResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'gearAttributes' @::@ 'HashMap' 'Text' 'Text'----getEndpointAttributesResponse :: GetEndpointAttributesResponse-getEndpointAttributesResponse = GetEndpointAttributesResponse- { _gearAttributes = mempty- }+instance AWSRequest GetEndpointAttributes where+ type Sv GetEndpointAttributes = SNS+ type Rs GetEndpointAttributes =+ GetEndpointAttributesResponse+ request = postQuery+ response+ = receiveXMLWrapper "GetEndpointAttributesResult"+ (\ s h x ->+ GetEndpointAttributesResponse' <$>+ (x .@? "Attributes" .!@ mempty >>=+ may (parseXMLMap "entry" "key" "value"))+ <*> (pure (fromEnum s))) --- | Attributes include the following:------ 'CustomUserData' -- arbitrary user data to associate with the endpoint.--- Amazon SNS does not use this data. The data must be in UTF-8 format and less--- than 2KB. 'Enabled' -- flag that enables/disables delivery to the endpoint.--- Amazon SNS will set this to false when a notification service indicates to--- Amazon SNS that the endpoint is invalid. Users can set it back to true,--- typically after updating Token. 'Token' -- device token, also referred to as a--- registration id, for an app and mobile device. This is returned from the--- notification service when an app and mobile device are registered with the--- notification service.-gearAttributes :: Lens' GetEndpointAttributesResponse (HashMap Text Text)-gearAttributes = lens _gearAttributes (\s a -> s { _gearAttributes = a }) . _EMap+instance ToHeaders GetEndpointAttributes where+ toHeaders = const mempty instance ToPath GetEndpointAttributes where- toPath = const "/"+ toPath = const "/" instance ToQuery GetEndpointAttributes where- toQuery GetEndpointAttributes{..} = mconcat- [ "EndpointArn" =? _geaEndpointArn- ]+ toQuery GetEndpointAttributes'{..}+ = mconcat+ ["Action" =: ("GetEndpointAttributes" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "EndpointArn" =: _geaEndpointARN] -instance ToHeaders GetEndpointAttributes+-- | Response from GetEndpointAttributes of the EndpointArn.+--+-- /See:/ 'getEndpointAttributesResponse' smart constructor.+data GetEndpointAttributesResponse = GetEndpointAttributesResponse'+ { _gearsAttributes :: !(Maybe (Map Text Text))+ , _gearsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest GetEndpointAttributes where- type Sv GetEndpointAttributes = SNS- type Rs GetEndpointAttributes = GetEndpointAttributesResponse+-- | Creates a value of 'GetEndpointAttributesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gearsAttributes'+--+-- * 'gearsStatus'+getEndpointAttributesResponse+ :: Int -- ^ 'gearsStatus'+ -> GetEndpointAttributesResponse+getEndpointAttributesResponse pStatus_ =+ GetEndpointAttributesResponse'+ { _gearsAttributes = Nothing+ , _gearsStatus = pStatus_+ } - request = post "GetEndpointAttributes"- response = xmlResponse+-- | Attributes include the following:+--+-- - 'CustomUserData' -- arbitrary user data to associate with the+-- endpoint. Amazon SNS does not use this data. The data must be in+-- UTF-8 format and less than 2KB.+-- - 'Enabled' -- flag that enables\/disables delivery to the endpoint.+-- Amazon SNS will set this to false when a notification service+-- indicates to Amazon SNS that the endpoint is invalid. Users can set+-- it back to true, typically after updating Token.+-- - 'Token' -- device token, also referred to as a registration id, for+-- an app and mobile device. This is returned from the notification+-- service when an app and mobile device are registered with the+-- notification service.+gearsAttributes :: Lens' GetEndpointAttributesResponse (HashMap Text Text)+gearsAttributes = lens _gearsAttributes (\ s a -> s{_gearsAttributes = a}) . _Default . _Map; -instance FromXML GetEndpointAttributesResponse where- parseXML = withElement "GetEndpointAttributesResult" $ \x -> GetEndpointAttributesResponse- <$> x .@? "Attributes" .!@ mempty+-- | The response status code.+gearsStatus :: Lens' GetEndpointAttributesResponse Int+gearsStatus = lens _gearsStatus (\ s a -> s{_gearsStatus = a});
gen/Network/AWS/SNS/GetPlatformApplicationAttributes.hs view
@@ -1,118 +1,146 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.GetPlatformApplicationAttributes--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Retrieves the attributes of the platform application object for the supported--- push notification services, such as APNS and GCM. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>.+-- Retrieves the attributes of the platform application object for the+-- supported push notification services, such as APNS and GCM. For more+-- information, see+-- <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>. ----- <http://docs.aws.amazon.com/sns/latest/api/API_GetPlatformApplicationAttributes.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_GetPlatformApplicationAttributes.html AWS API Reference> for GetPlatformApplicationAttributes. module Network.AWS.SNS.GetPlatformApplicationAttributes (- -- * Request- GetPlatformApplicationAttributes- -- ** Request constructor- , getPlatformApplicationAttributes- -- ** Request lenses- , gpaaPlatformApplicationArn+ -- * Creating a Request+ getPlatformApplicationAttributes+ , GetPlatformApplicationAttributes+ -- * Request Lenses+ , gpaaPlatformApplicationARN - -- * Response- , GetPlatformApplicationAttributesResponse- -- ** Response constructor+ -- * Destructuring the Response , getPlatformApplicationAttributesResponse- -- ** Response lenses- , gpaarAttributes+ , GetPlatformApplicationAttributesResponse+ -- * Response Lenses+ , gpaarsAttributes+ , gpaarsStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--newtype GetPlatformApplicationAttributes = GetPlatformApplicationAttributes- { _gpaaPlatformApplicationArn :: Text- } deriving (Eq, Ord, Read, Show, Monoid, IsString)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'GetPlatformApplicationAttributes' constructor.+-- | Input for GetPlatformApplicationAttributes action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'getPlatformApplicationAttributes' smart constructor.+newtype GetPlatformApplicationAttributes = GetPlatformApplicationAttributes'+ { _gpaaPlatformApplicationARN :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetPlatformApplicationAttributes' with the minimum fields required to make a request. ----- * 'gpaaPlatformApplicationArn' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---getPlatformApplicationAttributes :: Text -- ^ 'gpaaPlatformApplicationArn'- -> GetPlatformApplicationAttributes-getPlatformApplicationAttributes p1 = GetPlatformApplicationAttributes- { _gpaaPlatformApplicationArn = p1+-- * 'gpaaPlatformApplicationARN'+getPlatformApplicationAttributes+ :: Text -- ^ 'gpaaPlatformApplicationARN'+ -> GetPlatformApplicationAttributes+getPlatformApplicationAttributes pPlatformApplicationARN_ =+ GetPlatformApplicationAttributes'+ { _gpaaPlatformApplicationARN = pPlatformApplicationARN_ } -- | PlatformApplicationArn for GetPlatformApplicationAttributesInput.-gpaaPlatformApplicationArn :: Lens' GetPlatformApplicationAttributes Text-gpaaPlatformApplicationArn =- lens _gpaaPlatformApplicationArn- (\s a -> s { _gpaaPlatformApplicationArn = a })+gpaaPlatformApplicationARN :: Lens' GetPlatformApplicationAttributes Text+gpaaPlatformApplicationARN = lens _gpaaPlatformApplicationARN (\ s a -> s{_gpaaPlatformApplicationARN = a}); -newtype GetPlatformApplicationAttributesResponse = GetPlatformApplicationAttributesResponse- { _gpaarAttributes :: EMap "entry" "key" "value" Text Text- } deriving (Eq, Read, Show, Monoid, Semigroup)+instance AWSRequest GetPlatformApplicationAttributes+ where+ type Sv GetPlatformApplicationAttributes = SNS+ type Rs GetPlatformApplicationAttributes =+ GetPlatformApplicationAttributesResponse+ request = postQuery+ response+ = receiveXMLWrapper+ "GetPlatformApplicationAttributesResult"+ (\ s h x ->+ GetPlatformApplicationAttributesResponse' <$>+ (x .@? "Attributes" .!@ mempty >>=+ may (parseXMLMap "entry" "key" "value"))+ <*> (pure (fromEnum s))) --- | 'GetPlatformApplicationAttributesResponse' constructor.+instance ToHeaders GetPlatformApplicationAttributes+ where+ toHeaders = const mempty++instance ToPath GetPlatformApplicationAttributes+ where+ toPath = const "/"++instance ToQuery GetPlatformApplicationAttributes+ where+ toQuery GetPlatformApplicationAttributes'{..}+ = mconcat+ ["Action" =:+ ("GetPlatformApplicationAttributes" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "PlatformApplicationArn" =:+ _gpaaPlatformApplicationARN]++-- | Response for GetPlatformApplicationAttributes action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'getPlatformApplicationAttributesResponse' smart constructor.+data GetPlatformApplicationAttributesResponse = GetPlatformApplicationAttributesResponse'+ { _gpaarsAttributes :: !(Maybe (Map Text Text))+ , _gpaarsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetPlatformApplicationAttributesResponse' with the minimum fields required to make a request. ----- * 'gpaarAttributes' @::@ 'HashMap' 'Text' 'Text'+-- Use one of the following lenses to modify other fields as desired: ---getPlatformApplicationAttributesResponse :: GetPlatformApplicationAttributesResponse-getPlatformApplicationAttributesResponse = GetPlatformApplicationAttributesResponse- { _gpaarAttributes = mempty+-- * 'gpaarsAttributes'+--+-- * 'gpaarsStatus'+getPlatformApplicationAttributesResponse+ :: Int -- ^ 'gpaarsStatus'+ -> GetPlatformApplicationAttributesResponse+getPlatformApplicationAttributesResponse pStatus_ =+ GetPlatformApplicationAttributesResponse'+ { _gpaarsAttributes = Nothing+ , _gpaarsStatus = pStatus_ } -- | Attributes include the following: ----- 'EventEndpointCreated' -- Topic ARN to which EndpointCreated event--- notifications should be sent. 'EventEndpointDeleted' -- Topic ARN to which--- EndpointDeleted event notifications should be sent. 'EventEndpointUpdated' ----- Topic ARN to which EndpointUpdate event notifications should be sent. 'EventDeliveryFailure' -- Topic ARN to which DeliveryFailure event notifications should be sent--- upon Direct Publish delivery failure (permanent) to one of the application's--- endpoints.-gpaarAttributes :: Lens' GetPlatformApplicationAttributesResponse (HashMap Text Text)-gpaarAttributes = lens _gpaarAttributes (\s a -> s { _gpaarAttributes = a }) . _EMap--instance ToPath GetPlatformApplicationAttributes where- toPath = const "/"--instance ToQuery GetPlatformApplicationAttributes where- toQuery GetPlatformApplicationAttributes{..} = mconcat- [ "PlatformApplicationArn" =? _gpaaPlatformApplicationArn- ]--instance ToHeaders GetPlatformApplicationAttributes--instance AWSRequest GetPlatformApplicationAttributes where- type Sv GetPlatformApplicationAttributes = SNS- type Rs GetPlatformApplicationAttributes = GetPlatformApplicationAttributesResponse-- request = post "GetPlatformApplicationAttributes"- response = xmlResponse+-- - 'EventEndpointCreated' -- Topic ARN to which EndpointCreated event+-- notifications should be sent.+-- - 'EventEndpointDeleted' -- Topic ARN to which EndpointDeleted event+-- notifications should be sent.+-- - 'EventEndpointUpdated' -- Topic ARN to which EndpointUpdate event+-- notifications should be sent.+-- - 'EventDeliveryFailure' -- Topic ARN to which DeliveryFailure event+-- notifications should be sent upon Direct Publish delivery failure+-- (permanent) to one of the application\'s endpoints.+gpaarsAttributes :: Lens' GetPlatformApplicationAttributesResponse (HashMap Text Text)+gpaarsAttributes = lens _gpaarsAttributes (\ s a -> s{_gpaarsAttributes = a}) . _Default . _Map; -instance FromXML GetPlatformApplicationAttributesResponse where- parseXML = withElement "GetPlatformApplicationAttributesResult" $ \x -> GetPlatformApplicationAttributesResponse- <$> x .@? "Attributes" .!@ mempty+-- | The response status code.+gpaarsStatus :: Lens' GetPlatformApplicationAttributesResponse Int+gpaarsStatus = lens _gpaarsStatus (\ s a -> s{_gpaarsStatus = a});
gen/Network/AWS/SNS/GetSubscriptionAttributes.hs view
@@ -1,117 +1,139 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.GetSubscriptionAttributes--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Returns all of the properties of a subscription.+-- Returns all of the properties of a subscription. ----- <http://docs.aws.amazon.com/sns/latest/api/API_GetSubscriptionAttributes.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_GetSubscriptionAttributes.html AWS API Reference> for GetSubscriptionAttributes. module Network.AWS.SNS.GetSubscriptionAttributes (- -- * Request- GetSubscriptionAttributes- -- ** Request constructor- , getSubscriptionAttributes- -- ** Request lenses- , gsaSubscriptionArn+ -- * Creating a Request+ getSubscriptionAttributes+ , GetSubscriptionAttributes+ -- * Request Lenses+ , gsaSubscriptionARN - -- * Response- , GetSubscriptionAttributesResponse- -- ** Response constructor+ -- * Destructuring the Response , getSubscriptionAttributesResponse- -- ** Response lenses- , gsarAttributes+ , GetSubscriptionAttributesResponse+ -- * Response Lenses+ , gsarsAttributes+ , gsarsStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--newtype GetSubscriptionAttributes = GetSubscriptionAttributes- { _gsaSubscriptionArn :: Text- } deriving (Eq, Ord, Read, Show, Monoid, IsString)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'GetSubscriptionAttributes' constructor.+-- | Input for GetSubscriptionAttributes. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'getSubscriptionAttributes' smart constructor.+newtype GetSubscriptionAttributes = GetSubscriptionAttributes'+ { _gsaSubscriptionARN :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetSubscriptionAttributes' with the minimum fields required to make a request. ----- * 'gsaSubscriptionArn' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---getSubscriptionAttributes :: Text -- ^ 'gsaSubscriptionArn'- -> GetSubscriptionAttributes-getSubscriptionAttributes p1 = GetSubscriptionAttributes- { _gsaSubscriptionArn = p1+-- * 'gsaSubscriptionARN'+getSubscriptionAttributes+ :: Text -- ^ 'gsaSubscriptionARN'+ -> GetSubscriptionAttributes+getSubscriptionAttributes pSubscriptionARN_ =+ GetSubscriptionAttributes'+ { _gsaSubscriptionARN = pSubscriptionARN_ } -- | The ARN of the subscription whose properties you want to get.-gsaSubscriptionArn :: Lens' GetSubscriptionAttributes Text-gsaSubscriptionArn =- lens _gsaSubscriptionArn (\s a -> s { _gsaSubscriptionArn = a })--newtype GetSubscriptionAttributesResponse = GetSubscriptionAttributesResponse- { _gsarAttributes :: EMap "entry" "key" "value" Text Text- } deriving (Eq, Read, Show, Monoid, Semigroup)+gsaSubscriptionARN :: Lens' GetSubscriptionAttributes Text+gsaSubscriptionARN = lens _gsaSubscriptionARN (\ s a -> s{_gsaSubscriptionARN = a}); --- | 'GetSubscriptionAttributesResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'gsarAttributes' @::@ 'HashMap' 'Text' 'Text'----getSubscriptionAttributesResponse :: GetSubscriptionAttributesResponse-getSubscriptionAttributesResponse = GetSubscriptionAttributesResponse- { _gsarAttributes = mempty- }+instance AWSRequest GetSubscriptionAttributes where+ type Sv GetSubscriptionAttributes = SNS+ type Rs GetSubscriptionAttributes =+ GetSubscriptionAttributesResponse+ request = postQuery+ response+ = receiveXMLWrapper "GetSubscriptionAttributesResult"+ (\ s h x ->+ GetSubscriptionAttributesResponse' <$>+ (x .@? "Attributes" .!@ mempty >>=+ may (parseXMLMap "entry" "key" "value"))+ <*> (pure (fromEnum s))) --- | A map of the subscription's attributes. Attributes in this map include the--- following:------ 'SubscriptionArn' -- the subscription's ARN 'TopicArn' -- the topic ARN that--- the subscription is associated with 'Owner' -- the AWS account ID of the--- subscription's owner 'ConfirmationWasAuthenticated' -- true if the--- subscription confirmation request was authenticated 'DeliveryPolicy' -- the--- JSON serialization of the subscription's delivery policy 'EffectiveDeliveryPolicy' -- the JSON serialization of the effective delivery policy that takes into--- account the topic delivery policy and account system defaults-gsarAttributes :: Lens' GetSubscriptionAttributesResponse (HashMap Text Text)-gsarAttributes = lens _gsarAttributes (\s a -> s { _gsarAttributes = a }) . _EMap+instance ToHeaders GetSubscriptionAttributes where+ toHeaders = const mempty instance ToPath GetSubscriptionAttributes where- toPath = const "/"+ toPath = const "/" instance ToQuery GetSubscriptionAttributes where- toQuery GetSubscriptionAttributes{..} = mconcat- [ "SubscriptionArn" =? _gsaSubscriptionArn- ]+ toQuery GetSubscriptionAttributes'{..}+ = mconcat+ ["Action" =:+ ("GetSubscriptionAttributes" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "SubscriptionArn" =: _gsaSubscriptionARN] -instance ToHeaders GetSubscriptionAttributes+-- | Response for GetSubscriptionAttributes action.+--+-- /See:/ 'getSubscriptionAttributesResponse' smart constructor.+data GetSubscriptionAttributesResponse = GetSubscriptionAttributesResponse'+ { _gsarsAttributes :: !(Maybe (Map Text Text))+ , _gsarsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest GetSubscriptionAttributes where- type Sv GetSubscriptionAttributes = SNS- type Rs GetSubscriptionAttributes = GetSubscriptionAttributesResponse+-- | Creates a value of 'GetSubscriptionAttributesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gsarsAttributes'+--+-- * 'gsarsStatus'+getSubscriptionAttributesResponse+ :: Int -- ^ 'gsarsStatus'+ -> GetSubscriptionAttributesResponse+getSubscriptionAttributesResponse pStatus_ =+ GetSubscriptionAttributesResponse'+ { _gsarsAttributes = Nothing+ , _gsarsStatus = pStatus_+ } - request = post "GetSubscriptionAttributes"- response = xmlResponse+-- | A map of the subscription\'s attributes. Attributes in this map include+-- the following:+--+-- - 'SubscriptionArn' -- the subscription\'s ARN+-- - 'TopicArn' -- the topic ARN that the subscription is associated with+-- - 'Owner' -- the AWS account ID of the subscription\'s owner+-- - 'ConfirmationWasAuthenticated' -- true if the subscription+-- confirmation request was authenticated+-- - 'DeliveryPolicy' -- the JSON serialization of the subscription\'s+-- delivery policy+-- - 'EffectiveDeliveryPolicy' -- the JSON serialization of the effective+-- delivery policy that takes into account the topic delivery policy+-- and account system defaults+gsarsAttributes :: Lens' GetSubscriptionAttributesResponse (HashMap Text Text)+gsarsAttributes = lens _gsarsAttributes (\ s a -> s{_gsarsAttributes = a}) . _Default . _Map; -instance FromXML GetSubscriptionAttributesResponse where- parseXML = withElement "GetSubscriptionAttributesResult" $ \x -> GetSubscriptionAttributesResponse- <$> x .@? "Attributes" .!@ mempty+-- | The response status code.+gsarsStatus :: Lens' GetSubscriptionAttributesResponse Int+gsarsStatus = lens _gsarsStatus (\ s a -> s{_gsarsStatus = a});
gen/Network/AWS/SNS/GetTopicAttributes.hs view
@@ -1,118 +1,145 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.GetTopicAttributes--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Returns all of the properties of a topic. Topic properties returned might--- differ based on the authorization of the user.+-- Returns all of the properties of a topic. Topic properties returned+-- might differ based on the authorization of the user. ----- <http://docs.aws.amazon.com/sns/latest/api/API_GetTopicAttributes.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_GetTopicAttributes.html AWS API Reference> for GetTopicAttributes. module Network.AWS.SNS.GetTopicAttributes (- -- * Request- GetTopicAttributes- -- ** Request constructor- , getTopicAttributes- -- ** Request lenses- , gtaTopicArn+ -- * Creating a Request+ getTopicAttributes+ , GetTopicAttributes+ -- * Request Lenses+ , gtaTopicARN - -- * Response- , GetTopicAttributesResponse- -- ** Response constructor+ -- * Destructuring the Response , getTopicAttributesResponse- -- ** Response lenses- , gtarAttributes+ , GetTopicAttributesResponse+ -- * Response Lenses+ , gtarsAttributes+ , gtarsStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--newtype GetTopicAttributes = GetTopicAttributes- { _gtaTopicArn :: Text- } deriving (Eq, Ord, Read, Show, Monoid, IsString)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'GetTopicAttributes' constructor.+-- | Input for GetTopicAttributes action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'getTopicAttributes' smart constructor.+newtype GetTopicAttributes = GetTopicAttributes'+ { _gtaTopicARN :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetTopicAttributes' with the minimum fields required to make a request. ----- * 'gtaTopicArn' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---getTopicAttributes :: Text -- ^ 'gtaTopicArn'- -> GetTopicAttributes-getTopicAttributes p1 = GetTopicAttributes- { _gtaTopicArn = p1+-- * 'gtaTopicARN'+getTopicAttributes+ :: Text -- ^ 'gtaTopicARN'+ -> GetTopicAttributes+getTopicAttributes pTopicARN_ =+ GetTopicAttributes'+ { _gtaTopicARN = pTopicARN_ } -- | The ARN of the topic whose properties you want to get.-gtaTopicArn :: Lens' GetTopicAttributes Text-gtaTopicArn = lens _gtaTopicArn (\s a -> s { _gtaTopicArn = a })--newtype GetTopicAttributesResponse = GetTopicAttributesResponse- { _gtarAttributes :: EMap "entry" "key" "value" Text Text- } deriving (Eq, Read, Show, Monoid, Semigroup)+gtaTopicARN :: Lens' GetTopicAttributes Text+gtaTopicARN = lens _gtaTopicARN (\ s a -> s{_gtaTopicARN = a}); --- | 'GetTopicAttributesResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'gtarAttributes' @::@ 'HashMap' 'Text' 'Text'----getTopicAttributesResponse :: GetTopicAttributesResponse-getTopicAttributesResponse = GetTopicAttributesResponse- { _gtarAttributes = mempty- }+instance AWSRequest GetTopicAttributes where+ type Sv GetTopicAttributes = SNS+ type Rs GetTopicAttributes =+ GetTopicAttributesResponse+ request = postQuery+ response+ = receiveXMLWrapper "GetTopicAttributesResult"+ (\ s h x ->+ GetTopicAttributesResponse' <$>+ (x .@? "Attributes" .!@ mempty >>=+ may (parseXMLMap "entry" "key" "value"))+ <*> (pure (fromEnum s))) --- | A map of the topic's attributes. Attributes in this map include the following:------ 'TopicArn' -- the topic's ARN 'Owner' -- the AWS account ID of the topic's--- owner 'Policy' -- the JSON serialization of the topic's access control policy 'DisplayName' -- the human-readable name used in the "From" field for--- notifications to email and email-json endpoints 'SubscriptionsPending' -- the--- number of subscriptions pending confirmation on this topic 'SubscriptionsConfirmed' -- the number of confirmed subscriptions on this topic 'SubscriptionsDeleted'--- -- the number of deleted subscriptions on this topic 'DeliveryPolicy' -- the--- JSON serialization of the topic's delivery policy 'EffectiveDeliveryPolicy' ----- the JSON serialization of the effective delivery policy that takes into--- account system defaults-gtarAttributes :: Lens' GetTopicAttributesResponse (HashMap Text Text)-gtarAttributes = lens _gtarAttributes (\s a -> s { _gtarAttributes = a }) . _EMap+instance ToHeaders GetTopicAttributes where+ toHeaders = const mempty instance ToPath GetTopicAttributes where- toPath = const "/"+ toPath = const "/" instance ToQuery GetTopicAttributes where- toQuery GetTopicAttributes{..} = mconcat- [ "TopicArn" =? _gtaTopicArn- ]+ toQuery GetTopicAttributes'{..}+ = mconcat+ ["Action" =: ("GetTopicAttributes" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "TopicArn" =: _gtaTopicARN] -instance ToHeaders GetTopicAttributes+-- | Response for GetTopicAttributes action.+--+-- /See:/ 'getTopicAttributesResponse' smart constructor.+data GetTopicAttributesResponse = GetTopicAttributesResponse'+ { _gtarsAttributes :: !(Maybe (Map Text Text))+ , _gtarsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest GetTopicAttributes where- type Sv GetTopicAttributes = SNS- type Rs GetTopicAttributes = GetTopicAttributesResponse+-- | Creates a value of 'GetTopicAttributesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gtarsAttributes'+--+-- * 'gtarsStatus'+getTopicAttributesResponse+ :: Int -- ^ 'gtarsStatus'+ -> GetTopicAttributesResponse+getTopicAttributesResponse pStatus_ =+ GetTopicAttributesResponse'+ { _gtarsAttributes = Nothing+ , _gtarsStatus = pStatus_+ } - request = post "GetTopicAttributes"- response = xmlResponse+-- | A map of the topic\'s attributes. Attributes in this map include the+-- following:+--+-- - 'TopicArn' -- the topic\'s ARN+-- - 'Owner' -- the AWS account ID of the topic\'s owner+-- - 'Policy' -- the JSON serialization of the topic\'s access control+-- policy+-- - 'DisplayName' -- the human-readable name used in the \"From\" field+-- for notifications to email and email-json endpoints+-- - 'SubscriptionsPending' -- the number of subscriptions pending+-- confirmation on this topic+-- - 'SubscriptionsConfirmed' -- the number of confirmed subscriptions on+-- this topic+-- - 'SubscriptionsDeleted' -- the number of deleted subscriptions on+-- this topic+-- - 'DeliveryPolicy' -- the JSON serialization of the topic\'s delivery+-- policy+-- - 'EffectiveDeliveryPolicy' -- the JSON serialization of the effective+-- delivery policy that takes into account system defaults+gtarsAttributes :: Lens' GetTopicAttributesResponse (HashMap Text Text)+gtarsAttributes = lens _gtarsAttributes (\ s a -> s{_gtarsAttributes = a}) . _Default . _Map; -instance FromXML GetTopicAttributesResponse where- parseXML = withElement "GetTopicAttributesResult" $ \x -> GetTopicAttributesResponse- <$> x .@? "Attributes" .!@ mempty+-- | The response status code.+gtarsStatus :: Lens' GetTopicAttributesResponse Int+gtarsStatus = lens _gtarsStatus (\ s a -> s{_gtarsStatus = a});
gen/Network/AWS/SNS/ListEndpointsByPlatformApplication.hs view
@@ -1,144 +1,178 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.ListEndpointsByPlatformApplication--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Lists the endpoints and endpoint attributes for devices in a supported push--- notification service, such as GCM and APNS. The results for 'ListEndpointsByPlatformApplication' are paginated and return a limited list of endpoints, up to 100. If--- additional records are available after the first page results, then a--- NextToken string will be returned. To receive the next page, you call 'ListEndpointsByPlatformApplication' again using the NextToken string received from the previous call. When there--- are no more records to return, NextToken will be null. For more information,--- see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>.+-- Lists the endpoints and endpoint attributes for devices in a supported+-- push notification service, such as GCM and APNS. The results for+-- 'ListEndpointsByPlatformApplication' are paginated and return a limited+-- list of endpoints, up to 100. If additional records are available after+-- the first page results, then a NextToken string will be returned. To+-- receive the next page, you call 'ListEndpointsByPlatformApplication'+-- again using the NextToken string received from the previous call. When+-- there are no more records to return, NextToken will be null. For more+-- information, see+-- <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>. ----- <http://docs.aws.amazon.com/sns/latest/api/API_ListEndpointsByPlatformApplication.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_ListEndpointsByPlatformApplication.html AWS API Reference> for ListEndpointsByPlatformApplication.+--+-- This operation returns paginated results. module Network.AWS.SNS.ListEndpointsByPlatformApplication (- -- * Request- ListEndpointsByPlatformApplication- -- ** Request constructor- , listEndpointsByPlatformApplication- -- ** Request lenses+ -- * Creating a Request+ listEndpointsByPlatformApplication+ , ListEndpointsByPlatformApplication+ -- * Request Lenses , lebpaNextToken- , lebpaPlatformApplicationArn+ , lebpaPlatformApplicationARN - -- * Response- , ListEndpointsByPlatformApplicationResponse- -- ** Response constructor+ -- * Destructuring the Response , listEndpointsByPlatformApplicationResponse- -- ** Response lenses- , lebparEndpoints- , lebparNextToken+ , ListEndpointsByPlatformApplicationResponse+ -- * Response Lenses+ , lebparsNextToken+ , lebparsEndpoints+ , lebparsStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--data ListEndpointsByPlatformApplication = ListEndpointsByPlatformApplication- { _lebpaNextToken :: Maybe Text- , _lebpaPlatformApplicationArn :: Text- } deriving (Eq, Ord, Read, Show)+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'ListEndpointsByPlatformApplication' constructor.+-- | Input for ListEndpointsByPlatformApplication action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'listEndpointsByPlatformApplication' smart constructor.+data ListEndpointsByPlatformApplication = ListEndpointsByPlatformApplication'+ { _lebpaNextToken :: !(Maybe Text)+ , _lebpaPlatformApplicationARN :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListEndpointsByPlatformApplication' with the minimum fields required to make a request. ----- * 'lebpaNextToken' @::@ 'Maybe' 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'lebpaPlatformApplicationArn' @::@ 'Text'+-- * 'lebpaNextToken' ---listEndpointsByPlatformApplication :: Text -- ^ 'lebpaPlatformApplicationArn'- -> ListEndpointsByPlatformApplication-listEndpointsByPlatformApplication p1 = ListEndpointsByPlatformApplication- { _lebpaPlatformApplicationArn = p1- , _lebpaNextToken = Nothing+-- * 'lebpaPlatformApplicationARN'+listEndpointsByPlatformApplication+ :: Text -- ^ 'lebpaPlatformApplicationARN'+ -> ListEndpointsByPlatformApplication+listEndpointsByPlatformApplication pPlatformApplicationARN_ =+ ListEndpointsByPlatformApplication'+ { _lebpaNextToken = Nothing+ , _lebpaPlatformApplicationARN = pPlatformApplicationARN_ } -- | NextToken string is used when calling ListEndpointsByPlatformApplication--- action to retrieve additional records that are available after the first page--- results.+-- action to retrieve additional records that are available after the first+-- page results. lebpaNextToken :: Lens' ListEndpointsByPlatformApplication (Maybe Text)-lebpaNextToken = lens _lebpaNextToken (\s a -> s { _lebpaNextToken = a })---- | PlatformApplicationArn for ListEndpointsByPlatformApplicationInput action.-lebpaPlatformApplicationArn :: Lens' ListEndpointsByPlatformApplication Text-lebpaPlatformApplicationArn =- lens _lebpaPlatformApplicationArn- (\s a -> s { _lebpaPlatformApplicationArn = a })+lebpaNextToken = lens _lebpaNextToken (\ s a -> s{_lebpaNextToken = a}); -data ListEndpointsByPlatformApplicationResponse = ListEndpointsByPlatformApplicationResponse- { _lebparEndpoints :: List "member" Endpoint- , _lebparNextToken :: Maybe Text- } deriving (Eq, Read, Show)+-- | PlatformApplicationArn for ListEndpointsByPlatformApplicationInput+-- action.+lebpaPlatformApplicationARN :: Lens' ListEndpointsByPlatformApplication Text+lebpaPlatformApplicationARN = lens _lebpaPlatformApplicationARN (\ s a -> s{_lebpaPlatformApplicationARN = a}); --- | 'ListEndpointsByPlatformApplicationResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'lebparEndpoints' @::@ ['Endpoint']------ * 'lebparNextToken' @::@ 'Maybe' 'Text'----listEndpointsByPlatformApplicationResponse :: ListEndpointsByPlatformApplicationResponse-listEndpointsByPlatformApplicationResponse = ListEndpointsByPlatformApplicationResponse- { _lebparEndpoints = mempty- , _lebparNextToken = Nothing- }+instance AWSPager ListEndpointsByPlatformApplication+ where+ page rq rs+ | stop (rs ^. lebparsNextToken) = Nothing+ | stop (rs ^. lebparsEndpoints) = Nothing+ | otherwise =+ Just $ rq & lebpaNextToken .~ rs ^. lebparsNextToken --- | Endpoints returned for ListEndpointsByPlatformApplication action.-lebparEndpoints :: Lens' ListEndpointsByPlatformApplicationResponse [Endpoint]-lebparEndpoints = lens _lebparEndpoints (\s a -> s { _lebparEndpoints = a }) . _List+instance AWSRequest+ ListEndpointsByPlatformApplication where+ type Sv ListEndpointsByPlatformApplication = SNS+ type Rs ListEndpointsByPlatformApplication =+ ListEndpointsByPlatformApplicationResponse+ request = postQuery+ response+ = receiveXMLWrapper+ "ListEndpointsByPlatformApplicationResult"+ (\ s h x ->+ ListEndpointsByPlatformApplicationResponse' <$>+ (x .@? "NextToken") <*>+ (x .@? "Endpoints" .!@ mempty >>=+ may (parseXMLList "member"))+ <*> (pure (fromEnum s))) --- | NextToken string is returned when calling ListEndpointsByPlatformApplication--- action if additional records are available after the first page results.-lebparNextToken :: Lens' ListEndpointsByPlatformApplicationResponse (Maybe Text)-lebparNextToken = lens _lebparNextToken (\s a -> s { _lebparNextToken = a })+instance ToHeaders ListEndpointsByPlatformApplication+ where+ toHeaders = const mempty -instance ToPath ListEndpointsByPlatformApplication where- toPath = const "/"+instance ToPath ListEndpointsByPlatformApplication+ where+ toPath = const "/" -instance ToQuery ListEndpointsByPlatformApplication where- toQuery ListEndpointsByPlatformApplication{..} = mconcat- [ "NextToken" =? _lebpaNextToken- , "PlatformApplicationArn" =? _lebpaPlatformApplicationArn- ]+instance ToQuery ListEndpointsByPlatformApplication+ where+ toQuery ListEndpointsByPlatformApplication'{..}+ = mconcat+ ["Action" =:+ ("ListEndpointsByPlatformApplication" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "NextToken" =: _lebpaNextToken,+ "PlatformApplicationArn" =:+ _lebpaPlatformApplicationARN] -instance ToHeaders ListEndpointsByPlatformApplication+-- | Response for ListEndpointsByPlatformApplication action.+--+-- /See:/ 'listEndpointsByPlatformApplicationResponse' smart constructor.+data ListEndpointsByPlatformApplicationResponse = ListEndpointsByPlatformApplicationResponse'+ { _lebparsNextToken :: !(Maybe Text)+ , _lebparsEndpoints :: !(Maybe [Endpoint])+ , _lebparsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest ListEndpointsByPlatformApplication where- type Sv ListEndpointsByPlatformApplication = SNS- type Rs ListEndpointsByPlatformApplication = ListEndpointsByPlatformApplicationResponse+-- | Creates a value of 'ListEndpointsByPlatformApplicationResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lebparsNextToken'+--+-- * 'lebparsEndpoints'+--+-- * 'lebparsStatus'+listEndpointsByPlatformApplicationResponse+ :: Int -- ^ 'lebparsStatus'+ -> ListEndpointsByPlatformApplicationResponse+listEndpointsByPlatformApplicationResponse pStatus_ =+ ListEndpointsByPlatformApplicationResponse'+ { _lebparsNextToken = Nothing+ , _lebparsEndpoints = Nothing+ , _lebparsStatus = pStatus_+ } - request = post "ListEndpointsByPlatformApplication"- response = xmlResponse+-- | NextToken string is returned when calling+-- ListEndpointsByPlatformApplication action if additional records are+-- available after the first page results.+lebparsNextToken :: Lens' ListEndpointsByPlatformApplicationResponse (Maybe Text)+lebparsNextToken = lens _lebparsNextToken (\ s a -> s{_lebparsNextToken = a}); -instance FromXML ListEndpointsByPlatformApplicationResponse where- parseXML = withElement "ListEndpointsByPlatformApplicationResult" $ \x -> ListEndpointsByPlatformApplicationResponse- <$> x .@? "Endpoints" .!@ mempty- <*> x .@? "NextToken"+-- | Endpoints returned for ListEndpointsByPlatformApplication action.+lebparsEndpoints :: Lens' ListEndpointsByPlatformApplicationResponse [Endpoint]+lebparsEndpoints = lens _lebparsEndpoints (\ s a -> s{_lebparsEndpoints = a}) . _Default . _Coerce; -instance AWSPager ListEndpointsByPlatformApplication where- page rq rs- | stop (rs ^. lebparNextToken) = Nothing- | otherwise = (\x -> rq & lebpaNextToken ?~ x)- <$> (rs ^. lebparNextToken)+-- | The response status code.+lebparsStatus :: Lens' ListEndpointsByPlatformApplicationResponse Int+lebparsStatus = lens _lebparsStatus (\ s a -> s{_lebparsStatus = a});
gen/Network/AWS/SNS/ListPlatformApplications.hs view
@@ -1,134 +1,158 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.ListPlatformApplications--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Lists the platform application objects for the supported push notification--- services, such as APNS and GCM. The results for 'ListPlatformApplications' are--- paginated and return a limited list of applications, up to 100. If additional--- records are available after the first page results, then a NextToken string--- will be returned. To receive the next page, you call 'ListPlatformApplications'--- using the NextToken string received from the previous call. When there are no--- more records to return, NextToken will be null. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>.+-- Lists the platform application objects for the supported push+-- notification services, such as APNS and GCM. The results for+-- 'ListPlatformApplications' are paginated and return a limited list of+-- applications, up to 100. If additional records are available after the+-- first page results, then a NextToken string will be returned. To receive+-- the next page, you call 'ListPlatformApplications' using the NextToken+-- string received from the previous call. When there are no more records+-- to return, NextToken will be null. For more information, see+-- <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>. ----- <http://docs.aws.amazon.com/sns/latest/api/API_ListPlatformApplications.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_ListPlatformApplications.html AWS API Reference> for ListPlatformApplications.+--+-- This operation returns paginated results. module Network.AWS.SNS.ListPlatformApplications (- -- * Request- ListPlatformApplications- -- ** Request constructor- , listPlatformApplications- -- ** Request lenses+ -- * Creating a Request+ listPlatformApplications+ , ListPlatformApplications+ -- * Request Lenses , lpaNextToken - -- * Response- , ListPlatformApplicationsResponse- -- ** Response constructor+ -- * Destructuring the Response , listPlatformApplicationsResponse- -- ** Response lenses- , lparNextToken- , lparPlatformApplications+ , ListPlatformApplicationsResponse+ -- * Response Lenses+ , lparsPlatformApplications+ , lparsNextToken+ , lparsStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product -newtype ListPlatformApplications = ListPlatformApplications+-- | Input for ListPlatformApplications action.+--+-- /See:/ 'listPlatformApplications' smart constructor.+newtype ListPlatformApplications = ListPlatformApplications' { _lpaNextToken :: Maybe Text- } deriving (Eq, Ord, Read, Show, Monoid)+ } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'ListPlatformApplications' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'ListPlatformApplications' with the minimum fields required to make a request. ----- * 'lpaNextToken' @::@ 'Maybe' 'Text'+-- Use one of the following lenses to modify other fields as desired: ---listPlatformApplications :: ListPlatformApplications-listPlatformApplications = ListPlatformApplications+-- * 'lpaNextToken'+listPlatformApplications+ :: ListPlatformApplications+listPlatformApplications =+ ListPlatformApplications' { _lpaNextToken = Nothing } -- | NextToken string is used when calling ListPlatformApplications action to--- retrieve additional records that are available after the first page results.+-- retrieve additional records that are available after the first page+-- results. lpaNextToken :: Lens' ListPlatformApplications (Maybe Text)-lpaNextToken = lens _lpaNextToken (\s a -> s { _lpaNextToken = a })--data ListPlatformApplicationsResponse = ListPlatformApplicationsResponse- { _lparNextToken :: Maybe Text- , _lparPlatformApplications :: List "member" PlatformApplication- } deriving (Eq, Read, Show)+lpaNextToken = lens _lpaNextToken (\ s a -> s{_lpaNextToken = a}); --- | 'ListPlatformApplicationsResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'lparNextToken' @::@ 'Maybe' 'Text'------ * 'lparPlatformApplications' @::@ ['PlatformApplication']----listPlatformApplicationsResponse :: ListPlatformApplicationsResponse-listPlatformApplicationsResponse = ListPlatformApplicationsResponse- { _lparPlatformApplications = mempty- , _lparNextToken = Nothing- }+instance AWSPager ListPlatformApplications where+ page rq rs+ | stop (rs ^. lparsNextToken) = Nothing+ | stop (rs ^. lparsPlatformApplications) = Nothing+ | otherwise =+ Just $ rq & lpaNextToken .~ rs ^. lparsNextToken --- | NextToken string is returned when calling ListPlatformApplications action if--- additional records are available after the first page results.-lparNextToken :: Lens' ListPlatformApplicationsResponse (Maybe Text)-lparNextToken = lens _lparNextToken (\s a -> s { _lparNextToken = a })+instance AWSRequest ListPlatformApplications where+ type Sv ListPlatformApplications = SNS+ type Rs ListPlatformApplications =+ ListPlatformApplicationsResponse+ request = postQuery+ response+ = receiveXMLWrapper "ListPlatformApplicationsResult"+ (\ s h x ->+ ListPlatformApplicationsResponse' <$>+ (x .@? "PlatformApplications" .!@ mempty >>=+ may (parseXMLList "member"))+ <*> (x .@? "NextToken")+ <*> (pure (fromEnum s))) --- | Platform applications returned when calling ListPlatformApplications action.-lparPlatformApplications :: Lens' ListPlatformApplicationsResponse [PlatformApplication]-lparPlatformApplications =- lens _lparPlatformApplications- (\s a -> s { _lparPlatformApplications = a })- . _List+instance ToHeaders ListPlatformApplications where+ toHeaders = const mempty instance ToPath ListPlatformApplications where- toPath = const "/"+ toPath = const "/" instance ToQuery ListPlatformApplications where- toQuery ListPlatformApplications{..} = mconcat- [ "NextToken" =? _lpaNextToken- ]+ toQuery ListPlatformApplications'{..}+ = mconcat+ ["Action" =:+ ("ListPlatformApplications" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "NextToken" =: _lpaNextToken] -instance ToHeaders ListPlatformApplications+-- | Response for ListPlatformApplications action.+--+-- /See:/ 'listPlatformApplicationsResponse' smart constructor.+data ListPlatformApplicationsResponse = ListPlatformApplicationsResponse'+ { _lparsPlatformApplications :: !(Maybe [PlatformApplication])+ , _lparsNextToken :: !(Maybe Text)+ , _lparsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest ListPlatformApplications where- type Sv ListPlatformApplications = SNS- type Rs ListPlatformApplications = ListPlatformApplicationsResponse+-- | Creates a value of 'ListPlatformApplicationsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lparsPlatformApplications'+--+-- * 'lparsNextToken'+--+-- * 'lparsStatus'+listPlatformApplicationsResponse+ :: Int -- ^ 'lparsStatus'+ -> ListPlatformApplicationsResponse+listPlatformApplicationsResponse pStatus_ =+ ListPlatformApplicationsResponse'+ { _lparsPlatformApplications = Nothing+ , _lparsNextToken = Nothing+ , _lparsStatus = pStatus_+ } - request = post "ListPlatformApplications"- response = xmlResponse+-- | Platform applications returned when calling ListPlatformApplications+-- action.+lparsPlatformApplications :: Lens' ListPlatformApplicationsResponse [PlatformApplication]+lparsPlatformApplications = lens _lparsPlatformApplications (\ s a -> s{_lparsPlatformApplications = a}) . _Default . _Coerce; -instance FromXML ListPlatformApplicationsResponse where- parseXML = withElement "ListPlatformApplicationsResult" $ \x -> ListPlatformApplicationsResponse- <$> x .@? "NextToken"- <*> x .@? "PlatformApplications" .!@ mempty+-- | NextToken string is returned when calling ListPlatformApplications+-- action if additional records are available after the first page results.+lparsNextToken :: Lens' ListPlatformApplicationsResponse (Maybe Text)+lparsNextToken = lens _lparsNextToken (\ s a -> s{_lparsNextToken = a}); -instance AWSPager ListPlatformApplications where- page rq rs- | stop (rs ^. lparNextToken) = Nothing- | otherwise = (\x -> rq & lpaNextToken ?~ x)- <$> (rs ^. lparNextToken)+-- | The response status code.+lparsStatus :: Lens' ListPlatformApplicationsResponse Int+lparsStatus = lens _lparsStatus (\ s a -> s{_lparsStatus = a});
gen/Network/AWS/SNS/ListSubscriptions.hs view
@@ -1,127 +1,148 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.ListSubscriptions--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Returns a list of the requester's subscriptions. Each call returns a limited--- list of subscriptions, up to 100. If there are more subscriptions, a 'NextToken'--- is also returned. Use the 'NextToken' parameter in a new 'ListSubscriptions'--- call to get further results.+-- Returns a list of the requester\'s subscriptions. Each call returns a+-- limited list of subscriptions, up to 100. If there are more+-- subscriptions, a 'NextToken' is also returned. Use the 'NextToken'+-- parameter in a new 'ListSubscriptions' call to get further results. ----- <http://docs.aws.amazon.com/sns/latest/api/API_ListSubscriptions.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_ListSubscriptions.html AWS API Reference> for ListSubscriptions.+--+-- This operation returns paginated results. module Network.AWS.SNS.ListSubscriptions (- -- * Request- ListSubscriptions- -- ** Request constructor- , listSubscriptions- -- ** Request lenses+ -- * Creating a Request+ listSubscriptions+ , ListSubscriptions+ -- * Request Lenses , lsNextToken - -- * Response- , ListSubscriptionsResponse- -- ** Response constructor+ -- * Destructuring the Response , listSubscriptionsResponse- -- ** Response lenses- , lsrNextToken- , lsrSubscriptions+ , ListSubscriptionsResponse+ -- * Response Lenses+ , lsrsNextToken+ , lsrsSubscriptions+ , lsrsStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product -newtype ListSubscriptions = ListSubscriptions+-- | Input for ListSubscriptions action.+--+-- /See:/ 'listSubscriptions' smart constructor.+newtype ListSubscriptions = ListSubscriptions' { _lsNextToken :: Maybe Text- } deriving (Eq, Ord, Read, Show, Monoid)+ } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'ListSubscriptions' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'ListSubscriptions' with the minimum fields required to make a request. ----- * 'lsNextToken' @::@ 'Maybe' 'Text'+-- Use one of the following lenses to modify other fields as desired: ---listSubscriptions :: ListSubscriptions-listSubscriptions = ListSubscriptions+-- * 'lsNextToken'+listSubscriptions+ :: ListSubscriptions+listSubscriptions =+ ListSubscriptions' { _lsNextToken = Nothing } -- | Token returned by the previous 'ListSubscriptions' request. lsNextToken :: Lens' ListSubscriptions (Maybe Text)-lsNextToken = lens _lsNextToken (\s a -> s { _lsNextToken = a })--data ListSubscriptionsResponse = ListSubscriptionsResponse- { _lsrNextToken :: Maybe Text- , _lsrSubscriptions :: List "member" Subscription- } deriving (Eq, Read, Show)+lsNextToken = lens _lsNextToken (\ s a -> s{_lsNextToken = a}); --- | 'ListSubscriptionsResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'lsrNextToken' @::@ 'Maybe' 'Text'------ * 'lsrSubscriptions' @::@ ['Subscription']----listSubscriptionsResponse :: ListSubscriptionsResponse-listSubscriptionsResponse = ListSubscriptionsResponse- { _lsrSubscriptions = mempty- , _lsrNextToken = Nothing- }+instance AWSPager ListSubscriptions where+ page rq rs+ | stop (rs ^. lsrsNextToken) = Nothing+ | stop (rs ^. lsrsSubscriptions) = Nothing+ | otherwise =+ Just $ rq & lsNextToken .~ rs ^. lsrsNextToken --- | Token to pass along to the next 'ListSubscriptions' request. This element is--- returned if there are more subscriptions to retrieve.-lsrNextToken :: Lens' ListSubscriptionsResponse (Maybe Text)-lsrNextToken = lens _lsrNextToken (\s a -> s { _lsrNextToken = a })+instance AWSRequest ListSubscriptions where+ type Sv ListSubscriptions = SNS+ type Rs ListSubscriptions = ListSubscriptionsResponse+ request = postQuery+ response+ = receiveXMLWrapper "ListSubscriptionsResult"+ (\ s h x ->+ ListSubscriptionsResponse' <$>+ (x .@? "NextToken") <*>+ (x .@? "Subscriptions" .!@ mempty >>=+ may (parseXMLList "member"))+ <*> (pure (fromEnum s))) --- | A list of subscriptions.-lsrSubscriptions :: Lens' ListSubscriptionsResponse [Subscription]-lsrSubscriptions = lens _lsrSubscriptions (\s a -> s { _lsrSubscriptions = a }) . _List+instance ToHeaders ListSubscriptions where+ toHeaders = const mempty instance ToPath ListSubscriptions where- toPath = const "/"+ toPath = const "/" instance ToQuery ListSubscriptions where- toQuery ListSubscriptions{..} = mconcat- [ "NextToken" =? _lsNextToken- ]+ toQuery ListSubscriptions'{..}+ = mconcat+ ["Action" =: ("ListSubscriptions" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "NextToken" =: _lsNextToken] -instance ToHeaders ListSubscriptions+-- | Response for ListSubscriptions action+--+-- /See:/ 'listSubscriptionsResponse' smart constructor.+data ListSubscriptionsResponse = ListSubscriptionsResponse'+ { _lsrsNextToken :: !(Maybe Text)+ , _lsrsSubscriptions :: !(Maybe [Subscription])+ , _lsrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest ListSubscriptions where- type Sv ListSubscriptions = SNS- type Rs ListSubscriptions = ListSubscriptionsResponse+-- | Creates a value of 'ListSubscriptionsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lsrsNextToken'+--+-- * 'lsrsSubscriptions'+--+-- * 'lsrsStatus'+listSubscriptionsResponse+ :: Int -- ^ 'lsrsStatus'+ -> ListSubscriptionsResponse+listSubscriptionsResponse pStatus_ =+ ListSubscriptionsResponse'+ { _lsrsNextToken = Nothing+ , _lsrsSubscriptions = Nothing+ , _lsrsStatus = pStatus_+ } - request = post "ListSubscriptions"- response = xmlResponse+-- | Token to pass along to the next 'ListSubscriptions' request. This+-- element is returned if there are more subscriptions to retrieve.+lsrsNextToken :: Lens' ListSubscriptionsResponse (Maybe Text)+lsrsNextToken = lens _lsrsNextToken (\ s a -> s{_lsrsNextToken = a}); -instance FromXML ListSubscriptionsResponse where- parseXML = withElement "ListSubscriptionsResult" $ \x -> ListSubscriptionsResponse- <$> x .@? "NextToken"- <*> x .@? "Subscriptions" .!@ mempty+-- | A list of subscriptions.+lsrsSubscriptions :: Lens' ListSubscriptionsResponse [Subscription]+lsrsSubscriptions = lens _lsrsSubscriptions (\ s a -> s{_lsrsSubscriptions = a}) . _Default . _Coerce; -instance AWSPager ListSubscriptions where- page rq rs- | stop (rs ^. lsrNextToken) = Nothing- | otherwise = (\x -> rq & lsNextToken ?~ x)- <$> (rs ^. lsrNextToken)+-- | The response status code.+lsrsStatus :: Lens' ListSubscriptionsResponse Int+lsrsStatus = lens _lsrsStatus (\ s a -> s{_lsrsStatus = a});
gen/Network/AWS/SNS/ListSubscriptionsByTopic.hs view
@@ -1,138 +1,162 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.ListSubscriptionsByTopic--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Returns a list of the subscriptions to a specific topic. Each call returns a--- limited list of subscriptions, up to 100. If there are more subscriptions, a 'NextToken' is also returned. Use the 'NextToken' parameter in a new 'ListSubscriptionsByTopic' call to get further results.+-- Returns a list of the subscriptions to a specific topic. Each call+-- returns a limited list of subscriptions, up to 100. If there are more+-- subscriptions, a 'NextToken' is also returned. Use the 'NextToken'+-- parameter in a new 'ListSubscriptionsByTopic' call to get further+-- results. ----- <http://docs.aws.amazon.com/sns/latest/api/API_ListSubscriptionsByTopic.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_ListSubscriptionsByTopic.html AWS API Reference> for ListSubscriptionsByTopic.+--+-- This operation returns paginated results. module Network.AWS.SNS.ListSubscriptionsByTopic (- -- * Request- ListSubscriptionsByTopic- -- ** Request constructor- , listSubscriptionsByTopic- -- ** Request lenses+ -- * Creating a Request+ listSubscriptionsByTopic+ , ListSubscriptionsByTopic+ -- * Request Lenses , lsbtNextToken- , lsbtTopicArn+ , lsbtTopicARN - -- * Response- , ListSubscriptionsByTopicResponse- -- ** Response constructor+ -- * Destructuring the Response , listSubscriptionsByTopicResponse- -- ** Response lenses- , lsbtrNextToken- , lsbtrSubscriptions+ , ListSubscriptionsByTopicResponse+ -- * Response Lenses+ , lsbtrsNextToken+ , lsbtrsSubscriptions+ , lsbtrsStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--data ListSubscriptionsByTopic = ListSubscriptionsByTopic- { _lsbtNextToken :: Maybe Text- , _lsbtTopicArn :: Text- } deriving (Eq, Ord, Read, Show)+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'ListSubscriptionsByTopic' constructor.+-- | Input for ListSubscriptionsByTopic action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'listSubscriptionsByTopic' smart constructor.+data ListSubscriptionsByTopic = ListSubscriptionsByTopic'+ { _lsbtNextToken :: !(Maybe Text)+ , _lsbtTopicARN :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListSubscriptionsByTopic' with the minimum fields required to make a request. ----- * 'lsbtNextToken' @::@ 'Maybe' 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'lsbtTopicArn' @::@ 'Text'+-- * 'lsbtNextToken' ---listSubscriptionsByTopic :: Text -- ^ 'lsbtTopicArn'- -> ListSubscriptionsByTopic-listSubscriptionsByTopic p1 = ListSubscriptionsByTopic- { _lsbtTopicArn = p1- , _lsbtNextToken = Nothing+-- * 'lsbtTopicARN'+listSubscriptionsByTopic+ :: Text -- ^ 'lsbtTopicARN'+ -> ListSubscriptionsByTopic+listSubscriptionsByTopic pTopicARN_ =+ ListSubscriptionsByTopic'+ { _lsbtNextToken = Nothing+ , _lsbtTopicARN = pTopicARN_ } -- | Token returned by the previous 'ListSubscriptionsByTopic' request. lsbtNextToken :: Lens' ListSubscriptionsByTopic (Maybe Text)-lsbtNextToken = lens _lsbtNextToken (\s a -> s { _lsbtNextToken = a })+lsbtNextToken = lens _lsbtNextToken (\ s a -> s{_lsbtNextToken = a}); -- | The ARN of the topic for which you wish to find subscriptions.-lsbtTopicArn :: Lens' ListSubscriptionsByTopic Text-lsbtTopicArn = lens _lsbtTopicArn (\s a -> s { _lsbtTopicArn = a })+lsbtTopicARN :: Lens' ListSubscriptionsByTopic Text+lsbtTopicARN = lens _lsbtTopicARN (\ s a -> s{_lsbtTopicARN = a}); -data ListSubscriptionsByTopicResponse = ListSubscriptionsByTopicResponse- { _lsbtrNextToken :: Maybe Text- , _lsbtrSubscriptions :: List "member" Subscription- } deriving (Eq, Read, Show)+instance AWSPager ListSubscriptionsByTopic where+ page rq rs+ | stop (rs ^. lsbtrsNextToken) = Nothing+ | stop (rs ^. lsbtrsSubscriptions) = Nothing+ | otherwise =+ Just $ rq & lsbtNextToken .~ rs ^. lsbtrsNextToken --- | 'ListSubscriptionsByTopicResponse' constructor.+instance AWSRequest ListSubscriptionsByTopic where+ type Sv ListSubscriptionsByTopic = SNS+ type Rs ListSubscriptionsByTopic =+ ListSubscriptionsByTopicResponse+ request = postQuery+ response+ = receiveXMLWrapper "ListSubscriptionsByTopicResult"+ (\ s h x ->+ ListSubscriptionsByTopicResponse' <$>+ (x .@? "NextToken") <*>+ (x .@? "Subscriptions" .!@ mempty >>=+ may (parseXMLList "member"))+ <*> (pure (fromEnum s)))++instance ToHeaders ListSubscriptionsByTopic where+ toHeaders = const mempty++instance ToPath ListSubscriptionsByTopic where+ toPath = const "/"++instance ToQuery ListSubscriptionsByTopic where+ toQuery ListSubscriptionsByTopic'{..}+ = mconcat+ ["Action" =:+ ("ListSubscriptionsByTopic" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "NextToken" =: _lsbtNextToken,+ "TopicArn" =: _lsbtTopicARN]++-- | Response for ListSubscriptionsByTopic action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'listSubscriptionsByTopicResponse' smart constructor.+data ListSubscriptionsByTopicResponse = ListSubscriptionsByTopicResponse'+ { _lsbtrsNextToken :: !(Maybe Text)+ , _lsbtrsSubscriptions :: !(Maybe [Subscription])+ , _lsbtrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListSubscriptionsByTopicResponse' with the minimum fields required to make a request. ----- * 'lsbtrNextToken' @::@ 'Maybe' 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'lsbtrSubscriptions' @::@ ['Subscription']+-- * 'lsbtrsNextToken' ---listSubscriptionsByTopicResponse :: ListSubscriptionsByTopicResponse-listSubscriptionsByTopicResponse = ListSubscriptionsByTopicResponse- { _lsbtrSubscriptions = mempty- , _lsbtrNextToken = Nothing+-- * 'lsbtrsSubscriptions'+--+-- * 'lsbtrsStatus'+listSubscriptionsByTopicResponse+ :: Int -- ^ 'lsbtrsStatus'+ -> ListSubscriptionsByTopicResponse+listSubscriptionsByTopicResponse pStatus_ =+ ListSubscriptionsByTopicResponse'+ { _lsbtrsNextToken = Nothing+ , _lsbtrsSubscriptions = Nothing+ , _lsbtrsStatus = pStatus_ } -- | Token to pass along to the next 'ListSubscriptionsByTopic' request. This -- element is returned if there are more subscriptions to retrieve.-lsbtrNextToken :: Lens' ListSubscriptionsByTopicResponse (Maybe Text)-lsbtrNextToken = lens _lsbtrNextToken (\s a -> s { _lsbtrNextToken = a })+lsbtrsNextToken :: Lens' ListSubscriptionsByTopicResponse (Maybe Text)+lsbtrsNextToken = lens _lsbtrsNextToken (\ s a -> s{_lsbtrsNextToken = a}); -- | A list of subscriptions.-lsbtrSubscriptions :: Lens' ListSubscriptionsByTopicResponse [Subscription]-lsbtrSubscriptions =- lens _lsbtrSubscriptions (\s a -> s { _lsbtrSubscriptions = a })- . _List--instance ToPath ListSubscriptionsByTopic where- toPath = const "/"--instance ToQuery ListSubscriptionsByTopic where- toQuery ListSubscriptionsByTopic{..} = mconcat- [ "NextToken" =? _lsbtNextToken- , "TopicArn" =? _lsbtTopicArn- ]--instance ToHeaders ListSubscriptionsByTopic--instance AWSRequest ListSubscriptionsByTopic where- type Sv ListSubscriptionsByTopic = SNS- type Rs ListSubscriptionsByTopic = ListSubscriptionsByTopicResponse-- request = post "ListSubscriptionsByTopic"- response = xmlResponse--instance FromXML ListSubscriptionsByTopicResponse where- parseXML = withElement "ListSubscriptionsByTopicResult" $ \x -> ListSubscriptionsByTopicResponse- <$> x .@? "NextToken"- <*> x .@? "Subscriptions" .!@ mempty+lsbtrsSubscriptions :: Lens' ListSubscriptionsByTopicResponse [Subscription]+lsbtrsSubscriptions = lens _lsbtrsSubscriptions (\ s a -> s{_lsbtrsSubscriptions = a}) . _Default . _Coerce; -instance AWSPager ListSubscriptionsByTopic where- page rq rs- | stop (rs ^. lsbtrNextToken) = Nothing- | otherwise = (\x -> rq & lsbtNextToken ?~ x)- <$> (rs ^. lsbtrNextToken)+-- | The response status code.+lsbtrsStatus :: Lens' ListSubscriptionsByTopicResponse Int+lsbtrsStatus = lens _lsbtrsStatus (\ s a -> s{_lsbtrsStatus = a});
gen/Network/AWS/SNS/ListTopics.hs view
@@ -1,126 +1,146 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.ListTopics--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Returns a list of the requester's topics. Each call returns a limited list of--- topics, up to 100. If there are more topics, a 'NextToken' is also returned.--- Use the 'NextToken' parameter in a new 'ListTopics' call to get further results.+-- Returns a list of the requester\'s topics. Each call returns a limited+-- list of topics, up to 100. If there are more topics, a 'NextToken' is+-- also returned. Use the 'NextToken' parameter in a new 'ListTopics' call+-- to get further results. ----- <http://docs.aws.amazon.com/sns/latest/api/API_ListTopics.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_ListTopics.html AWS API Reference> for ListTopics.+--+-- This operation returns paginated results. module Network.AWS.SNS.ListTopics (- -- * Request- ListTopics- -- ** Request constructor- , listTopics- -- ** Request lenses+ -- * Creating a Request+ listTopics+ , ListTopics+ -- * Request Lenses , ltNextToken - -- * Response- , ListTopicsResponse- -- ** Response constructor+ -- * Destructuring the Response , listTopicsResponse- -- ** Response lenses- , ltrNextToken- , ltrTopics+ , ListTopicsResponse+ -- * Response Lenses+ , ltrsTopics+ , ltrsNextToken+ , ltrsStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product -newtype ListTopics = ListTopics+-- | /See:/ 'listTopics' smart constructor.+newtype ListTopics = ListTopics' { _ltNextToken :: Maybe Text- } deriving (Eq, Ord, Read, Show, Monoid)+ } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'ListTopics' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'ListTopics' with the minimum fields required to make a request. ----- * 'ltNextToken' @::@ 'Maybe' 'Text'+-- Use one of the following lenses to modify other fields as desired: ---listTopics :: ListTopics-listTopics = ListTopics+-- * 'ltNextToken'+listTopics+ :: ListTopics+listTopics =+ ListTopics' { _ltNextToken = Nothing } -- | Token returned by the previous 'ListTopics' request. ltNextToken :: Lens' ListTopics (Maybe Text)-ltNextToken = lens _ltNextToken (\s a -> s { _ltNextToken = a })--data ListTopicsResponse = ListTopicsResponse- { _ltrNextToken :: Maybe Text- , _ltrTopics :: List "member" Topic- } deriving (Eq, Read, Show)+ltNextToken = lens _ltNextToken (\ s a -> s{_ltNextToken = a}); --- | 'ListTopicsResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'ltrNextToken' @::@ 'Maybe' 'Text'------ * 'ltrTopics' @::@ ['Topic']----listTopicsResponse :: ListTopicsResponse-listTopicsResponse = ListTopicsResponse- { _ltrTopics = mempty- , _ltrNextToken = Nothing- }+instance AWSPager ListTopics where+ page rq rs+ | stop (rs ^. ltrsNextToken) = Nothing+ | stop (rs ^. ltrsTopics) = Nothing+ | otherwise =+ Just $ rq & ltNextToken .~ rs ^. ltrsNextToken --- | Token to pass along to the next 'ListTopics' request. This element is returned--- if there are additional topics to retrieve.-ltrNextToken :: Lens' ListTopicsResponse (Maybe Text)-ltrNextToken = lens _ltrNextToken (\s a -> s { _ltrNextToken = a })+instance AWSRequest ListTopics where+ type Sv ListTopics = SNS+ type Rs ListTopics = ListTopicsResponse+ request = postQuery+ response+ = receiveXMLWrapper "ListTopicsResult"+ (\ s h x ->+ ListTopicsResponse' <$>+ (x .@? "Topics" .!@ mempty >>=+ may (parseXMLList "member"))+ <*> (x .@? "NextToken")+ <*> (pure (fromEnum s))) --- | A list of topic ARNs.-ltrTopics :: Lens' ListTopicsResponse [Topic]-ltrTopics = lens _ltrTopics (\s a -> s { _ltrTopics = a }) . _List+instance ToHeaders ListTopics where+ toHeaders = const mempty instance ToPath ListTopics where- toPath = const "/"+ toPath = const "/" instance ToQuery ListTopics where- toQuery ListTopics{..} = mconcat- [ "NextToken" =? _ltNextToken- ]+ toQuery ListTopics'{..}+ = mconcat+ ["Action" =: ("ListTopics" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "NextToken" =: _ltNextToken] -instance ToHeaders ListTopics+-- | Response for ListTopics action.+--+-- /See:/ 'listTopicsResponse' smart constructor.+data ListTopicsResponse = ListTopicsResponse'+ { _ltrsTopics :: !(Maybe [Topic])+ , _ltrsNextToken :: !(Maybe Text)+ , _ltrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest ListTopics where- type Sv ListTopics = SNS- type Rs ListTopics = ListTopicsResponse+-- | Creates a value of 'ListTopicsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ltrsTopics'+--+-- * 'ltrsNextToken'+--+-- * 'ltrsStatus'+listTopicsResponse+ :: Int -- ^ 'ltrsStatus'+ -> ListTopicsResponse+listTopicsResponse pStatus_ =+ ListTopicsResponse'+ { _ltrsTopics = Nothing+ , _ltrsNextToken = Nothing+ , _ltrsStatus = pStatus_+ } - request = post "ListTopics"- response = xmlResponse+-- | A list of topic ARNs.+ltrsTopics :: Lens' ListTopicsResponse [Topic]+ltrsTopics = lens _ltrsTopics (\ s a -> s{_ltrsTopics = a}) . _Default . _Coerce; -instance FromXML ListTopicsResponse where- parseXML = withElement "ListTopicsResult" $ \x -> ListTopicsResponse- <$> x .@? "NextToken"- <*> x .@? "Topics" .!@ mempty+-- | Token to pass along to the next 'ListTopics' request. This element is+-- returned if there are additional topics to retrieve.+ltrsNextToken :: Lens' ListTopicsResponse (Maybe Text)+ltrsNextToken = lens _ltrsNextToken (\ s a -> s{_ltrsNextToken = a}); -instance AWSPager ListTopics where- page rq rs- | stop (rs ^. ltrNextToken) = Nothing- | otherwise = (\x -> rq & ltNextToken ?~ x)- <$> (rs ^. ltrNextToken)+-- | The response status code.+ltrsStatus :: Lens' ListTopicsResponse Int+ltrsStatus = lens _ltrsStatus (\ s a -> s{_ltrsStatus = a});
gen/Network/AWS/SNS/Publish.hs view
@@ -1,212 +1,241 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.Publish--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Sends a message to all of a topic's subscribed endpoints. When a 'messageId' is--- returned, the message has been saved and Amazon SNS will attempt to deliver--- it to the topic's subscribers shortly. The format of the outgoing message to--- each subscribed endpoint depends on the notification protocol selected.+-- Sends a message to all of a topic\'s subscribed endpoints. When a+-- 'messageId' is returned, the message has been saved and Amazon SNS will+-- attempt to deliver it to the topic\'s subscribers shortly. The format of+-- the outgoing message to each subscribed endpoint depends on the+-- notification protocol selected. ----- To use the 'Publish' action for sending a message to a mobile endpoint, such--- as an app on a Kindle device or mobile phone, you must specify the--- EndpointArn. The EndpointArn is returned when making a call with the 'CreatePlatformEndpoint' action. The second example below shows a request and response for publishing--- to a mobile endpoint.+-- To use the 'Publish' action for sending a message to a mobile endpoint,+-- such as an app on a Kindle device or mobile phone, you must specify the+-- EndpointArn. The EndpointArn is returned when making a call with the+-- 'CreatePlatformEndpoint' action. The second example below shows a+-- request and response for publishing to a mobile endpoint. ----- <http://docs.aws.amazon.com/sns/latest/api/API_Publish.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_Publish.html AWS API Reference> for Publish. module Network.AWS.SNS.Publish (- -- * Request- Publish- -- ** Request constructor- , publish- -- ** Request lenses- , pMessage+ -- * Creating a Request+ publish+ , Publish+ -- * Request Lenses , pMessageAttributes- , pMessageStructure+ , pTargetARN , pSubject- , pTargetArn- , pTopicArn+ , pTopicARN+ , pMessageStructure+ , pMessage - -- * Response- , PublishResponse- -- ** Response constructor+ -- * Destructuring the Response , publishResponse- -- ** Response lenses- , prMessageId+ , PublishResponse+ -- * Response Lenses+ , prsMessageId+ , prsStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--data Publish = Publish- { _pMessage :: Text- , _pMessageAttributes :: EMap "entry" "Name" "Value" Text MessageAttributeValue- , _pMessageStructure :: Maybe Text- , _pSubject :: Maybe Text- , _pTargetArn :: Maybe Text- , _pTopicArn :: Maybe Text- } deriving (Eq, Read, Show)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'Publish' constructor.+-- | Input for Publish action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'publish' smart constructor.+data Publish = Publish'+ { _pMessageAttributes :: !(Maybe (Map Text MessageAttributeValue))+ , _pTargetARN :: !(Maybe Text)+ , _pSubject :: !(Maybe Text)+ , _pTopicARN :: !(Maybe Text)+ , _pMessageStructure :: !(Maybe Text)+ , _pMessage :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Publish' with the minimum fields required to make a request. ----- * 'pMessage' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'pMessageAttributes' @::@ 'HashMap' 'Text' 'MessageAttributeValue'+-- * 'pMessageAttributes' ----- * 'pMessageStructure' @::@ 'Maybe' 'Text'+-- * 'pTargetARN' ----- * 'pSubject' @::@ 'Maybe' 'Text'+-- * 'pSubject' ----- * 'pTargetArn' @::@ 'Maybe' 'Text'+-- * 'pTopicARN' ----- * 'pTopicArn' @::@ 'Maybe' 'Text'+-- * 'pMessageStructure' ---publish :: Text -- ^ 'pMessage'- -> Publish-publish p1 = Publish- { _pMessage = p1- , _pTopicArn = Nothing- , _pTargetArn = Nothing- , _pSubject = Nothing- , _pMessageStructure = Nothing- , _pMessageAttributes = mempty+-- * 'pMessage'+publish+ :: Text -- ^ 'pMessage'+ -> Publish+publish pMessage_ =+ Publish'+ { _pMessageAttributes = Nothing+ , _pTargetARN = Nothing+ , _pSubject = Nothing+ , _pTopicARN = Nothing+ , _pMessageStructure = Nothing+ , _pMessage = pMessage_ } --- | The message you want to send to the topic.------ If you want to send the same message to all transport protocols, include the--- text of the message as a String value.------ If you want to send different messages for each transport protocol, set the--- value of the 'MessageStructure' parameter to 'json' and use a JSON object for the 'Message' parameter. See the Examples section for the format of the JSON--- object.------ Constraints: Messages must be UTF-8 encoded strings at most 256 KB in size--- (262144 bytes, not 262144 characters).------ JSON-specific constraints: Keys in the JSON object that correspond to--- supported transport protocols must have simple JSON string values. The--- values will be parsed (unescaped) before they are used in outgoing messages. Outbound notifications are JSON encoded (meaning that the characters will be reescaped for sending).--- Values have a minimum length of 0 (the empty string, "", is allowed). Values--- have a maximum length bounded by the overall message size (so, including--- multiple protocols may limit message sizes). Non-string values will cause the--- key to be ignored. Keys that do not correspond to supported transport--- protocols are ignored. Duplicate keys are not allowed. Failure to parse or--- validate any key or value in the message will cause the 'Publish' call to--- return an error (no partial delivery).-pMessage :: Lens' Publish Text-pMessage = lens _pMessage (\s a -> s { _pMessage = a })- -- | Message attributes for Publish action. pMessageAttributes :: Lens' Publish (HashMap Text MessageAttributeValue)-pMessageAttributes =- lens _pMessageAttributes (\s a -> s { _pMessageAttributes = a })- . _EMap+pMessageAttributes = lens _pMessageAttributes (\ s a -> s{_pMessageAttributes = a}) . _Default . _Map; --- | Set 'MessageStructure' to 'json' if you want to send a different message for each--- protocol. For example, using one publish action, you can send a short message--- to your SMS subscribers and a longer message to your email subscribers. If--- you set 'MessageStructure' to 'json', the value of the 'Message' parameter must:+-- | Either TopicArn or EndpointArn, but not both.+pTargetARN :: Lens' Publish (Maybe Text)+pTargetARN = lens _pTargetARN (\ s a -> s{_pTargetARN = a});++-- | Optional parameter to be used as the \"Subject\" line when the message+-- is delivered to email endpoints. This field will also be included, if+-- present, in the standard JSON messages delivered to other endpoints. ----- be a syntactically valid JSON object; and contain at least a top-level JSON--- key of "default" with a value that is a string. You can define other--- top-level keys that define the message you want to send to a specific--- transport protocol (e.g., "http").+-- Constraints: Subjects must be ASCII text that begins with a letter,+-- number, or punctuation mark; must not include line breaks or control+-- characters; and must be less than 100 characters long.+pSubject :: Lens' Publish (Maybe Text)+pSubject = lens _pSubject (\ s a -> s{_pSubject = a});++-- | The topic you want to publish to.+pTopicARN :: Lens' Publish (Maybe Text)+pTopicARN = lens _pTopicARN (\ s a -> s{_pTopicARN = a});++-- | Set 'MessageStructure' to 'json' if you want to send a different message+-- for each protocol. For example, using one publish action, you can send a+-- short message to your SMS subscribers and a longer message to your email+-- subscribers. If you set 'MessageStructure' to 'json', the value of the+-- 'Message' parameter must: ----- For information about sending different messages for each protocol using the--- AWS Management Console, go to <http://docs.aws.amazon.com/sns/latest/gsg/Publish.html#sns-message-formatting-by-protocol Create Different Messages for Each Protocol> in--- the /Amazon Simple Notification Service Getting Started Guide/.+-- - be a syntactically valid JSON object; and+-- - contain at least a top-level JSON key of \"default\" with a value+-- that is a string. --+-- You can define other top-level keys that define the message you want to+-- send to a specific transport protocol (e.g., \"http\").+--+-- For information about sending different messages for each protocol using+-- the AWS Management Console, go to+-- <http://docs.aws.amazon.com/sns/latest/gsg/Publish.html#sns-message-formatting-by-protocol Create Different Messages for Each Protocol>+-- in the /Amazon Simple Notification Service Getting Started Guide/.+-- -- Valid value: 'json' pMessageStructure :: Lens' Publish (Maybe Text)-pMessageStructure =- lens _pMessageStructure (\s a -> s { _pMessageStructure = a })+pMessageStructure = lens _pMessageStructure (\ s a -> s{_pMessageStructure = a}); --- | Optional parameter to be used as the "Subject" line when the message is--- delivered to email endpoints. This field will also be included, if present,--- in the standard JSON messages delivered to other endpoints.+-- | The message you want to send to the topic. ----- Constraints: Subjects must be ASCII text that begins with a letter, number,--- or punctuation mark; must not include line breaks or control characters; and--- must be less than 100 characters long.-pSubject :: Lens' Publish (Maybe Text)-pSubject = lens _pSubject (\s a -> s { _pSubject = a })+-- If you want to send the same message to all transport protocols, include+-- the text of the message as a String value.+--+-- If you want to send different messages for each transport protocol, set+-- the value of the 'MessageStructure' parameter to 'json' and use a JSON+-- object for the 'Message' parameter. See the Examples section for the+-- format of the JSON object.+--+-- Constraints: Messages must be UTF-8 encoded strings at most 256 KB in+-- size (262144 bytes, not 262144 characters).+--+-- JSON-specific constraints:+--+-- - Keys in the JSON object that correspond to supported transport+-- protocols must have simple JSON string values.+-- - The values will be parsed (unescaped) before they are used in+-- outgoing messages.+-- - Outbound notifications are JSON encoded (meaning that the characters+-- will be reescaped for sending).+-- - Values have a minimum length of 0 (the empty string, \"\", is+-- allowed).+-- - Values have a maximum length bounded by the overall message size+-- (so, including multiple protocols may limit message sizes).+-- - Non-string values will cause the key to be ignored.+-- - Keys that do not correspond to supported transport protocols are+-- ignored.+-- - Duplicate keys are not allowed.+-- - Failure to parse or validate any key or value in the message will+-- cause the 'Publish' call to return an error (no partial delivery).+pMessage :: Lens' Publish Text+pMessage = lens _pMessage (\ s a -> s{_pMessage = a}); --- | Either TopicArn or EndpointArn, but not both.-pTargetArn :: Lens' Publish (Maybe Text)-pTargetArn = lens _pTargetArn (\s a -> s { _pTargetArn = a })+instance AWSRequest Publish where+ type Sv Publish = SNS+ type Rs Publish = PublishResponse+ request = postQuery+ response+ = receiveXMLWrapper "PublishResult"+ (\ s h x ->+ PublishResponse' <$>+ (x .@? "MessageId") <*> (pure (fromEnum s))) --- | The topic you want to publish to.-pTopicArn :: Lens' Publish (Maybe Text)-pTopicArn = lens _pTopicArn (\s a -> s { _pTopicArn = a })+instance ToHeaders Publish where+ toHeaders = const mempty -newtype PublishResponse = PublishResponse- { _prMessageId :: Maybe Text- } deriving (Eq, Ord, Read, Show, Monoid)+instance ToPath Publish where+ toPath = const "/" --- | 'PublishResponse' constructor.+instance ToQuery Publish where+ toQuery Publish'{..}+ = mconcat+ ["Action" =: ("Publish" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "MessageAttributes" =:+ toQuery+ (toQueryMap "entry" "Name" "Value" <$>+ _pMessageAttributes),+ "TargetArn" =: _pTargetARN, "Subject" =: _pSubject,+ "TopicArn" =: _pTopicARN,+ "MessageStructure" =: _pMessageStructure,+ "Message" =: _pMessage]++-- | Response for Publish action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'publishResponse' smart constructor.+data PublishResponse = PublishResponse'+ { _prsMessageId :: !(Maybe Text)+ , _prsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'PublishResponse' with the minimum fields required to make a request. ----- * 'prMessageId' @::@ 'Maybe' 'Text'+-- Use one of the following lenses to modify other fields as desired: ---publishResponse :: PublishResponse-publishResponse = PublishResponse- { _prMessageId = Nothing+-- * 'prsMessageId'+--+-- * 'prsStatus'+publishResponse+ :: Int -- ^ 'prsStatus'+ -> PublishResponse+publishResponse pStatus_ =+ PublishResponse'+ { _prsMessageId = Nothing+ , _prsStatus = pStatus_ } -- | Unique identifier assigned to the published message. -- -- Length Constraint: Maximum 100 characters-prMessageId :: Lens' PublishResponse (Maybe Text)-prMessageId = lens _prMessageId (\s a -> s { _prMessageId = a })--instance ToPath Publish where- toPath = const "/"--instance ToQuery Publish where- toQuery Publish{..} = mconcat- [ "Message" =? _pMessage- , "MessageAttributes" =? _pMessageAttributes- , "MessageStructure" =? _pMessageStructure- , "Subject" =? _pSubject- , "TargetArn" =? _pTargetArn- , "TopicArn" =? _pTopicArn- ]--instance ToHeaders Publish--instance AWSRequest Publish where- type Sv Publish = SNS- type Rs Publish = PublishResponse-- request = post "Publish"- response = xmlResponse+prsMessageId :: Lens' PublishResponse (Maybe Text)+prsMessageId = lens _prsMessageId (\ s a -> s{_prsMessageId = a}); -instance FromXML PublishResponse where- parseXML = withElement "PublishResult" $ \x -> PublishResponse- <$> x .@? "MessageId"+-- | The response status code.+prsStatus :: Lens' PublishResponse Int+prsStatus = lens _prsStatus (\ s a -> s{_prsStatus = a});
gen/Network/AWS/SNS/RemovePermission.hs view
@@ -1,101 +1,105 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.RemovePermission--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Removes a statement from a topic's access control policy.+-- Removes a statement from a topic\'s access control policy. ----- <http://docs.aws.amazon.com/sns/latest/api/API_RemovePermission.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_RemovePermission.html AWS API Reference> for RemovePermission. module Network.AWS.SNS.RemovePermission (- -- * Request- RemovePermission- -- ** Request constructor- , removePermission- -- ** Request lenses+ -- * Creating a Request+ removePermission+ , RemovePermission+ -- * Request Lenses+ , rpTopicARN , rpLabel- , rpTopicArn - -- * Response- , RemovePermissionResponse- -- ** Response constructor+ -- * Destructuring the Response , removePermissionResponse+ , RemovePermissionResponse ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--data RemovePermission = RemovePermission- { _rpLabel :: Text- , _rpTopicArn :: Text- } deriving (Eq, Ord, Read, Show)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'RemovePermission' constructor.+-- | Input for RemovePermission action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'removePermission' smart constructor.+data RemovePermission = RemovePermission'+ { _rpTopicARN :: !Text+ , _rpLabel :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'RemovePermission' with the minimum fields required to make a request. ----- * 'rpLabel' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'rpTopicArn' @::@ 'Text'+-- * 'rpTopicARN' ---removePermission :: Text -- ^ 'rpTopicArn'- -> Text -- ^ 'rpLabel'- -> RemovePermission-removePermission p1 p2 = RemovePermission- { _rpTopicArn = p1- , _rpLabel = p2+-- * 'rpLabel'+removePermission+ :: Text -- ^ 'rpTopicARN'+ -> Text -- ^ 'rpLabel'+ -> RemovePermission+removePermission pTopicARN_ pLabel_ =+ RemovePermission'+ { _rpTopicARN = pTopicARN_+ , _rpLabel = pLabel_ } +-- | The ARN of the topic whose access control policy you wish to modify.+rpTopicARN :: Lens' RemovePermission Text+rpTopicARN = lens _rpTopicARN (\ s a -> s{_rpTopicARN = a});+ -- | The unique label of the statement you want to remove. rpLabel :: Lens' RemovePermission Text-rpLabel = lens _rpLabel (\s a -> s { _rpLabel = a })---- | The ARN of the topic whose access control policy you wish to modify.-rpTopicArn :: Lens' RemovePermission Text-rpTopicArn = lens _rpTopicArn (\s a -> s { _rpTopicArn = a })+rpLabel = lens _rpLabel (\ s a -> s{_rpLabel = a}); -data RemovePermissionResponse = RemovePermissionResponse- deriving (Eq, Ord, Read, Show, Generic)+instance AWSRequest RemovePermission where+ type Sv RemovePermission = SNS+ type Rs RemovePermission = RemovePermissionResponse+ request = postQuery+ response = receiveNull RemovePermissionResponse' --- | 'RemovePermissionResponse' constructor.-removePermissionResponse :: RemovePermissionResponse-removePermissionResponse = RemovePermissionResponse+instance ToHeaders RemovePermission where+ toHeaders = const mempty instance ToPath RemovePermission where- toPath = const "/"+ toPath = const "/" instance ToQuery RemovePermission where- toQuery RemovePermission{..} = mconcat- [ "Label" =? _rpLabel- , "TopicArn" =? _rpTopicArn- ]--instance ToHeaders RemovePermission+ toQuery RemovePermission'{..}+ = mconcat+ ["Action" =: ("RemovePermission" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "TopicArn" =: _rpTopicARN, "Label" =: _rpLabel] -instance AWSRequest RemovePermission where- type Sv RemovePermission = SNS- type Rs RemovePermission = RemovePermissionResponse+-- | /See:/ 'removePermissionResponse' smart constructor.+data RemovePermissionResponse =+ RemovePermissionResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic) - request = post "RemovePermission"- response = nullResponse RemovePermissionResponse+-- | Creates a value of 'RemovePermissionResponse' with the minimum fields required to make a request.+--+removePermissionResponse+ :: RemovePermissionResponse+removePermissionResponse = RemovePermissionResponse'
gen/Network/AWS/SNS/SetEndpointAttributes.hs view
@@ -1,112 +1,123 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.SetEndpointAttributes--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Sets the attributes for an endpoint for a device on one of the supported push--- notification services, such as GCM and APNS. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html UsingAmazon SNS Mobile Push Notifications>.+-- Sets the attributes for an endpoint for a device on one of the supported+-- push notification services, such as GCM and APNS. For more information,+-- see+-- <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>. ----- <http://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html AWS API Reference> for SetEndpointAttributes. module Network.AWS.SNS.SetEndpointAttributes (- -- * Request- SetEndpointAttributes- -- ** Request constructor- , setEndpointAttributes- -- ** Request lenses+ -- * Creating a Request+ setEndpointAttributes+ , SetEndpointAttributes+ -- * Request Lenses+ , seaEndpointARN , seaAttributes- , seaEndpointArn - -- * Response- , SetEndpointAttributesResponse- -- ** Response constructor+ -- * Destructuring the Response , setEndpointAttributesResponse+ , SetEndpointAttributesResponse ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--data SetEndpointAttributes = SetEndpointAttributes- { _seaAttributes :: EMap "entry" "key" "value" Text Text- , _seaEndpointArn :: Text- } deriving (Eq, Read, Show)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'SetEndpointAttributes' constructor.+-- | Input for SetEndpointAttributes action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'setEndpointAttributes' smart constructor.+data SetEndpointAttributes = SetEndpointAttributes'+ { _seaEndpointARN :: !Text+ , _seaAttributes :: !(Map Text Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'SetEndpointAttributes' with the minimum fields required to make a request. ----- * 'seaAttributes' @::@ 'HashMap' 'Text' 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'seaEndpointArn' @::@ 'Text'+-- * 'seaEndpointARN' ---setEndpointAttributes :: Text -- ^ 'seaEndpointArn'- -> SetEndpointAttributes-setEndpointAttributes p1 = SetEndpointAttributes- { _seaEndpointArn = p1- , _seaAttributes = mempty+-- * 'seaAttributes'+setEndpointAttributes+ :: Text -- ^ 'seaEndpointARN'+ -> SetEndpointAttributes+setEndpointAttributes pEndpointARN_ =+ SetEndpointAttributes'+ { _seaEndpointARN = pEndpointARN_+ , _seaAttributes = mempty } +-- | EndpointArn used for SetEndpointAttributes action.+seaEndpointARN :: Lens' SetEndpointAttributes Text+seaEndpointARN = lens _seaEndpointARN (\ s a -> s{_seaEndpointARN = a});+ -- | A map of the endpoint attributes. Attributes in this map include the -- following: ----- 'CustomUserData' -- arbitrary user data to associate with the endpoint.--- Amazon SNS does not use this data. The data must be in UTF-8 format and less--- than 2KB. 'Enabled' -- flag that enables/disables delivery to the endpoint.--- Amazon SNS will set this to false when a notification service indicates to--- Amazon SNS that the endpoint is invalid. Users can set it back to true,--- typically after updating Token. 'Token' -- device token, also referred to as a--- registration id, for an app and mobile device. This is returned from the--- notification service when an app and mobile device are registered with the--- notification service.+-- - 'CustomUserData' -- arbitrary user data to associate with the+-- endpoint. Amazon SNS does not use this data. The data must be in+-- UTF-8 format and less than 2KB.+-- - 'Enabled' -- flag that enables\/disables delivery to the endpoint.+-- Amazon SNS will set this to false when a notification service+-- indicates to Amazon SNS that the endpoint is invalid. Users can set+-- it back to true, typically after updating Token.+-- - 'Token' -- device token, also referred to as a registration id, for+-- an app and mobile device. This is returned from the notification+-- service when an app and mobile device are registered with the+-- notification service. seaAttributes :: Lens' SetEndpointAttributes (HashMap Text Text)-seaAttributes = lens _seaAttributes (\s a -> s { _seaAttributes = a }) . _EMap---- | EndpointArn used for SetEndpointAttributes action.-seaEndpointArn :: Lens' SetEndpointAttributes Text-seaEndpointArn = lens _seaEndpointArn (\s a -> s { _seaEndpointArn = a })+seaAttributes = lens _seaAttributes (\ s a -> s{_seaAttributes = a}) . _Map; -data SetEndpointAttributesResponse = SetEndpointAttributesResponse- deriving (Eq, Ord, Read, Show, Generic)+instance AWSRequest SetEndpointAttributes where+ type Sv SetEndpointAttributes = SNS+ type Rs SetEndpointAttributes =+ SetEndpointAttributesResponse+ request = postQuery+ response = receiveNull SetEndpointAttributesResponse' --- | 'SetEndpointAttributesResponse' constructor.-setEndpointAttributesResponse :: SetEndpointAttributesResponse-setEndpointAttributesResponse = SetEndpointAttributesResponse+instance ToHeaders SetEndpointAttributes where+ toHeaders = const mempty instance ToPath SetEndpointAttributes where- toPath = const "/"+ toPath = const "/" instance ToQuery SetEndpointAttributes where- toQuery SetEndpointAttributes{..} = mconcat- [ "Attributes" =? _seaAttributes- , "EndpointArn" =? _seaEndpointArn- ]--instance ToHeaders SetEndpointAttributes+ toQuery SetEndpointAttributes'{..}+ = mconcat+ ["Action" =: ("SetEndpointAttributes" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "EndpointArn" =: _seaEndpointARN,+ "Attributes" =:+ toQueryMap "entry" "key" "value" _seaAttributes] -instance AWSRequest SetEndpointAttributes where- type Sv SetEndpointAttributes = SNS- type Rs SetEndpointAttributes = SetEndpointAttributesResponse+-- | /See:/ 'setEndpointAttributesResponse' smart constructor.+data SetEndpointAttributesResponse =+ SetEndpointAttributesResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic) - request = post "SetEndpointAttributes"- response = nullResponse SetEndpointAttributesResponse+-- | Creates a value of 'SetEndpointAttributesResponse' with the minimum fields required to make a request.+--+setEndpointAttributesResponse+ :: SetEndpointAttributesResponse+setEndpointAttributesResponse = SetEndpointAttributesResponse'
gen/Network/AWS/SNS/SetPlatformApplicationAttributes.hs view
@@ -1,116 +1,138 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.SetPlatformApplicationAttributes--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Sets the attributes of the platform application object for the supported push--- notification services, such as APNS and GCM. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html UsingAmazon SNS Mobile Push Notifications>.+-- Sets the attributes of the platform application object for the supported+-- push notification services, such as APNS and GCM. For more information,+-- see+-- <http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html Using Amazon SNS Mobile Push Notifications>. ----- <http://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html AWS API Reference> for SetPlatformApplicationAttributes. module Network.AWS.SNS.SetPlatformApplicationAttributes (- -- * Request- SetPlatformApplicationAttributes- -- ** Request constructor- , setPlatformApplicationAttributes- -- ** Request lenses+ -- * Creating a Request+ setPlatformApplicationAttributes+ , SetPlatformApplicationAttributes+ -- * Request Lenses+ , spaaPlatformApplicationARN , spaaAttributes- , spaaPlatformApplicationArn - -- * Response- , SetPlatformApplicationAttributesResponse- -- ** Response constructor+ -- * Destructuring the Response , setPlatformApplicationAttributesResponse+ , SetPlatformApplicationAttributesResponse ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--data SetPlatformApplicationAttributes = SetPlatformApplicationAttributes- { _spaaAttributes :: EMap "entry" "key" "value" Text Text- , _spaaPlatformApplicationArn :: Text- } deriving (Eq, Read, Show)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'SetPlatformApplicationAttributes' constructor.+-- | Input for SetPlatformApplicationAttributes action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'setPlatformApplicationAttributes' smart constructor.+data SetPlatformApplicationAttributes = SetPlatformApplicationAttributes'+ { _spaaPlatformApplicationARN :: !Text+ , _spaaAttributes :: !(Map Text Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'SetPlatformApplicationAttributes' with the minimum fields required to make a request. ----- * 'spaaAttributes' @::@ 'HashMap' 'Text' 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'spaaPlatformApplicationArn' @::@ 'Text'+-- * 'spaaPlatformApplicationARN' ---setPlatformApplicationAttributes :: Text -- ^ 'spaaPlatformApplicationArn'- -> SetPlatformApplicationAttributes-setPlatformApplicationAttributes p1 = SetPlatformApplicationAttributes- { _spaaPlatformApplicationArn = p1- , _spaaAttributes = mempty+-- * 'spaaAttributes'+setPlatformApplicationAttributes+ :: Text -- ^ 'spaaPlatformApplicationARN'+ -> SetPlatformApplicationAttributes+setPlatformApplicationAttributes pPlatformApplicationARN_ =+ SetPlatformApplicationAttributes'+ { _spaaPlatformApplicationARN = pPlatformApplicationARN_+ , _spaaAttributes = mempty } --- | A map of the platform application attributes. Attributes in this map include--- the following:------ 'PlatformCredential' -- The credential received from the notification--- service. For APNS/APNS_SANDBOX, PlatformCredential is "private key". For GCM,--- PlatformCredential is "API key". For ADM, PlatformCredential is "client--- secret". 'PlatformPrincipal' -- The principal received from the notification--- service. For APNS/APNS_SANDBOX, PlatformPrincipal is "SSL certificate". For--- GCM, PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is--- "client id". 'EventEndpointCreated' -- Topic ARN to which EndpointCreated--- event notifications should be sent. 'EventEndpointDeleted' -- Topic ARN to--- which EndpointDeleted event notifications should be sent. 'EventEndpointUpdated' -- Topic ARN to which EndpointUpdate event notifications should be sent. 'EventDeliveryFailure' -- Topic ARN to which DeliveryFailure event notifications should be sent--- upon Direct Publish delivery failure (permanent) to one of the application's--- endpoints.-spaaAttributes :: Lens' SetPlatformApplicationAttributes (HashMap Text Text)-spaaAttributes = lens _spaaAttributes (\s a -> s { _spaaAttributes = a }) . _EMap- -- | PlatformApplicationArn for SetPlatformApplicationAttributes action.-spaaPlatformApplicationArn :: Lens' SetPlatformApplicationAttributes Text-spaaPlatformApplicationArn =- lens _spaaPlatformApplicationArn- (\s a -> s { _spaaPlatformApplicationArn = a })+spaaPlatformApplicationARN :: Lens' SetPlatformApplicationAttributes Text+spaaPlatformApplicationARN = lens _spaaPlatformApplicationARN (\ s a -> s{_spaaPlatformApplicationARN = a}); -data SetPlatformApplicationAttributesResponse = SetPlatformApplicationAttributesResponse- deriving (Eq, Ord, Read, Show, Generic)+-- | A map of the platform application attributes. Attributes in this map+-- include the following:+--+-- - 'PlatformCredential' -- The credential received from the+-- notification service. For APNS\/APNS_SANDBOX, PlatformCredential is+-- \"private key\". For GCM, PlatformCredential is \"API key\". For+-- ADM, PlatformCredential is \"client secret\".+-- - 'PlatformPrincipal' -- The principal received from the notification+-- service. For APNS\/APNS_SANDBOX, PlatformPrincipal is \"SSL+-- certificate\". For GCM, PlatformPrincipal is not applicable. For+-- ADM, PlatformPrincipal is \"client id\".+-- - 'EventEndpointCreated' -- Topic ARN to which EndpointCreated event+-- notifications should be sent.+-- - 'EventEndpointDeleted' -- Topic ARN to which EndpointDeleted event+-- notifications should be sent.+-- - 'EventEndpointUpdated' -- Topic ARN to which EndpointUpdate event+-- notifications should be sent.+-- - 'EventDeliveryFailure' -- Topic ARN to which DeliveryFailure event+-- notifications should be sent upon Direct Publish delivery failure+-- (permanent) to one of the application\'s endpoints.+spaaAttributes :: Lens' SetPlatformApplicationAttributes (HashMap Text Text)+spaaAttributes = lens _spaaAttributes (\ s a -> s{_spaaAttributes = a}) . _Map; --- | 'SetPlatformApplicationAttributesResponse' constructor.-setPlatformApplicationAttributesResponse :: SetPlatformApplicationAttributesResponse-setPlatformApplicationAttributesResponse = SetPlatformApplicationAttributesResponse+instance AWSRequest SetPlatformApplicationAttributes+ where+ type Sv SetPlatformApplicationAttributes = SNS+ type Rs SetPlatformApplicationAttributes =+ SetPlatformApplicationAttributesResponse+ request = postQuery+ response+ = receiveNull+ SetPlatformApplicationAttributesResponse' -instance ToPath SetPlatformApplicationAttributes where- toPath = const "/"+instance ToHeaders SetPlatformApplicationAttributes+ where+ toHeaders = const mempty -instance ToQuery SetPlatformApplicationAttributes where- toQuery SetPlatformApplicationAttributes{..} = mconcat- [ "Attributes" =? _spaaAttributes- , "PlatformApplicationArn" =? _spaaPlatformApplicationArn- ]+instance ToPath SetPlatformApplicationAttributes+ where+ toPath = const "/" -instance ToHeaders SetPlatformApplicationAttributes+instance ToQuery SetPlatformApplicationAttributes+ where+ toQuery SetPlatformApplicationAttributes'{..}+ = mconcat+ ["Action" =:+ ("SetPlatformApplicationAttributes" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "PlatformApplicationArn" =:+ _spaaPlatformApplicationARN,+ "Attributes" =:+ toQueryMap "entry" "key" "value" _spaaAttributes] -instance AWSRequest SetPlatformApplicationAttributes where- type Sv SetPlatformApplicationAttributes = SNS- type Rs SetPlatformApplicationAttributes = SetPlatformApplicationAttributesResponse+-- | /See:/ 'setPlatformApplicationAttributesResponse' smart constructor.+data SetPlatformApplicationAttributesResponse =+ SetPlatformApplicationAttributesResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic) - request = post "SetPlatformApplicationAttributes"- response = nullResponse SetPlatformApplicationAttributesResponse+-- | Creates a value of 'SetPlatformApplicationAttributesResponse' with the minimum fields required to make a request.+--+setPlatformApplicationAttributesResponse+ :: SetPlatformApplicationAttributesResponse+setPlatformApplicationAttributesResponse =+ SetPlatformApplicationAttributesResponse'
gen/Network/AWS/SNS/SetSubscriptionAttributes.hs view
@@ -1,116 +1,123 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.SetSubscriptionAttributes--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Allows a subscription owner to set an attribute of the topic to a new value.+-- Allows a subscription owner to set an attribute of the topic to a new+-- value. ----- <http://docs.aws.amazon.com/sns/latest/api/API_SetSubscriptionAttributes.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_SetSubscriptionAttributes.html AWS API Reference> for SetSubscriptionAttributes. module Network.AWS.SNS.SetSubscriptionAttributes (- -- * Request- SetSubscriptionAttributes- -- ** Request constructor- , setSubscriptionAttributes- -- ** Request lenses- , ssaAttributeName+ -- * Creating a Request+ setSubscriptionAttributes+ , SetSubscriptionAttributes+ -- * Request Lenses , ssaAttributeValue- , ssaSubscriptionArn+ , ssaSubscriptionARN+ , ssaAttributeName - -- * Response- , SetSubscriptionAttributesResponse- -- ** Response constructor+ -- * Destructuring the Response , setSubscriptionAttributesResponse+ , SetSubscriptionAttributesResponse ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--data SetSubscriptionAttributes = SetSubscriptionAttributes- { _ssaAttributeName :: Text- , _ssaAttributeValue :: Maybe Text- , _ssaSubscriptionArn :: Text- } deriving (Eq, Ord, Read, Show)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'SetSubscriptionAttributes' constructor.+-- | Input for SetSubscriptionAttributes action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'setSubscriptionAttributes' smart constructor.+data SetSubscriptionAttributes = SetSubscriptionAttributes'+ { _ssaAttributeValue :: !(Maybe Text)+ , _ssaSubscriptionARN :: !Text+ , _ssaAttributeName :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'SetSubscriptionAttributes' with the minimum fields required to make a request. ----- * 'ssaAttributeName' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'ssaAttributeValue' @::@ 'Maybe' 'Text'+-- * 'ssaAttributeValue' ----- * 'ssaSubscriptionArn' @::@ 'Text'+-- * 'ssaSubscriptionARN' ---setSubscriptionAttributes :: Text -- ^ 'ssaSubscriptionArn'- -> Text -- ^ 'ssaAttributeName'- -> SetSubscriptionAttributes-setSubscriptionAttributes p1 p2 = SetSubscriptionAttributes- { _ssaSubscriptionArn = p1- , _ssaAttributeName = p2- , _ssaAttributeValue = Nothing+-- * 'ssaAttributeName'+setSubscriptionAttributes+ :: Text -- ^ 'ssaSubscriptionARN'+ -> Text -- ^ 'ssaAttributeName'+ -> SetSubscriptionAttributes+setSubscriptionAttributes pSubscriptionARN_ pAttributeName_ =+ SetSubscriptionAttributes'+ { _ssaAttributeValue = Nothing+ , _ssaSubscriptionARN = pSubscriptionARN_+ , _ssaAttributeName = pAttributeName_ } --- | The name of the attribute you want to set. Only a subset of the subscriptions--- attributes are mutable.------ Valid values: 'DeliveryPolicy' | 'RawMessageDelivery'-ssaAttributeName :: Lens' SetSubscriptionAttributes Text-ssaAttributeName = lens _ssaAttributeName (\s a -> s { _ssaAttributeName = a })- -- | The new value for the attribute in JSON format. ssaAttributeValue :: Lens' SetSubscriptionAttributes (Maybe Text)-ssaAttributeValue =- lens _ssaAttributeValue (\s a -> s { _ssaAttributeValue = a })+ssaAttributeValue = lens _ssaAttributeValue (\ s a -> s{_ssaAttributeValue = a}); -- | The ARN of the subscription to modify.-ssaSubscriptionArn :: Lens' SetSubscriptionAttributes Text-ssaSubscriptionArn =- lens _ssaSubscriptionArn (\s a -> s { _ssaSubscriptionArn = a })+ssaSubscriptionARN :: Lens' SetSubscriptionAttributes Text+ssaSubscriptionARN = lens _ssaSubscriptionARN (\ s a -> s{_ssaSubscriptionARN = a}); -data SetSubscriptionAttributesResponse = SetSubscriptionAttributesResponse- deriving (Eq, Ord, Read, Show, Generic)+-- | The name of the attribute you want to set. Only a subset of the+-- subscriptions attributes are mutable.+--+-- Valid values: 'DeliveryPolicy' | 'RawMessageDelivery'+ssaAttributeName :: Lens' SetSubscriptionAttributes Text+ssaAttributeName = lens _ssaAttributeName (\ s a -> s{_ssaAttributeName = a}); --- | 'SetSubscriptionAttributesResponse' constructor.-setSubscriptionAttributesResponse :: SetSubscriptionAttributesResponse-setSubscriptionAttributesResponse = SetSubscriptionAttributesResponse+instance AWSRequest SetSubscriptionAttributes where+ type Sv SetSubscriptionAttributes = SNS+ type Rs SetSubscriptionAttributes =+ SetSubscriptionAttributesResponse+ request = postQuery+ response+ = receiveNull SetSubscriptionAttributesResponse' +instance ToHeaders SetSubscriptionAttributes where+ toHeaders = const mempty+ instance ToPath SetSubscriptionAttributes where- toPath = const "/"+ toPath = const "/" instance ToQuery SetSubscriptionAttributes where- toQuery SetSubscriptionAttributes{..} = mconcat- [ "AttributeName" =? _ssaAttributeName- , "AttributeValue" =? _ssaAttributeValue- , "SubscriptionArn" =? _ssaSubscriptionArn- ]--instance ToHeaders SetSubscriptionAttributes+ toQuery SetSubscriptionAttributes'{..}+ = mconcat+ ["Action" =:+ ("SetSubscriptionAttributes" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "AttributeValue" =: _ssaAttributeValue,+ "SubscriptionArn" =: _ssaSubscriptionARN,+ "AttributeName" =: _ssaAttributeName] -instance AWSRequest SetSubscriptionAttributes where- type Sv SetSubscriptionAttributes = SNS- type Rs SetSubscriptionAttributes = SetSubscriptionAttributesResponse+-- | /See:/ 'setSubscriptionAttributesResponse' smart constructor.+data SetSubscriptionAttributesResponse =+ SetSubscriptionAttributesResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic) - request = post "SetSubscriptionAttributes"- response = nullResponse SetSubscriptionAttributesResponse+-- | Creates a value of 'SetSubscriptionAttributesResponse' with the minimum fields required to make a request.+--+setSubscriptionAttributesResponse+ :: SetSubscriptionAttributesResponse+setSubscriptionAttributesResponse = SetSubscriptionAttributesResponse'
gen/Network/AWS/SNS/SetTopicAttributes.hs view
@@ -1,115 +1,120 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.SetTopicAttributes--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Allows a topic owner to set an attribute of the topic to a new value.+-- Allows a topic owner to set an attribute of the topic to a new value. ----- <http://docs.aws.amazon.com/sns/latest/api/API_SetTopicAttributes.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_SetTopicAttributes.html AWS API Reference> for SetTopicAttributes. module Network.AWS.SNS.SetTopicAttributes (- -- * Request- SetTopicAttributes- -- ** Request constructor- , setTopicAttributes- -- ** Request lenses- , staAttributeName+ -- * Creating a Request+ setTopicAttributes+ , SetTopicAttributes+ -- * Request Lenses , staAttributeValue- , staTopicArn+ , staTopicARN+ , staAttributeName - -- * Response- , SetTopicAttributesResponse- -- ** Response constructor+ -- * Destructuring the Response , setTopicAttributesResponse+ , SetTopicAttributesResponse ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--data SetTopicAttributes = SetTopicAttributes- { _staAttributeName :: Text- , _staAttributeValue :: Maybe Text- , _staTopicArn :: Text- } deriving (Eq, Ord, Read, Show)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'SetTopicAttributes' constructor.+-- | Input for SetTopicAttributes action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'setTopicAttributes' smart constructor.+data SetTopicAttributes = SetTopicAttributes'+ { _staAttributeValue :: !(Maybe Text)+ , _staTopicARN :: !Text+ , _staAttributeName :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'SetTopicAttributes' with the minimum fields required to make a request. ----- * 'staAttributeName' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'staAttributeValue' @::@ 'Maybe' 'Text'+-- * 'staAttributeValue' ----- * 'staTopicArn' @::@ 'Text'+-- * 'staTopicARN' ---setTopicAttributes :: Text -- ^ 'staTopicArn'- -> Text -- ^ 'staAttributeName'- -> SetTopicAttributes-setTopicAttributes p1 p2 = SetTopicAttributes- { _staTopicArn = p1- , _staAttributeName = p2- , _staAttributeValue = Nothing+-- * 'staAttributeName'+setTopicAttributes+ :: Text -- ^ 'staTopicARN'+ -> Text -- ^ 'staAttributeName'+ -> SetTopicAttributes+setTopicAttributes pTopicARN_ pAttributeName_ =+ SetTopicAttributes'+ { _staAttributeValue = Nothing+ , _staTopicARN = pTopicARN_+ , _staAttributeName = pAttributeName_ } --- | The name of the attribute you want to set. Only a subset of the topic's--- attributes are mutable.------ Valid values: 'Policy' | 'DisplayName' | 'DeliveryPolicy'-staAttributeName :: Lens' SetTopicAttributes Text-staAttributeName = lens _staAttributeName (\s a -> s { _staAttributeName = a })- -- | The new value for the attribute. staAttributeValue :: Lens' SetTopicAttributes (Maybe Text)-staAttributeValue =- lens _staAttributeValue (\s a -> s { _staAttributeValue = a })+staAttributeValue = lens _staAttributeValue (\ s a -> s{_staAttributeValue = a}); -- | The ARN of the topic to modify.-staTopicArn :: Lens' SetTopicAttributes Text-staTopicArn = lens _staTopicArn (\s a -> s { _staTopicArn = a })+staTopicARN :: Lens' SetTopicAttributes Text+staTopicARN = lens _staTopicARN (\ s a -> s{_staTopicARN = a}); -data SetTopicAttributesResponse = SetTopicAttributesResponse- deriving (Eq, Ord, Read, Show, Generic)+-- | The name of the attribute you want to set. Only a subset of the topic\'s+-- attributes are mutable.+--+-- Valid values: 'Policy' | 'DisplayName' | 'DeliveryPolicy'+staAttributeName :: Lens' SetTopicAttributes Text+staAttributeName = lens _staAttributeName (\ s a -> s{_staAttributeName = a}); --- | 'SetTopicAttributesResponse' constructor.-setTopicAttributesResponse :: SetTopicAttributesResponse-setTopicAttributesResponse = SetTopicAttributesResponse+instance AWSRequest SetTopicAttributes where+ type Sv SetTopicAttributes = SNS+ type Rs SetTopicAttributes =+ SetTopicAttributesResponse+ request = postQuery+ response = receiveNull SetTopicAttributesResponse' +instance ToHeaders SetTopicAttributes where+ toHeaders = const mempty+ instance ToPath SetTopicAttributes where- toPath = const "/"+ toPath = const "/" instance ToQuery SetTopicAttributes where- toQuery SetTopicAttributes{..} = mconcat- [ "AttributeName" =? _staAttributeName- , "AttributeValue" =? _staAttributeValue- , "TopicArn" =? _staTopicArn- ]--instance ToHeaders SetTopicAttributes+ toQuery SetTopicAttributes'{..}+ = mconcat+ ["Action" =: ("SetTopicAttributes" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "AttributeValue" =: _staAttributeValue,+ "TopicArn" =: _staTopicARN,+ "AttributeName" =: _staAttributeName] -instance AWSRequest SetTopicAttributes where- type Sv SetTopicAttributes = SNS- type Rs SetTopicAttributes = SetTopicAttributesResponse+-- | /See:/ 'setTopicAttributesResponse' smart constructor.+data SetTopicAttributesResponse =+ SetTopicAttributesResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic) - request = post "SetTopicAttributes"- response = nullResponse SetTopicAttributesResponse+-- | Creates a value of 'SetTopicAttributesResponse' with the minimum fields required to make a request.+--+setTopicAttributesResponse+ :: SetTopicAttributesResponse+setTopicAttributesResponse = SetTopicAttributesResponse'
gen/Network/AWS/SNS/Subscribe.hs view
@@ -1,148 +1,172 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.Subscribe--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Prepares to subscribe an endpoint by sending the endpoint a confirmation--- message. To actually create a subscription, the endpoint owner must call the 'ConfirmSubscription' action with the token from the confirmation message. Confirmation tokens are--- valid for three days.+-- Prepares to subscribe an endpoint by sending the endpoint a confirmation+-- message. To actually create a subscription, the endpoint owner must call+-- the 'ConfirmSubscription' action with the token from the confirmation+-- message. Confirmation tokens are valid for three days. ----- <http://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html AWS API Reference> for Subscribe. module Network.AWS.SNS.Subscribe (- -- * Request- Subscribe- -- ** Request constructor- , subscribe- -- ** Request lenses- , sEndpoint- , sProtocol- , sTopicArn+ -- * Creating a Request+ subscribe+ , Subscribe+ -- * Request Lenses+ , subEndpoint+ , subTopicARN+ , subProtocol - -- * Response- , SubscribeResponse- -- ** Response constructor+ -- * Destructuring the Response , subscribeResponse- -- ** Response lenses- , srSubscriptionArn+ , SubscribeResponse+ -- * Response Lenses+ , srsSubscriptionARN+ , srsStatus ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--data Subscribe = Subscribe- { _sEndpoint :: Maybe Text- , _sProtocol :: Text- , _sTopicArn :: Text- } deriving (Eq, Ord, Read, Show)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'Subscribe' constructor.+-- | Input for Subscribe action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'subscribe' smart constructor.+data Subscribe = Subscribe'+ { _subEndpoint :: !(Maybe Endpoint)+ , _subTopicARN :: !Text+ , _subProtocol :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Subscribe' with the minimum fields required to make a request. ----- * 'sEndpoint' @::@ 'Maybe' 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'sProtocol' @::@ 'Text'+-- * 'subEndpoint' ----- * 'sTopicArn' @::@ 'Text'+-- * 'subTopicARN' ---subscribe :: Text -- ^ 'sTopicArn'- -> Text -- ^ 'sProtocol'- -> Subscribe-subscribe p1 p2 = Subscribe- { _sTopicArn = p1- , _sProtocol = p2- , _sEndpoint = Nothing+-- * 'subProtocol'+subscribe+ :: Text -- ^ 'subTopicARN'+ -> Text -- ^ 'subProtocol'+ -> Subscribe+subscribe pTopicARN_ pProtocol_ =+ Subscribe'+ { _subEndpoint = Nothing+ , _subTopicARN = pTopicARN_+ , _subProtocol = pProtocol_ } -- | The endpoint that you want to receive notifications. Endpoints vary by -- protocol: ----- For the 'http' protocol, the endpoint is an URL beginning with "http://" For--- the 'https' protocol, the endpoint is a URL beginning with "https://" For the 'email' protocol, the endpoint is an email address For the 'email-json' protocol, the--- endpoint is an email address For the 'sms' protocol, the endpoint is a phone--- number of an SMS-enabled device For the 'sqs' protocol, the endpoint is the ARN--- of an Amazon SQS queue For the 'application' protocol, the endpoint is the--- EndpointArn of a mobile app and device.-sEndpoint :: Lens' Subscribe (Maybe Text)-sEndpoint = lens _sEndpoint (\s a -> s { _sEndpoint = a })---- | The protocol you want to use. Supported protocols include:------ 'http' -- delivery of JSON-encoded message via HTTP POST 'https' -- delivery--- of JSON-encoded message via HTTPS POST 'email' -- delivery of message via SMTP--- 'email-json' -- delivery of JSON-encoded message via SMTP 'sms' -- delivery of--- message via SMS 'sqs' -- delivery of JSON-encoded message to an Amazon SQS--- queue 'application' -- delivery of JSON-encoded message to an EndpointArn for--- a mobile app and device.-sProtocol :: Lens' Subscribe Text-sProtocol = lens _sProtocol (\s a -> s { _sProtocol = a })+-- - For the 'http' protocol, the endpoint is an URL beginning with+-- \"http:\/\/\"+-- - For the 'https' protocol, the endpoint is a URL beginning with+-- \"https:\/\/\"+-- - For the 'email' protocol, the endpoint is an email address+-- - For the 'email-json' protocol, the endpoint is an email address+-- - For the 'sms' protocol, the endpoint is a phone number of an+-- SMS-enabled device+-- - For the 'sqs' protocol, the endpoint is the ARN of an Amazon SQS+-- queue+-- - For the 'application' protocol, the endpoint is the EndpointArn of a+-- mobile app and device.+subEndpoint :: Lens' Subscribe (Maybe Endpoint)+subEndpoint = lens _subEndpoint (\ s a -> s{_subEndpoint = a}); -- | The ARN of the topic you want to subscribe to.-sTopicArn :: Lens' Subscribe Text-sTopicArn = lens _sTopicArn (\s a -> s { _sTopicArn = a })--newtype SubscribeResponse = SubscribeResponse- { _srSubscriptionArn :: Maybe Text- } deriving (Eq, Ord, Read, Show, Monoid)+subTopicARN :: Lens' Subscribe Text+subTopicARN = lens _subTopicARN (\ s a -> s{_subTopicARN = a}); --- | 'SubscribeResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'srSubscriptionArn' @::@ 'Maybe' 'Text'+-- | The protocol you want to use. Supported protocols include: ---subscribeResponse :: SubscribeResponse-subscribeResponse = SubscribeResponse- { _srSubscriptionArn = Nothing- }+-- - 'http' -- delivery of JSON-encoded message via HTTP POST+-- - 'https' -- delivery of JSON-encoded message via HTTPS POST+-- - 'email' -- delivery of message via SMTP+-- - 'email-json' -- delivery of JSON-encoded message via SMTP+-- - 'sms' -- delivery of message via SMS+-- - 'sqs' -- delivery of JSON-encoded message to an Amazon SQS queue+-- - 'application' -- delivery of JSON-encoded message to an EndpointArn+-- for a mobile app and device.+subProtocol :: Lens' Subscribe Text+subProtocol = lens _subProtocol (\ s a -> s{_subProtocol = a}); --- | The ARN of the subscription, if the service was able to create a subscription--- immediately (without requiring endpoint owner confirmation).-srSubscriptionArn :: Lens' SubscribeResponse (Maybe Text)-srSubscriptionArn =- lens _srSubscriptionArn (\s a -> s { _srSubscriptionArn = a })+instance AWSRequest Subscribe where+ type Sv Subscribe = SNS+ type Rs Subscribe = SubscribeResponse+ request = postQuery+ response+ = receiveXMLWrapper "SubscribeResult"+ (\ s h x ->+ SubscribeResponse' <$>+ (x .@? "SubscriptionArn") <*> (pure (fromEnum s))) +instance ToHeaders Subscribe where+ toHeaders = const mempty+ instance ToPath Subscribe where- toPath = const "/"+ toPath = const "/" instance ToQuery Subscribe where- toQuery Subscribe{..} = mconcat- [ "Endpoint" =? _sEndpoint- , "Protocol" =? _sProtocol- , "TopicArn" =? _sTopicArn- ]+ toQuery Subscribe'{..}+ = mconcat+ ["Action" =: ("Subscribe" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "Endpoint" =: _subEndpoint,+ "TopicArn" =: _subTopicARN,+ "Protocol" =: _subProtocol] -instance ToHeaders Subscribe+-- | Response for Subscribe action.+--+-- /See:/ 'subscribeResponse' smart constructor.+data SubscribeResponse = SubscribeResponse'+ { _srsSubscriptionARN :: !(Maybe Text)+ , _srsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest Subscribe where- type Sv Subscribe = SNS- type Rs Subscribe = SubscribeResponse+-- | Creates a value of 'SubscribeResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'srsSubscriptionARN'+--+-- * 'srsStatus'+subscribeResponse+ :: Int -- ^ 'srsStatus'+ -> SubscribeResponse+subscribeResponse pStatus_ =+ SubscribeResponse'+ { _srsSubscriptionARN = Nothing+ , _srsStatus = pStatus_+ } - request = post "Subscribe"- response = xmlResponse+-- | The ARN of the subscription, if the service was able to create a+-- subscription immediately (without requiring endpoint owner+-- confirmation).+srsSubscriptionARN :: Lens' SubscribeResponse (Maybe Text)+srsSubscriptionARN = lens _srsSubscriptionARN (\ s a -> s{_srsSubscriptionARN = a}); -instance FromXML SubscribeResponse where- parseXML = withElement "SubscribeResult" $ \x -> SubscribeResponse- <$> x .@? "SubscriptionArn"+-- | The response status code.+srsStatus :: Lens' SubscribeResponse Int+srsStatus = lens _srsStatus (\ s a -> s{_srsStatus = a});
gen/Network/AWS/SNS/Types.hs view
@@ -1,343 +1,150 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-} -{-# OPTIONS_GHC -fno-warn-unused-imports #-}+-- Derived from AWS service descriptions, licensed under Apache 2.0. +-- | -- Module : Network.AWS.SNS.Types--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.- module Network.AWS.SNS.Types ( -- * Service SNS- -- ** Error- , RESTError- -- ** XML- , ns - -- * Topic- , Topic- , topic- , tTopicArn+ -- * Errors+ , _EndpointDisabledException+ , _AuthorizationErrorException+ , _InvalidParameterException+ , _SubscriptionLimitExceededException+ , _PlatformApplicationDisabledException+ , _InternalErrorException+ , _NotFoundException+ , _InvalidParameterValueException+ , _TopicLimitExceededException + -- * Endpoint+ , Endpoint+ , endpoint+ , eAttributes+ , eEndpointARN+ -- * MessageAttributeValue , MessageAttributeValue , messageAttributeValue , mavBinaryValue- , mavDataType , mavStringValue+ , mavDataType -- * PlatformApplication , PlatformApplication , platformApplication+ , paPlatformApplicationARN , paAttributes- , paPlatformApplicationArn -- * Subscription , Subscription , subscription- , s1Endpoint- , s1Owner- , s1Protocol- , s1SubscriptionArn- , s1TopicArn+ , sProtocol+ , sOwner+ , sTopicARN+ , sEndpoint+ , sSubscriptionARN - -- * Endpoint- , Endpoint- , endpoint- , eAttributes- , eEndpointArn+ -- * Topic+ , Topic+ , topic+ , tTopicARN ) where -import Network.AWS.Prelude-import Network.AWS.Signing-import qualified GHC.Exts+import Network.AWS.Prelude+import Network.AWS.Sign.V4+import Network.AWS.SNS.Types.Product+import Network.AWS.SNS.Types.Sum --- | Version @2010-03-31@ of the Amazon Simple Notification Service service.+-- | Version @2010-03-31@ of the Amazon Simple Notification Service SDK. data SNS instance AWSService SNS where type Sg SNS = V4- type Er SNS = RESTError-- service = service'+ service = const svc where- service' :: Service SNS- service' = Service- { _svcAbbrev = "SNS"- , _svcPrefix = "sns"- , _svcVersion = "2010-03-31"- , _svcTargetPrefix = Nothing- , _svcJSONVersion = Nothing- , _svcHandle = handle- , _svcRetry = retry+ svc =+ Service+ { _svcAbbrev = "SNS"+ , _svcPrefix = "sns"+ , _svcVersion = "2010-03-31"+ , _svcEndpoint = defaultEndpoint svc+ , _svcTimeout = Just 70+ , _svcStatus = statusSuccess+ , _svcError = parseXMLError+ , _svcRetry = retry }-- handle :: Status- -> Maybe (LazyByteString -> ServiceError RESTError)- handle = restError statusSuccess service'-- retry :: Retry SNS- retry = Exponential- { _retryBase = 0.05- , _retryGrowth = 2+ retry =+ Exponential+ { _retryBase = 5.0e-2+ , _retryGrowth = 2 , _retryAttempts = 5- , _retryCheck = check+ , _retryCheck = check }-- check :: Status- -> RESTError- -> Bool- check (statusCode -> s) (awsErrorCode -> e)- | s == 400 && (Just "Throttling") == e = True -- Throttling- | s == 500 = True -- General Server Error- | s == 509 = True -- Limit Exceeded- | s == 503 = True -- Service Unavailable- | otherwise = False--ns :: Text-ns = "http://sns.amazonaws.com/doc/2010-03-31/"-{-# INLINE ns #-}--newtype Topic = Topic- { _tTopicArn :: Maybe Text- } deriving (Eq, Ord, Read, Show, Monoid)---- | 'Topic' constructor.------ The fields accessible through corresponding lenses are:------ * 'tTopicArn' @::@ 'Maybe' 'Text'----topic :: Topic-topic = Topic- { _tTopicArn = Nothing- }---- | The topic's ARN.-tTopicArn :: Lens' Topic (Maybe Text)-tTopicArn = lens _tTopicArn (\s a -> s { _tTopicArn = a })--instance FromXML Topic where- parseXML x = Topic- <$> x .@? "TopicArn"--instance ToQuery Topic where- toQuery Topic{..} = mconcat- [ "TopicArn" =? _tTopicArn- ]--data MessageAttributeValue = MessageAttributeValue- { _mavBinaryValue :: Maybe Base64- , _mavDataType :: Text- , _mavStringValue :: Maybe Text- } deriving (Eq, Read, Show)---- | 'MessageAttributeValue' constructor.------ The fields accessible through corresponding lenses are:------ * 'mavBinaryValue' @::@ 'Maybe' 'Base64'------ * 'mavDataType' @::@ 'Text'------ * 'mavStringValue' @::@ 'Maybe' 'Text'----messageAttributeValue :: Text -- ^ 'mavDataType'- -> MessageAttributeValue-messageAttributeValue p1 = MessageAttributeValue- { _mavDataType = p1- , _mavStringValue = Nothing- , _mavBinaryValue = Nothing- }---- | Binary type attributes can store any binary data, for example, compressed--- data, encrypted data, or images.-mavBinaryValue :: Lens' MessageAttributeValue (Maybe Base64)-mavBinaryValue = lens _mavBinaryValue (\s a -> s { _mavBinaryValue = a })---- | Amazon SNS supports the following logical data types: String, Number, and--- Binary. For more information, see <http://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html#SNSMessageAttributes.DataTypes Message Attribute Data Types>.-mavDataType :: Lens' MessageAttributeValue Text-mavDataType = lens _mavDataType (\s a -> s { _mavDataType = a })---- | Strings are Unicode with UTF8 binary encoding. For a list of code values, see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.-mavStringValue :: Lens' MessageAttributeValue (Maybe Text)-mavStringValue = lens _mavStringValue (\s a -> s { _mavStringValue = a })--instance FromXML MessageAttributeValue where- parseXML x = MessageAttributeValue- <$> x .@? "BinaryValue"- <*> x .@ "DataType"- <*> x .@? "StringValue"--instance ToQuery MessageAttributeValue where- toQuery MessageAttributeValue{..} = mconcat- [ "BinaryValue" =? _mavBinaryValue- , "DataType" =? _mavDataType- , "StringValue" =? _mavStringValue- ]--data PlatformApplication = PlatformApplication- { _paAttributes :: EMap "entry" "key" "value" Text Text- , _paPlatformApplicationArn :: Maybe Text- } deriving (Eq, Read, Show)---- | 'PlatformApplication' constructor.------ The fields accessible through corresponding lenses are:------ * 'paAttributes' @::@ 'HashMap' 'Text' 'Text'------ * 'paPlatformApplicationArn' @::@ 'Maybe' 'Text'----platformApplication :: PlatformApplication-platformApplication = PlatformApplication- { _paPlatformApplicationArn = Nothing- , _paAttributes = mempty- }---- | Attributes for platform application object.-paAttributes :: Lens' PlatformApplication (HashMap Text Text)-paAttributes = lens _paAttributes (\s a -> s { _paAttributes = a }) . _EMap---- | PlatformApplicationArn for platform application object.-paPlatformApplicationArn :: Lens' PlatformApplication (Maybe Text)-paPlatformApplicationArn =- lens _paPlatformApplicationArn- (\s a -> s { _paPlatformApplicationArn = a })--instance FromXML PlatformApplication where- parseXML x = PlatformApplication- <$> x .@? "Attributes" .!@ mempty- <*> x .@? "PlatformApplicationArn"--instance ToQuery PlatformApplication where- toQuery PlatformApplication{..} = mconcat- [ "Attributes" =? _paAttributes- , "PlatformApplicationArn" =? _paPlatformApplicationArn- ]--data Subscription = Subscription- { _s1Endpoint :: Maybe Text- , _s1Owner :: Maybe Text- , _s1Protocol :: Maybe Text- , _s1SubscriptionArn :: Maybe Text- , _s1TopicArn :: Maybe Text- } deriving (Eq, Ord, Read, Show)---- | 'Subscription' constructor.------ The fields accessible through corresponding lenses are:------ * 's1Endpoint' @::@ 'Maybe' 'Text'------ * 's1Owner' @::@ 'Maybe' 'Text'------ * 's1Protocol' @::@ 'Maybe' 'Text'------ * 's1SubscriptionArn' @::@ 'Maybe' 'Text'------ * 's1TopicArn' @::@ 'Maybe' 'Text'----subscription :: Subscription-subscription = Subscription- { _s1SubscriptionArn = Nothing- , _s1Owner = Nothing- , _s1Protocol = Nothing- , _s1Endpoint = Nothing- , _s1TopicArn = Nothing- }---- | The subscription's endpoint (format depends on the protocol).-s1Endpoint :: Lens' Subscription (Maybe Text)-s1Endpoint = lens _s1Endpoint (\s a -> s { _s1Endpoint = a })---- | The subscription's owner.-s1Owner :: Lens' Subscription (Maybe Text)-s1Owner = lens _s1Owner (\s a -> s { _s1Owner = a })---- | The subscription's protocol.-s1Protocol :: Lens' Subscription (Maybe Text)-s1Protocol = lens _s1Protocol (\s a -> s { _s1Protocol = a })---- | The subscription's ARN.-s1SubscriptionArn :: Lens' Subscription (Maybe Text)-s1SubscriptionArn =- lens _s1SubscriptionArn (\s a -> s { _s1SubscriptionArn = a })+ check e+ | has (hasCode "ThrottlingException" . hasStatus 400) e =+ Just "throttling_exception"+ | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"+ | 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 ARN of the subscription's topic.-s1TopicArn :: Lens' Subscription (Maybe Text)-s1TopicArn = lens _s1TopicArn (\s a -> s { _s1TopicArn = a })+-- | Exception error indicating endpoint disabled.+_EndpointDisabledException :: AsError a => Getting (First ServiceError) a ServiceError+_EndpointDisabledException =+ _ServiceError . hasStatus 400 . hasCode "EndpointDisabled" -instance FromXML Subscription where- parseXML x = Subscription- <$> x .@? "Endpoint"- <*> x .@? "Owner"- <*> x .@? "Protocol"- <*> x .@? "SubscriptionArn"- <*> x .@? "TopicArn"+-- | Indicates that the user has been denied access to the requested+-- resource.+_AuthorizationErrorException :: AsError a => Getting (First ServiceError) a ServiceError+_AuthorizationErrorException =+ _ServiceError . hasStatus 403 . hasCode "AuthorizationError" -instance ToQuery Subscription where- toQuery Subscription{..} = mconcat- [ "Endpoint" =? _s1Endpoint- , "Owner" =? _s1Owner- , "Protocol" =? _s1Protocol- , "SubscriptionArn" =? _s1SubscriptionArn- , "TopicArn" =? _s1TopicArn- ]+-- | Indicates that a request parameter does not comply with the associated+-- constraints.+_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidParameterException =+ _ServiceError . hasStatus 400 . hasCode "InvalidParameter" -data Endpoint = Endpoint- { _eAttributes :: EMap "entry" "key" "value" Text Text- , _eEndpointArn :: Maybe Text- } deriving (Eq, Read, Show)+-- | Indicates that the customer already owns the maximum allowed number of+-- subscriptions.+_SubscriptionLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError+_SubscriptionLimitExceededException =+ _ServiceError . hasStatus 403 . hasCode "SubscriptionLimitExceeded" --- | 'Endpoint' constructor.------ The fields accessible through corresponding lenses are:------ * 'eAttributes' @::@ 'HashMap' 'Text' 'Text'------ * 'eEndpointArn' @::@ 'Maybe' 'Text'----endpoint :: Endpoint-endpoint = Endpoint- { _eEndpointArn = Nothing- , _eAttributes = mempty- }+-- | Exception error indicating platform application disabled.+_PlatformApplicationDisabledException :: AsError a => Getting (First ServiceError) a ServiceError+_PlatformApplicationDisabledException =+ _ServiceError . hasStatus 400 . hasCode "PlatformApplicationDisabled" --- | Attributes for endpoint.-eAttributes :: Lens' Endpoint (HashMap Text Text)-eAttributes = lens _eAttributes (\s a -> s { _eAttributes = a }) . _EMap+-- | Indicates an internal service error.+_InternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError+_InternalErrorException =+ _ServiceError . hasStatus 500 . hasCode "InternalError" --- | EndpointArn for mobile app and device.-eEndpointArn :: Lens' Endpoint (Maybe Text)-eEndpointArn = lens _eEndpointArn (\s a -> s { _eEndpointArn = a })+-- | Indicates that the requested resource does not exist.+_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_NotFoundException = _ServiceError . hasStatus 404 . hasCode "NotFound" -instance FromXML Endpoint where- parseXML x = Endpoint- <$> x .@? "Attributes" .!@ mempty- <*> x .@? "EndpointArn"+-- | Indicates that a request parameter does not comply with the associated+-- constraints.+_InvalidParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidParameterValueException =+ _ServiceError . hasStatus 400 . hasCode "ParameterValueInvalid" -instance ToQuery Endpoint where- toQuery Endpoint{..} = mconcat- [ "Attributes" =? _eAttributes- , "EndpointArn" =? _eEndpointArn- ]+-- | Indicates that the customer already owns the maximum allowed number of+-- topics.+_TopicLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError+_TopicLimitExceededException =+ _ServiceError . hasStatus 403 . hasCode "TopicLimitExceeded"
+ gen/Network/AWS/SNS/Types/Product.hs view
@@ -0,0 +1,258 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SNS.Types.Product+-- Copyright : (c) 2013-2015 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)+--+module Network.AWS.SNS.Types.Product where++import Network.AWS.Prelude+import Network.AWS.SNS.Types.Sum++-- | Endpoint for mobile app and device.+--+-- /See:/ 'endpoint' smart constructor.+data Endpoint = Endpoint'+ { _eAttributes :: !(Maybe (Map Text Text))+ , _eEndpointARN :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Endpoint' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'eAttributes'+--+-- * 'eEndpointARN'+endpoint+ :: Endpoint+endpoint =+ Endpoint'+ { _eAttributes = Nothing+ , _eEndpointARN = Nothing+ }++-- | Attributes for endpoint.+eAttributes :: Lens' Endpoint (HashMap Text Text)+eAttributes = lens _eAttributes (\ s a -> s{_eAttributes = a}) . _Default . _Map;++-- | EndpointArn for mobile app and device.+eEndpointARN :: Lens' Endpoint (Maybe Text)+eEndpointARN = lens _eEndpointARN (\ s a -> s{_eEndpointARN = a});++instance FromXML Endpoint where+ parseXML x+ = Endpoint' <$>+ (x .@? "Attributes" .!@ mempty >>=+ may (parseXMLMap "entry" "key" "value"))+ <*> (x .@? "EndpointArn")++instance ToQuery Endpoint where+ toQuery Endpoint'{..}+ = mconcat+ ["Attributes" =:+ toQuery+ (toQueryMap "entry" "key" "value" <$> _eAttributes),+ "EndpointArn" =: _eEndpointARN]++-- | The user-specified message attribute value. For string data types, the+-- value attribute has the same restrictions on the content as the message+-- body. For more information, see+-- <http://docs.aws.amazon.com/sns/latest/api/API_Publish.html Publish>.+--+-- Name, type, and value must not be empty or null. In addition, the+-- message body should not be empty or null. All parts of the message+-- attribute, including name, type, and value, are included in the message+-- size restriction, which is currently 256 KB (262,144 bytes). For more+-- information, see+-- <http://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html Using Amazon SNS Message Attributes>.+--+-- /See:/ 'messageAttributeValue' smart constructor.+data MessageAttributeValue = MessageAttributeValue'+ { _mavBinaryValue :: !(Maybe Base64)+ , _mavStringValue :: !(Maybe Text)+ , _mavDataType :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'MessageAttributeValue' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'mavBinaryValue'+--+-- * 'mavStringValue'+--+-- * 'mavDataType'+messageAttributeValue+ :: Text -- ^ 'mavDataType'+ -> MessageAttributeValue+messageAttributeValue pDataType_ =+ MessageAttributeValue'+ { _mavBinaryValue = Nothing+ , _mavStringValue = Nothing+ , _mavDataType = pDataType_+ }++-- | Binary type attributes can store any binary data, for example,+-- compressed data, encrypted data, or images.+mavBinaryValue :: Lens' MessageAttributeValue (Maybe ByteString)+mavBinaryValue = lens _mavBinaryValue (\ s a -> s{_mavBinaryValue = a}) . mapping _Base64;++-- | Strings are Unicode with UTF8 binary encoding. For a list of code+-- values, see+-- <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.+mavStringValue :: Lens' MessageAttributeValue (Maybe Text)+mavStringValue = lens _mavStringValue (\ s a -> s{_mavStringValue = a});++-- | Amazon SNS supports the following logical data types: String, Number,+-- and Binary. For more information, see+-- <http://docs.aws.amazon.com/sns/latest/dg/SNSMessageAttributes.html#SNSMessageAttributes.DataTypes Message Attribute Data Types>.+mavDataType :: Lens' MessageAttributeValue Text+mavDataType = lens _mavDataType (\ s a -> s{_mavDataType = a});++instance ToQuery MessageAttributeValue where+ toQuery MessageAttributeValue'{..}+ = mconcat+ ["BinaryValue" =: _mavBinaryValue,+ "StringValue" =: _mavStringValue,+ "DataType" =: _mavDataType]++-- | Platform application object.+--+-- /See:/ 'platformApplication' smart constructor.+data PlatformApplication = PlatformApplication'+ { _paPlatformApplicationARN :: !(Maybe Text)+ , _paAttributes :: !(Maybe (Map Text Text))+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'PlatformApplication' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'paPlatformApplicationARN'+--+-- * 'paAttributes'+platformApplication+ :: PlatformApplication+platformApplication =+ PlatformApplication'+ { _paPlatformApplicationARN = Nothing+ , _paAttributes = Nothing+ }++-- | PlatformApplicationArn for platform application object.+paPlatformApplicationARN :: Lens' PlatformApplication (Maybe Text)+paPlatformApplicationARN = lens _paPlatformApplicationARN (\ s a -> s{_paPlatformApplicationARN = a});++-- | Attributes for platform application object.+paAttributes :: Lens' PlatformApplication (HashMap Text Text)+paAttributes = lens _paAttributes (\ s a -> s{_paAttributes = a}) . _Default . _Map;++instance FromXML PlatformApplication where+ parseXML x+ = PlatformApplication' <$>+ (x .@? "PlatformApplicationArn") <*>+ (x .@? "Attributes" .!@ mempty >>=+ may (parseXMLMap "entry" "key" "value"))++-- | A wrapper type for the attributes of an Amazon SNS subscription.+--+-- /See:/ 'subscription' smart constructor.+data Subscription = Subscription'+ { _sProtocol :: !(Maybe Text)+ , _sOwner :: !(Maybe Text)+ , _sTopicARN :: !(Maybe Text)+ , _sEndpoint :: !(Maybe Endpoint)+ , _sSubscriptionARN :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Subscription' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sProtocol'+--+-- * 'sOwner'+--+-- * 'sTopicARN'+--+-- * 'sEndpoint'+--+-- * 'sSubscriptionARN'+subscription+ :: Subscription+subscription =+ Subscription'+ { _sProtocol = Nothing+ , _sOwner = Nothing+ , _sTopicARN = Nothing+ , _sEndpoint = Nothing+ , _sSubscriptionARN = Nothing+ }++-- | The subscription\'s protocol.+sProtocol :: Lens' Subscription (Maybe Text)+sProtocol = lens _sProtocol (\ s a -> s{_sProtocol = a});++-- | The subscription\'s owner.+sOwner :: Lens' Subscription (Maybe Text)+sOwner = lens _sOwner (\ s a -> s{_sOwner = a});++-- | The ARN of the subscription\'s topic.+sTopicARN :: Lens' Subscription (Maybe Text)+sTopicARN = lens _sTopicARN (\ s a -> s{_sTopicARN = a});++-- | The subscription\'s endpoint (format depends on the protocol).+sEndpoint :: Lens' Subscription (Maybe Endpoint)+sEndpoint = lens _sEndpoint (\ s a -> s{_sEndpoint = a});++-- | The subscription\'s ARN.+sSubscriptionARN :: Lens' Subscription (Maybe Text)+sSubscriptionARN = lens _sSubscriptionARN (\ s a -> s{_sSubscriptionARN = a});++instance FromXML Subscription where+ parseXML x+ = Subscription' <$>+ (x .@? "Protocol") <*> (x .@? "Owner") <*>+ (x .@? "TopicArn")+ <*> (x .@? "Endpoint")+ <*> (x .@? "SubscriptionArn")++-- | A wrapper type for the topic\'s Amazon Resource Name (ARN). To retrieve+-- a topic\'s attributes, use 'GetTopicAttributes'.+--+-- /See:/ 'topic' smart constructor.+newtype Topic = Topic'+ { _tTopicARN :: Maybe Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Topic' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tTopicARN'+topic+ :: Topic+topic =+ Topic'+ { _tTopicARN = Nothing+ }++-- | The topic\'s ARN.+tTopicARN :: Lens' Topic (Maybe Text)+tTopicARN = lens _tTopicARN (\ s a -> s{_tTopicARN = a});++instance FromXML Topic where+ parseXML x = Topic' <$> (x .@? "TopicArn")
+ gen/Network/AWS/SNS/Types/Sum.hs view
@@ -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.SNS.Types.Sum+-- Copyright : (c) 2013-2015 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)+--+module Network.AWS.SNS.Types.Sum where++import Network.AWS.Prelude
gen/Network/AWS/SNS/Unsubscribe.hs view
@@ -1,96 +1,101 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TypeFamilies #-}+{-# 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.SNS.Unsubscribe--- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License : This Source Code Form is subject to the terms of--- the Mozilla Public License, v. 2.0.--- A copy of the MPL can be found in the LICENSE file or--- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>--- Stability : experimental+-- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Deletes a subscription. If the subscription requires authentication for--- deletion, only the owner of the subscription or the topic's owner can--- unsubscribe, and an AWS signature is required. If the 'Unsubscribe' call does--- not require authentication and the requester is not the subscription owner, a--- final cancellation message is delivered to the endpoint, so that the endpoint--- owner can easily resubscribe to the topic if the 'Unsubscribe' request was--- unintended.+-- Deletes a subscription. If the subscription requires authentication for+-- deletion, only the owner of the subscription or the topic\'s owner can+-- unsubscribe, and an AWS signature is required. If the 'Unsubscribe' call+-- does not require authentication and the requester is not the+-- subscription owner, a final cancellation message is delivered to the+-- endpoint, so that the endpoint owner can easily resubscribe to the topic+-- if the 'Unsubscribe' request was unintended. ----- <http://docs.aws.amazon.com/sns/latest/api/API_Unsubscribe.html>+-- /See:/ <http://docs.aws.amazon.com/sns/latest/api/API_Unsubscribe.html AWS API Reference> for Unsubscribe. module Network.AWS.SNS.Unsubscribe (- -- * Request- Unsubscribe- -- ** Request constructor- , unsubscribe- -- ** Request lenses- , uSubscriptionArn+ -- * Creating a Request+ unsubscribe+ , Unsubscribe+ -- * Request Lenses+ , uSubscriptionARN - -- * Response- , UnsubscribeResponse- -- ** Response constructor+ -- * Destructuring the Response , unsubscribeResponse+ , UnsubscribeResponse ) where -import Network.AWS.Prelude-import Network.AWS.Request.Query-import Network.AWS.SNS.Types-import qualified GHC.Exts--newtype Unsubscribe = Unsubscribe- { _uSubscriptionArn :: Text- } deriving (Eq, Ord, Read, Show, Monoid, IsString)+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SNS.Types+import Network.AWS.SNS.Types.Product --- | 'Unsubscribe' constructor.+-- | Input for Unsubscribe action. ----- The fields accessible through corresponding lenses are:+-- /See:/ 'unsubscribe' smart constructor.+newtype Unsubscribe = Unsubscribe'+ { _uSubscriptionARN :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Unsubscribe' with the minimum fields required to make a request. ----- * 'uSubscriptionArn' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---unsubscribe :: Text -- ^ 'uSubscriptionArn'- -> Unsubscribe-unsubscribe p1 = Unsubscribe- { _uSubscriptionArn = p1+-- * 'uSubscriptionARN'+unsubscribe+ :: Text -- ^ 'uSubscriptionARN'+ -> Unsubscribe+unsubscribe pSubscriptionARN_ =+ Unsubscribe'+ { _uSubscriptionARN = pSubscriptionARN_ } -- | The ARN of the subscription to be deleted.-uSubscriptionArn :: Lens' Unsubscribe Text-uSubscriptionArn = lens _uSubscriptionArn (\s a -> s { _uSubscriptionArn = a })+uSubscriptionARN :: Lens' Unsubscribe Text+uSubscriptionARN = lens _uSubscriptionARN (\ s a -> s{_uSubscriptionARN = a}); -data UnsubscribeResponse = UnsubscribeResponse- deriving (Eq, Ord, Read, Show, Generic)+instance AWSRequest Unsubscribe where+ type Sv Unsubscribe = SNS+ type Rs Unsubscribe = UnsubscribeResponse+ request = postQuery+ response = receiveNull UnsubscribeResponse' --- | 'UnsubscribeResponse' constructor.-unsubscribeResponse :: UnsubscribeResponse-unsubscribeResponse = UnsubscribeResponse+instance ToHeaders Unsubscribe where+ toHeaders = const mempty instance ToPath Unsubscribe where- toPath = const "/"+ toPath = const "/" instance ToQuery Unsubscribe where- toQuery Unsubscribe{..} = mconcat- [ "SubscriptionArn" =? _uSubscriptionArn- ]--instance ToHeaders Unsubscribe+ toQuery Unsubscribe'{..}+ = mconcat+ ["Action" =: ("Unsubscribe" :: ByteString),+ "Version" =: ("2010-03-31" :: ByteString),+ "SubscriptionArn" =: _uSubscriptionARN] -instance AWSRequest Unsubscribe where- type Sv Unsubscribe = SNS- type Rs Unsubscribe = UnsubscribeResponse+-- | /See:/ 'unsubscribeResponse' smart constructor.+data UnsubscribeResponse =+ UnsubscribeResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic) - request = post "Unsubscribe"- response = nullResponse UnsubscribeResponse+-- | Creates a value of 'UnsubscribeResponse' with the minimum fields required to make a request.+--+unsubscribeResponse+ :: UnsubscribeResponse+unsubscribeResponse = UnsubscribeResponse'
+ gen/Network/AWS/SNS/Waiters.hs view
@@ -0,0 +1,20 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SNS.Waiters+-- Copyright : (c) 2013-2015 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)+--+module Network.AWS.SNS.Waiters where++import Network.AWS.Prelude+import Network.AWS.SNS.Types+import Network.AWS.Waiter
+ test/Main.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2015 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)+--+module Main (main) where++import Test.Tasty+import Test.AWS.SNS+import Test.AWS.SNS.Internal++main :: IO ()+main = defaultMain $ testGroup "SNS"+ [ testGroup "tests" tests+ , testGroup "fixtures" fixtures+ ]
+ test/Test/AWS/Gen/SNS.hs view
@@ -0,0 +1,464 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Test.AWS.Gen.SNS+-- Copyright : (c) 2013-2015 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)+--+module Test.AWS.Gen.SNS where++import Data.Proxy+import Test.AWS.Fixture+import Test.AWS.Prelude+import Test.Tasty+import Network.AWS.SNS+import Test.AWS.SNS.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.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+-- [ testGroup "request"+-- [ testDeleteEndpoint $+-- deleteEndpoint+--+-- , testRemovePermission $+-- removePermission+--+-- , testSetPlatformApplicationAttributes $+-- setPlatformApplicationAttributes+--+-- , testCreatePlatformEndpoint $+-- createPlatformEndpoint+--+-- , testListSubscriptionsByTopic $+-- listSubscriptionsByTopic+--+-- , testGetTopicAttributes $+-- getTopicAttributes+--+-- , testDeleteTopic $+-- deleteTopic+--+-- , testListTopics $+-- listTopics+--+-- , testCreatePlatformApplication $+-- createPlatformApplication+--+-- , testListEndpointsByPlatformApplication $+-- listEndpointsByPlatformApplication+--+-- , testGetPlatformApplicationAttributes $+-- getPlatformApplicationAttributes+--+-- , testDeletePlatformApplication $+-- deletePlatformApplication+--+-- , testListPlatformApplications $+-- listPlatformApplications+--+-- , testSetTopicAttributes $+-- setTopicAttributes+--+-- , testGetEndpointAttributes $+-- getEndpointAttributes+--+-- , testAddPermission $+-- addPermission+--+-- , testGetSubscriptionAttributes $+-- getSubscriptionAttributes+--+-- , testListSubscriptions $+-- listSubscriptions+--+-- , testCreateTopic $+-- createTopic+--+-- , testSubscribe $+-- subscribe+--+-- , testUnsubscribe $+-- unsubscribe+--+-- , testSetEndpointAttributes $+-- setEndpointAttributes+--+-- , testSetSubscriptionAttributes $+-- setSubscriptionAttributes+--+-- , testConfirmSubscription $+-- confirmSubscription+--+-- , testPublish $+-- publish+--+-- ]++-- , testGroup "response"+-- [ testDeleteEndpointResponse $+-- deleteEndpointResponse+--+-- , testRemovePermissionResponse $+-- removePermissionResponse+--+-- , testSetPlatformApplicationAttributesResponse $+-- setPlatformApplicationAttributesResponse+--+-- , testCreatePlatformEndpointResponse $+-- createPlatformEndpointResponse+--+-- , testListSubscriptionsByTopicResponse $+-- listSubscriptionsByTopicResponse+--+-- , testGetTopicAttributesResponse $+-- getTopicAttributesResponse+--+-- , testDeleteTopicResponse $+-- deleteTopicResponse+--+-- , testListTopicsResponse $+-- listTopicsResponse+--+-- , testCreatePlatformApplicationResponse $+-- createPlatformApplicationResponse+--+-- , testListEndpointsByPlatformApplicationResponse $+-- listEndpointsByPlatformApplicationResponse+--+-- , testGetPlatformApplicationAttributesResponse $+-- getPlatformApplicationAttributesResponse+--+-- , testDeletePlatformApplicationResponse $+-- deletePlatformApplicationResponse+--+-- , testListPlatformApplicationsResponse $+-- listPlatformApplicationsResponse+--+-- , testSetTopicAttributesResponse $+-- setTopicAttributesResponse+--+-- , testGetEndpointAttributesResponse $+-- getEndpointAttributesResponse+--+-- , testAddPermissionResponse $+-- addPermissionResponse+--+-- , testGetSubscriptionAttributesResponse $+-- getSubscriptionAttributesResponse+--+-- , testListSubscriptionsResponse $+-- listSubscriptionsResponse+--+-- , testCreateTopicResponse $+-- createTopicResponse+--+-- , testSubscribeResponse $+-- subscribeResponse+--+-- , testUnsubscribeResponse $+-- unsubscribeResponse+--+-- , testSetEndpointAttributesResponse $+-- setEndpointAttributesResponse+--+-- , testSetSubscriptionAttributesResponse $+-- setSubscriptionAttributesResponse+--+-- , testConfirmSubscriptionResponse $+-- confirmSubscriptionResponse+--+-- , testPublishResponse $+-- publishResponse+--+-- ]+-- ]++-- Requests++testDeleteEndpoint :: DeleteEndpoint -> TestTree+testDeleteEndpoint = req+ "DeleteEndpoint"+ "fixture/DeleteEndpoint"++testRemovePermission :: RemovePermission -> TestTree+testRemovePermission = req+ "RemovePermission"+ "fixture/RemovePermission"++testSetPlatformApplicationAttributes :: SetPlatformApplicationAttributes -> TestTree+testSetPlatformApplicationAttributes = req+ "SetPlatformApplicationAttributes"+ "fixture/SetPlatformApplicationAttributes"++testCreatePlatformEndpoint :: CreatePlatformEndpoint -> TestTree+testCreatePlatformEndpoint = req+ "CreatePlatformEndpoint"+ "fixture/CreatePlatformEndpoint"++testListSubscriptionsByTopic :: ListSubscriptionsByTopic -> TestTree+testListSubscriptionsByTopic = req+ "ListSubscriptionsByTopic"+ "fixture/ListSubscriptionsByTopic"++testGetTopicAttributes :: GetTopicAttributes -> TestTree+testGetTopicAttributes = req+ "GetTopicAttributes"+ "fixture/GetTopicAttributes"++testDeleteTopic :: DeleteTopic -> TestTree+testDeleteTopic = req+ "DeleteTopic"+ "fixture/DeleteTopic"++testListTopics :: ListTopics -> TestTree+testListTopics = req+ "ListTopics"+ "fixture/ListTopics"++testCreatePlatformApplication :: CreatePlatformApplication -> TestTree+testCreatePlatformApplication = req+ "CreatePlatformApplication"+ "fixture/CreatePlatformApplication"++testListEndpointsByPlatformApplication :: ListEndpointsByPlatformApplication -> TestTree+testListEndpointsByPlatformApplication = req+ "ListEndpointsByPlatformApplication"+ "fixture/ListEndpointsByPlatformApplication"++testGetPlatformApplicationAttributes :: GetPlatformApplicationAttributes -> TestTree+testGetPlatformApplicationAttributes = req+ "GetPlatformApplicationAttributes"+ "fixture/GetPlatformApplicationAttributes"++testDeletePlatformApplication :: DeletePlatformApplication -> TestTree+testDeletePlatformApplication = req+ "DeletePlatformApplication"+ "fixture/DeletePlatformApplication"++testListPlatformApplications :: ListPlatformApplications -> TestTree+testListPlatformApplications = req+ "ListPlatformApplications"+ "fixture/ListPlatformApplications"++testSetTopicAttributes :: SetTopicAttributes -> TestTree+testSetTopicAttributes = req+ "SetTopicAttributes"+ "fixture/SetTopicAttributes"++testGetEndpointAttributes :: GetEndpointAttributes -> TestTree+testGetEndpointAttributes = req+ "GetEndpointAttributes"+ "fixture/GetEndpointAttributes"++testAddPermission :: AddPermission -> TestTree+testAddPermission = req+ "AddPermission"+ "fixture/AddPermission"++testGetSubscriptionAttributes :: GetSubscriptionAttributes -> TestTree+testGetSubscriptionAttributes = req+ "GetSubscriptionAttributes"+ "fixture/GetSubscriptionAttributes"++testListSubscriptions :: ListSubscriptions -> TestTree+testListSubscriptions = req+ "ListSubscriptions"+ "fixture/ListSubscriptions"++testCreateTopic :: CreateTopic -> TestTree+testCreateTopic = req+ "CreateTopic"+ "fixture/CreateTopic"++testSubscribe :: Subscribe -> TestTree+testSubscribe = req+ "Subscribe"+ "fixture/Subscribe"++testUnsubscribe :: Unsubscribe -> TestTree+testUnsubscribe = req+ "Unsubscribe"+ "fixture/Unsubscribe"++testSetEndpointAttributes :: SetEndpointAttributes -> TestTree+testSetEndpointAttributes = req+ "SetEndpointAttributes"+ "fixture/SetEndpointAttributes"++testSetSubscriptionAttributes :: SetSubscriptionAttributes -> TestTree+testSetSubscriptionAttributes = req+ "SetSubscriptionAttributes"+ "fixture/SetSubscriptionAttributes"++testConfirmSubscription :: ConfirmSubscription -> TestTree+testConfirmSubscription = req+ "ConfirmSubscription"+ "fixture/ConfirmSubscription"++testPublish :: Publish -> TestTree+testPublish = req+ "Publish"+ "fixture/Publish"++-- Responses++testDeleteEndpointResponse :: DeleteEndpointResponse -> TestTree+testDeleteEndpointResponse = res+ "DeleteEndpointResponse"+ "fixture/DeleteEndpointResponse"+ (Proxy :: Proxy DeleteEndpoint)++testRemovePermissionResponse :: RemovePermissionResponse -> TestTree+testRemovePermissionResponse = res+ "RemovePermissionResponse"+ "fixture/RemovePermissionResponse"+ (Proxy :: Proxy RemovePermission)++testSetPlatformApplicationAttributesResponse :: SetPlatformApplicationAttributesResponse -> TestTree+testSetPlatformApplicationAttributesResponse = res+ "SetPlatformApplicationAttributesResponse"+ "fixture/SetPlatformApplicationAttributesResponse"+ (Proxy :: Proxy SetPlatformApplicationAttributes)++testCreatePlatformEndpointResponse :: CreatePlatformEndpointResponse -> TestTree+testCreatePlatformEndpointResponse = res+ "CreatePlatformEndpointResponse"+ "fixture/CreatePlatformEndpointResponse"+ (Proxy :: Proxy CreatePlatformEndpoint)++testListSubscriptionsByTopicResponse :: ListSubscriptionsByTopicResponse -> TestTree+testListSubscriptionsByTopicResponse = res+ "ListSubscriptionsByTopicResponse"+ "fixture/ListSubscriptionsByTopicResponse"+ (Proxy :: Proxy ListSubscriptionsByTopic)++testGetTopicAttributesResponse :: GetTopicAttributesResponse -> TestTree+testGetTopicAttributesResponse = res+ "GetTopicAttributesResponse"+ "fixture/GetTopicAttributesResponse"+ (Proxy :: Proxy GetTopicAttributes)++testDeleteTopicResponse :: DeleteTopicResponse -> TestTree+testDeleteTopicResponse = res+ "DeleteTopicResponse"+ "fixture/DeleteTopicResponse"+ (Proxy :: Proxy DeleteTopic)++testListTopicsResponse :: ListTopicsResponse -> TestTree+testListTopicsResponse = res+ "ListTopicsResponse"+ "fixture/ListTopicsResponse"+ (Proxy :: Proxy ListTopics)++testCreatePlatformApplicationResponse :: CreatePlatformApplicationResponse -> TestTree+testCreatePlatformApplicationResponse = res+ "CreatePlatformApplicationResponse"+ "fixture/CreatePlatformApplicationResponse"+ (Proxy :: Proxy CreatePlatformApplication)++testListEndpointsByPlatformApplicationResponse :: ListEndpointsByPlatformApplicationResponse -> TestTree+testListEndpointsByPlatformApplicationResponse = res+ "ListEndpointsByPlatformApplicationResponse"+ "fixture/ListEndpointsByPlatformApplicationResponse"+ (Proxy :: Proxy ListEndpointsByPlatformApplication)++testGetPlatformApplicationAttributesResponse :: GetPlatformApplicationAttributesResponse -> TestTree+testGetPlatformApplicationAttributesResponse = res+ "GetPlatformApplicationAttributesResponse"+ "fixture/GetPlatformApplicationAttributesResponse"+ (Proxy :: Proxy GetPlatformApplicationAttributes)++testDeletePlatformApplicationResponse :: DeletePlatformApplicationResponse -> TestTree+testDeletePlatformApplicationResponse = res+ "DeletePlatformApplicationResponse"+ "fixture/DeletePlatformApplicationResponse"+ (Proxy :: Proxy DeletePlatformApplication)++testListPlatformApplicationsResponse :: ListPlatformApplicationsResponse -> TestTree+testListPlatformApplicationsResponse = res+ "ListPlatformApplicationsResponse"+ "fixture/ListPlatformApplicationsResponse"+ (Proxy :: Proxy ListPlatformApplications)++testSetTopicAttributesResponse :: SetTopicAttributesResponse -> TestTree+testSetTopicAttributesResponse = res+ "SetTopicAttributesResponse"+ "fixture/SetTopicAttributesResponse"+ (Proxy :: Proxy SetTopicAttributes)++testGetEndpointAttributesResponse :: GetEndpointAttributesResponse -> TestTree+testGetEndpointAttributesResponse = res+ "GetEndpointAttributesResponse"+ "fixture/GetEndpointAttributesResponse"+ (Proxy :: Proxy GetEndpointAttributes)++testAddPermissionResponse :: AddPermissionResponse -> TestTree+testAddPermissionResponse = res+ "AddPermissionResponse"+ "fixture/AddPermissionResponse"+ (Proxy :: Proxy AddPermission)++testGetSubscriptionAttributesResponse :: GetSubscriptionAttributesResponse -> TestTree+testGetSubscriptionAttributesResponse = res+ "GetSubscriptionAttributesResponse"+ "fixture/GetSubscriptionAttributesResponse"+ (Proxy :: Proxy GetSubscriptionAttributes)++testListSubscriptionsResponse :: ListSubscriptionsResponse -> TestTree+testListSubscriptionsResponse = res+ "ListSubscriptionsResponse"+ "fixture/ListSubscriptionsResponse"+ (Proxy :: Proxy ListSubscriptions)++testCreateTopicResponse :: CreateTopicResponse -> TestTree+testCreateTopicResponse = res+ "CreateTopicResponse"+ "fixture/CreateTopicResponse"+ (Proxy :: Proxy CreateTopic)++testSubscribeResponse :: SubscribeResponse -> TestTree+testSubscribeResponse = res+ "SubscribeResponse"+ "fixture/SubscribeResponse"+ (Proxy :: Proxy Subscribe)++testUnsubscribeResponse :: UnsubscribeResponse -> TestTree+testUnsubscribeResponse = res+ "UnsubscribeResponse"+ "fixture/UnsubscribeResponse"+ (Proxy :: Proxy Unsubscribe)++testSetEndpointAttributesResponse :: SetEndpointAttributesResponse -> TestTree+testSetEndpointAttributesResponse = res+ "SetEndpointAttributesResponse"+ "fixture/SetEndpointAttributesResponse"+ (Proxy :: Proxy SetEndpointAttributes)++testSetSubscriptionAttributesResponse :: SetSubscriptionAttributesResponse -> TestTree+testSetSubscriptionAttributesResponse = res+ "SetSubscriptionAttributesResponse"+ "fixture/SetSubscriptionAttributesResponse"+ (Proxy :: Proxy SetSubscriptionAttributes)++testConfirmSubscriptionResponse :: ConfirmSubscriptionResponse -> TestTree+testConfirmSubscriptionResponse = res+ "ConfirmSubscriptionResponse"+ "fixture/ConfirmSubscriptionResponse"+ (Proxy :: Proxy ConfirmSubscription)++testPublishResponse :: PublishResponse -> TestTree+testPublishResponse = res+ "PublishResponse"+ "fixture/PublishResponse"+ (Proxy :: Proxy Publish)
+ test/Test/AWS/SNS.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE OverloadedStrings #-}++-- Module : Test.AWS.SNS+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++module Test.AWS.SNS+ ( tests+ , fixtures+ ) where++import Network.AWS.SNS+import Test.AWS.Gen.SNS+import Test.Tasty++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/SNS/Internal.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE OverloadedStrings #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Test.AWS.SNS.Internal+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++module Test.AWS.SNS.Internal where++import Test.AWS.Prelude