Skip to content

/AWS1/IF_CHI=>REGISTERAPPINSTANCEUSERENDPT()

About RegisterAppInstanceUserEndpoint

Registers an endpoint under an Amazon Chime AppInstanceUser. The endpoint receives messages for a user. For push notifications, the endpoint is a mobile device used to receive mobile push notifications for a user.

Method Signature

METHODS /AWS1/IF_CHI~REGISTERAPPINSTANCEUSERENDPT
  IMPORTING
    !IV_APPINSTANCEUSERARN TYPE /AWS1/CHISENSITIVECHIMEARN OPTIONAL
    !IV_NAME TYPE /AWS1/CHISENSITIVESTRING1600 OPTIONAL
    !IV_TYPE TYPE /AWS1/CHIAPPINSTUSERENDPTTYPE OPTIONAL
    !IV_RESOURCEARN TYPE /AWS1/CHICHIMEARN OPTIONAL
    !IO_ENDPOINTATTRIBUTES TYPE REF TO /AWS1/CL_CHIENDPOINTATTRIBUTES OPTIONAL
    !IV_CLIENTREQUESTTOKEN TYPE /AWS1/CHICLIENTREQUESTTOKEN OPTIONAL
    !IV_ALLOWMESSAGES TYPE /AWS1/CHIALLOWMESSAGES OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_chiregappinstuseren01
  RAISING
    /AWS1/CX_CHIBADREQUESTEX
    /AWS1/CX_CHICONFLICTEXCEPTION
    /AWS1/CX_CHIFORBIDDENEXCEPTION
    /AWS1/CX_CHIRESRCLIMITEXCDEX
    /AWS1/CX_CHISERVICEFAILUREEX
    /AWS1/CX_CHISERVICEUNAVAILEX
    /AWS1/CX_CHITHROTTLEDCLIENTEX
    /AWS1/CX_CHIUNAUTHDCLIENTEX
    /AWS1/CX_CHICLIENTEXC
    /AWS1/CX_CHISERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_appinstanceuserarn TYPE /AWS1/CHISENSITIVECHIMEARN /AWS1/CHISENSITIVECHIMEARN

The ARN of the AppInstanceUser.

iv_type TYPE /AWS1/CHIAPPINSTUSERENDPTTYPE /AWS1/CHIAPPINSTUSERENDPTTYPE

The type of the AppInstanceUserEndpoint. Supported types:

  • APNS: The mobile notification service for an Apple device.

  • APNS_SANDBOX: The sandbox environment of the mobile notification service for an Apple device.

  • GCM: The mobile notification service for an Android device.

Populate the ResourceArn value of each type as PinpointAppArn.

iv_resourcearn TYPE /AWS1/CHICHIMEARN /AWS1/CHICHIMEARN

The ARN of the resource to which the endpoint belongs.

io_endpointattributes TYPE REF TO /AWS1/CL_CHIENDPOINTATTRIBUTES /AWS1/CL_CHIENDPOINTATTRIBUTES

The attributes of an Endpoint.

iv_clientrequesttoken TYPE /AWS1/CHICLIENTREQUESTTOKEN /AWS1/CHICLIENTREQUESTTOKEN

The unique ID assigned to the request. Use different tokens to register other endpoints.

Optional arguments:

iv_name TYPE /AWS1/CHISENSITIVESTRING1600 /AWS1/CHISENSITIVESTRING1600

The name of the AppInstanceUserEndpoint.

iv_allowmessages TYPE /AWS1/CHIALLOWMESSAGES /AWS1/CHIALLOWMESSAGES

Boolean that controls whether the AppInstanceUserEndpoint is opted in to receive messages. ALL indicates the endpoint receives all messages. NONE indicates the endpoint receives no messages.

RETURNING

oo_output TYPE REF TO /aws1/cl_chiregappinstuseren01 /AWS1/CL_CHIREGAPPINSTUSEREN01

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->registerappinstanceuserendpt(
  io_endpointattributes = new /aws1/cl_chiendpointattributes(
    iv_devicetoken = |string|
    iv_voipdevicetoken = |string|
  )
  iv_allowmessages = |string|
  iv_appinstanceuserarn = |string|
  iv_clientrequesttoken = |string|
  iv_name = |string|
  iv_resourcearn = |string|
  iv_type = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_chimearn = lo_result->get_appinstanceuserarn( ).
  lv_string64 = lo_result->get_endpointid( ).
ENDIF.