:doc:`ChimeSDKIdentity <../../chime-sdk-identity>` / Client / register_app_instance_user_endpoint

***********************************
register_app_instance_user_endpoint
***********************************



.. py:method:: ChimeSDKIdentity.Client.register_app_instance_user_endpoint(**kwargs)

  

  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.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-identity-2021-04-20/RegisterAppInstanceUserEndpoint>`_  


  **Request Syntax**
  ::

    response = client.register_app_instance_user_endpoint(
        AppInstanceUserArn='string',
        Name='string',
        Type='APNS'|'APNS_SANDBOX'|'GCM',
        ResourceArn='string',
        EndpointAttributes={
            'DeviceToken': 'string',
            'VoipDeviceToken': 'string'
        },
        ClientRequestToken='string',
        AllowMessages='ALL'|'NONE'
    )
    
  :type AppInstanceUserArn: string
  :param AppInstanceUserArn: **[REQUIRED]** 

    The ARN of the ``AppInstanceUser``.

    

  
  :type Name: string
  :param Name: 

    The name of the ``AppInstanceUserEndpoint``.

    

  
  :type Type: string
  :param Type: **[REQUIRED]** 

    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``.

    

  
  :type ResourceArn: string
  :param ResourceArn: **[REQUIRED]** 

    The ARN of the resource to which the endpoint belongs.

    

  
  :type EndpointAttributes: dict
  :param EndpointAttributes: **[REQUIRED]** 

    The attributes of an ``Endpoint``.

    

  
    - **DeviceToken** *(string) --* **[REQUIRED]** 

      The device token for the GCM, APNS, and APNS_SANDBOX endpoint types.

      

    
    - **VoipDeviceToken** *(string) --* 

      The VOIP device token for the APNS and APNS_SANDBOX endpoint types.

      

    
  
  :type ClientRequestToken: string
  :param ClientRequestToken: **[REQUIRED]** 

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

    This field is autopopulated if not provided.

  
  :type AllowMessages: string
  :param AllowMessages: 

    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.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'AppInstanceUserArn': 'string',
          'EndpointId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **AppInstanceUserArn** *(string) --* 

        The ARN of the ``AppInstanceUser``.

        
      

      - **EndpointId** *(string) --* 

        The unique identifier of the ``AppInstanceUserEndpoint``.

        
  
  **Exceptions**
  
  *   :py:class:`ChimeSDKIdentity.Client.exceptions.BadRequestException`

  
  *   :py:class:`ChimeSDKIdentity.Client.exceptions.ConflictException`

  
  *   :py:class:`ChimeSDKIdentity.Client.exceptions.ForbiddenException`

  
  *   :py:class:`ChimeSDKIdentity.Client.exceptions.ResourceLimitExceededException`

  
  *   :py:class:`ChimeSDKIdentity.Client.exceptions.ThrottledClientException`

  
  *   :py:class:`ChimeSDKIdentity.Client.exceptions.UnauthorizedClientException`

  
  *   :py:class:`ChimeSDKIdentity.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`ChimeSDKIdentity.Client.exceptions.ServiceFailureException`

  