:doc:`GlobalAccelerator <../../globalaccelerator>` / Client / create_custom_routing_listener

******************************
create_custom_routing_listener
******************************



.. py:method:: GlobalAccelerator.Client.create_custom_routing_listener(**kwargs)

  

  Create a listener to process inbound connections from clients to a custom routing accelerator. Connections arrive to assigned static IP addresses on the port range that you specify.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateCustomRoutingListener>`_  


  **Request Syntax**
  ::

    response = client.create_custom_routing_listener(
        AcceleratorArn='string',
        PortRanges=[
            {
                'FromPort': 123,
                'ToPort': 123
            },
        ],
        IdempotencyToken='string'
    )
    
  :type AcceleratorArn: string
  :param AcceleratorArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the accelerator for a custom routing listener.

    

  
  :type PortRanges: list
  :param PortRanges: **[REQUIRED]** 

    The port range to support for connections from clients to your accelerator.

     

    Separately, you set port ranges for endpoints. For more information, see `About endpoints for custom routing accelerators <https://docs.aws.amazon.com/global-accelerator/latest/dg/about-custom-routing-endpoints.html>`__.

    

  
    - *(dict) --* 

      A complex type for a range of ports for a listener.

      

    
      - **FromPort** *(integer) --* 

        The first port in the range of ports, inclusive.

        

      
      - **ToPort** *(integer) --* 

        The last port in the range of ports, inclusive.

        

      
    

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

    A unique, case-sensitive identifier that you provide to ensure the idempotency—that is, the uniqueness—of the request.

    This field is autopopulated if not provided.

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

    
    ::

      {
          'Listener': {
              'ListenerArn': 'string',
              'PortRanges': [
                  {
                      'FromPort': 123,
                      'ToPort': 123
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Listener** *(dict) --* 

        The listener that you've created for a custom routing accelerator.

        
        

        - **ListenerArn** *(string) --* 

          The Amazon Resource Name (ARN) of the listener.

          
        

        - **PortRanges** *(list) --* 

          The port range to support for connections from clients to your accelerator.

           

          Separately, you set port ranges for endpoints. For more information, see `About endpoints for custom routing accelerators <https://docs.aws.amazon.com/global-accelerator/latest/dg/about-custom-routing-endpoints.html>`__.

          
          

          - *(dict) --* 

            A complex type for a range of ports for a listener.

            
            

            - **FromPort** *(integer) --* 

              The first port in the range of ports, inclusive.

              
            

            - **ToPort** *(integer) --* 

              The last port in the range of ports, inclusive.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`GlobalAccelerator.Client.exceptions.InvalidArgumentException`

  
  *   :py:class:`GlobalAccelerator.Client.exceptions.AcceleratorNotFoundException`

  
  *   :py:class:`GlobalAccelerator.Client.exceptions.InvalidPortRangeException`

  
  *   :py:class:`GlobalAccelerator.Client.exceptions.InternalServiceErrorException`

  
  *   :py:class:`GlobalAccelerator.Client.exceptions.LimitExceededException`

  