endpoint_attributes
Creates, updates, deletes, gets or lists an endpoint_attributes resource.
Overview
| Name | endpoint_attributes |
| Type | Resource |
| Id | aws.sns.endpoint_attributes |
Fields
The following fields are returned by SELECT queries:
- get_endpoint_attributes
| Name | Datatype | Description |
|---|---|---|
attributes | string | 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. The device token for the iOS platform is returned in lowercase. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_endpoint_attributes | select | EndpointArn, region | Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS. For more information, see Using Amazon SNS Mobile Push Notifications. | |
set_endpoint_attributes | update | EndpointArn, region | Attributes | Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS. For more information, see Using Amazon SNS Mobile Push Notifications. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
EndpointArn | string | EndpointArn used for SetEndpointAttributes action. |
region | string | AWS region (default: us-east-1) |
Attributes | object | 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. |
SELECT examples
- get_endpoint_attributes
Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS. For more information, see Using Amazon SNS Mobile Push Notifications.
SELECT
attributes
FROM aws.sns.endpoint_attributes
WHERE EndpointArn = '{{ EndpointArn }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- set_endpoint_attributes
Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS. For more information, see Using Amazon SNS Mobile Push Notifications.
UPDATE aws.sns.endpoint_attributes
SET
-- No updatable properties
WHERE
EndpointArn = '{{ EndpointArn }}' --required
AND region = '{{ region }}' --required
AND Attributes = '{{ Attributes}}';