Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Registers a device to receive push sync notifications.
This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.
Synopsis
- data RegisterDevice = RegisterDevice' {
- identityPoolId :: Text
- identityId :: Text
- platform :: Platform
- token :: Text
- newRegisterDevice :: Text -> Text -> Platform -> Text -> RegisterDevice
- registerDevice_identityPoolId :: Lens' RegisterDevice Text
- registerDevice_identityId :: Lens' RegisterDevice Text
- registerDevice_platform :: Lens' RegisterDevice Platform
- registerDevice_token :: Lens' RegisterDevice Text
- data RegisterDeviceResponse = RegisterDeviceResponse' {
- deviceId :: Maybe Text
- httpStatus :: Int
- newRegisterDeviceResponse :: Int -> RegisterDeviceResponse
- registerDeviceResponse_deviceId :: Lens' RegisterDeviceResponse (Maybe Text)
- registerDeviceResponse_httpStatus :: Lens' RegisterDeviceResponse Int
Creating a Request
data RegisterDevice Source #
A request to RegisterDevice.
See: newRegisterDevice
smart constructor.
RegisterDevice' | |
|
Instances
:: Text | |
-> Text | |
-> Platform | |
-> Text | |
-> RegisterDevice |
Create a value of RegisterDevice
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:identityPoolId:RegisterDevice'
, registerDevice_identityPoolId
- A name-spaced GUID (for example,
us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. Here, the ID of the pool that the identity belongs to.
$sel:identityId:RegisterDevice'
, registerDevice_identityId
- The unique ID for this identity.
$sel:platform:RegisterDevice'
, registerDevice_platform
- The SNS platform type (e.g. GCM, SDM, APNS, APNS_SANDBOX).
$sel:token:RegisterDevice'
, registerDevice_token
- The push token.
Request Lenses
registerDevice_identityPoolId :: Lens' RegisterDevice Text Source #
A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. Here, the ID of the pool that the identity belongs to.
registerDevice_identityId :: Lens' RegisterDevice Text Source #
The unique ID for this identity.
registerDevice_platform :: Lens' RegisterDevice Platform Source #
The SNS platform type (e.g. GCM, SDM, APNS, APNS_SANDBOX).
registerDevice_token :: Lens' RegisterDevice Text Source #
The push token.
Destructuring the Response
data RegisterDeviceResponse Source #
Response to a RegisterDevice request.
See: newRegisterDeviceResponse
smart constructor.
RegisterDeviceResponse' | |
|
Instances
newRegisterDeviceResponse Source #
Create a value of RegisterDeviceResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:deviceId:RegisterDeviceResponse'
, registerDeviceResponse_deviceId
- The unique ID generated for this device by Cognito.
$sel:httpStatus:RegisterDeviceResponse'
, registerDeviceResponse_httpStatus
- The response's http status code.
Response Lenses
registerDeviceResponse_deviceId :: Lens' RegisterDeviceResponse (Maybe Text) Source #
The unique ID generated for this device by Cognito.
registerDeviceResponse_httpStatus :: Lens' RegisterDeviceResponse Int Source #
The response's http status code.